
:root {
    --primary-color: #019c5f; /* dark blue */
    --primary-dark: #2F4356; /* darker shade */
    --primary-light: #E3EAF1; /* light blue tint */
    --secondary-color: #E8843C;
    --text-dark: #2D3436;
    --text-gray: #636E72;
    --text-light: #B2BEC3;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E9ECEF;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --toast-duration: 1200ms;
    --accent-purple: #5e35b1;
    --star-gold: #F4B400;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Header */
.top-bar {
    background: var(--primary-color);
    padding: 8px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    position: relative;
}

    .top-bar .tb-viewport {
        overflow: hidden;
        width: 100%;
        direction: ltr;
        text-align: left;
    }

    .top-bar .tb-track {
        display: inline-flex;
        align-items: center;
        gap: 30px;
        white-space: nowrap;
        padding: 0; /* إزالة الهوامش لمنع الفراغ عند الالتفاف */
        animation: tbMarquee 18s linear infinite; /* احتياطي إذا عطّل JS */
        will-change: transform;
    }

    .top-bar .tb-item {
        margin: 0;
    }

    .top-bar .tb-sep {
        opacity: .8;
    }

    .top-bar:hover .tb-track {
        animation-play-state: paused;
    }

@keyframes tbMarquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.main-header {
    background: var(--bg-white);
    padding: 10px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Centered logo (independent of right/left header sides) */
.logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    pointer-events: auto;
    z-index: 2;
}

    .logo img {
        height: 50px;
        width: auto;
        max-width: 60vw; /* حماية من تجاوز العرض في الشاشات الصغيرة */
        display: block;
    }

@media (max-width: 768px) {
    .logo img {
        height: 50px;
    }

    .header-search-input {
        width: 180px;
    }

    .header-search-wrap {
        margin-right: 12px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 45px;
    }

    .header-search-input {
        width: 150px;
    }

    .header-search-wrap {
        margin-right: 14px;
    }
}

@media (max-width: 360px) {
    .header-search-input {
        width: 130px;
    }

    .header-search-wrap {
        margin-right: 16px;
    }
}

.logo-text {
    color: var(--text-dark);
}

    .logo-text h1 {
        font-size: 22px;
        font-weight: 700;
        color: var(--primary-color);
        margin: 0;
    }

    .logo-text span {
        font-size: 11px;
        color: var(--text-gray);
    }

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative; /* ensure above centered logo */
    z-index: 3;
}
/* Inline header search */
.header-search-wrap {
    display: none;
    align-items: center;
    gap: 6px;
    margin-inline-end: 8px;
    margin-right: 10px;
}

.header-search-input {
    width: 220px;
    height: 36px;
    border: 1px solid var(--primary-light);
    background: #F8FAFB;
    border-radius: 10px;
    padding: 0 10px;
    font-weight: 600;
    outline: none;
}

    .header-search-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(61, 85, 107, 0.18);
    }

.header-search-cancel {
    background: transparent;
    border: 0;
    color: #7f8c8d;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.header-icon {
    position: relative;
    color: var(--primary-color);
    font-size: 22px;
    text-decoration: none;
    transition: all 0.3s;
}

    .header-icon:hover {
        color: var(--primary-dark);
        transform: scale(1.1);
    }

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    display: none;
    line-height: 1; /* ضبط التموضع الرأسي للأشرطة */
    position: relative;
    top: -4px; /* رفع بسيط لمحاذاة السلة والبحث */
}

/* ====== Search Overlay ====== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

    .search-overlay.show {
        display: flex;
    }

.search-modal {
    width: min(720px, 92vw);
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12), 0 3px 8px rgba(0,0,0,0.05);
    padding: 16px;
    position: relative;
}

.search-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: transparent;
    border: 0;
    color: #7f8c8d;
    font-size: 22px;
    cursor: pointer;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input-lg {
    flex: 1;
    height: 46px;
    border: 1px solid #E7EBF0;
    background: #F8FAFB;
    border-radius: 12px;
    padding: 0 12px;
    font-weight: 700;
}

.search-go {
    height: 46px;
    background: var(--primary-color);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
}

.search-suggest {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    max-height: 300px;
    overflow: auto;
}

    .search-suggest li {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px;
        border-radius: 10px;
        border: 1px solid #EEF2F5;
        background: #fff;
        cursor: pointer;
    }

        .search-suggest li + li {
            margin-top: 6px;
        }

    .search-suggest img {
        width: 40px;
        height: 40px;
        object-fit: contain;
        background: #F5F7F9;
        border: 1px solid #EEF2F5;
        border-radius: 8px;
    }

    .search-suggest .name {
        font-weight: 700;
        color: #2D3436;
        font-size: 13px;
    }

    .search-suggest .price {
        margin-inline-start: auto;
        color: #2D3436;
        font-weight: 700;
        font-size: 13px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .search-suggest li:hover {
        border-color: #dfe6eb;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    }

.search-results {
    margin-top: 12px;
}

    .search-results .grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 10px;
    }

    .search-results .product-card {
        min-width: 0;
        width: 100%;
    }
/* Custom hamburger (3 rounded bars) */
.menu-btn .menu-icon {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 2.5px;
    background: var(--primary-color);
    border-radius: 3px;
}

    .menu-btn .menu-icon::before,
    .menu-btn .menu-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 26px;
        height: 2.5px;
        background: var(--primary-color);
        border-radius: 3px;
    }

    .menu-btn .menu-icon::before {
        top: -7px;
    }

    .menu-btn .menu-icon::after {
        top: 7px;
    }

