/* ── Custom Properties ── */
:root {
    --color-bg: #f2f4f5;
    --color-surface: #ffffff;
    --color-text: #1d2d35;
    --color-text-secondary: #6b7d87;
    --color-border: #d8dfe3;
    --color-slate: #3e5c6e;
    --color-slate-dark: #2f4858;
    --color-slate-light: #4d7285;
    --color-primary: #3e5c6e;
    --color-primary-hover: #2f4858;
    --color-accent: #4caf7d;
    --color-danger: #d94f4f;
    --color-badge: #d94f4f;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.14);
    --radius: 10px;
    --radius-sm: 6px;
    --header-h: 64px;

    --cart-w: 400px;
    --sidebar-w: 260px;
    --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Welcome Splash ── */
.splash {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 1;
    transition: opacity .4s ease;
}

.splash.closing {
    opacity: 0;
    pointer-events: none;
}

.splash.hidden { display: none; }

.splash__content {
    position: relative;
    max-width: 720px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
    animation: splashIn .4s ease;
}

@keyframes splashIn {
    from { transform: scale(.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.splash__img {
    width: 100%;
    height: auto;
    display: block;
}

.splash__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
}

.splash__close:hover { background: rgba(0,0,0,.7); }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button { cursor: pointer; font: inherit; }
img { display: block; max-width: 100%; }

/* ── Header ── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--color-slate);
    border-bottom: none;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.header__logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.btn-store-info {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    background: transparent;
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease;
}

.btn-store-info:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.5);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.btn-cart {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    transition: background var(--transition), border-color var(--transition);
}

.btn-cart:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.5);
}

.btn-cart__badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--color-badge);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cart__badge:empty { display: none; }
.btn-cart__badge.bump { animation: bump .3s ease; }

@keyframes bump {
    50% { transform: scale(1.35); }
}

/* ── Layout: Sidebar + Main ── */
.layout {
    display: flex;
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

/* ── Sidebar ── */
.sidebar {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    overflow-y: auto;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 50;
    transition: transform var(--transition), min-width var(--transition), width var(--transition), padding var(--transition);
}

.sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    width: 0;
    min-width: 0;
    padding: 0;
    border-right: none;
    overflow: hidden;
}

/* ── Sidebar Toggle Button ── */
.sidebar-toggle {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    left: calc(var(--sidebar-w) - 20px);
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 160;
    box-shadow: var(--shadow-md);
    transition: left var(--transition), transform var(--transition), color var(--transition);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.sidebar-toggle:hover { color: var(--color-primary); }

.sidebar-toggle.collapsed {
    left: 8px;
    transform: rotate(180deg);
}

.sidebar__section {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.sidebar__section:last-child { border-bottom: none; }

.sidebar__section--cats {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar__title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.sidebar__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar__clear {
    border: none;
    background: none;
    font-size: .72rem;
    font-weight: 600;
    color: var(--color-primary);
    padding: 2px 6px;
    border-radius: 4px;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 10px;
}

.sidebar__clear:hover {
    background: #fee2e2;
    color: #dc2626;
}

.sidebar__select {
    width: 100%;
    height: 36px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    font-size: .84rem;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color var(--transition);
}

.sidebar__select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.sidebar__search {
    position: relative;
}

.sidebar__search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: .84rem;
    background: var(--color-bg);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.sidebar__search input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(62,92,110,.15);
}

.sidebar__search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--color-text-secondary);
    pointer-events: none;
}

/* ── Category Tree (checkboxes) ── */
.cat-tree {
    flex: 1;
    overflow-y: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

.cat-node { margin: 0; }

.cat-row {
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: background var(--transition);
}

.cat-row:hover { background: var(--color-bg); }

.cat-row label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px 5px 0;
    cursor: pointer;
    font-size: .82rem;
    color: var(--color-text);
    user-select: none;
}

.cat-row label input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.cat-row--n1 label { font-weight: 600; font-size: .84rem; }
.cat-row--n2 label { padding-left: 6px; font-size: .82rem; }
.cat-row--n3 label { padding-left: 6px; font-size: .8rem; color: var(--color-text-secondary); }

.cat-children {
    padding-left: 16px;
    border-left: 2px solid var(--color-border);
    margin-left: 8px;
}

.cat-row__count {
    font-size: .7rem;
    color: var(--color-text-secondary);
    margin-left: auto;
    padding-right: 6px;
    opacity: .7;
}

/* ── Main Content ── */
.main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px 40px;
    background: #fff;
}

.results-info {
    margin-bottom: 14px;
    font-size: .85rem;
    color: var(--color-text-secondary);
}

/* ── Product Grid ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

/* ── Product Card (minimal / Yeezy-style) ── */
.product-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: transform .15s ease-out, box-shadow .15s ease-out;
    border-radius: 6px;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 0 0 1px rgba(62,92,110,.08);
}

.product-card__img-wrap {
    position: relative;
    aspect-ratio: 1;
    background: #f0f0f0;
    overflow: hidden;
    border-radius: 6px;
}

.product-card__img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform .3s ease-out, filter .3s ease-out;
}

