/* ================================================================
   home.css — Styles matching the reference UI design
   ================================================================ */

/* ── Global Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --red: #D32F2F;
    --red-dark: #B71C1C;
    --bg: #f5f5f5;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-mid: #444444;
    --text-light: #888888;
    --radius-card: 20px;
    --radius-btn: 50px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.14);
    --font: 'Tajawal', sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
}

::selection {
    background-color: var(--red);
    color: #ffffff;
}

::-moz-selection {
    background-color: var(--red);
    color: #ffffff;
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 3%;
    /* More breathing room at edges */
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    height: 75px;
    /* Consistent height for better alignment */
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 10;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    padding: 4px 10px;
    background: transparent;
    box-sizing: content-box;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Search Bar */
.header-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 550px;
    /* Controlled width for premium feel */
    margin: 0;
    z-index: 5;
    display: none;
    direction: rtl;
}

@media (min-width: 820px) {
    .header-search {
        display: block;
    }
}

/* On smaller screens, allow flex to handle distribution if hidden */
@media (max-width: 819px) {
    .header-search {
        position: static;
        transform: none;
        max-width: none;
        flex: 1;
        margin: 0 15px;
    }
}

.header-search form {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input {
    width: 100%;
    background: #f4f6f9;
    border: 2px solid transparent;
    border-radius: 14px;
    /* More modern squared-round look */
    padding: 12px 50px 12px 20px;
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.header-search input:focus {
    background: #fff;
    border-color: var(--red);
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.1);
    outline: none;
}

.header-search button {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s;
}

.header-search input:focus+button {
    color: var(--red);
}

.header-search button svg {
    width: 20px;
    height: 20px;
}

/* ── Live Search Results ── */
.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: none;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.06);
    animation: slideDown 0.3s ease;
}

.search-results.active {
    display: block;
}

/* Premium Scrollbar for Search Results Dropdown */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 640px) {
    .search-results {
        max-height: 320px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #f8fafc;
    padding-right: 22px;
}

.search-item img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    background: #f1f5f9;
}

.search-item .info {
    flex: 1;
    min-width: 0;
}

.search-item .name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.search-item .desc {
    font-size: 0.75rem;
    color: #888;
    margin: 2px 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-item .price {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--red);
}

/* Cart button */
.cart-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    color: var(--text-dark);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    z-index: 10;
}

.cart-btn:hover {
    background: #fff;
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 8px 24px rgba(211, 47, 47, 0.15);
    transform: translateY(-3px) scale(1.03);
}

.cart-badge {
    position: absolute;
    top: 0;
    left: 0;
    /* left = visually top-left in LTR; top-right in RTL screen */
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
}

/* ================================================================
   MAIN WRAPPER
   ================================================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px 0;
}

/* ================================================================
   HERO CARD  (matches the card with solar panel background)
   ================================================================ */
.hero-card {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;

    /* Unified fixed aspect ratio across all devices */
    aspect-ratio: 16 / 9;

    /* Center the container and reduce width on desktop */
    width: 100%;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow-card);
    margin-bottom: 28px;
    background: #0d0d0d;
    /* dark base while image loads */
}

/* Ensure mobile content has breathing room if height gets too tight */
@media (max-width: 480px) {
    .hero-card__content {
        padding: 16px 15px 20px !important;
        gap: 8px !important;
    }

    .hero-title {
        font-size: 1.3rem !important;
    }

    .hero-desc {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
    }

    .hero-actions {
        flex-direction: row !important;
        gap: 6px !important;
    }

    .hero-actions a {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }
}

/* Background slider container */
.hero-slider-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Individual slide */
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Center to prevent bottom cropping */
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    transform: scale(1.05);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 16px;
}

.slider-btn:hover {
    background: var(--red);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 15px;
}

/* Swapped: Prev on left */
.slider-btn.next {
    right: 15px;
}

/* Swapped: Next on right */

.slider-dots {
    position: absolute;
    bottom: 15px;
    /* Moved to bottom */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--red);
    width: 24px;
    border-radius: 4px;
}

/* Dark gradient overlay covers the absolute bounds */
.hero-card__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.25) 35%,
            rgba(0, 0, 0, 0.78) 100%);
}