.menu-btn:hover .menu-icon,
.menu-btn:hover .menu-icon::before,
.menu-btn:hover .menu-icon::after {
    background: var(--primary-dark);
}

/* Triangle beside hamburger (original site style) - معطّل */
.menu-btn .menu-triangle {
    display: none;
}

/* Off-canvas categories drawer */
.drawer {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1100;
}

    .drawer.open {
        display: block;
    }

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(85vw, 380px);
    height: 100%;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.drawer.open .drawer-panel {
    transform: translateX(0);
}

.drawer-header {
    padding: 16px 16px;
    border-bottom: 1px solid var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .drawer-header h3 {
        font-size: 18px;
        margin: 0;
        color: var(--primary-color);
    }

.drawer-close {
    background: none;
    border: 0;
    font-size: 22px;
    cursor: pointer;
    color: var(--primary-color);
}

.drawer-body {
    padding: 14px 14px 22px;
    overflow-y: auto;
}

.drawer-categories {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

    .drawer-categories li a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px;
        border-radius: 12px;
        text-decoration: none;
        color: var(--text-dark);
        border: 1px solid var(--primary-color);
        background: var(--primary-light);
        box-shadow: 0 8px 18px rgba(0,0,0,0.06);
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    }

        .drawer-categories li a:hover {
            background: var(--primary-light);
            border-color: var(--primary-color);
            transform: none;
            box-shadow: 0 8px 18px rgba(0,0,0,0.06);
        }

    .drawer-categories img {
        width: 68px;
        height: 68px;
        object-fit: cover;
        border-radius: 12px;
        border: 1px solid var(--primary-light);
    }

    .drawer-categories span {
        font-weight: 800;
        font-size: 16px;
    }

/* Categories Section (Replaces Slider) */
.categories-section {
    background: var(--bg-light);
    padding: 30px 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

/* Promo images row (optional) */
.promo-section {
    background: var(--bg-light);
    padding: 10px 0 0;
}

.promo-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.promo-card {
    background: var(--bg-light);
    border: 1px solid #E7EBF0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

    .promo-card img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

.section-title h2 {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.section-title::before,
.section-title::after {
    content: '';
    height: 2px;
    width: 100px;
    background: var(--primary-color);
    display: inline-block;
}

.categories-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .categories-grid::-webkit-scrollbar {
        display: none;
    }

.category-card {
    flex: 0 0 auto;
    width: 130px;
    background: transparent;
    border: 0;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 6px 0;
}

    .category-card img {
        width: 110px;
        height: 110px;
        object-fit: cover;
        display: block;
        margin: 0 auto;
        border-radius: 50%;
        border: 3px solid var(--primary-color);
        background: #fff;
        padding: 3px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        transition: all 0.3s ease;
    }

    .category-card h3 {
        font-size: 13px;
        font-weight: 600;
        color: var(--text-dark);
        text-align: center;
        margin: 10px 0 0;
        line-height: 1.2;
    }

@media (max-width: 768px) {
    .category-card {
        width: 110px;
        padding: 6px 6px 0;
    }

        .category-card img {
            width: 95px;
            height: 95px;
            border-width: 2px;
        }

        .category-card h3 {
            font-size: 12px;
        }
}

.category-card:hover img {
    border-color: var(--primary-dark);
    box-shadow: 0 6px 18px rgba(139,197,63,0.30);
    transform: translateY(-4px);
}
/* Categories: disable vertical float; auto-scroll handled in index */
.categories-grid .category-card {
    animation: none !important;
}

/* Banner Sections */
.banner-section {
    margin: 30px 0 4px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

    .banner-section img {
        width: 100%;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        display: block;
    }

/* Product Sections */
.products-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 0 0 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

.products-section-header {
    text-align: right;
    margin-bottom: 18px;
    padding: 0 20px 0 0;
}

    .products-section-header h2 {
        color: var(--primary-color);
        font-size: 22px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        justify-content: flex-start;
    }

        .products-section-header h2 a {
            color: inherit;
            text-decoration: none;
        }

            .products-section-header h2 a:hover {
                color: var(--primary-dark);
            }

.products-grid {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 0 20px 6px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .products-grid::-webkit-scrollbar {
        display: none;
    }

.product-card {
    background: var(--bg-white);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    min-width: 230px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    height: 420px;
    scroll-snap-align: start;
    cursor: pointer;
}

    .product-card:hover {
        box-shadow: var(--shadow-hover);
        transform: translateY(-5px);
    }

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #6C5CE7; /* Purple */
    color: #fff;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 800;
    z-index: 2;
    display: none;
}

.product-wishlist {
    position: absolute;
    top: 12px;
    left: 12px;
    background: transparent;
    width: auto;
    height: auto;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 3;
    box-shadow: none;
}

    .product-wishlist:hover {
        color: #e74c3c;
        background: transparent;
    }

.product-image {
    position: relative;
    padding: 18px 18px 10px;
    background: #F5F7F9;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .product-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: transform 0.3s;
    }

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 14px 16px 8px;
    background: #fff;
    flex: 1 1 auto;
    position: relative;
    padding-bottom: 28px; /* حجز مساحة سفلية للخصم/السعر القديم */
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 48px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #FFC107;
    font-size: 13px;
}

    .product-rating i {
        font-size: 11px;
    }

.rating-count {
    color: var(--text-gray);
    font-size: 12px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}
/* Saudi Riyal currency icon */
.currency-icon {
    height: 14px;
    width: auto;
    display: inline-block;
    vertical-align: -1px;
    pointer-events: none;
}

.product-price .currency {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 13px;
    margin-inline-end: 4px;
}

.current-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
}

.old-price {
    font-size: 14px;
    color: var(--text-gray);
    text-decoration: line-through;
}

.discount-badge {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 700;
}

.product-shipping {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.price-sub {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px; /* ملاصق أسفل مساحة product-info */
    margin: 0;
}

    .price-sub .old-price {
        order: 1;
    }

    .price-sub .price-discount {
        color: #e74c3c;
        font-size: 12px;
        font-weight: 800;
        order: 2;
    }

.add-to-cart-btn {
    display: none;
}

.product-footer {
    padding: 18px 0 28px;
    background: #fff;
    display: flex;
    justify-content: center;
    position: relative;
    min-height: 90px;
}

    .product-footer::before {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 14px;
        width: calc(100% - 24px); /* تقريباً كامل العرض */
        height: 60px;
        background: #fff;
        border: 1px solid rgba(231,235,240,0.6); /* أخف سماكة/لون */
        border-radius: 20px;
        box-shadow: 0 6px 14px rgba(0,0,0,0.05), inset 0 0 0 1px rgba(0,0,0,0.02);
        z-index: 1;
    }

.cart-fab {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #E7EBF0; /* subtle ring */
    background: #fff;
    color: var(--primary-color); /* match site primary color */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08), /* soft drop */
    0 2px 6px rgba(0,0,0,0.05), /* near shadow */
    inset 0 0 0 1px rgba(0,0,0,0.04); /* inner ring */
    cursor: pointer;
    transition: transform 0.2s ease;
    position: absolute;
    left: 50%;
    bottom: 22px; /* (60px box height - 44px btn)/2 + 14px bottom offset */
    transform: translateX(-50%);
    z-index: 3; /* فوق الصندوق */
}

    .cart-fab i {
        font-size: 22px;
    }

    .cart-fab:hover {
        transform: translateY(-2px);
    }
    /* Cart button ring animation */
    .cart-fab.ring {
        animation: cart-ring 650ms ease-out 1;
    }

@keyframes cart-ring {
    0% {
        box-shadow: 0 10px 20px rgba(0,0,0,0.08), 0 0 0 0 rgba(126,182,147,0.45), inset 0 0 0 1px rgba(0,0,0,0.04);
    }

    70% {
        box-shadow: 0 10px 20px rgba(0,0,0,0.08), 0 0 0 16px rgba(126,182,147,0.0), inset 0 0 0 1px rgba(0,0,0,0.04);
    }

    100% {
        box-shadow: 0 10px 20px rgba(0,0,0,0.08), 0 0 0 0 rgba(126,182,147,0.0), inset 0 0 0 1px rgba(0,0,0,0.04);
    }
}

/* Load More Button */
.load-more {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    display: inline-block;
    padding: 15px 50px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: white;
    border-radius: var(--radius);
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

    .load-more-btn:hover {
        background: var(--primary-color);
        color: white;
    }

/* Categories Cards Section */
.category-cards-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.category-card-large {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 200px;
    text-decoration: none;
}

    .category-card-large img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

    .category-card-overlay h3 {
        font-size: 20px;
        font-weight: 700;
    }

/* Customer Reviews */
.reviews-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.review-card {
    background: var(--bg-white);
    padding: 14px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    scroll-snap-align: start;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    min-height: 36px;
    flex-wrap: nowrap;
}

.reviewer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 16px;
}

.reviewer-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #F5F7F9;
    border: 1px solid #E7EBF0;
}

.reviewer-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

    .reviewer-info h4 {
        font-size: 12px;
        font-weight: 800;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 48%;
    }

    .reviewer-info span {
        font-size: 11px;
        color: var(--text-gray);
        white-space: nowrap;
    }

.review-text {
    color: var(--text-gray);
    font-size: 12.5px;
    line-height: 1.35;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
.main-footer {
    background: var(--primary-light);
    padding: 60px 0 0; /* إزالة الفراغ أسفل الموقع */
    margin-top: 50px;
}

/* ================= Product Page ================= */
.product-page {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 12px;
    margin-bottom: 78px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}
/* Breadcrumb */
.breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 60px;
    z-index: 900;
}

.breadcrumb-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
}

.breadcrumb-back {
    background: #f3f6f8;
    border: 1px solid #E7EBF0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    font-size: 14px;
    white-space: nowrap;
}

    .breadcrumb-list a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 700;
    }

        .breadcrumb-list a:hover {
            color: var(--primary-dark);
        }

    .breadcrumb-list .current {
        color: #2D3436;
        font-weight: 700;
    }