.product-card:hover .product-card__img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.product-card__btn-add {
    position: absolute;
    bottom: 10px; right: 10px;
    width: 34px; height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--transition), transform var(--transition), background var(--transition);
    z-index: 3;
}

.product-card:hover .product-card__btn-add {
    opacity: 1;
    transform: translateY(0);
}

.product-card__btn-add:hover {
    background: var(--color-slate);
}

.product-card__btn-add.added {
    opacity: 1;
    background: var(--color-accent);
}

.product-card__meta {
    padding: 10px 6px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-card__sku {
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.product-card__price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-slate);
    letter-spacing: -.01em;
}

.product-card__price--empty {
    font-size: .85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* ── Infinite Scroll Sentinel ── */
.scroll-sentinel {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 16px;
    color: var(--color-text-secondary);
    font-size: .85rem;
}

.scroll-sentinel.visible {
    display: flex;
}

/* ── Product Detail Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    padding: 24px;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-surface);
    border-radius: 16px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(.95) translateY(10px);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
}

.modal__close {
    position: absolute;
    top: 10px; right: 10px;
    width: 36px; height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 1.1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    backdrop-filter: blur(4px);
}

.modal__close:hover { background: rgba(0,0,0,.7); }

.modal__body {
    display: flex;
    gap: 0;
}

.modal__img-wrap {
    position: relative;
    width: 42%;
    flex-shrink: 0;
    background: var(--color-bg);
    min-height: 300px;
    border-radius: 16px 0 0 16px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.modal__img {
    width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: top center;
    cursor: zoom-in;
}

.modal__zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: .8;
    transition: opacity .2s ease;
}

.modal__img-wrap:hover .modal__zoom-hint {
    opacity: 1;
}

.modal__info {
    flex: 1;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal__tags-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.modal__sku {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.modal__sku:empty { display: none; }

.modal__name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
}

.modal__presentation {
    font-size: .8rem;
    color: var(--color-text-secondary);
}

.modal__presentation:empty { display: none; }

.modal__category {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.modal__category-tag {
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(62,92,110,.08);
    color: var(--color-primary);
    font-size: .68rem;
    font-weight: 500;
}

.modal__price-row {
    margin-top: 4px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.modal__price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text);
}

.modal__price--empty {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.modal__price-label {
    font-size: .75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Presentaciones (modal) ── */
.modal__presentaciones {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pres-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-secondary);
}

.pres-options {
    display: flex;
    gap: 8px;
}

.pres-opt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 8px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.pres-opt:hover {
    border-color: var(--color-slate-light);
}

.pres-opt.active {
    border-color: var(--color-primary);
    background: rgba(62,92,110,.06);
    box-shadow: 0 0 0 2px rgba(62,92,110,.12);
}

.pres-opt__name {
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
}

.pres-opt__discount {
    position: absolute;
    top: -8px;
    right: -6px;
    font-size: .58rem;
    font-weight: 800;
    color: #fff;
    background: var(--color-accent);
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: .02em;
    line-height: 1;
}

.pres-opt__qty {
    font-size: .7rem;
    color: var(--color-text-secondary);
}

.pres-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pres-qty-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.pres-qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.pres-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s ease, color .12s ease;
}

.pres-qty-btn:hover {
    background: var(--color-border);
    color: var(--color-primary);
}

.pres-qty-value {
    min-width: 36px;
    text-align: center;
    font-size: .95rem;
    font-weight: 700;
}

.pres-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--color-bg);
}

.pres-total-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pres-total-detail {
    font-size: .78rem;
    color: var(--color-text-secondary);
}

.pres-total-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text);
}

.pres-total-saving {
    font-size: .78rem;
    font-weight: 600;
    color: var(--color-accent);
}

.pres-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s ease;
}

.pres-add-btn:hover { background: var(--color-primary-hover); }
.pres-add-btn.added { background: var(--color-accent); }

