/* ═══════════════════════════════════════════════════════════════════════════
   JANABIO — Unified Site Stylesheet
   Covers: Homepage (index.php) + Product Page (product.php)
   Font: Cairo (Arabic) · Bootstrap Icons
   Version: 1.0.0
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   1. DESIGN TOKENS (CSS Custom Properties)
   ───────────────────────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --primary:        #92c23b;
    --primary-dark:   #79a82e;
    --primary-light:  #d9eeaf;
    --primary-xlight: #f2fadf;
    --secondary:      #3c5242;
    --secondary-light:#526e5a;

    /* Surfaces */
    --background:     #ffffff;
    --surface:        #f7f9f4;
    --surface-alt:    #eef4e3;

    /* Text */
    --text-dark:      #333333;
    --text-mid:       #555555;
    --text-light:     #777777;
    --text-muted:     #aaaaaa;

    /* Borders */
    --border-color:   #e5e5e5;
    --border-dark:    #cccccc;

    /* Semantic */
    --danger:         #d32f2f;
    --danger-light:   #ffebee;
    --warning:        #f57c00;
    --warning-light:  #fff3e0;
    --success:        #2e7d32;
    --success-light:  #e8f5e9;

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius:    10px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(0,0,0,.07);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.09);
    --shadow-md: 0 4px 20px rgba(0,0,0,.11);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.14);

    /* Animation */
    --transition: .22s cubic-bezier(.4,0,.2,1);

    /* Typography */
    --font: 'Cairo', 'Lato', 'Segoe UI', Arial, sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   2. RESET & BASE
   ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-dark);
    background: var(--background);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol { list-style: none; }

button {
    font-family: var(--font);
    cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────
   3. LAYOUT UTILITIES
   ───────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mt-3 { margin-top: 1rem; }
.mx-1 { margin-inline: .25rem; }

/* ─────────────────────────────────────────────────────────────
   4. PRELOADER
   ───────────────────────────────────────────────────────────── */
#preloader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity .4s ease, visibility .4s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.preloader-content .spinner,
.btn .spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: inline-block;
    animation: spin .6s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}

.preloader-content .spinner {
    width: 38px;
    height: 38px;
    border-width: 3px;
    border-top-color: var(--primary);
}

.loading-text {
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: .5px;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────
   5. TOP HEADER BAR
   ───────────────────────────────────────────────────────────── */
.top-header {
    background: var(--secondary);
    padding: 8px 0;
    font-size: 13px;
    color: rgba(255,255,255,.8);
}

.top-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.top-header a {
    color: rgba(255,255,255,.85);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color var(--transition);
}

.top-header a:hover { color: var(--primary-light); }

.top-header-left,
.top-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ─────────────────────────────────────────────────────────────
   6. MAIN HEADER
   ───────────────────────────────────────────────────────────── */
.main-header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    position: sticky;
    top: 0;
    z-index: 500;
    padding: 12px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo img {
    height: 46px;
    width: auto;
    object-fit: contain;
}

/* Search */
.search-container { flex: 1; }

.search-form {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    transition: border-color var(--transition);
}

.search-form:focus-within { border-color: var(--primary); }

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    direction: rtl;
}

.search-input::placeholder { color: var(--text-muted); }

.search-btn {
    background: var(--primary);
    border: none;
    padding: 10px 18px;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: background var(--transition);
}

.search-btn:hover { background: var(--primary-dark); }

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-mid);
    position: relative;
    transition: color var(--transition), background var(--transition);
}

.action-btn i { font-size: 20px; }
.action-btn:hover { color: var(--primary); background: var(--primary-xlight); }

.cart-count,
.wish-count {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ─────────────────────────────────────────────────────────────
   7. MAIN NAV
   ───────────────────────────────────────────────────────────── */
.main-nav {
    background: var(--secondary);
    border-bottom: 2px solid var(--primary);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
}

/* Category toggle */
.category-menu { position: relative; }

.category-toggle {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition);
}