/* Content sits on top of the image */
.hero-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 24px 20px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Small badge label */
.hero-badge {
    align-self: flex-start;
    /* RTL: anchors to right (start) */
    background: var(--red);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

/* Main heading */
.hero-title {
    color: #fff;
    font-size: clamp(1.6rem, 5vw, 2.1rem);
    font-weight: 800;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Description */
.hero-desc {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.65;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Button row */
.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-primary {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 11px 26px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, transform 0.18s;
    box-shadow: 0 4px 14px rgba(211, 47, 47, 0.4);
}

.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(211, 47, 47, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    padding: 11px 22px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.18s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.1);
}

.hero-actions-outside {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 25px;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding: 0 20px;
}

.btn-secondary-outside {
    background: transparent;
    color: var(--text-dark);
    border: 1.5px solid var(--text-dark);
    padding: 11px 22px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s, transform 0.18s, color 0.2s, border-color 0.2s;
}

.btn-secondary-outside:hover {
    background: var(--text-dark);
    color: var(--white);
    transform: translateY(-3px) scale(1.02);
}

/* Dark theme support for the outside secondary button */
html[data-theme="dark"] .btn-secondary-outside {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] .btn-secondary-outside:hover {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--white);
}

/* ================================================================
   TRUST / BRANDS SECTION  (below hero)
   ================================================================ */
.trust-section {
    padding: 10px 0 24px;
}

.trust-label {
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    display: block;
}

.trust-heading {
    font-size: clamp(1.3rem, 4.5vw, 1.75rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

/* ── Marquee ticker wrapper ── */
.brands-ticker {
    overflow: hidden;
    width: 100%;
    /* CRITICAL: Force LTR so animation direction is consistent on RTL pages */
    direction: ltr;
    /* Soften the edges */
    -webkit-mask-image: linear-gradient(to right,
            transparent 0,
            black 8%,
            black 92%,
            transparent 100%);
    mask-image: linear-gradient(to right,
            transparent 0,
            black 8%,
            black 92%,
            transparent 100%);
}

/* The scrolling track — must be wider than viewport */
.brands-track {
    display: flex;
    align-items: center;
    width: max-content;
    /* grows to fit all items */
    animation: ticker-scroll 24s linear infinite;
    will-change: transform;
    /* GPU-accelerated */
}

/* Pause on hover */
.brands-ticker:hover .brands-track {
    animation-play-state: paused;
}

/* Each half — exactly equal so -50% lands seamlessly on set 2 */
.brands-set {
    display: flex;
    align-items: center;
    gap: 48px;
    padding-right: 48px;
    /* matches gap so sets join seamlessly */
    flex-shrink: 0;
}

/* Individual brand item */
.brand-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: var(--text-mid);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: color 0.2s, transform 0.2s;
    cursor: default;
    /* Restore RTL text direction for the item label */
    direction: rtl;
    text-decoration: none;
}

a.brand-item {
    cursor: pointer;
}

.brand-item:hover {
    color: var(--red);
    transform: scale(1.06);
}

.brand-item svg,
.brand-logo-img {
    stroke: var(--red);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.brand-logo-img {
    object-fit: contain;
    /* Optional: make logos red if they are black/grayscale */
    /* filter: grayscale(1) brightness(0.5) sepia(1) hue-rotate(-50deg) saturate(5); */
}

/* Separator dot */
.brands-sep {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(211, 47, 47, 0.25);
    flex-shrink: 0;
}

/* ─── The keyframe ───
   Moves exactly -50% of the track width (= one full set).
   When it resets to 0, set-2 is now where set-1 was → seamless.
*/
@keyframes ticker-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ================================================================
   SERVICES SECTION
   ================================================================ */
#services {
    padding: 0 0 32px;
}

#services .section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

#services .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.service-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.service-card svg {
    width: 42px;
    height: 42px;
    stroke: var(--red);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 14px;
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.service-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ================================================================
   PRODUCTS SECTION
   ================================================================ */
#products {
    padding: 0 0 32px;
}

#products .section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
    text-align: center;
}

#products .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
}

/* ── Category Filters ── */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 4px 2px 20px;
    margin-bottom: 8px;
}