.product-hero {
    background: #F5F7F9;
    border-radius: 16px;
    padding: 18px 18px 10px;
    box-shadow: var(--shadow);
}

    .product-hero img {
        width: 100%;
        max-height: 240px;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 4px 0 2px;
}

    .hero-dots span {
        width: 6px;
        height: 6px;
        background: #cfd8dc;
        border-radius: 50%;
        display: inline-block;
    }

        .hero-dots span.active {
            background: #90a4ae;
        }

.product-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 2px 0;
}

    .product-header-row .product-title {
        font-size: 16px;
        font-weight: 500;
        color: var(--text-dark);
        display: block;
        min-height: auto;
        -webkit-line-clamp: unset;
    }

    .product-header-row .product-price {
        margin: 0;
    }

.price-tax {
    color: #9aa0a6;
    font-size: 10px;
    margin-top: 0;
    margin-inline-start: 6px;
    align-self: baseline;
}

.product-page .current-price {
    font-size: 17px;
}

.product-meta {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 12px;
}

    .product-meta .rating {
        color: #FFC107;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.info-card {
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: var(--shadow);
    margin-top: 10px;
}

    .info-card h3 {
        font-size: 15px;
        font-weight: 600;
        color: var(--text-dark);
        margin: 2px 0 8px;
        padding-bottom: 4px;
        border-bottom: 1px solid #EEF2F5;
    }
    /* Product description section special style */
    .info-card.desc-card {
        background: #F5F8FB;
        border-color: #CFD8E3;
    }

        .info-card.desc-card h3 {
            color: var(--primary-color);
            border-bottom-color: rgba(61,85,107,0.25);
        }