.category-toggle:hover { background: var(--primary-dark); }

.categories-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 600;
    max-height: 420px;
    overflow-y: auto;
    display: none;
}

.categories-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 13.5px;
    color: var(--text-mid);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition), color var(--transition), padding var(--transition);
}

.categories-dropdown a:last-child { border-bottom: none; }

.categories-dropdown a:hover {
    background: var(--primary-xlight);
    color: var(--secondary);
    padding-right: 22px;
}

.category-menu:hover .categories-dropdown,
.category-menu.open .categories-dropdown {
    display: block;
}

/* Nav links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    list-style: none;
}

.nav-menu a {
    display: block;
    padding: 10px 14px;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #fff;
    background: rgba(255,255,255,.12);
}

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    margin-right: auto;
    padding: 4px 8px;
}

/* ─────────────────────────────────────────────────────────────
   8. HERO SLIDER
   ───────────────────────────────────────────────────────────── */
.hero-slider {
    margin: 20px auto;
}

.slider-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 21/6;
    background: var(--surface);
}

@media (max-width: 768px) {
    .slider-wrapper { aspect-ratio: 16/7; }
}

.slider-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}

.slider-item.active {
    opacity: 1;
    pointer-events: auto;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.85);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    color: var(--secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background var(--transition), color var(--transition);
}

.slider-nav:hover { background: var(--primary); color: #fff; }
.slider-nav.prev { right: 14px; }
.slider-nav.next { left: 14px; }

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition), transform var(--transition);
}

.dot.active, .dot:hover {
    background: var(--primary);
    transform: scale(1.3);
}

/* ─────────────────────────────────────────────────────────────
   9. SECTION HEADERS
   ───────────────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i { color: var(--primary); font-size: 22px; }

.view-all {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid var(--primary-light);
    padding: 5px 14px;
    border-radius: 20px;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.view-all:hover { background: var(--primary); color: #fff; }

.view-all-mobile {
    display: none;
    text-align: center;
    margin-top: 18px;
}

@media (max-width: 768px) {
    .view-all { display: none; }
    .view-all-mobile { display: block; }
}

/* ─────────────────────────────────────────────────────────────
   10. PRODUCTS SECTION
   ───────────────────────────────────────────────────────────── */
.products-section {
    margin-bottom: 40px;
}

/* Grid display (≤ 6 cards per row) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 1399px) { .products-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1199px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991px)  { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 400px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* ─────────────────────────────────────────────────────────────
   11. PRODUCT CARD
   ───────────────────────────────────────────────────────────── */
.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
    width: 100%;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform .35s ease;
}

.product-card:hover .product-image img { transform: scale(1.06); }

.product-card a {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 10px;
    gap: 4px;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--secondary);
}