.category-btn {
    background: var(--white);
    color: var(--text-mid);
    border: 1px solid #e0e0e0;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-btn:hover {
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(211, 47, 47, 0.1);
}

.category-btn.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.35);
    transform: translateY(-2px);
}

/* ── Products Carousel (mobile-first snap scroll) ── */
.products-carousel-wrapper {
    position: relative;
}

/* Scroll container */
.products-carousel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px 2px 16px;
    margin: 0 -2px;
}

.products-carousel::-webkit-scrollbar {
    display: none;
}

/* Each card snaps at every 2-card boundary */
.product-card {
    scroll-snap-align: start;
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.quick-add-btn {
    width: 100%;
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 12px;
    background: var(--red);
    color: #fff;
    border: none;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.quick-add-btn:not(:disabled):hover {
    background: var(--red-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.4);
}

.quick-add-btn svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.13);
}

.product-card img {
    width: 100%;
    height: 130px;
    /* shorter on mobile */
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card__body {
    padding: 10px 10px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card__body h3 {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-dark);
    line-height: 1.35;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__price {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    align-self: flex-start;
}

.product-card__desc {
    font-size: 0.74rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__tag {
    display: inline-block;
    background: #f3f4f6;
    color: var(--text-mid);
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: auto;
    padding-top: 6px;
    font-weight: 600;
    align-self: flex-start;
}

/* ── Scroll indicator dots ── */
.products-dots {
    display: none;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    padding-bottom: 4px;
}

.products-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background 0.25s, width 0.25s;
    border: none;
    padding: 0;
    cursor: pointer;
}

.products-dot.active {
    background: var(--red);
    width: 18px;
    border-radius: 3px;
}

/* Desktop: regular 2-column grid, no horizontal scroll */
@media (min-width: 640px) {
    .products-carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-flow: row;
        grid-auto-columns: unset;
        overflow-x: visible;
        scroll-snap-type: none;
        gap: 20px;
        margin: 0;
    }

    .product-card img {
        height: 190px;
    }

    .product-card__body {
        padding: 16px;
    }

    .product-card__body h3 {
        font-size: 1rem;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    .product-card__desc {
        font-size: 0.84rem;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    .products-dots {
        display: none;
    }

    /* no dots needed on desktop */
}

/* Large Desktop: 4-column grid */
@media (min-width: 1024px) {
    .products-carousel {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ================================================================
   PARTNERS SECTION
   ================================================================ */
#partners {
    padding: 0 0 40px;
}

#partners .section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

#partners .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
}

.partners-logos {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    align-items: center;
}

.partners-logos::-webkit-scrollbar {
    display: none;
}

.partners-logos img {
    height: 38px;
    width: auto;
    flex-shrink: 0;
    filter: grayscale(100%) opacity(0.55);
    transition: filter 0.25s ease, transform 0.2s ease;
}

.partners-logos img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.06);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: #0d111b;
    color: rgba(255, 255, 255, 0.65);
    padding: 70px 20px 120px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}


.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ── Footer Columns ── */
.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Correct right-alignment in RTL */
    text-align: right;
}

/* ── Brand Column ── */
.footer-col--brand {
    gap: 20px;
}

.footer-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 10px;
    box-sizing: content-box;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}


.footer-about-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.5);
    max-width: 320px;
    margin: 0;
}

/* ── Socials ── */
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.footer-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-social-btn:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.4);
}

.footer-social-btn svg {
    width: 18px;
    height: 18px;
}

.footer-social-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    transform: translateY(-3px);
}

/* ── Title & Line ── */
.footer-col__title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.2;
}

.footer-title-line {
    width: 40px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
    margin-bottom: 25px;
    transition: width 0.3s ease;
}

.footer-col:hover .footer-title-line {
    width: 65px;
}

/* ── Quick Links ── */
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.footer-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link::before {
    content: '‹';
    color: var(--red);
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.6;
}

.footer-link:hover {
    color: var(--red);
    padding-right: 10px;
}

/* ── Contact Info ── */
.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.footer-contact-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    width: 100%;
}

.footer-contact-link:hover {
    padding-right: 8px;
}