.info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .info-list li {
        display: grid;
        grid-template-columns: 20px 1fr;
        align-items: center;
        gap: 10px;
        padding: 6px 6px;
        border-bottom: 1px solid #EEF2F5;
    }

        .info-list li:last-child {
            border-bottom: 0;
        }

    .info-list .text {
        color: #2D3436;
        font-size: 12px;
        font-weight: 600;
    }

    .info-list .icon {
        color: #90A4AE;
        font-size: 16px;
        width: 20px;
        text-align: center;
        margin-top: 0;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

/* Sticky action bar */
.sticky-bar {
    position: fixed;
    bottom: 22px;
    left: 0;
    right: 0;
    background: transparent;
    border-top: 0;
    box-shadow: none;
    z-index: 1200;
}

.sticky-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.sticky-buy, .sticky-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    white-space: nowrap;
    width: 100%;
    box-shadow: 0 10px 22px rgba(61,85,107,0.22);
}

.sticky-buy {
    display: none;
}

.sticky-add {
    background: var(--primary-color);
    color: #fff;
}

    .sticky-add:hover {
        filter: brightness(0.98);
    }

    .sticky-add i {
        display: none;
    }

    .sticky-add.added {
        background: var(--primary-dark);
        color: #fff;
    }

@media (max-width: 768px) {
    .product-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .sticky-inner {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 0 24px;
    }

    .product-hero img {
        max-height: 170px;
    }

    .product-page .current-price {
        font-size: 16px;
    }
}

