/* Homepage refinements: calmer surfaces, clearer hierarchy, and better touch targets. */
:root {
    --home-accent: #c9282d;
    --home-accent-dark: #a91f25;
    --home-ink: #17202c;
    --home-muted: #687386;
    --home-line: #e8ebf0;
    --home-surface: #fff;
    --home-radius: 1.25rem;
}

html { scroll-behavior: smooth; }
body { background: #f7f8fa; }
main.pt-20 { padding-top: var(--site-header-height, 3.5rem); }

nav.site-header {
    border-bottom-color: rgba(226, 230, 236, .9);
    box-shadow: 0 5px 22px rgba(25, 34, 48, .045);
}
nav.site-header .header-main-row { gap: .75rem; }
nav.site-header .header-nav-link { transition: color .18s ease, background-color .18s ease; }
nav.site-header .header-nav-link:hover { background: #fff4f4; }
nav.site-header .header-search-input { min-height: 2.75rem; border-radius: 999px; }

.mazen-banner-section {
    padding-top: clamp(1rem, 2.3vw, 2rem);
    padding-bottom: clamp(1rem, 2.3vw, 2rem);
    background: #f7f8fa;
}
.mazen-banner-section .banner-container,
.bottom-banner-container,
.banner-container-shelves {
    border-radius: var(--home-radius);
    box-shadow: 0 14px 36px rgba(24, 34, 50, .10);
}
.mazen-banner-section .banner-container img { border-radius: inherit; }

#shelves-container,
#collections-shelves-container {
    max-width: 1440px;
    padding-top: clamp(1.5rem, 3vw, 2.75rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.75rem);
}
#shelves-container .shelf-section,
#collections-shelves-container .shelf-section {
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.shelf-section > .flex.items-center.justify-between {
    margin-bottom: 1.15rem;
    padding: 0 .25rem;
}
.shelf-section h2 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--home-ink);
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.35;
    letter-spacing: -.025em;
}
.shelf-section h2::before {
    content: "";
    width: .28rem;
    height: 1.35em;
    border-radius: 999px;
    background: linear-gradient(180deg, #e34b4f, var(--home-accent-dark));
}
[dir="ltr"] .shelf-section h2::before { order: -1; }
.shelf-section .shelf-product-card { padding: .2rem; }
.shelf-product-card .laptop-card {
    border: 1px solid var(--home-line);
    border-radius: 1rem;
    background: var(--home-surface);
    box-shadow: 0 3px 12px rgba(23, 32, 44, .045);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.shelf-product-card .laptop-card:hover {
    transform: translateY(-4px);
    border-color: #f0b8ba;
    box-shadow: 0 14px 30px rgba(23, 32, 44, .10);
}
.shelf-product-card .laptop-img-container { border-radius: .8rem; }
#laptopGrid > .laptop-card {
    border-radius: 1rem;
    border-color: var(--home-line);
    box-shadow: 0 3px 12px rgba(23, 32, 44, .045);
}

#products {
    background: #f1f3f6;
    border-top: 1px solid #e9edf2;
    border-bottom: 1px solid #e9edf2;
}
#products > div > .mb-4 h1 {
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -.03em;
}
#products input[type="text"] { min-height: 2.8rem; border-radius: .8rem; }

button[data-modal-target="filterModal"] {
    animation: none;
    box-shadow: 0 8px 22px rgba(169, 31, 37, .26);
}
.laptop-card .add-to-cart-btn:disabled { cursor: not-allowed; opacity: .45; filter: grayscale(.25); transform: none; box-shadow: none; }
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 3px solid rgba(201, 40, 45, .35);
    outline-offset: 3px;
}

.dark body { background: #181b20; }
.dark nav.site-header { border-bottom-color: rgba(255,255,255,.08); box-shadow: 0 5px 22px rgba(0,0,0,.18); }
.dark nav.site-header .header-nav-link:hover { background: rgba(255,255,255,.07); }
.dark .mazen-banner-section { background: #202329; }
.dark #shelves-container,
.dark #collections-shelves-container { color: #f3f4f6; }
.dark .shelf-section h2 { color: #f3f4f6; }
.dark .shelf-product-card .laptop-card,
.dark #laptopGrid > .laptop-card {
    background: #242930;
    border-color: #363c45;
    box-shadow: 0 4px 14px rgba(0,0,0,.14);
}
.dark .shelf-product-card .laptop-card:hover { border-color: #8f3a3d; }
.dark #products { background: #1d2127; border-color: #303640; }

@media (max-width: 767px) {
    nav.site-header .header-main-row { gap: .25rem; }
    .mazen-banner-section { padding-inline: .25rem; }
    .mazen-banner-section .container { padding-inline: .75rem; }
    .mazen-banner-section .banner-container,
    .bottom-banner-container,
    .banner-container-shelves { border-radius: .9rem; }
    #shelves-container,
    #collections-shelves-container { padding-inline: .9rem; }
    .shelf-section > .flex.items-center.justify-between { padding-inline: .1rem; }
    .shelf-section h2 { font-size: 1.15rem; }
    #products { padding-top: 1.5rem; padding-bottom: 1.5rem; }
    button[data-modal-target="filterModal"] { width: 2.9rem; height: 2.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
