:root {
    --bg-primary: #f2f4f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --glass: #ffffff;
    --glass-border: #ebebeb;
    --cyan: #14bfc7;
    --cyan-dim: #e9f4fc;
    --blue: #1976d2;
    --blue-dim: #e9f4fc;
    --text-primary: #101316;
    --text-secondary: #6f777c;
    --text-muted: #6f777c;
    --radius: 28px;
    --radius-sm: 20px;
    --color-canvas-mist: #f2f4f5;
    --color-pure-white: #ffffff;
    --color-ink-black: #101316;
    --color-faint-border: #ebebeb;
    --color-muted-gray: #6f777c;
    --color-shop-blue: #1976d2;
    --color-shop-cyan: #14bfc7;
    --color-blue-wash: #e9f4fc;
    --font-shop: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-card: 0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -2px rgba(0,0,0,.10);
    --shadow-chip: 0 2px 8px rgba(0,0,0,.06);
    --shadow-search: 0 4px 24px rgba(25,118,210,.28);
    --radius-card: 28px;
}

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    min-height: 100dvh;
    padding-left: 64px;
    overflow-x: hidden;
    background: var(--color-canvas-mist);
    color: var(--color-ink-black);
    font-family: var(--font-shop);
    font-size: 16px;
    letter-spacing: -.031em;
    line-height: 1.45;
    transition: background-color .22s ease, color .22s ease;
}
button, input { font: inherit; }
button { letter-spacing: inherit; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: fixed;
    z-index: 4000;
    top: 10px;
    left: 74px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--color-ink-black);
    color: #fff;
    transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.sidebar-nav {
    position: fixed;
    z-index: 1200;
    inset: 0 auto 0 0;
    width: 64px;
    padding: 12px 8px 14px;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 24px;
    background: var(--color-pure-white);
}
.rail-brand {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
}
.rail-brand img { width: 42px; height: auto; display: block; }
.rail-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.rail-links a {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: var(--color-ink-black);
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}
.rail-links a:hover, .rail-links a.active { background: var(--color-canvas-mist); }
.rail-links svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rail-label { display: none; }
.rail-profile {
    width: 32px;
    height: 32px;
    margin-top: auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--color-faint-border);
    border-radius: 50%;
    color: var(--color-ink-black);
    background: var(--color-pure-white);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: -.02em;
}

.store-toolbar {
    width: min(100% - 48px, 1200px);
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.store-location { color: var(--color-muted-gray); font-size: 14px; }
.nav-icon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 0;
    border-radius: 50%;
    background: var(--color-pure-white);
    color: var(--color-ink-black);
    cursor: pointer;
    box-shadow: var(--shadow-chip); /* taste-skill-ignore: kept to match the supplied store-design reference */
    transition: transform .18s ease;
}
.nav-icon-btn:hover { transform: translateY(-2px); }
.nav-icon-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cart-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--color-shop-blue);
    color: white;
    font-size: 11px;
    letter-spacing: 0;
}