.footer-contact-link:hover .footer-contact-icon {
    background: var(--red);
    border-color: var(--red);
}

.footer-contact-link:hover .footer-contact-icon svg {
    stroke: #fff;
    fill: none;
}

.footer-contact-link:hover .contact-val {
    color: var(--red);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
}

.footer-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: 1.5px solid rgba(211, 47, 47, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.footer-contact-icon svg {
    width: 15px;
    height: 15px;
    stroke: var(--red);
    stroke-width: 2.5;
    fill: none;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-val {
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.contact-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
}

/* Divider & Bottom */
.footer-divider {
    height: 1px;
    background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.06), transparent);
    margin: 40px 0 25px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-copy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
}




/* ================================================================
   SCROLL REVEAL ANIMATIONS
   ================================================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay for children if needed */
.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* ================================================================
   RESPONSIVE TWEAKS
   ================================================================ */
@media (max-width: 480px) {
    .hero-card {
        min-height: unset;
        aspect-ratio: 16 / 9;
    }

    .hero-card__content {
        padding: 12px 15px 15px !important;
        gap: 6px !important;
    }

    .hero-title {
        font-size: 1.35rem;
    }

    .hero-desc {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .hero-actions {
        gap: 6px;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.82rem;
        padding: 8px 16px;
    }
}

/* ================================================================
   PRODUCT DETAILS PAGE (Premium Redesign)
   ================================================================ */
.product-details-page {
    padding-bottom: 80px;
    padding-top: 10px;
}

.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 30px;
    opacity: 0.8;
}

.product-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.product-breadcrumb a:hover {
    color: var(--red);
}

.product-breadcrumb .sep {
    font-size: 0.6rem;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

@media (min-width: 992px) {
    .product-main {
        grid-template-columns: 0.8fr 1.2fr;
        /* Reduced image width, increased info width */
        align-items: start;
        gap: 60px;
    }
}

/* Visuals */
.product-visuals {
    position: relative;
    z-index: 10;
}

@media (min-width: 992px) {
    .product-visuals {
        position: relative;
        align-self: start;
    }
}

.product-img-wrapper {
    background: #fff;
    border-radius: 24px;
    padding: 10px;
    /* Reduced padding */
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.product-img-wrapper img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 16px;
}

/* Info Section */
.product-header {
    margin-bottom: 35px;
}

.product-badge {
    display: inline-block;
    background: var(--red);
    color: #fff;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.product-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.product-price-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-val {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--red);
}

.price-tax {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.product-description {
    margin-bottom: 40px;
}

.product-description h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.product-description h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 30px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
}

.product-description p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-mid);
    white-space: pre-line;
}

/* Checkout Section */
.checkout-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 12px;
    border-radius: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    margin-bottom: 40px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.qty-control {
    display: flex;
    align-items: center;
    background: #f8f8f8;
    border-radius: 50px;
    padding: 4px;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--red);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    /* Changed from none to handle dynamic JS */
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.3);
}

/* ── Cart Side Drawer ── */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    left: -420px;
    /* Hidden off-screen left for RTL feel */
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    z-index: 2001;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    left: 0;
}

.cart-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f1f1;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.cart-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
}

.cart-title svg {
    width: 24px;
    height: 24px;
    color: var(--red);
}

.cart-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-clear {
    background: rgba(211, 47, 47, 0.08);
    border: none;
    color: var(--red);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-clear:hover {
    background: var(--red);
    color: #fff;
    transform: rotate(10deg);
}

.cart-clear svg {
    width: 18px;
    height: 18px;
}

.cart-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-dark);
}

.cart-close:hover {
    background: var(--text-dark);
    color: #fff;
    transform: rotate(90deg);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    background: #f8fafc;
}

.cart-empty {
    text-align: center;
    padding-top: 80px;
}

.empty-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
    opacity: 0.2;
}

