/* ============================================================
   LA PERLA — Tienda de licorera (pública)
   Reusa las variables de landing.css (--noir, --gold, --ivory…)
   ============================================================ */

.store-body { background: var(--noir); }

/* La nav de la tienda va siempre en estado "scrolled" (fondo sólido) */
.store-main { padding: 110px 0 120px; min-height: 100svh; }

/* ---------- Encabezado ---------- */
.store-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 52px); }
.store-title { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: 16px 0 14px; }
.store-notice {
    display: inline-flex; align-items: center; gap: 9px;
    margin-top: 20px; padding: 9px 16px;
    border: 1px solid var(--gold-dim); border-radius: 999px;
    background: var(--gold-faint);
    font-size: 0.86rem; color: var(--ivory);
}
.store-notice svg { width: 16px; height: 16px; color: var(--gold-light); }
.store-notice b { color: var(--gold-light); }

/* ---------- Filtro de categorías ---------- */
.store-filters {
    position: sticky; top: 70px; z-index: 40;
    display: flex; flex-wrap: wrap; gap: 10px;
    padding: 14px 0; margin-bottom: 10px;
    background: linear-gradient(var(--noir) 70%, transparent);
}
.store-chip {
    padding: 8px 18px; border-radius: 999px;
    border: 1px solid var(--ivory-10);
    color: var(--ivory-72);
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    transition: all 0.2s var(--ease-out);
}
.store-chip:hover { border-color: var(--gold-dim); color: var(--ivory); }
.store-chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--noir); }

/* ---------- Categorías + grilla ---------- */
.store-cat { margin-bottom: clamp(36px, 5vw, 56px); scroll-margin-top: 130px; }
.store-cat-title {
    font-family: var(--font-display); font-weight: 440;
    font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 22px;
    padding-bottom: 12px; border-bottom: 1px solid var(--ivory-10);
}
.store-cat.is-hidden { display: none; }

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.store-card {
    display: flex; flex-direction: column;
    background: var(--noir-card);
    border: 1px solid var(--ivory-10);
    border-radius: var(--radius); overflow: hidden;
    transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.store-card:hover { transform: translateY(-5px); border-color: var(--gold-dim); box-shadow: 0 22px 44px rgba(0,0,0,0.45); }

.store-card-media {
    aspect-ratio: 1 / 1; overflow: hidden;
    background: linear-gradient(150deg, var(--emerald-deep), var(--noir-soft));
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
}
.store-card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.6s var(--ease-out); }
.store-card:hover .store-card-media img { transform: scale(1.06); }
.store-card-noimg { width: 100%; height: 100%; display: grid; place-items: center; }
.store-card-noimg span {
    font-family: var(--font-display); font-style: italic; font-size: 3rem; color: var(--gold-dim);
}

.store-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; flex: 1; }
.store-card-name { font-family: var(--font-display); font-weight: 460; font-size: 1.08rem; line-height: 1.2; }
.store-card-desc { font-size: 0.82rem; color: var(--ivory-55); line-height: 1.4; }
.store-card-stock { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: var(--gold-light); margin-top: 6px; }
.store-card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.store-card-price { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; color: var(--gold-light); font-variant-numeric: tabular-nums; }

.store-add {
    padding: 9px 16px; border-radius: 999px;
    background: rgba(245,245,245,0.04); border: 1px solid var(--gold-dim);
    color: var(--ivory); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    transition: all 0.2s var(--ease-out);
    display: inline-flex; align-items: center; justify-content: center;
}
.store-add:hover { background: var(--gold); border-color: var(--gold); color: var(--noir); }
.store-add.added { background: var(--emerald); border-color: var(--emerald); color: var(--ivory); }

.store-empty { text-align: center; padding: 80px 20px; color: var(--ivory-72); }
.store-empty p { margin-bottom: 22px; }

/* ---------- Botón carrito en la nav ---------- */
.store-cart-btn {
    position: relative; display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid var(--gold-dim); color: var(--gold-light);
    transition: all 0.25s;
}
.store-cart-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--noir); }
.store-cart-btn svg { width: 20px; height: 20px; }
.store-cart-count {
    position: absolute; top: -4px; right: -4px;
    min-width: 20px; height: 20px; padding: 0 5px;
    display: grid; place-items: center; border-radius: 999px;
    background: var(--gold); color: var(--noir);
    font-size: 11px; font-weight: 700;
}

/* ---------- Drawer del carrito ---------- */
.store-drawer-overlay {
    position: fixed; inset: 0; z-index: 190;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity 0.3s;
}
.store-drawer-overlay.show { opacity: 1; }

.store-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
    width: min(440px, 100%);
    display: flex; flex-direction: column;
    background: var(--noir-soft);
    border-left: 1px solid var(--gold-dim);
    transform: translateX(100%); transition: transform 0.35s var(--ease-out);
}
.store-drawer.open { transform: none; }

.store-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 22px; border-bottom: 1px solid var(--ivory-10);
}
.store-drawer-head h2 { font-family: var(--font-display); font-weight: 440; font-size: 1.4rem; }
.store-drawer-close { font-size: 2rem; line-height: 1; color: var(--ivory-72); width: 40px; height: 40px; }
.store-drawer-close:hover { color: var(--gold-light); }

.store-drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.store-cart-empty { text-align: center; color: var(--ivory-55); padding: 40px 0; }

