@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00bcd4;
    --secondary-color: #00acc1;
    --dark-color: #0a2540;
    --navy-color: #0d3b66;
    --light-color: #ffffff;
    --text-color: #2c3e50;
    --border-color: #e8ecef;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --accent-turquoise: #00bcd4;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    min-height: 110px;
}

.logo {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.logo-img {
    height: 150px;
    width: auto;
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.3s, filter 0.3s;
    display: block;
    margin: 0;
    padding: 0;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo h1 {
    color: var(--dark-color);
    font-size: 1.8rem;
    cursor: pointer;
}

.nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.account-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
    border: none;
}

.account-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.account-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.account-btn:hover i {
    transform: scale(1.1);
}

.account-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.cart-btn {
    background-color: var(--navy-color);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    position: relative;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
    border: none;
}

.cart-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Support image-based cart icon in header */
.cart-btn .cart-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.cart-count-badge {
    background-color: var(--accent-turquoise);
    color: var(--navy-color);
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    position: absolute;
    top: -8px;
    right: -8px;
    border: 2px solid #fff;
    padding: 0 0.3rem;
    box-sizing: content-box;
}

.cart-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.cart-btn:hover i {
    transform: scale(1.1);
}

.cart-btn:hover .cart-img {
    transform: scale(1.05);
}

.cart-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: var(--navy-color);
    z-index: 2000;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
}

.mobile-bottom-nav .mobile-bottom-nav-inner {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
}

.mobile-bottom-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    height: 100%;
}

.mobile-bottom-nav a i {
    font-size: 1.15rem;
}

.mobile-bottom-nav a.active {
    color: var(--accent-turquoise);
}

.mobile-bottom-nav a.active i {
    transform: translateY(-1px);
}

.scroll-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 5.5rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2100;
}

.scroll-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-4px);
}

.scroll-to-top i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .scroll-to-top {
        right: 1rem;
        bottom: 5.5rem;
    }
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--dark-color), var(--navy-color));
    color: white;
    padding: 2.2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, var(--primary-color) 100%);
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.1rem;
    margin-bottom: 0.6rem;
}

.hero-content p {
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    opacity: 0.9;
}

.btn-primary { 
    background-color: var(--navy-color);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.4);
    background-color: var(--secondary-color);
}

/* ===== Hero Search Bar ===== */
.hero-search-form {
    max-width: 500px;
    margin: 1rem auto;
    width: 100%;
}

.hero-search-inner {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.3rem 0.3rem 0.3rem 0.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-search-inner:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 188, 212, 0.3);
}

.hero-search-input {
    flex: 1 1 auto;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.7rem 0.8rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-color);
    direction: rtl;
}

.hero-search-input::placeholder {
    color: #94a3b8;
}

.hero-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    outline: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 50px;
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 188, 212, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.hero-search-btn i {
    font-size: 0.9rem;
}

.hero-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.5);
}

.hero-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 188, 212, 0.3);
}

/* Responsive for hero search */
@media (max-width: 768px) {
    .hero-search-form {
        max-width: 100%;
        margin: 1.2rem 0.5rem;
    }
    .hero-search-inner {
        padding: 0.25rem 0.25rem 0.25rem 0.5rem;
    }
    .hero-search-input {
        padding: 0.6rem 0.5rem;
        font-size: 0.95rem;
    }
    .hero-search-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .hero-search-btn span {
        display: none;
    }
    .hero-search-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-search-form {
        margin: 1rem 0.3rem;
    }
    .hero-search-inner {
        border-radius: 40px;
    }
    .hero-search-input {
        padding: 0.5rem 0.4rem;
        font-size: 0.9rem;
    }
    .hero-search-btn {
        padding: 0.5rem 0.9rem;
        border-radius: 35px;
    }
    .hero-search-btn i {
        font-size: 0.95rem;
    }
}

/* ===== Categories Section ===== */
.categories-section {
    padding: 1.8rem 0 0.6rem;
}

.categories-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* ===== Offers Section ===== */
.offers-section {
    padding: 2rem 0;
}

.offers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.offers-header .section-title {
    margin-bottom: 0;
}

.btn-view-all-offers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0;
    background: none;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: none;
    transition: color 0.2s ease;
}

.btn-view-all-offers i {
    font-size: 0.8rem;
}

.btn-view-all-offers:hover {
    color: var(--secondary-color);
    transform: none;
    box-shadow: none;
    background: none;
}

.offers-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.offer-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 160px;
}

.offer-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.offer-card-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.offer-card-body {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.offer-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    line-height: 1.3;
}

.offer-card-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
}

/* ===== Products Section ===== */
.products-section {
    padding: 2.8rem 0;
}

.category-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.1rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    scroll-snap-align: start;
    flex: 0 0 auto;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 188, 212, 0.35);
}