.cart-empty p {
    color: var(--text-mid);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* ── Cart Items ── */
.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.cart-item img {
    width: 85px;
    height: 85px;
    border-radius: 12px;
    object-fit: cover;
    background: #f1f5f9;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-dark);
    line-height: 1.4;
}

.item-price {
    color: var(--red);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 12px;
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-qty-control {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 2px;
}

.item-qty-control .qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #fff;
    color: var(--text-dark);
    cursor: pointer;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.item-qty-control .qty-btn:hover {
    background: var(--text-dark);
    color: #fff;
}

.item-qty-control .qty-val {
    padding: 0 12px;
    font-size: 0.9rem;
    font-weight: 700;
    width: 34px;
    text-align: center;
}

.item-remove {
    background: rgba(211, 47, 47, 0.08);
    border: none;
    color: var(--red);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.item-remove svg {
    width: 16px;
    height: 16px;
}

.item-remove:hover {
    background: var(--red);
    color: #fff;
}

/* ── Cart Footer & Summary ── */
.cart-footer {
    padding: 24px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.03);
}

.cart-coupon {
    margin-bottom: 20px;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
}

.coupon-input-group input {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.coupon-input-group input:focus {
    border-color: var(--red);
    outline: none;
    background: #fff;
}

.btn-apply-coupon {
    background: var(--text-dark);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 12px;
    font-family: var(--font);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-apply-coupon:hover {
    background: #000;
}

.coupon-msg {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
}

.coupon-msg.error {
    color: var(--red);
}

.coupon-msg.success {
    color: #10b981;
}

.cart-summary {
    background: #f8fafc;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-mid);
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row .text-red {
    color: var(--red);
    font-weight: 700;
}

.summary-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 12px 0;
}

.cart-total {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-top: 4px;
}

.total-price {
    color: var(--red);
    font-size: 1.3rem;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    font-size: 1.1rem;
    text-align: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.25);
}

#qty-input {
    width: 50px;
    border: none;
    background: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font);
}

.add-to-cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 52px;
    border-radius: 50px;
    background: var(--red);
    color: #fff;
    border: none;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.3);
}

.add-to-cart-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(211, 47, 47, 0.45);
    background: var(--red-dark);
}

.add-to-cart-btn svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}

/* Trust Badges */
.trust-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.02);
    padding: 12px 18px;
    border-radius: 16px;
    transition: background 0.2s;
}

.badge-item:hover {
    background: rgba(211, 47, 47, 0.04);
}

.badge-icon {
    width: 38px;
    height: 38px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.badge-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--red);
}

.badge-item span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Related Section */
.related-section {
    padding-top: 60px;
    border-top: 1px solid #eee;
}

.related-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 30px;
    color: var(--text-dark);
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 992px) {
    .related-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* Animation refinement */
.product-visuals {
    animation: floatIn 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Floating WhatsApp Button ── */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    /* WhatsApp Green */
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: whatsapp-pulse 2s infinite;
    text-decoration: none;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #128C7E;
    /* WhatsApp Darker Green */
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        transform: scale(1);
    }
}

/* Ensure it doesn't overlap bottom nav on mobile */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 100px;
        /* Position above the glass bottom nav */
        right: 20px;
        width: 55px;
        height: 55px;
    }
}

/* ================================================================
   DARK THEME (client — html[data-theme="dark"])
   ================================================================ */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c1017;
    --white: #141c2c;
    --text-dark: #e8eef5;
    --text-mid: #aab4c5;
    --text-light: #8b95a8;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
    /* align with style.css */
    --primary-red: #ef5350;
    --dark-red: #d32f2f;
    --off-white: #0c1017;
}

html[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text-dark);
}