.hero {
    width: min(100% - 48px, 1200px);
    margin: 0 auto;
    padding: 12px 0 44px;
    text-align: center;
    overflow: visible;
    background: transparent;
}
.hero-showcase {
    /* Reserva la altura de las tarjetas antes de que lleguen los productos (evita el salto de diseño). */
    min-height: calc(clamp(126px, 14vw, 164px) + 74px);
    margin: 0 auto 14px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
}
.hero-showcase:empty { visibility: hidden; }
.hero-showcase[hidden] { display: none; }
.spotlight-card {
    width: clamp(126px, 14vw, 164px);
    padding: 7px 7px 10px;
    border: 0;
    border-radius: var(--radius-card);
    background: var(--color-pure-white);
    box-shadow: var(--shadow-card); /* taste-skill-ignore: product spotlight uses the supplied reference elevation */
    color: var(--color-ink-black);
    text-align: left;
    cursor: pointer;
    transition: transform .22s ease;
}
.spotlight-card:hover { transform: translateY(-5px); }
.spotlight-card-1 { margin-bottom: 18px; }
.spotlight-card-3 { margin-bottom: 26px; }
.spotlight-card img {
    width: 100%;
    aspect-ratio: 1;
    display: block;
    object-fit: contain;
    padding: 9px;
    border-radius: 20px;
    background: var(--color-canvas-mist);
}
.spotlight-name, .spotlight-price { display: block; padding: 0 5px; }
.spotlight-name {
    margin-top: 9px;
    overflow: hidden;
    color: var(--color-ink-black);
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.spotlight-price { margin-top: 2px; color: var(--color-muted-gray); font-size: 12px; }
.hero-brand {
    margin: 4px 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--color-ink-black);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -.05em;
}
.hero-brand img { width: 54px; height: auto; display: block; }
.hero-brand-shop { color: var(--color-shop-blue); }
.hero h1 {
    max-width: 820px;
    margin: 0 auto;
    color: var(--color-ink-black);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 500;
    letter-spacing: -.055em;
    line-height: 1.02;
}
.hero p {
    max-width: 520px;
    margin: 14px auto 22px;
    color: var(--color-muted-gray);
    font-size: 16px;
    line-height: 1.45;
}
.hero-search {
    width: min(100%, 620px);
    min-height: 60px;
    margin: 0 auto;
    padding: 5px 6px 5px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(16,19,22,.12);
    border-radius: 9999px;
    background: var(--color-pure-white);
}
.hero-search:focus-within { border-color: var(--color-shop-blue); }
.hero-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--color-ink-black);
    background: transparent;
    font-size: 16px;
}
.hero-search input::placeholder { color: var(--color-muted-gray); opacity: 1; }
.hero-search button {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 0;
    border-radius: 50%;
    background: var(--color-shop-blue);
    color: white;
    box-shadow: var(--shadow-search); /* taste-skill-ignore: supplied reference specifies an elevated search action */
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
    transition: background-color .18s ease, transform .18s ease;
}
.hero-search button:hover { background: #1265b6; transform: scale(1.04); }

.stats-row {
    width: min(100% - 48px, 660px);
    margin: 0 auto 48px;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    gap: clamp(28px, 8vw, 92px);
    border-radius: 20px;
    background: rgba(255,255,255,.55);
}
.stat-item { text-align: center; }
.stat-item .num { color: var(--color-ink-black); font-size: 18px; font-weight: 500; letter-spacing: -.04em; }
.stat-item .num { background: none; -webkit-text-fill-color: currentColor; }
.stat-item .label { margin-top: 1px; color: var(--color-muted-gray); font-size: 12px; }

.section {
    width: min(100% - 48px, 1200px);
    margin: 0 auto;
    padding: 24px 0 40px;
    scroll-margin-top: 24px;
}
#categorias {
    padding: 20px;
    border: 1px solid var(--color-faint-border);
    border-radius: 20px;
    background: rgba(255,255,255,.035);
}
.section + .section { margin-top: 12px; }
.section-title {
    margin-bottom: 22px;
    color: var(--color-ink-black);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -.05em;
}
.section-title span { color: inherit; }
.categories-grid {
    display: flex;
    width: max-content;
    min-width: 100%;
    justify-content: space-between;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.categories-grid::-webkit-scrollbar { display: none; }
.category-rail {
    position: relative;
    overflow: hidden;
}
.category-carousel-arrow {
    position: absolute;
    z-index: 2;
    top: 43%;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--color-faint-border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-pure-white) 88%, transparent);
    box-shadow: 0 5px 20px rgba(0,0,0,.18);
    backdrop-filter: blur(14px);
    color: var(--color-ink-black);
    cursor: pointer;
    font-size: 27px;
    line-height: 1;
    transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}
.category-carousel-arrow:hover { transform: scale(1.06); background: var(--color-pure-white); }
.category-carousel-arrow[hidden] { display: none; }
.category-carousel-prev { left: 0; }
.category-carousel-next { right: 0; }
.category-card {
    flex: 0 0 156px;
    height: 174px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--color-faint-border);
    border-radius: 18px;
    background: var(--color-pure-white);
    color: var(--color-ink-black);
    text-align: center;
    cursor: pointer;
    scroll-snap-align: start;
    transition: color .18s ease, transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.category-card:hover { transform: translateY(-3px); }