.store-cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ivory-10); }
.store-cart-item-img { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--emerald-deep); }
.store-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.store-cart-item-main { flex: 1; min-width: 0; }
.store-cart-item-name { font-weight: 600; font-size: 0.92rem; line-height: 1.25; }
.store-cart-item-price { font-size: 0.82rem; color: var(--gold-light); margin-top: 3px; }
.store-cart-item-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.store-qty-btn { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--ivory-10); color: var(--ivory); display: grid; place-items: center; font-size: 1rem; line-height: 1; }
.store-qty-btn:hover { border-color: var(--gold-dim); color: var(--gold-light); }
.store-qty-val { min-width: 22px; text-align: center; font-weight: 600; }
.store-cart-item-remove { margin-left: auto; font-size: 0.78rem; color: var(--ivory-55); }
.store-cart-item-remove:hover { color: #e57373; }

/* ---------- Checkout ---------- */
.store-checkout { padding: 4px 22px 18px; overflow-y: auto; }
.store-checkout h3 { font-family: var(--font-display); font-weight: 440; font-size: 1.15rem; margin: 6px 0 14px; }
.store-field { margin-bottom: 14px; }
.store-field > label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 6px; }
.store-field input[type=text],
.store-field input[type=tel] {
    width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ivory-10);
    padding: 9px 2px; color: var(--ivory); font-family: var(--font-body); font-size: 0.98rem;
}
.store-field input:focus { outline: none; border-bottom-color: var(--gold); }
.store-city { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--gold-dim); border-radius: 10px; background: var(--gold-faint); font-size: 0.88rem; }
.store-city svg { width: 16px; height: 16px; color: var(--gold-light); }
.store-pay { display: flex; flex-direction: column; gap: 8px; }
.store-pay-opt { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--ivory-10); border-radius: 10px; cursor: pointer; font-size: 0.9rem; transition: border-color 0.2s; }
.store-pay-opt:hover { border-color: var(--gold-dim); }
.store-pay-opt input { accent-color: var(--gold); }
.store-checkout-err { color: #e57373; font-size: 0.85rem; margin-top: 6px; }

/* ---------- Pie del drawer (totales + CTA) ---------- */
.store-drawer-foot { padding: 16px 22px 22px; border-top: 1px solid var(--ivory-10); background: var(--noir-card); }
.store-totals { margin-bottom: 14px; }
.store-totals > div { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: var(--ivory-72); padding: 4px 0; }
.store-total-row { padding-top: 10px !important; margin-top: 6px; border-top: 1px solid var(--ivory-10); font-size: 1.05rem !important; color: var(--ivory) !important; }
.store-total-row b { color: var(--gold-light); font-size: 1.25rem; }
.store-cta { width: 100%; }
.store-back-link { display: block; width: 100%; margin-top: 12px; color: var(--ivory-55); font-size: 0.85rem; }
.store-back-link:hover { color: var(--gold-light); }

/* ---------- Páginas de pago / gracias ---------- */
.store-pay-wrap { min-height: 100svh; display: grid; place-items: center; padding: 40px 20px; }
.store-pay-card {
    width: min(460px, 100%); text-align: center;
    background: var(--noir-card); border: 1px solid var(--gold-dim);
    border-radius: 24px; padding: clamp(28px, 5vw, 44px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.store-pay-logo { width: 120px; margin: 0 auto 18px; }
.store-pay-summary { text-align: left; margin: 22px 0; padding: 18px; border: 1px solid var(--ivory-10); border-radius: 14px; }
.store-pay-summary > div { display: flex; justify-content: space-between; gap: 14px; font-size: 0.9rem; color: var(--ivory-72); padding: 5px 0; }
.store-pay-summary > div b { color: var(--ivory); font-variant-numeric: tabular-nums; }
.store-pay-sub { border-top: 1px solid var(--ivory-10); margin-top: 6px; padding-top: 10px !important; }
.store-pay-total { font-size: 1.05rem !important; color: var(--ivory) !important; margin-top: 4px; }
.store-pay-total b { color: var(--gold-light) !important; font-size: 1.2rem; }
.store-pay-btn { margin: 22px 0 8px; min-height: 52px; display: flex; justify-content: center; align-items: center; }
.store-pay-note { font-size: 0.82rem; color: var(--ivory-55); margin: 14px 0 8px; }

.store-spinner {
    width: 46px; height: 46px; margin: 8px auto; border-radius: 50%;
    border: 3px solid var(--ivory-10); border-top-color: var(--gold);
    animation: store-spin 0.9s linear infinite;
}
@keyframes store-spin { to { transform: rotate(360deg); } }
.store-check-ok {
    width: 64px; height: 64px; margin: 8px auto; border-radius: 50%;
    display: grid; place-items: center; font-size: 2rem; font-weight: 700;
    background: var(--emerald); color: var(--gold-light); border: 2px solid var(--gold);
}

@media (max-width: 560px) {
    .store-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .store-card-media { padding: 8px; }
    .store-card-body { padding: 10px 10px 12px; gap: 4px; }
    .store-card-name { font-size: 0.92rem; line-height: 1.25; }
    .store-card-desc { font-size: 0.76rem; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
    .store-card-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 8px;
        margin-top: auto;
    }
    .store-card-price {
        font-size: 1.05rem;
        text-align: center;
    }
    .store-add {
        width: 100%;
        text-align: center;
        padding: 9px 10px;
        font-size: 11px;
        letter-spacing: 0.05em;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .store-filters { top: 64px; }
}