html[data-theme="dark"] .site-header {
    background: #ffffff !important;
    box-shadow: 0 1px 14px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .site-header .logo-img {
    background: transparent !important;
    box-shadow: none !important;
}

/* Force light mode text/colors for header in dark mode */
html[data-theme="dark"] .site-header .header-search input {
    background: #f4f6f9 !important;
    color: #1a1a1a !important;
}

html[data-theme="dark"] .site-header .header-search input::placeholder {
    color: #888888 !important;
}

html[data-theme="dark"] .site-header .cart-btn {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1a1a1a !important;
}

html[data-theme="dark"] .site-header .mgt-theme-toggle {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: var(--red) !important;
    /* Sun icon becomes red as requested! */
}


html[data-theme="dark"] .header-search input {
    background: #1a2438;
    color: var(--text-dark);
}

html[data-theme="dark"] .header-search input:focus {
    background: #1e2d4a;
    box-shadow: 0 10px 25px rgba(239, 83, 80, 0.12);
}

html[data-theme="dark"] .header-search button {
    color: #8b9cb8;
}

html[data-theme="dark"] .search-results {
    background: var(--white);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .search-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .search-item:hover {
    background: rgba(239, 83, 80, 0.08);
}

html[data-theme="dark"] .search-item img {
    background: #243047;
}

html[data-theme="dark"] .cart-btn {
    background: #1a2438;
    border-color: #2a3548;
    color: var(--text-dark);
}

html[data-theme="dark"] .cart-btn:hover {
    background: #1e2d4a;
    box-shadow: 0 5px 18px rgba(239, 83, 80, 0.12);
}

html[data-theme="dark"] .product-card {
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .product-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .service-card {
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .service-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .category-btn {
    border-color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .quick-add-btn:not(:disabled):hover {
    background: var(--red-dark);
    color: #fff;
}

html[data-theme="dark"] .site-footer {
    background: #050810;
    border-top-color: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .footer-logo {
    background: rgba(255, 255, 255, 0.97);
}


html[data-theme="dark"] .logo-img {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .product-img-wrapper {
    background: var(--white);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .checkout-container {
    background: var(--white);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .qty-control {
    background: #1a2438;
}

html[data-theme="dark"] .cart-drawer {
    background: #141c2c;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .cart-header {
    background: rgba(20, 28, 44, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .cart-body {
    background: #0f1522;
}

html[data-theme="dark"] .cart-item {
    background: #1a2438;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .cart-item:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .cart-item img {
    background: #243047;
}

html[data-theme="dark"] .item-qty-control {
    background: #243047;
}

html[data-theme="dark"] .item-qty-control .qty-btn {
    background: #1e2d4a;
    color: var(--text-dark);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .cart-close {
    background: #243047;
    color: var(--text-dark);
}

html[data-theme="dark"] .cart-footer {
    background: #141c2c;
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .coupon-input-group input {
    background: #1a2438;
    border-color: #334155;
    color: var(--text-dark);
}

html[data-theme="dark"] .coupon-input-group input:focus {
    background: #1e2d4a;
}

html[data-theme="dark"] .cart-summary {
    background: #1a2438;
}

html[data-theme="dark"] .summary-divider {
    background: #334155;
}

html[data-theme="dark"] .btn-apply-coupon:hover {
    background: #000;
}

html[data-theme="dark"] .badge-item {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .badge-icon {
    background: #1a2438;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .related-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .partners-logos img {
    filter: grayscale(100%) opacity(0.45);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .cart-drawer,
html[data-theme="dark"] .search-results {
    transition:
        background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.45s ease,
        color 0.35s ease,
        box-shadow 0.45s ease;
}

/* ================================================================
   RESPONSIVE DESKTOP ADJUSTMENTS (MOBILE NAVIGATION)
   ================================================================ */
@media (min-width: 768px) {

    /* Hide the mobile bottom navigation on desktop */
    .mobile-only-nav {
        display: none !important;
    }

    /* Reset the footer padding to remove the empty space left by the navigation */
    .site-footer {
        padding-bottom: 70px !important;
    }

    /* Reset the product details page padding to remove the empty space */
    .product-details-page {
        padding-bottom: 40px !important;
    }
}

/* Unified Button Styles Refinement */
.load-more-btn {
    background: var(--red);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(211, 47, 47, 0.4);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.load-more-btn:hover {
    background: var(--red-dark);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.5);
}

.header-search button {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-search button:hover {
    color: var(--red) !important;
    transform: scale(1.2);
}

/* ── Site-wide Modals ── */
.site-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.site-modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.site-modal {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.site-modal-backdrop.active .site-modal {
    transform: scale(1);
}

.site-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(211, 47, 47, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.site-modal-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--red);
    fill: none;
    stroke-width: 2;
}

.site-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
}

/* Modal Button Styles */
.site-modal-btn {
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    font-family: inherit;
}

.site-modal-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.site-modal-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-2px);
}

.site-modal-btn-danger {
    background: rgba(211, 47, 47, 0.08);
    color: var(--red);
    border-color: rgba(211, 47, 47, 0.2);
}

.site-modal-btn-danger:hover {
    background: var(--red);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.25);
}

html[data-theme="dark"] .site-modal-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .site-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}


html[data-theme="dark"] .site-modal {
    background: #070b14;
    color: #f1f5f9;
}

html[data-theme="dark"] .site-modal-icon {
    background: rgba(211, 47, 47, 0.15);
}

/* ── Mobile Search Overlay & Toggle ── */
.mobile-search-toggle {
    display: none;
}

@keyframes searchSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 819px) {
    .mobile-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 1px solid #e2e8f0 !important;
        border-radius: 14px;
        cursor: pointer;
        background: #ffffff !important;
        /* Always white background! */
        color: #64748b !important;
        /* Transparent/grey icon by default! */
        transition:
            transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
            box-shadow 0.35s ease,
            background 0.35s ease,
            border-color 0.35s ease,
            color 0.35s ease;
    }

    .mobile-search-toggle svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
    }

    .mobile-search-toggle:hover,
    .mobile-search-toggle.active {
        transform: translateY(-3px) scale(1.03);
        box-shadow: 0 8px 24px rgba(211, 47, 47, 0.15);
        border-color: var(--red) !important;
        color: var(--red) !important;
        /* Red magnifying glass icon when pressed/active! */
    }

    .mobile-search-toggle:active {
        transform: scale(0.96);
    }

    html[data-theme="dark"] .mobile-search-toggle {
        background: #ffffff !important;
        /* Kept white even in dark mode! */
        color: #64748b !important;
        /* Kept transparent/grey by default in dark mode! */
        border-color: #e2e8f0 !important;
        box-shadow: none !important;
    }

    html[data-theme="dark"] .mobile-search-toggle:hover,
    html[data-theme="dark"] .mobile-search-toggle.active {
        background: #ffffff !important;
        border-color: var(--red) !important;
        color: var(--red) !important;
        /* Red lens when active/pressed on dark mode! */
        box-shadow: none !important;
    }

    .header-search {
        display: none;
        /* hidden by default on mobile */
        position: absolute !important;
        top: 76px !important;
        /* slide down directly below header */
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        transform: none !important;
        background: var(--white);
        padding: 12px 20px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
        z-index: 999 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        margin: 0 !important;
    }

    .header-search.active {
        display: block !important;
        animation: searchSlideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    html[data-theme="dark"] .header-search {
        background: #0f172a !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
    }
}

/* Remove all shadows from theme toggle and mobile search toggle on storefront header */
.site-header .mgt-theme-toggle,
.site-header .mgt-theme-toggle:hover,
.site-header .mgt-theme-toggle.is-dark,
.site-header .mgt-theme-toggle.is-dark:hover,
.mobile-search-toggle,
.mobile-search-toggle:hover,
.mobile-search-toggle.active,
html[data-theme="dark"] .mobile-search-toggle,
html[data-theme="dark"] .mobile-search-toggle:hover,
html[data-theme="dark"] .mobile-search-toggle.active {
    box-shadow: none !important;
}

/* Mobile Header Breathing Room & Element Shrinking to Fit Small Screens */
@media (max-width: 768px) {
    .header-inner {
        padding: 8px 12px !important;
        height: auto !important;
        min-height: 60px !important;
    }

    /* Shrink the logo on mobile */
    .logo-img {
        height: 36px !important;
        padding: 2px 4px !important;
    }

    /* Reduce spacing between buttons */
    .header-actions {
        gap: 6px !important;
    }

    /* Shrink the action buttons to fit 375px screens */
    .cart-btn,
    .mgt-lang-toggle,
    .mgt-theme-toggle,
    .mobile-search-toggle {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
    }

    /* Adjust cart badge position and size */
    .cart-badge {
        min-width: 15px !important;
        height: 15px !important;
        font-size: 8px !important;
    }

    /* Center the smaller theme toggle icon */
    .mgt-theme-toggle__icon {
        width: 18px !important;
        height: 18px !important;
        margin: -9px 0 0 -9px !important;
    }
}