.category-card:focus-visible { outline: 2px solid var(--color-shop-blue); outline-offset: 2px; }
.category-card.active {
    color: var(--color-shop-blue);
    background: color-mix(in srgb, var(--color-shop-blue) 9%, transparent);
    border-color: var(--color-shop-blue);
}
.category-image-wrap {
    width: 100%;
    height: 106px;
    flex: 0 0 106px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: var(--color-canvas-mist);
}
.category-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.category-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-shop-blue) 12%, var(--color-pure-white));
    color: var(--color-shop-blue);
}
.category-icon svg { width: 30px; height: 30px; }
.image-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--color-shop-blue); }
.image-fallback svg { width: 54px; height: 54px; }
.modal-image-fallback svg { width: 88px; height: 88px; }
.category-name {
    width: 100%;
    height: 34px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}
.section > div[style*="justify-content:space-between"] { margin-bottom: 16px; }
.btn-secondary {
    padding: 9px 15px;
    border: 1px solid var(--color-faint-border);
    border-radius: 9999px;
    background: var(--color-pure-white);
    color: var(--color-ink-black);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
}
.products-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.product-card {
    min-width: 0;
    padding: 7px;
    border: 1px solid var(--color-faint-border);
    border-radius: 24px;
    background: var(--color-pure-white);
    box-shadow: none;
    color: var(--color-ink-black);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.product-card:hover,
.product-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--color-shop-blue);
    box-shadow: 0 10px 24px rgba(25, 118, 210, .1);
}
.product-card > div:first-of-type {
    width: calc(100% - 2px) !important;
    margin: 0 auto;
    border-radius: 20px;
    background: var(--color-canvas-mist) !important;
}
.product-image-frame {
    aspect-ratio: 1;
    overflow: hidden;
}
.card-img { display: block; width: 100%; height: 100%; padding: 9px; border-radius: 20px; object-fit: contain; }
.product-card > div:nth-of-type(2) { padding: 12px 10px 11px !important; }
.product-card > div:nth-of-type(2) > div:first-child {
    margin-bottom: 4px !important;
    color: var(--color-muted-gray) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    text-transform: none !important;
}
.product-card > div:nth-of-type(2) > div:nth-child(2) {
    min-height: 42px;
    margin-bottom: 7px !important;
    color: var(--color-ink-black) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.35;
}
.card-price { color: var(--color-ink-black); font-size: 16px; font-weight: 500; }
.product-card > div:nth-of-type(2) span { color: var(--color-muted-gray) !important; font-size: 12px !important; }
.card-badge {
    z-index: 2;
    top: 16px;
    left: 16px;
    padding: 6px 10px;
    border-radius: 9999px;
    background: var(--color-shop-blue);
    color: white;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
}
.catalog-message {
    grid-column: 1 / -1;
    padding: 32px 20px;
    color: var(--color-muted-gray);
    text-align: center;
}

.btn-primary {
    padding: 12px 20px;
    border-radius: 9999px;
    background: var(--color-shop-blue);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}