.original-price {
    font-size: 12.5px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.rating-stars { display: flex; gap: 2px; }
.rating-stars i { color: #f5a623; font-size: 12px; }

.rating-count {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Product info wrapper */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    flex: 1;
}

/* Pricing row */
.product-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

/* Delivery info */
.product-delivery {
    font-size: 11.5px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-delivery i { color: var(--primary); }

/* Promo / stock badges */
.badge-promo,
.badge-outstock {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.badge-promo   { background: var(--danger); color: #fff; }
.badge-outstock{ background: #666; color: #fff; }

/* Product card needs position relative for absolute badges */
.product-card { position: relative; }

/* Product action buttons */
.product-btn {
    display: flex;
    gap: 6px;
    padding: 8px 10px 10px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.btn {
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    text-decoration: none;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    flex: 1;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-grey {
    background: var(--surface);
    color: var(--text-mid);
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.btn-grey:hover { background: var(--border-color); }

.fav-btn {
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--text-mid);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: color var(--transition), background var(--transition);
}

.fav-btn:hover,
.fav-btn[aria-pressed="true"] {
    color: var(--danger);
    background: var(--danger-light);
    border-color: var(--danger);
}

.fav-btn .fav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─────────────────────────────────────────────────────────────
   12. SWIPER (Product Carousel)
   ───────────────────────────────────────────────────────────── */
.swiper {
    width: 100%;
    padding: 10px 0 40px;
}

.swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.swiper-slide {
    height: auto;
    display: flex;
}

/* Responsive slide widths */
@media (min-width: 1400px) {
    .swiper-slide { width: calc(100%/6 - 14px) !important; margin-right: 15px; }
}
@media (max-width: 1399px) and (min-width: 1200px) {
    .swiper-slide { width: calc(100%/5 - 14px) !important; margin-right: 15px; }
}
@media (max-width: 1199px) and (min-width: 992px) {
    .swiper-slide { width: calc(100%/4 - 14px) !important; margin-right: 15px; }
}
@media (max-width: 991px) and (min-width: 768px) {
    .swiper-slide { width: calc(100%/3 - 14px) !important; margin-right: 15px; }
}
@media (max-width: 767px) and (min-width: 576px) {
    .swiper-slide { width: calc(100%/2 - 14px) !important; margin-right: 15px; }
}
@media (max-width: 575px) {
    .swiper-slide { width: calc(100%/2 - 10px) !important; margin-right: 0; }
}

/* Swiper nav buttons */
.swiper-button-next,
.swiper-button-prev {
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    color: var(--primary);
}

.swiper-button-next { right: 10px; left: auto; }
.swiper-button-prev { left: 10px;  right: auto; }
.swiper-button-next::after,
.swiper-button-prev::after { font-size: 18px; }

@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   13. TAGS SECTION
   ───────────────────────────────────────────────────────────── */
.tags-section { margin: 40px auto; }

.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    background: #cee3a9;
    padding: 8px;
    border-radius: 19px;
}

@media (max-width: 768px) {
    .tags-grid { grid-template-columns: repeat(2, 1fr); }
}

.tag-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 15px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform .25s ease, box-shadow .25s ease;
    display: block;
}

.tag-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.tag-icon {
    font-size: 42px;
    color: var(--primary);
    margin-bottom: 10px;
}

.tag-name {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.tag-desc {
    font-size: 13.5px;
    color: #666;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────
   14. REVIEWS SECTION
   ───────────────────────────────────────────────────────────── */
.reviews-section {
    background: #d4eba9;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) { .reviews-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 576px) { .reviews-grid { grid-template-columns: 1fr; } }

.review-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-light);
    flex-shrink: 0;
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.review-date {
    font-size: 12px;
    color: var(--text-muted);
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.review-text {
    font-size: 13.5px;
    color: var(--text-mid);
    line-height: 1.7;
}

.review-product {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    border: 1px solid var(--border-color);
}

.review-product-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-xs);
    overflow: hidden;
    flex-shrink: 0;
}

.review-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.review-product-id {
    font-size: 11px;
    color: var(--text-muted);
}

.review-product-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   15. BLOG SECTION
   ───────────────────────────────────────────────────────────── */
.blog-section { margin-bottom: 40px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 576px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    transition: box-shadow var(--transition), transform var(--transition);
}

.blog-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.blog-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.blog-card:hover .blog-image img { transform: scale(1.05); }

.blog-content { padding: 14px 16px 16px; }

.blog-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   16. COOKIE BANNER
   ───────────────────────────────────────────────────────────── */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 40, 30, .96);
    color: #fff;
    padding: 14px 20px;
    z-index: 9000;
    font-size: 13.5px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    text-align: center;
}

#cookie-banner p { line-height: 1.6; }

.cookie-link { color: var(--primary-light); text-decoration: underline; }

#accept-cookies {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 24px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition);
}

#accept-cookies:hover { background: var(--primary-dark); }

/* ─────────────────────────────────────────────────────────────
   17. FOOTER
   ───────────────────────────────────────────────────────────── */
.footer {
    background: var(--secondary);
    color: rgba(255,255,255,.85);
    padding: 50px 0 0;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 576px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo img {
    height: 48px;
    filter: brightness(0) invert(1);
    margin-bottom: 14px;
}

.footer p {
    font-size: 13.5px;
    line-height: 1.7;
    color: rgba(255,255,255,.7);
}

.footer h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: background var(--transition), color var(--transition);
}

.social-links a:hover { background: var(--primary); color: #fff; }

.footer-links ul,
.footer-contact ul,
.footer-hours ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}

.footer-links a,
.footer-contact a {
    color: rgba(255,255,255,.7);
    font-size: 13.5px;
    transition: color var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover { color: var(--primary-light); }

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: rgba(255,255,255,.7);
}

.footer-contact li i { color: var(--primary); }

.footer-hours li {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: rgba(255,255,255,.7);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,.5);
}

.footer-policies {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-policies a {
    color: rgba(255,255,255,.5);
    font-size: 13px;
    transition: color var(--transition);
}

.footer-policies a:hover { color: var(--primary-light); }

.footer-credit {
    text-align: center;
    padding: 14px 0;
    font-size: 13px;
    color: rgba(255,255,255,.4);
    border-top: 1px solid rgba(255,255,255,.08);
}

.footer-credit i { color: var(--danger); }

/* ─────────────────────────────────────────────────────────────
   18. TOAST NOTIFICATION
   ───────────────────────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: 28px;
    right: 50%;
    transform: translateX(50%) translateY(80px);
    background: var(--secondary);
    color: #fff;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    pointer-events: none;
    white-space: nowrap;
}

#toast.show {
    transform: translateX(50%) translateY(0);
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   19. PRODUCT PAGE styles (product.php)
   ═══════════════════════════════════════════════════════════ */

/* Breadcrumb */
.breadcrumb {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 13px 0;
    font-size: 13px;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.breadcrumb li { display: flex; align-items: center; gap: 4px; }
.breadcrumb li + li::before { content: '‹'; color: var(--text-muted); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li:last-child { color: var(--text-dark); font-weight: 600; }

/* Product page wrapper */
.product-page { padding: 36px 0 70px; }

/* 2-column product layout */
.product-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 52px;
    align-items: start;
}

@media (max-width: 860px) {
    .product-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ── Gallery ── */
.gallery { position: sticky; top: 24px; }

.gallery-main {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    aspect-ratio: 1;
    cursor: zoom-in;
}

.gallery-main img#gallery-hero {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 28px;
    transition: transform .38s ease;
}

.gallery-main:hover img#gallery-hero { transform: scale(1.05); }

/* Badges */
.badge-float {
    position: absolute;
    top: 14px;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .4px;
    pointer-events: none;
    line-height: 1;
}

.badge-float.right { right: 14px; }
.badge-float.left  { left: 14px; }
.badge-oos  { background: var(--danger);    color: #fff; }
.badge-disc { background: var(--primary);   color: #fff; }
.badge-new  { background: var(--secondary); color: #fff; }

/* Thumbnails */
.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.thumb:hover,
.thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }

.thumb-video { position: relative; background: var(--secondary); }
.thumb-video::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    background: rgba(60,82,66,.55);
}

/* ── Product Info ── */
.product-info { display: flex; flex-direction: column; gap: 20px; }

.product-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    background: var(--surface-alt);
    border: 1px solid var(--primary-light);
    border-radius: 20px;
    padding: 3px 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.product-info .product-title {
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.4;
    padding: 0;
    border: none;
    display: block;
    -webkit-line-clamp: initial;
    overflow: visible;
}

.product-excerpt {
    font-size: 14.5px;
    color: var(--text-light);
    line-height: 1.85;
    border-right: 3px solid var(--primary);
    padding-right: 14px;
}

/* Stock pill */
.stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 20px;
}

.stock-pill::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.stock-in  { color: var(--success); background: var(--success-light); }
.stock-out { color: var(--danger);  background: var(--danger-light); }
.stock-low { color: var(--warning); background: var(--warning-light); }

/* Price block */
.price-block {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.price-current {
    font-size: clamp(28px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1;
}

.price-current.is-promo   { color: var(--danger); }
.price-current.is-regular { color: var(--secondary); }

.price-current small {
    font-size: .45em;
    font-weight: 600;
    vertical-align: super;
    margin-right: 2px;
}

.price-original {
    font-size: 17px;
    color: var(--text-muted);
    text-decoration: line-through;
    line-height: 1;
    align-self: flex-end;
    margin-bottom: 2px;
}

.price-save-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 700;
    background: #fff8e1;
    color: #7a5700;
    border: 1px solid #ffe082;
    border-radius: 20px;
    padding: 4px 12px;
    align-self: flex-end;
    margin-bottom: 2px;
}

/* Delivery row */
.delivery-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-light);
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}

.delivery-row svg { fill: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }
.delivery-free { color: var(--success); font-weight: 700; }

/* Qty */
.qty-row { display: flex; align-items: center; gap: 14px; }

.qty-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.qty-ctrl {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    background: var(--surface);
    border: none;
    width: 40px;
    height: 40px;
    font-size: 21px;
    line-height: 1;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}

.qty-btn:hover:not(:disabled) { background: var(--primary); color: #fff; }
.qty-btn:disabled { opacity: .35; cursor: default; }

.qty-input {
    width: 54px;
    height: 40px;
    border: none;
    border-inline: 1.5px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font);
    color: var(--text-dark);
    outline: none;
    -moz-appearance: textfield;
}

.qty-input::-webkit-inner-spin-button { display: none; }

/* CTA Buttons */
.cta-group { display: flex; flex-direction: column; gap: 10px; }

.btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 30px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .3px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 5px 18px rgba(146,194,59,.38);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
}

.btn-buy:hover:not(.disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(146,194,59,.48);
}

.btn-buy:active:not(.disabled) { transform: translateY(0); }

.btn-buy.disabled {
    background: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

.btn-buy svg, .btn-secondary svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.btn-buy svg { width: 21px; height: 21px; }

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    border: 2px solid var(--secondary);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary);
    background: transparent;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
}

.btn-secondary:hover { background: var(--secondary); color: #fff; }

/* Trust badges */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 500px) { .trust-grid { grid-template-columns: repeat(2,1fr); } }

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 8px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    text-align: center;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.trust-item:hover { border-color: var(--primary); box-shadow: var(--shadow-xs); }
.trust-item svg { width: 24px; height: 24px; fill: var(--primary); }

hr.divider { border: none; border-top: 1px solid var(--border-color); }

/* Tabs */
.tabs-wrapper { margin-top: 56px; }

.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
    flex-shrink: 0;
    padding: 13px 26px;
    border: none;
    background: transparent;
    font-family: var(--font);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn svg { width: 17px; height: 17px; fill: currentColor; }
.tab-btn:hover  { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel         { display: none;  padding: 34px 0 0; }
.tab-panel.active  { display: block; }

/* Content card */
.content-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 26px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 { font-size: 17px; font-weight: 700; color: var(--secondary); }
.card-header svg { width: 20px; height: 20px; fill: var(--primary); flex-shrink: 0; }
.card-body { padding: 26px 28px; }

/* Prose */
.prose { font-size: 14.5px; color: var(--text-mid); line-height: 1.9; }
.prose h1,.prose h2,.prose h3,.prose h4 { margin: 22px 0 10px; color: var(--secondary); font-weight: 700; }
.prose h1 { font-size: 1.4em; }
.prose h2 { font-size: 1.2em; }
.prose h3 { font-size: 1.05em; }
.prose p  { margin-bottom: 14px; }
.prose ul,.prose ol { padding-right: 22px; margin-bottom: 14px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text-dark); font-weight: 700; }

.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 18px; }
.prose th,.prose td { border: 1px solid var(--border-color); padding: 10px 14px; text-align: right; }
.prose th { background: var(--surface); color: var(--secondary); font-weight: 700; }
.prose tr:nth-child(even) td { background: #fafaf8; }
.prose img { max-width: 100%; border-radius: var(--radius-sm); margin: 12px 0; }
.prose blockquote {
    border-right: 4px solid var(--primary);
    padding: 12px 18px;
    margin: 18px 0;
    background: var(--primary-xlight);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--secondary);
    font-style: italic;
}

/* Video embed */
.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Specs table */
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table tr { border-bottom: 1px solid var(--border-color); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 12px 14px; vertical-align: middle; }
.specs-table td:first-child { width: 38%; font-weight: 700; color: var(--secondary); background: var(--surface); }
.specs-table td:last-child  { color: var(--text-mid); }

/* Recommended grid */
.recommended-section { margin-top: 52px; }

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 1024px) { .rec-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 900px)  { .rec-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 620px)  { .rec-grid { grid-template-columns: repeat(2,1fr); gap: 12px; } }
@media (max-width: 480px)  { .rec-grid { grid-template-columns: repeat(2,1fr); gap: 10px; } }

