/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PeydaWeb', 'Segoe UI', Tahoma, sans-serif;
}

body {
    background: #f5f6fa;
    color: #1a1a2e;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== FLASH MESSAGES ==================== */
.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid transparent;
    background: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    font-size: 14px;
}

.flash-message i {
    font-size: 18px;
    flex-shrink: 0;
}

.flash-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.flash-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.flash-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.flash-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* ==================== TOP BAR ==================== */
.top-bar {
    background: #0a0e27;
    color: #fff;
    font-size: 13px;
    padding: 10px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left i { color: #4d7cff; margin-inline-end: 8px; }
.top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}
.top-bar-right span {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
.divider { color: #444; }

/* ==================== HEADER ==================== */
.header {
    background: #fff;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}
.header .container {
    display: flex;
    align-items: center;
    gap: 30px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    direction: ltr;
}
.logo i {
    background: #2563eb;
    color: white;
    padding: 8px;
    border-radius: 8px;
    font-size: 18px;
}
.logo { color: #2563eb; }

.search-bar {
    flex: 1;
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 650px;
}
.search-bar input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    outline: none;
    font-size: 14px;
}
.search-bar select {
    border: none;
    border-inline-start: 1px solid #eee;
    padding: 0 16px;
    background: #fff;
    cursor: pointer;
    outline: none;
    font-size: 14px;
}
.search-bar button {
    background: #2563eb;
    border: none;
    color: white;
    padding: 0 22px;
    cursor: pointer;
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 25px;
    align-items: center;
}
.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}
.action-item i { font-size: 22px; color: #333; }
.action-item small { display: block; color: #777; font-size: 11px; }
.cart-item { position: relative; }
.cart-badge {
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    inset-inline-end: 35px;
}

/* ==================== NAV ==================== */
.nav {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}
.nav .container {
    display: flex;
    align-items: center;
    gap: 30px;
}
.categories-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    padding-inline-end: 25px;
    border-inline-end: 1px solid #eee;
}
.nav-links {
    display: flex;
    gap: 35px;
}
.nav-links a {
    font-size: 14px;
    color: #555;
    padding-bottom: 5px;
    font-weight: 500;
    transition: 0.2s;
}
.nav-links a:hover { color: #2563eb; }
.nav-links a.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transition: 0.2s;
}
.btn-primary:hover { background: #1d4ed8; }

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 1px solid #2563eb;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}
.btn-outline:hover {
    background: #2563eb;
    color: white;
}

/* ==================== PRODUCT CARD ==================== */
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: 0.2s;
}
.product-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.product-img {
    position: relative;
    background: #f8f9fc;
    padding: 25px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    color: white;
    font-weight: 500;
}
.badge.save { background: #10b981; }
.badge.new { background: #2563eb; }
.badge.hot { background: #ef4444; }

.wishlist-btn {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.wishlist-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.product-info { padding: 15px; }
.product-info h4 {
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
    line-height: 1.3;
    min-height: 36px;
}
.rating {
    color: #f59e0b;
    font-size: 12px;
    margin-bottom: 10px;
}
.rating span { color: #777; margin-inline-start: 5px; }
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price { font-size: 16px; font-weight: 700; }
.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    margin-inline-start: 5px;
}
.cart-btn {
    background: #2563eb;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
}

/* ==================== SECTION ==================== */
.section { margin-bottom: 40px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-header h2 { font-size: 22px; }
.section-header a {
    color: #2563eb;
    font-size: 14px;
    font-weight: 500;
}

/* ==================== FOOTER ==================== */
.footer {
    background: #0a0e27;
    color: #b8c5e0;
    padding: 50px 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.footer h4 {
    color: white;
    margin-bottom: 18px;
    font-size: 15px;
}
.footer ul li {
    margin-bottom: 10px;
    font-size: 13px;
    cursor: pointer;
}
.footer ul li:hover { color: white; }
.footer-bottom {
    border-top: 1px solid #1e2a4a;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* ==================== TABLETS ==================== */
@media (max-width: 968px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .top-bar-left { font-size: 11px; }
    .top-bar-right { gap: 10px; font-size: 11px; }
    .header .container { flex-wrap: wrap; }
    .search-bar { order: 3; width: 100%; max-width: 100%; }
}

/* ==================== MOBILE ==================== */
@media (max-width: 768px) {
    .nav .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .nav-links {
        flex-wrap: wrap;
        gap: 18px;
    }
    .header-actions { gap: 18px; }
}

@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .top-bar {
        padding: 8px 0;
    }
    .top-bar .container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .top-bar-left { font-size: 11px; }
    .top-bar-right { gap: 8px; font-size: 11px; flex-wrap: wrap; justify-content: center; }
    .top-bar-right .divider { display: none; }
    .header-actions { gap: 15px; }
    .header-actions span,
    .header-actions div:not(i) { display: none; }
    .header-actions .action-item i { font-size: 20px; }
}