/* Ensure currency icon is inline next to the price */
.product-price .current-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.price-sub .old-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
/* Larger discount badge on product page */
.product-page .price-discount {
    font-size: 14px;
    font-weight: 700;
    background: rgba(231,76,60,0.08);
    padding: 2px 8px;
    border-radius: 10px;
}
/* Product description HTML helpers */
.product-description {
    font-size: 12px;
}

    .product-description table {
        width: 100%;
        border-collapse: collapse;
    }

    .product-description td, .product-description th {
        border-bottom: 1px solid #EEF2F5;
        padding: 5px;
        text-align: right;
    }

/* Toast notification */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: #25D366;
    color: #fff;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: fixed;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 99999;
}

    .toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(-6px);
    }

    .toast .progress {
        position: absolute;
        bottom: 0;
        right: 0;
        height: 3px;
        background: rgba(255,255,255,0.9);
        width: 100%;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }

    .toast.show .progress {
        animation: toast-progress var(--toast-duration) linear forwards;
    }

@keyframes toast-progress {
    from {
        width: 100%;
    }

    to {
        width: 0;
    }
}

/* ================= Cart Page ================= */
.cart-page {
    max-width: 1100px;
    margin: 8px auto 110px;
    padding: 0 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 12px;
}

.breadcrumb-bar + .cart-page {
    margin-top: 8px !important;
}

.cart-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.cart-grid {
    display: grid;
    grid-template-columns: 1.6fr 0.4fr;
    gap: 14px;
}

.cart-items {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #EEF2F5;
}

    .cart-item:last-child {
        border-bottom: 0;
    }

    .cart-item > img {
        width: 80px;
        height: 80px;
        object-fit: contain;
        background: #F5F7F9;
        border-radius: 10px;
    }

    .cart-item .currency-icon {
        height: 14px;
        width: auto;
    }

.cart-summary .currency-icon {
    height: 14px;
    width: auto;
}

.item-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.item-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 14px;
}

.item-subtotal {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 14px;
}

.qty-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #E7EBF0;
    border-radius: 10px;
    padding: 4px 6px;
    background: #fff;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 0;
    background: #F3F6F8;
    color: #2D3436;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
}

.qty-input {
    width: 44px;
    text-align: center;
    border: 0;
    background: transparent;
    font-weight: 700;
    color: #2D3436;
}

.remove-item {
    color: #e74c3c;
    text-decoration: none;
    font-size: 13px;
    margin-inline-start: 8px;
}
/* Enhanced details */
.item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #E7EBF0;
    background: #F8FAFB;
    color: #2D3436;
}

    .badge i {
        font-size: 12px;
    }

    .badge.free-ship {
        color: #2e7d32;
        background: #e8f5e9;
        border-color: #c8e6c9;
    }

    .badge.installment {
        color: #5e35b1;
        background: #ede7f6;
        border-color: #d1c4e9;
    }

.item-amounts {
    text-align: left;
    min-width: 130px;
}