.rec-card {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}

.rec-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.rec-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    z-index: 1;
}

.rec-img-wrap { width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--surface); }
.rec-img-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform .35s ease;
}

.rec-card:hover .rec-img-wrap img { transform: scale(1.06); }

.rec-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.rec-no-img svg { width: 42px; height: 42px; fill: var(--border-color); }

.rec-info { padding: 12px 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }

.rec-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.rec-price { font-size: 14px; font-weight: 800; color: var(--secondary); }
.rec-price.promo { color: var(--danger); }
.rec-price small { font-size: 10px; font-weight: 600; }
.rec-original { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }

/* Sticky CTA bar */
.cta-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,.12);
    padding: 12px 16px;
    display: none;
    align-items: center;
    gap: 10px;
}

.cta-sticky.visible { display: flex; }
.cta-sticky .btn-buy      { flex: 1; padding: 13px 16px; font-size: 15px; border-radius: var(--radius-md); box-shadow: none; }
.cta-sticky .btn-secondary{ flex: 1; padding: 12px 16px; font-size: 14px; border-radius: var(--radius-md); }

.cta-sticky-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    min-width: 90px;
}

.cta-sticky-price .sp-current {
    font-size: 17px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.cta-sticky-price .sp-current.is-promo { color: var(--danger); }

.cta-sticky-price .sp-original {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
    line-height: 1;
}

/* ─────────────────────────────────────────────────────────────
   20. RESPONSIVE — PRODUCT PAGE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .product-page { padding: 20px 0 110px; }

    .section-title { font-size: 17px; }

    .product-info .product-title { font-size: 19px; }
    .price-current { font-size: 26px !important; }

    .trust-grid { grid-template-columns: repeat(2,1fr); }
    .tabs-wrapper { margin-top: 32px; }
    .card-body { padding: 18px; }

    .tab-btn { padding: 11px 14px; font-size: 13px; }
}

@media (max-width: 480px) {
    .gallery-main { border-radius: var(--radius-md); }
    .price-current { font-size: 24px !important; }
    .product-info { gap: 14px; }
    .section-title { font-size: 16px; }
}

/* ─────────────────────────────────────────────────────────────
   21. RESPONSIVE — NAVIGATION
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .header-content { flex-wrap: wrap; }
    .search-container { order: 3; width: 100%; flex: none; }

    .menu-toggle { display: flex; }

    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary);
        z-index: 700;
        padding: 8px 0;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.open { display: flex; }

    .nav-menu a { border-radius: 0; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.06); }

    .category-menu { display: none; }

    .action-btn span:not(.cart-count):not(.wish-count) { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   22. TOP BAR & HEADER RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .top-header-left span { display: none; }
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
    .footer-policies { justify-content: center; }
}