.btn-primary:hover { background: #1265b6; transform: translateY(-1px); }
.modal-overlay {
    position: fixed;
    z-index: 2000;
    inset: 0;
    padding: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15,19,22,.48);
}
.modal-overlay.open { display: flex; }
.modal-box {
    width: min(900px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 0;
    border-radius: 28px;
    background: var(--color-pure-white);
    box-shadow: 0 12px 40px rgba(0,0,0,.18); /* taste-skill-ignore: dialog overlay */
}
.modal-gallery { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--color-canvas-mist); }
.modal-gallery img { width: 100%; height: 100%; object-fit: contain; }
.modal-gallery .modal-close-btn,
.modal-gallery .modal-nav-btn {
    position: absolute;
    z-index: 30;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(16,19,22,.68);
    color: #fff;
    cursor: pointer;
}
.modal-gallery .modal-close-btn { top: 12px; right: 12px; }
.modal-gallery .modal-nav-btn { top: 50%; transform: translateY(-50%); font-size: 22px; }
.modal-gallery .modal-nav-btn.left { left: 12px; }
.modal-gallery .modal-nav-btn.right { right: 12px; }
.modal-gallery .modal-counter {
    position: absolute;
    z-index: 30;
    bottom: 14px;
    left: 50%;
    padding: 5px 10px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(16,19,22,.68);
    color: #fff;
    font-size: 12px;
}
.modal-product-category { color: var(--color-shop-blue); font-size: 13px; }
.modal-price { color: var(--color-shop-blue); font-size: 36px; font-weight: 500; letter-spacing: -.05em; }
.quantity-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--color-canvas-mist);
    color: var(--color-ink-black);
    cursor: pointer;
}
.quantity-button.small { width: 26px; height: 26px; font-size: 14px; }
.remove-item { padding: 4px; border: 0; background: transparent; color: var(--color-muted-gray); cursor: pointer; font-size: 18px; }
.modal-gallery .modal-close-btn, .modal-gallery .modal-nav-btn { background: rgba(16,19,22,.68); }
.cart-panel {
    position: fixed;
    z-index: 3000;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    width: min(420px, 100vw);
    right: min(-420px, -100vw);
    border: 0;
    border-radius: 28px 0 0 28px;
    background: var(--color-pure-white);
    color: var(--color-ink-black);
    box-shadow: -8px 0 32px rgba(0,0,0,.12); /* taste-skill-ignore: slide-over cart overlay */
    transition: right .32s ease;
}
.cart-panel.open { right: 0; }
.cart-panel > div:first-child, .cart-panel > div:last-child { border-color: var(--color-faint-border) !important; }
.cart-panel > div:first-child button { color: var(--color-ink-black) !important; }
.cart-panel > div:last-child > div span:last-child { color: var(--color-shop-blue) !important; }
.cart-panel .btn-primary { justify-content: center; }
.cart-panel #cart-total, #modal-info .modal-price {
    background: none !important;
    color: var(--color-shop-blue) !important;
    -webkit-text-fill-color: var(--color-shop-blue) !important;
}
.cart-item-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.cart-item-thumb {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: var(--color-canvas-mist);
    font-size: 22px;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cart-item-row > div:nth-child(2) > div:first-child { color: var(--color-ink-black); font-size: 14px !important; }
.cart-item-row > div:nth-child(2) > div:last-child { color: var(--color-shop-blue) !important; font-size: 14px !important; font-weight: 500 !important; }
footer {
    margin-top: 44px;
    padding: 38px 24px;
    background: var(--color-ink-black);
    color: rgba(255,255,255,.72);
    text-align: center;
    font-size: 14px;
}
.footer-brand {
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -.04em;
    text-decoration: none;
}
.footer-brand img { width: 38px; height: auto; }
:focus-visible { outline: 3px solid var(--color-shop-cyan); outline-offset: 3px; }

@media (max-width: 1100px) {
    .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 680px) {
    body { padding-left: 0; padding-bottom: 70px; }
    .sidebar-nav {
        inset: auto 0 0;
        width: 100%;
        height: 64px;
        padding: 4px 8px max(4px, env(safe-area-inset-bottom));
        flex-direction: row;
        justify-content: center;
        gap: 0;
        box-shadow: 0 -2px 12px rgba(0,0,0,.06); /* taste-skill-ignore: fixed mobile navigation layer */
    }
    .rail-brand, .rail-profile { display: none; }
    .rail-links { width: 100%; flex-direction: row; justify-content: space-around; gap: 2px; }
    .rail-links a { width: 56px; height: 54px; gap: 2px; border-radius: 16px; }
    .rail-links a { display: flex; flex-direction: column; justify-content: center; }
    .rail-links svg { width: 21px; height: 21px; }
    .rail-label { display: block; font-size: 10px; letter-spacing: -.015em; }
    .store-toolbar, .hero, .section { width: min(100% - 32px, 1200px); }
    .skip-link { left: 12px; }
    .store-toolbar { min-height: 58px; }
    .hero { padding-top: 4px; padding-bottom: 30px; }
    .hero-showcase { min-height: calc(min(29vw, 150px) + 58px); margin-bottom: 17px; gap: 8px; }
    .spotlight-card { width: min(29vw, 150px); padding: 5px 5px 8px; border-radius: 20px; }
    .spotlight-card-1 { margin-bottom: 8px; }
    .spotlight-card-3 { margin-bottom: 13px; }
    .spotlight-card img { border-radius: 15px; }
    .spotlight-name { font-size: 11px; }
    .spotlight-price { font-size: 11px; }
    .hero-brand { font-size: 18px; }
    .hero-brand img { width: 44px; }
    .hero h1 { max-width: 460px; font-size: clamp(34px, 9vw, 46px); }
    .hero p { margin: 10px auto 18px; font-size: 15px; }
    .hero-search { min-height: 56px; padding-left: 16px; }
    .hero-search button { width: 44px; height: 44px; flex-basis: 44px; }
    .stats-row { width: min(100% - 32px, 560px); margin-bottom: 28px; gap: 22px; }
    .stat-item .num { font-size: 16px; }
    .stat-item .label { font-size: 11px; }
    .section { padding: 18px 0 24px; }
    #categorias { padding: 14px; }
    .section-title { margin-bottom: 15px; font-size: 19px; }
    .section > div[style*="justify-content:space-between"] { align-items: flex-start !important; flex-direction: column; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-card { padding: 5px; border-radius: 22px; }
    .product-card > div:first-of-type, .card-img { border-radius: 16px; }
    .product-card > div:nth-of-type(2) { padding: 9px 7px 8px !important; }
    .product-card > div:nth-of-type(2) > div:nth-child(2) { min-height: 38px; font-size: 13px !important; }
    .card-price { font-size: 14px; }
    .product-card > div:nth-of-type(2) span { font-size: 10px !important; }
    .categories-grid { gap: 14px; }
    .category-card { flex-basis: 138px; height: 154px; padding: 10px; gap: 6px; }
    .category-image-wrap { height: 92px; flex-basis: 92px; }
    .category-name { height: 34px; font-size: 12px; }
    .category-carousel-arrow { width: 36px; height: 36px; font-size: 23px; }
    .modal-box { max-height: 92dvh; overflow-y: auto; grid-template-columns: 1fr; }
    .modal-gallery { max-height: 42dvh; }
    .cart-panel { border-radius: 24px 0 0 24px; }
    footer { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Dark mode shares its saved preference with the main WebCenter homepage. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg-primary: #0b1420;
    --bg-secondary: #142231;
    --bg-card: #142231;
    --glass: #142231;
    --glass-border: #2a3b4b;
    --cyan: #37c9cf;
    --cyan-dim: #14363d;
    --blue: #49a4f1;
    --blue-dim: #18344e;
    --text-primary: #edf5f8;
    --text-secondary: #b5c2cc;
    --text-muted: #9eacb7;
    --color-canvas-mist: #0b1420;
    --color-pure-white: #142231;
    --color-ink-black: #edf5f8;
    --color-faint-border: #2a3b4b;
    --color-muted-gray: #a6b4bf;
    --color-shop-blue: #49a4f1;
    --color-shop-cyan: #37c9cf;
    --color-blue-wash: #173044;
    --shadow-card: 0 5px 18px rgba(0,0,0,.24);
    --shadow-chip: 0 2px 10px rgba(0,0,0,.24);
    --shadow-search: 0 4px 24px rgba(73,164,241,.2);
}
:root[data-theme="dark"] body { background: var(--color-canvas-mist); color: var(--color-ink-black); }
:root[data-theme="dark"] .stats-row { border: 1px solid var(--color-faint-border); background: rgba(255,255,255,.035); }
:root[data-theme="dark"] .hero-search { border-color: var(--color-faint-border); }
:root[data-theme="dark"] .category-carousel-arrow { background: color-mix(in srgb, var(--color-pure-white) 88%, transparent); color: var(--color-ink-black); }
:root[data-theme="dark"] footer { background: #070e16; color: #b5c2cc; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle .theme-icon { display: grid; place-items: center; }
.theme-toggle .theme-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: no-preference) {
    .sidebar-nav, .hero, .section { transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease; }
    .nav-icon-btn { transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .18s ease; }
    .cart-panel { transition: right .32s ease, background-color .22s ease, color .22s ease, border-color .22s ease; }
}