.item-amounts {
    text-align: left;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.unit-line, .subtotal-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .unit-line .label, .subtotal-line .label {
        color: #7f8c8d;
        font-size: 12px;
        font-weight: 700;
    }

.item-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

    .item-prices .current-price {
        font-size: 14px;
        font-weight: 900;
        color: var(--primary-color);
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .item-prices .old-price {
        font-size: 12px;
        color: #95a5a6;
        text-decoration: line-through;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

.discount-pill {
    background: rgba(231,76,60,0.08);
    color: #e74c3c;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
}

.cart-summary {
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 12px;
    height: fit-content;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #EEF2F5;
}

    .summary-row:last-child {
        border-bottom: 0;
    }

.summary-total {
    font-weight: 900;
    color: #2D3436;
    font-size: 16px;
}

.cart-summary .cart-total {
    font-weight: 900;
    color: #1f2937;
    font-size: 17px;
    background: #F6FBF8;
    border: 1px solid #E7EBF0;
    padding: 6px 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.checkout-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 800;
    text-decoration: none;
}

.continue-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    text-align: center;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 800;
    text-decoration: none;
}

.empty-cart {
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 26px 20px;
    text-align: center;
    color: var(--text-gray);
}

    .empty-cart .empty-icon {
        font-size: 46px;
        color: var(--primary-color);
        margin-bottom: 10px;
        opacity: 0.9;
    }

    .empty-cart .empty-text {
        font-weight: 800;
        color: var(--text-dark);
        margin-bottom: 8px;
    }

.summary-info {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #2D3436;
    text-align: center;
    align-items: center;
}

    .summary-info .info i.ok {
        color: #2e7d32;
        margin-inline-start: 2px;
    }

    .summary-info .info i.inst {
        color: #5e35b1;
        margin-inline-start: 2px;
    }

@media(max-width: 900px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 560px) {
    .cart-item {
        grid-template-columns: 70px 1fr;
        align-items: flex-start;
    }

    .item-amounts {
        grid-column: 1 / -1;
        text-align: right;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 6px;
    }

    .item-subtotal {
        font-size: 13px;
    }

    .qty-btn {
        width: 26px;
        height: 26px;
    }

    .qty-input {
        width: 40px;
    }
}

/* ===== New Cart v2 (matches screenshot) ===== */
.cart2-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 14px 0 10px;
}

.cart2-item {
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    position: relative;
}

    .cart2-item .top-row {
        display: grid;
        grid-template-columns: auto auto 1fr auto;
        gap: 10px;
        align-items: center;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .cart2-item .img-close {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        position: relative;
    }

    .cart2-item .prod-img {
        width: 80px;
        height: 80px;
        object-fit: contain;
        background: #F5F7F9;
        border-radius: 10px;
        border: 1px solid #E7EBF0;
    }

    .cart2-item .remove-btn {
        background: #e74c3c;
        color: #fff;
        border: none;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 900;
        cursor: pointer;
        flex-shrink: 0;
        align-self: flex-start;
    }

        .cart2-item .remove-btn:hover {
            background: #c0392b;
        }

    .cart2-item .name-qty {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .cart2-item .name {
        font-weight: 400;
        font-size: 13px;
        color: #2D3436;
        text-align: right;
    }

.cart2-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.sum-box .amount {
    font-weight: 700;
    font-size: 15px;
    color: #2D3436;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-direction: row-reverse;
}

    .sum-box .amount.total {
        color: var(--primary-color);
    }

    .sum-box .amount .currency-icon {
        width: 14px;
        height: 14px;
        object-fit: contain;
        filter: none;
    }

.qty-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #F8FAFB;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    height: 28px;
    line-height: 28px;
    padding: 0 10px 0 22px;
    font-weight: 600;
    color: var(--text-gray);
    position: relative;
    text-align: center;
    text-align-last: center;
    -moz-text-align-last: center;
    min-width: 56px;
    font-size: 12px;
    box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

    .qty-select:hover {
        border-color: #C6D0DE;
    }

    .qty-select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(46,125,50,0.08);
    }

.qty-select-wrap {
    position: relative;
    display: inline-block;
}

    .qty-select-wrap:after {
        content: "\f107";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        position: absolute;
        left: 7px;
        top: 50%;
        transform: translateY(-50%);
        color: #9aa3a9;
        pointer-events: none;
        font-size: 11px;
    }

.variant-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-top: 6px;
    overflow-x: auto;
    padding: 0 2px 2px;
}

    .variant-pills .pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #E4E9F2;
        background: #fff;
        color: var(--text-gray);
        padding: 7px 6px;
        border-radius: 10px;
        font-weight: 500;
        font-size: 10px;
        cursor: pointer;
        transition: border-color .15s ease, color .15s ease, background-color .15s ease;
        white-space: nowrap;
        line-height: 1;
        min-height: 30px;
    }

        .variant-pills .pill:hover {
            border-color: #d6deea;
        }

        .variant-pills .pill.active {
            background: #fff;
            border-color: var(--primary-color);
            color: var(--text-dark);
        }

.cart2-summary-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 16px 0 8px;
}

.sum-box {
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 400;
}

.sum-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.btn-outline {
    display: block;
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.btn-primary {
    display: block;
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}
/* Slimmer cart actions */
.sum-actions .btn-outline,
.sum-actions .btn-primary {
    display: block;
    width: 92%;
    margin: 0 auto;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 10px;
}

@media(max-width: 560px) {
    .cart2-item {
        grid-template-columns: 1fr 86px;
    }

        .cart2-item .prod-img {
            width: 86px;
            height: 86px;
        }

        .cart2-item .name {
            font-size: 15px;
        }
}

/* ================= Checkout Page ================= */
.checkout-page {
    max-width: 700px;
    margin: 16px auto 110px;
    padding: 0 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

.checkout-card {
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
    padding: 10px;
    max-width: 520px;
    margin: 0 auto;
}

.checkout-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.input-wrap {
    position: relative;
}

.text-input {
    width: 100%;
    height: 42px;
    border: 1px solid #E7EBF0;
    background: #fff;
    color: #2D3436;
    border-radius: 9px;
    padding: 8px 38px 8px 10px;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

    .text-input::placeholder {
        color: #9aa3a9;
        font-weight: 700;
    }

    .text-input[name="whatsapp"] {
        text-align: right;
        direction: ltr;
    }

.input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa3a9;
    font-size: 15px;
}

.status-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    display: none;
}

    .status-icon.ok {
        color: #2e7d32;
        display: block;
    }

    .status-icon.err {
        color: #e74c3c;
        display: block;
    }

.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.text-input.valid {
    border-color: var(--primary-color);
    background: #F3FFF7;
    color: #2D3436;
    box-shadow: 0 0 0 2px rgba(126,182,147,0.12) inset;
}

    .text-input.valid::placeholder {
        color: #7EA88D;
    }

.text-input.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231,76,60,0.08) inset;
}