.category-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 188, 212, 0.12);
    color: var(--navy-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.category-icon i {
    font-size: 1.1rem;
}

.category-name {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.mobile-fab-cart {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fff;
    color: var(--navy-color);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    z-index: 2500;
    text-decoration: none;
    align-items: center;
    justify-content: center;
}

.mobile-fab-cart i {
    font-size: 1.1rem;
}

.mobile-fab-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, var(--dark-color), var(--navy-color));
    z-index: 2400;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.mobile-topbar-inner {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ===== Mobile Drawer & Overlay (legal/info menu) ===== */

.mobile-menu-toggle {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    cursor: pointer;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
    z-index: 998;
}

.mobile-menu-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 78%;
    max-width: 320px;
    background: #ffffff;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.25s ease-out;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.mobile-menu-drawer.is-open {
    transform: translateX(0);
}

body.mobile-menu-open {
    overflow: hidden;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-title {
    font-size: 1rem;
    font-weight: 600;
}

.mobile-menu-close {
    border: none;
    background: transparent;
    color: #222;
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    cursor: pointer;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
}

.mobile-menu-list li {
    border-bottom: 1px solid #f3f3f3;
}

.mobile-menu-list a {
    display: block;
    padding: 12px 20px;
    font-size: 0.95rem;
    color: #222;
    text-decoration: none;
}

.mobile-menu-list a:hover {
    background-color: #f7f7f7;
}

.mobile-menu-list a:active {
    background-color: rgba(0, 188, 212, 0.08);
}

@media (min-width: 992px) {
    .mobile-menu-toggle,
    .mobile-menu-overlay,
    .mobile-menu-drawer {
        display: none;
    }
}

.mobile-topbar-back {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

.mobile-topbar-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

/* وضع زر القائمة في يمين الهيدر للجوال */
.mobile-menu-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-topbar-logo img {
    height: 34px;
    width: auto;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.section-title {
    text-align: right;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 1.4rem;
    }
}

.section-title::after {
    display: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* ===== Product Card ===== */
.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 188, 212, 0.15);
    border-color: var(--primary-color);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.fav-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(15, 23, 42, 0.70);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fav-btn:hover {
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    border-color: rgba(0, 188, 212, 0.35);
}

.fav-btn:active {
    transform: translateY(1px);
}

.fav-btn.is-active {
    color: #e11d48;
    border-color: rgba(225, 29, 72, 0.25);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-description {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* في كروت الشبكات نعرض الوصف كسطر واحد مختصر تحت العنوان */
.products-grid .product-description {
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 1; /* أقصى شيء سطر واحد داخل الكرت */
    -moz-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.btn-add-cart {
    background-color: var(--navy-color);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-add-cart:hover {
    background-color: var(--dark-color);
    transform: scale(1.05);
}

.btn-add-cart:active {
    transform: scale(0.98);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--navy-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent-turquoise);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--accent-turquoise);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ===== Notification Toast ===== */
.notification {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translate(-50%, 120%);
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 5000;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
}

.notification.show {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .header {
        padding: 0.6rem 0;
    }

    .header .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        min-height: auto;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    .logo-img {
        height: 75px;
    }

    .nav {
        flex-direction: row;
        gap: 0.8rem;
        justify-content: center;
        flex-wrap: wrap;
        order: 2;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }

    .header-actions {
        order: 3;
        margin-top: 0.5rem;
        gap: 0.8rem;
    }

    .account-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }

    .account-btn span {
        display: none;
    }

    .cart-icon {
        order: 3;
        margin-top: 0.5rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 64px;
        padding-top: calc(56px + env(safe-area-inset-top));
    }

    .header,
    .footer {
        display: none;
    }

    .account-btn {
        display: none;
    }

    .mobile-bottom-nav {
        display: block;
    }

    .mobile-topbar {
        display: block;
        padding-top: env(safe-area-inset-top);
        height: calc(56px + env(safe-area-inset-top));
    }

    .mobile-topbar-logo img {
        height: 30px;
    }

    .mobile-fab-cart {
        top: calc(env(safe-area-inset-top) + 5px);
        left: 12px;
        width: 40px;
        height: 40px;
        border-radius: 14px;
        background: transparent;
        border: none;
        box-shadow: none;
        color: #fff;
    }

    .mobile-fab-cart i {
        font-size: 1.05rem;
    }

    .mobile-fab-badge {
        top: -6px;
        left: -6px;
        min-width: 20px;
        height: 20px;
        font-size: 0.72rem;
    }

    .mobile-fav-btn {
        top: 4px;
        left: 4px;
        width: 36px;
        height: 36px;
    }

    .hero {
        padding: 0.8rem 0 1rem;
        border-radius: 0 0 24px 24px;
    }

    .hero-content h2 {
        margin-bottom: 0.6rem;
        font-size: 1.35rem;
    }

    .hero .btn-primary {
        padding: 0.85rem 1.8rem;
        font-size: 1rem;
    }

    .mobile-summary-bar {
        bottom: 64px;
    }

    .logo-img {
        height: 65px;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.3rem 0;
    }

    .cart-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .products-grid,
    .favorites-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-image {
        height: 140px;
    }

    .fav-btn {
        top: 4px;
        left: 4px;
        width: 34px;
        height: 34px;
    }

    .fav-btn i {
        font-size: 0.85rem;
    }

    .product-info {
        padding: 0.7rem 0.75rem 0.9rem;
    }

    .product-title {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

    .product-description {
        display: none;
    }

    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 0.55rem;
    }

    .product-price {
        font-size: 1.05rem;
        text-align: center;
    }

    .btn-add-cart {
        width: 100%;
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }

    .categories-section {
        padding: 0.9rem 0 0.25rem;
    }

    .categories-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
    }

    .category-card {
        padding: 0;
        border-radius: 14px;
        gap: 6px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: none;
    }

    .category-icon {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: rgba(13, 59, 102, 0.08);
    }

    .category-name {
        font-size: 0.78rem;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .products-section {
        padding-top: 1.25rem;
    }

    .section-title {
        margin-bottom: 1.25rem;
    }

    .mobile-fab-cart {
        display: inline-flex;
    }

    /* Raise notification to clear mobile bottom nav and safe-area */
    .notification {
        bottom: calc(30px + 64px + env(safe-area-inset-bottom));
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Skeleton Loading ===== */
.skel {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400% 100%;
    animation: skel 1.4s ease infinite;
    display: block;
}

.skel-circle {
    border-radius: 50%;
}

@keyframes skel {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}