/* ── Image Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0,0,0,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    padding: 24px;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    transform: scale(.92);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.lightbox.open .lightbox__img {
    transform: scale(1);
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
}

.lightbox__close:hover {
    background: rgba(255,255,255,.3);
}

/* ── Cart Overlay & Panel ── */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: var(--cart-w);
    max-width: 100vw;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition);
}

.cart-panel.open { transform: translateX(0); }

.cart-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.cart-panel__title { font-size: 1.1rem; font-weight: 700; }

.btn-close-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1.1rem;
    transition: background var(--transition);
}

.btn-close-cart:hover { background: var(--color-border); }

.cart-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.cart-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--color-text-secondary);
    font-size: .9rem;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-item__img {
    width: 56px; height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-bg);
    flex-shrink: 0;
}

.cart-item__info { flex: 1; min-width: 0; }

.cart-item__name {
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item__pres {
    font-size: .75rem;
    color: var(--color-primary);
    font-weight: 500;
}

.cart-item__pres:empty { display: none; }

.cart-item__price {
    font-size: .8rem;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.cart-item__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.cart-item__qty-btn {
    width: 26px; height: 26px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: var(--color-text);
    transition: all var(--transition);
}

.cart-item__qty-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.cart-item__qty {
    font-size: .85rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item__remove {
    border: none;
    background: none;
    color: var(--color-danger);
    font-size: .75rem;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
}

.cart-item__remove:hover { background: rgba(255,59,48,.1); }

.cart-panel__footer {
    padding: 20px;
    border-top: 1px solid var(--color-border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cart-seller {
    margin-bottom: 14px;
}

.cart-seller__label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.cart-seller__options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.seller-btn {
    padding: 8px 14px;
    border: 2px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: .82rem;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.seller-btn:hover {
    border-color: var(--color-slate-light);
}

.seller-btn.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.seller-btn__badge {
    display: block;
    font-size: .6rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    margin-top: 1px;
}

.seller-btn.active .seller-btn__badge {
    color: rgba(255,255,255,.8);
}

.btn-whatsapp {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    background: #25d366;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--transition);
}

.btn-whatsapp:hover { background: #1fb855; }
.btn-whatsapp:disabled { opacity: .5; cursor: default; }

.btn-clear-cart {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: none;
    font-size: .82rem;
    color: var(--color-text-secondary);
    transition: all var(--transition);
}

.btn-clear-cart:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
}

/* ── Store Info Modal ── */
.store-info-modal {
    max-width: 480px;
}

.store-info {
    padding: 32px 28px;
}

.store-info__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.store-info__content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.store-info__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.store-info__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.store-info__data {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.store-info__label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-secondary);
}

.store-info__value {
    font-size: .88rem;
    color: var(--color-text);
    word-break: break-word;
}

.store-info__link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.store-info__link:hover {
    text-decoration: underline;
}

/* ── Loading / Spinner ── */
.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 16px;
    gap: 16px;
    color: var(--color-text-secondary);
}

.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── API Error ── */
.api-error {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 64px 16px;
    color: var(--color-text-secondary);
    text-align: center;
}

.api-error p { font-size: 1rem; font-weight: 600; color: var(--color-text); }
.api-error small { font-size: .82rem; }

.api-error button {
    margin-top: 8px;
    padding: 8px 20px;
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    background: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: .85rem;
}

.api-error button:hover { background: rgba(62,92,110,.08); }

/* ── No Results ── */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 16px;
    color: var(--color-text-secondary);
}

.no-results p { font-size: 1rem; font-weight: 600; color: var(--color-text); margin-bottom: 4px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        top: var(--header-h);
        left: 0;
        bottom: 0;
        z-index: 150;
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 768px) {
    :root { --cart-w: 100vw; --sidebar-w: 280px; }

    .header { padding: 0 12px; gap: 8px; }
    .header__logo { font-size: 1.1rem; }

    .main { padding: 16px 12px 40px; }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 4px;
    }

    .product-card__btn-add { opacity: 1; transform: translateY(0); }

    .modal__body { flex-direction: column; }
    .modal__img-wrap {
        width: 100%;
        min-height: 220px;
        max-height: 300px;
        border-radius: 16px 16px 0 0;
    }
    .modal__info { padding: 14px 16px; }
    .modal { max-width: 95vw; }

    .pres-total-row { flex-direction: column; align-items: stretch; gap: 10px; }
    .pres-add-btn { justify-content: center; }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }
}