.pay-tabs {
    display: flex;
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 12px;
    padding: 2px;
    gap: 6px;
    margin: 4px 0 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 520px;
    margin-inline: auto;
}

.pay-tab {
    flex: 1;
    text-align: center;
    padding: 7px 9px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    color: #2D3436;
    background: transparent;
    border: 0;
    cursor: pointer;
}

    .pay-tab.active {
        background: var(--primary-color);
        color: #fff;
    }

.installments-box {
    border: 1px solid #E7EBF0;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06), 0 2px 5px rgba(0,0,0,0.04);
    max-width: 520px;
    margin: 0 auto;
}

.box-title {
    font-size: 13px;
    font-weight: 700;
    color: #2D3436;
    margin: 6px 0 8px;
    text-align: center;
}

.chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    align-items: center;
}

.chip {
    text-align: center;
    border: 1px solid #E4E9F2;
    background: #fff;
    color: var(--text-dark);
    padding: 8px 4px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

    .chip:hover {
        border-color: #d6deea;
    }

    .chip.active {
        border-color: var(--primary-color);
        background: #F3FFF7;
        color: #2D3436;
        box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.08) inset;
        position: relative;
    }

        .chip.active::after {
            content: "\f00c";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            color: var(--primary-color);
            position: absolute;
            left: 8px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 11px;
        }

.monthly-line {
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.monthly-line-label {
    color: var(--primary-color);
    font-weight: 800;
}

.monthly-line-amount, .schedule-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--primary-color);
    font-weight: 800;
}

    .monthly-line .currency-icon, .schedule-amount .currency-icon {
        width: 14px;
        height: 14px;
        object-fit: contain;
        filter: none;
    }

.schedule-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 160px;
    max-width: 240px;
    text-align: center;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 5px 10px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    margin: 8px auto 0;
}

.schedule-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    display: none;
}

    .schedule-table th, .schedule-table td {
        border: 1px solid #E7EBF0;
        padding: 8px;
        text-align: center;
        font-size: 13px;
    }

    .schedule-table .dp-row {
        background: #FFF5F5;
    }

        .schedule-table .dp-row td {
            font-weight: 700;
            color: #D94B4B;
            text-shadow: 0 0 10px rgba(217,75,75,0.18);
        }

        .schedule-table .dp-row .schedule-amount {
            color: #D94B4B;
        }

    .schedule-table tbody tr:not(.dp-row) td:first-child {
        color: var(--primary-color);
        font-weight: 700;
    }

    .schedule-table tbody tr:not(.dp-row) td:nth-child(2) {
        color: var(--primary-color);
    }

.schedule-term {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 62px;
    direction: rtl;
}

.schedule-term-label {
    display: inline-block;
    min-width: 28px;
    text-align: center;
}

.schedule-term-number {
    display: inline-block;
    min-width: 18px;
    text-align: center;
}

.checkout-submit {
    display: block;
    width: auto;
    min-width: 220px;
    max-width: 420px;
    margin: 12px auto 0;
    text-align: center;
    padding: 9px 14px;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    box-shadow: var(--shadow);
}

/* ================= Reviews Section ================= */
.reviews-section {
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 16px;
    margin: 14px auto;
    max-width: 1100px;
}

.reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reviews-title {
    font-size: 18px;
    font-weight: 700;
    color: #2D3436;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-review-btn {
    background: var(--primary-color);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    .add-review-btn i {
        font-size: 14px;
    }

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.dist-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2D3436;
    font-size: 13px;
}

.dist-label {
    width: 60px;
    text-align: right;
}

.dist-bar {
    position: relative;
    width: 160px;
    height: 8px;
    border-radius: 999px;
    background: #EEF2F5;
    overflow: hidden;
}

    .dist-bar > span {
        position: absolute;
        inset: 0;
        background: var(--primary-color);
    }

.dist-count {
    width: 24px;
    text-align: left;
    color: #636E72;
    font-weight: 700;
}

.avg-box {
    text-align: center;
    padding: 10px 12px;
    border: 1px solid #E7EBF0;
    border-radius: 12px;
}

.avg-score {
    font-size: 26px;
    font-weight: 900;
    color: #2D3436;
}

.avg-stars {
    margin-top: 0;
    color: var(--star-gold);
    font-size: 13px;
}

.review-header .avg-stars {
    font-size: 12px;
    white-space: nowrap;
    margin-inline-start: auto;
}

.stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.star {
    font-size: 18px;
    color: #d1c4e9;
    cursor: pointer;
}

    .star.filled {
        color: var(--star-gold);
    }

.reviews-form-hint {
    color: #7f8c8d;
    font-size: 12px;
}

/* Horizontal carousel for reviews */
.reviews-carousel {
    margin-top: 12px;
    position: relative;
}

.reviews-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 0;
    overflow-x: auto;
    padding: 6px 0 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

    .reviews-track::-webkit-scrollbar {
        display: none;
    }

.reviews-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
}

    .reviews-dots .dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #dfe6e9;
        cursor: pointer;
        transition: .2s;
    }

        .reviews-dots .dot.active {
            background: var(--primary-color);
            transform: scale(1.15);
        }

.review-card {
    direction: rtl;
}

/* Review Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99998;
}

    .modal-overlay.show {
        display: flex;
    }

.review-modal {
    width: min(680px, 92vw);
    background: #fff;
    border: 1px solid #E7EBF0;
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    overflow: hidden;
}

    .review-modal .modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
        background: #F8F9FA;
        border-bottom: 1px solid #E7EBF0;
    }

    .review-modal .modal-title {
        font-weight: 900;
        color: #2D3436;
    }

    .review-modal .modal-body {
        padding: 14px;
    }

.mini-product {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px dashed #E7EBF0;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 10px;
}

    .mini-product img {
        width: 56px;
        height: 56px;
        object-fit: contain;
        background: #F5F7F9;
        border-radius: 10px;
    }

    .mini-product .name {
        font-weight: 800;
        color: #2D3436;
        font-size: 13px;
    }

.review-modal .currency-icon {
    height: 14px;
    width: auto;
    vertical-align: middle;
}

.rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 12px;
}

    .rating-row .label {
        color: #2D3436;
        font-weight: 800;
    }

.rating-stars .star {
    font-size: 22px;
}

.detail-label {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 6px;
}

.review-textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid #E7EBF0;
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    outline: none;
}

    .review-textarea::placeholder {
        color: #b0b9bf;
    }

.char-counter {
    text-align: left;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 6px;
}

.attachments {
    margin-top: 10px;
    border: 1px dashed #D6DAE0;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    color: #7f8c8d;
    font-size: 12px;
}

.anonymous {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2D3436;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
}

.modal-btn {
    background: var(--primary-color);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 900;
    cursor: pointer;
}

.modal-close {
    background: transparent;
    border: 0;
    color: #2D3436;
    font-weight: 800;
    cursor: pointer;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-brand p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

    .footer-links a:hover {
        color: var(--primary-color);
    }

.footer-bottom {
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 30px 20px 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-methods {
    display: flex;
    gap: 8px;
    flex-wrap: wrap; /* لاستيعاب جميع الأيقونات */
    justify-content: center; /* توسيط الصفوف بما فيها السطر الثاني */
    width: 100%;
}

.payment-icon {
    height: 26px;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Legal strip at the very bottom */
.legal-strip {
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 14px 0;
    margin-top: 12px; /* مسافة بين صور الدفع والقسم السفلي */
}

.legal-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.legal-logos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.legal-logo {
    height: 36px;
    width: auto;
    display: inline-block;
}

.legal-text {
    color: var(--text-dark);
    font-size: 14px;
    white-space: nowrap;
}

/* Copyright bar at the very bottom */
.copyright-bar {
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.copyright-container {
    width: fit-content;
    max-width: calc(100% - 40px);
    margin: 0 auto;
    padding: 8px 14px;
    color: var(--text-dark);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light); /* نفس لون الفوتر الأخضر */
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

    .social-link:hover {
        background: var(--primary-color);
        transform: translateY(-3px);
    }

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s;
    z-index: 9999;
}

    .whatsapp-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    }

/* Responsive */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }

    .categories-grid {
        padding: 0 12px;
        gap: 12px;
    }
    /* Keep horizontal scroll and large images for categories on mobile */

    .products-grid {
        gap: 14px;
        padding-right: 12px;
    }

    .product-card {
        min-width: calc(50% - 10px);
        max-width: 320px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .legal-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-grid {
        gap: 12px;
    }
}
/* ===== Image Protection (banners, categories, products, sliders) ===== */
.banner-section img,
.promo-card img,
.category-card img,
.category-card-large img,
.product-image img,
.product-hero img,
.drawer-categories img,
.home-slider-slide img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    -webkit-touch-callout: none;
}
/* Re-enable pointer events for the wrapping link/card so clicks still work */
.banner-section a, .promo-card, .category-card, .category-card-large, .product-card, .product-hero, .drawer-categories li a, .home-slider-slide {
    pointer-events: auto;
}
