/* ═══════════════════════════════════════════════════════════════
   Tienda publica — catalogo, ficha de producto, carrito y checkout.
   Archivo plano (fuera de Vite) para que el despliegue no dependa de
   recompilar: se carga despues de web.css y usa su paleta.
═══════════════════════════════════════════════════════════════ */

:root {
    --tw-ink: #1f170b;
    --tw-muted: #6f6556;
    --tw-line: #ece5d6;
    --tw-card: #ffffff;
    --tw-soft: #faf6ec;
    --tw-promo: #c0392b;
    --tw-ok: #1e8449;
    --tw-wa: #25d366;
    --tw-radius: 16px;
    --tw-shadow: 0 1px 2px rgba(31, 23, 11, .04), 0 6px 20px rgba(31, 23, 11, .06);
}

/* ── Botones ────────────────────────────────────────────────── */
.tw-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 42px; padding: .55rem 1.1rem; border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 700; font-size: .92rem; line-height: 1.1; text-decoration: none; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.tw-btn:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.tw-btn:active { transform: scale(.98); }
.tw-btn-lg { min-height: 52px; font-size: 1rem; padding: .75rem 1.4rem; }
.tw-btn-add { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: var(--dark); box-shadow: 0 4px 14px rgba(201, 160, 42, .3); }
.tw-btn-add:hover { color: var(--dark); box-shadow: 0 8px 22px rgba(201, 160, 42, .42); transform: translateY(-1px); }
.tw-btn-add.is-done { background: var(--tw-ok); color: #fff; box-shadow: none; }
.tw-btn.is-loading { opacity: .7; pointer-events: none; }
.tw-btn-dark { background: var(--tw-ink); color: #fff; }
.tw-btn-dark:hover { background: #3a2c16; color: #fff; }
.tw-btn-ghost { background: #fff; color: var(--tw-ink); border-color: var(--tw-line); }
.tw-btn-ghost:hover { border-color: var(--gold); color: var(--tw-ink); }
.tw-btn-ghost.is-disabled { color: var(--tw-muted); cursor: default; }
.tw-btn-wa { background: var(--tw-wa); color: #fff; }
.tw-btn-wa:hover { background: #1fb457; color: #fff; }

/* ── Cabecera de la tienda ──────────────────────────────────── */
.tw-shop-head { padding: 1.75rem 0 1.25rem; background: linear-gradient(180deg, var(--gold-pale), #fffdf5); border-bottom: 1px solid var(--tw-line); }
.tw-breadcrumb { font-size: .82rem; }
.tw-breadcrumb a { color: var(--tw-muted); text-decoration: none; }
.tw-breadcrumb a:hover { color: var(--gold-dark); }
.tw-shop-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.tw-shop-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--tw-ink); margin-bottom: .25rem; }
.tw-shop-sub { color: var(--tw-muted); }

.tw-search { position: relative; display: flex; align-items: center; flex: 1 1 360px; max-width: 520px; background: #fff; border: 1.5px solid var(--tw-line); border-radius: 999px; padding: 4px 4px 4px 2.6rem; box-shadow: var(--tw-shadow); }
.tw-search:focus-within { border-color: var(--gold); }
.tw-search > i { position: absolute; left: 1rem; color: var(--tw-muted); }
.tw-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .95rem; padding: .5rem 0; }
.tw-search button { border: 0; border-radius: 999px; background: var(--tw-ink); color: #fff; font-weight: 700; padding: .55rem 1.2rem; }

/* ── Franja de confianza ────────────────────────────────────── */
.tw-trust { background: #fff; border-bottom: 1px solid var(--tw-line); }
.tw-trust-list { list-style: none; margin: 0; padding: .85rem 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tw-trust-list li { display: flex; align-items: center; gap: .7rem; font-size: .85rem; }
.tw-trust-list i { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-pale); color: var(--gold-dark); }
.tw-trust-list strong { display: block; color: var(--tw-ink); }
.tw-trust-list span { color: var(--tw-muted); }
@media (max-width: 991.98px) {
    .tw-trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .tw-trust-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1.25rem; scrollbar-width: none; }
    .tw-trust-list::-webkit-scrollbar { display: none; }
    .tw-trust-list li { flex: 0 0 auto; scroll-snap-align: start; }
}

/* ── Layout de resultados ───────────────────────────────────── */
.tw-shop { padding: 1.75rem 0 3rem; }
.tw-shop-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 991.98px) { .tw-shop-layout { grid-template-columns: minmax(0, 1fr); } }

.tw-sidebar { position: sticky; top: 96px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: .25rem; }
.tw-filter-group { padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--tw-line); }
.tw-filter-group:last-child { border-bottom: 0; }
.tw-filter-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--tw-muted); margin-bottom: .6rem; }
.tw-filter-link { display: flex; justify-content: space-between; gap: .5rem; padding: .38rem .6rem; border-radius: 8px; color: var(--tw-ink); text-decoration: none; font-size: .92rem; }
.tw-filter-link span { color: var(--tw-muted); font-size: .8rem; }
.tw-filter-link:hover { background: var(--tw-soft); color: var(--tw-ink); }
.tw-filter-link.is-active { background: var(--gold-pale); color: var(--gold-dark); font-weight: 700; }
.tw-filter-more { border: 0; background: none; color: var(--gold-dark); font-weight: 700; font-size: .85rem; padding: .4rem .6rem; }
.tw-filter-check { display: flex; align-items: center; gap: .55rem; color: var(--tw-ink); text-decoration: none; font-size: .92rem; padding: .3rem .6rem; }
.tw-filter-check i { color: var(--tw-muted); }
.tw-filter-check.is-active i { color: var(--gold-dark); }

.tw-toolbar { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tw-count { color: var(--tw-muted); font-size: .9rem; margin-right: auto; }
.tw-sort .form-select { border-radius: 999px; border-color: var(--tw-line); font-size: .9rem; font-weight: 600; min-width: 210px; }

.tw-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tw-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: 999px; background: var(--tw-ink); color: #fff; text-decoration: none; font-size: .82rem; font-weight: 600; }
.tw-chip:hover { color: #fff; background: #3a2c16; }
.tw-chip-clear { font-size: .82rem; font-weight: 700; color: var(--gold-dark); align-self: center; text-decoration: none; }

/* ── Grilla y tarjeta de producto ───────────────────────────── */
.tw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.1rem; }
.tw-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 991.98px) { .tw-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .tw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
}

.tw-card { display: flex; flex-direction: column; background: var(--tw-card); border: 1px solid var(--tw-line); border-radius: var(--tw-radius); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.tw-card:hover { box-shadow: var(--tw-shadow); border-color: #e2d6bb; transform: translateY(-2px); }
.tw-card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.tw-card-media img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; background: #fff; transition: transform .35s ease; }
.tw-card:hover .tw-card-media img { transform: scale(1.04); }
.tw-card.is-agotado .tw-card-media img { opacity: .55; filter: grayscale(.4); }

.tw-card-noimg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: radial-gradient(circle at 50% 35%, #fff 0, var(--gold-pale) 70%); color: var(--gold); }
.tw-card-noimg i { font-size: 2rem; opacity: .55; }
.tw-card-noimg-brand { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 1.05rem; color: var(--gold-dark); text-align: center; padding: 0 .75rem; }

.tw-badges { position: absolute; top: .6rem; left: .6rem; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; z-index: 1; }
.tw-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .55rem; border-radius: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .01em; line-height: 1.2; }
.tw-badge-promo { background: var(--tw-promo); color: #fff; }
.tw-badge-top { background: var(--tw-ink); color: var(--gold-light); }
.tw-stock-flag { position: absolute; left: 0; right: 0; bottom: 0; padding: .3rem; text-align: center; font-size: .74rem; font-weight: 800; background: rgba(255, 244, 214, .95); color: #8a5a00; }
.tw-stock-flag.is-out { background: rgba(31, 23, 11, .82); color: #fff; }

.tw-card-body { display: flex; flex-direction: column; gap: .35rem; padding: .85rem .9rem 1rem; flex: 1; }
.tw-card-brand { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--gold-dark); }
.tw-card-title { font-size: .92rem; font-weight: 600; line-height: 1.35; margin: 0; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tw-card-title a { color: var(--tw-ink); text-decoration: none; }
.tw-card-title a:hover { color: var(--gold-dark); }
.tw-card-promo { font-size: .76rem; font-weight: 700; color: var(--tw-promo); }
.tw-card-actions { margin-top: auto; padding-top: .45rem; }
.tw-card-actions .tw-btn { width: 100%; min-height: 40px; font-size: .86rem; }
@media (max-width: 575.98px) {
    .tw-card-body { padding: .65rem .65rem .8rem; }
    .tw-card-title { font-size: .84rem; }
    .tw-card-actions .tw-btn span { font-size: .8rem; }
}

.tw-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .5rem; }
.tw-price-now { font-size: 1.12rem; font-weight: 800; color: var(--tw-ink); }
.tw-price-old { font-size: .85rem; color: var(--tw-muted); text-decoration: line-through; }

/* ── Paginacion, vacio, ayuda ───────────────────────────────── */
.tw-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: .35rem; margin-top: 2rem; }
.tw-page { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 .6rem; border-radius: 10px; border: 1px solid var(--tw-line); background: #fff; color: var(--tw-ink); text-decoration: none; font-weight: 700; }
.tw-page:hover { border-color: var(--gold); color: var(--tw-ink); }
.tw-page.is-active { background: var(--tw-ink); border-color: var(--tw-ink); color: #fff; }
.tw-page-gap { align-self: center; color: var(--tw-muted); padding: 0 .2rem; }

.tw-empty { text-align: center; padding: 3rem 1rem; background: #fff; border: 1px dashed var(--tw-line); border-radius: var(--tw-radius); }
.tw-empty > i { font-size: 2.2rem; color: var(--gold); margin-bottom: .8rem; }
.tw-empty h2 { font-size: 1.25rem; font-weight: 800; color: var(--tw-ink); }
.tw-empty p { color: var(--tw-muted); }

.tw-help { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding: 1.1rem 1.25rem; border-radius: var(--tw-radius); background: var(--tw-ink); color: #f3ead6; }
.tw-help strong { color: #fff; }
.tw-help p { font-size: .9rem; color: #d8ccb3; }
.tw-help-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(240, 208, 112, .14); color: var(--gold-light); font-size: 1.2rem; }

.tw-offcanvas { max-width: 86vw; }
.tw-section-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.7rem); color: var(--tw-ink); margin-bottom: 1.1rem; }

/* ── Ficha de producto ──────────────────────────────────────── */
.tw-pdp { padding: 1.25rem 0 2.5rem; }
.tw-pdp-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 991.98px) { .tw-pdp-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
.tw-pdp-media { position: relative; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--tw-line); border-radius: 20px; overflow: hidden; }
.tw-pdp-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6%; background: #fff; }
.tw-pdp-noimg .tw-card-noimg-brand { font-size: 1.6rem; }
.tw-pdp-noimg i { font-size: 3rem; }
@media (min-width: 992px) { .tw-pdp-media { position: sticky; top: 96px; } }

.tw-pdp-brand { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dark); text-decoration: none; }
.tw-pdp-title { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 800; color: var(--tw-ink); line-height: 1.2; margin: .3rem 0 .35rem; }
.tw-pdp-sku { font-size: .8rem; color: var(--tw-muted); }
.tw-pdp-price { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .75rem; margin: 1.1rem 0 .35rem; }
.tw-pdp-price .tw-price-now { font-size: 2rem; }
.tw-pdp-price .tw-price-old { font-size: 1.05rem; }
.tw-pdp-promo { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 10px; background: #fdecea; color: var(--tw-promo); font-weight: 700; font-size: .9rem; }
.tw-pdp-stock { margin: 1rem 0; font-weight: 700; font-size: .92rem; color: var(--tw-ok); }
.tw-pdp-stock.is-low { color: #b9770e; }
.tw-pdp-stock.is-out { color: var(--tw-muted); }
.tw-pdp-buy { display: flex; gap: .6rem; }
.tw-pdp-buy .tw-btn { flex: 1; }
.tw-pdp-incart { margin: .7rem 0 0; font-size: .88rem; color: var(--tw-ok); font-weight: 600; }
.tw-pdp-perks { list-style: none; padding: 1rem 0 0; margin: 1.1rem 0 0; border-top: 1px solid var(--tw-line); display: grid; gap: .45rem; font-size: .9rem; color: var(--tw-muted); }
.tw-pdp-perks i { width: 22px; color: var(--gold-dark); }
.tw-pdp-ask { display: flex; align-items: center; gap: .8rem; margin-top: 1.1rem; padding: .85rem 1rem; border-radius: 14px; background: #eafaf0; color: #155d33; text-decoration: none; font-size: .9rem; }
.tw-pdp-ask i { font-size: 1.6rem; color: var(--tw-wa); }
.tw-pdp-ask:hover { color: #0f4726; background: #dcf5e6; }
.tw-pdp-desc { margin-top: 1.5rem; }
.tw-pdp-desc h2 { font-size: 1.05rem; font-weight: 800; }
.tw-pdp-desc p { color: #4a4031; line-height: 1.65; }

.tw-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--tw-line); border-radius: 999px; background: #fff; overflow: hidden; }
.tw-qty button { width: 42px; height: 50px; border: 0; background: none; color: var(--tw-ink); }
.tw-qty button:hover { background: var(--tw-soft); }
.tw-qty input { width: 44px; border: 0; text-align: center; font-weight: 800; -moz-appearance: textfield; appearance: textfield; }
.tw-qty input::-webkit-outer-spin-button, .tw-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tw-qty-sm button { width: 34px; height: 36px; font-size: .8rem; }
.tw-qty-sm input { width: 34px; font-size: .92rem; }

.tw-related { padding: 2rem 0 3rem; }
.tw-sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 16px calc(.65rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--tw-line); box-shadow: 0 -6px 20px rgba(31, 23, 11, .08); }
.tw-sticky-buy > div { min-width: 0; }
.tw-sticky-name { font-size: .78rem; color: var(--tw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 991.98px) { body:has(.tw-sticky-buy) { padding-bottom: 76px; } body:has(.tw-sticky-buy) .tw-wa-float { bottom: 88px; } }

/* ── Carrito y checkout ─────────────────────────────────────── */
.tw-cart { padding: 1.75rem 0 3rem; }
.tw-cart-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.tw-cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.75rem; align-items: start; }
@media (max-width: 991.98px) { .tw-cart-grid { grid-template-columns: minmax(0, 1fr); } }
.tw-cart-list { display: grid; gap: .75rem; }
.tw-cart-item { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .85rem; background: #fff; border: 1px solid var(--tw-line); border-radius: var(--tw-radius); }
.tw-cart-item.is-updating { opacity: .5; pointer-events: none; }
.tw-cart-thumb { position: relative; width: 88px; height: 88px; border-radius: 12px; background: var(--tw-soft); display: grid; place-items: center; overflow: hidden; color: var(--gold); }
.tw-cart-thumb img, .tw-mini-thumb img { position: absolute; inset: 0; }
.tw-cart-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.tw-cart-name { display: block; font-weight: 700; color: var(--tw-ink); text-decoration: none; line-height: 1.3; }
.tw-cart-unit { font-size: .82rem; color: var(--tw-muted); margin-top: .15rem; }
.tw-cart-promo { font-size: .8rem; font-weight: 700; color: var(--tw-ok); margin-top: .2rem; }
.tw-cart-promo.is-hint { color: var(--tw-promo); }
.tw-cart-low { font-size: .78rem; font-weight: 700; color: #b9770e; margin-top: .15rem; }
.tw-cart-side { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.tw-cart-price { text-align: right; }
.tw-cart-price .tw-price-old { display: block; }
.tw-cart-price strong { font-size: 1.05rem; color: var(--tw-ink); }
.tw-cart-remove { border: 0; background: none; color: var(--tw-muted); font-size: .8rem; padding: 0; }
.tw-cart-remove:hover { color: var(--tw-promo); }
@media (max-width: 575.98px) {
    .tw-cart-item { grid-template-columns: 72px minmax(0, 1fr); }
    .tw-cart-thumb { width: 72px; height: 72px; }
    .tw-cart-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
}
.tw-link-back { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; font-weight: 700; color: var(--gold-dark); text-decoration: none; }

.tw-summary { position: sticky; top: 96px; background: #fff; border: 1px solid var(--tw-line); border-radius: 20px; padding: 1.35rem; box-shadow: var(--tw-shadow); }
.tw-summary-title { font-size: 1.15rem; font-weight: 800; margin-bottom: .9rem; }
.tw-summary-line { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; color: #4a4031; padding: .25rem 0; }
.tw-summary-line.is-saving { color: var(--tw-ok); font-weight: 700; }
.tw-summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: .8rem 0; margin: .4rem 0 .6rem; border-top: 1px solid var(--tw-line); }
.tw-summary-total strong { font-size: 1.45rem; color: var(--tw-ink); }
.tw-summary-help { display: block; text-align: center; margin-top: 1rem; font-weight: 700; color: #155d33; text-decoration: none; }
.tw-summary-help i { color: var(--tw-wa); }

.tw-checkout .form-label { font-size: .84rem; font-weight: 700; margin-bottom: .25rem; }
.tw-checkout .form-control { border-radius: 10px; border-color: var(--tw-line); padding: .6rem .8rem; }
.tw-checkout .form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(201, 160, 42, .18); }
.tw-checkout-step { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--tw-muted); margin: 1rem 0 .6rem; }
.tw-checkout-note { font-size: .8rem; color: var(--tw-muted); margin-bottom: .5rem; }
.tw-checkout-note a { color: var(--gold-dark); font-weight: 700; }
.tw-delivery-options { display: grid; gap: .5rem; margin-bottom: .75rem; }
.tw-delivery-option { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border: 1.5px solid var(--tw-line); border-radius: 12px; cursor: pointer; }
.tw-delivery-option:has(input:checked) { border-color: var(--gold); background: var(--gold-pale); }
.tw-delivery-option input { accent-color: var(--gold-dark); width: 18px; height: 18px; }
.tw-delivery-option span { display: flex; justify-content: space-between; flex: 1; gap: .5rem; font-size: .9rem; }
.tw-delivery-option small { color: var(--tw-muted); font-weight: 700; }
.tw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Panel lateral del carrito ──────────────────────────────── */
.tw-mini { max-width: 420px; }
.tw-mini .offcanvas-body { display: grid; align-content: start; gap: .75rem; }
.tw-mini-added { padding: .65rem .8rem; border-radius: 10px; background: #eafaf0; color: #155d33; font-size: .88rem; }
.tw-mini-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding-bottom: .75rem; border-bottom: 1px solid var(--tw-line); font-size: .88rem; }
.tw-mini-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; background: var(--tw-soft); display: grid; place-items: center; overflow: hidden; color: var(--gold); }
.tw-mini-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.tw-mini-info a { display: block; color: var(--tw-ink); font-weight: 600; text-decoration: none; line-height: 1.3; }
.tw-mini-info span { color: var(--tw-muted); font-size: .8rem; }
.tw-mini-promo { display: block; color: var(--tw-ok); font-weight: 700; }
.tw-mini-empty { text-align: center; color: var(--tw-muted); padding: 2.5rem 0; }
.tw-mini-empty i { font-size: 2rem; color: var(--gold); }
.tw-mini-foot { padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--tw-line); background: #fff; }

/* ── Menu: icono del carrito ────────────────────────────────── */
.tw-nav-cart { position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--gold-pale); color: var(--tw-ink); display: inline-grid; place-items: center; font-size: 1.1rem; }
.tw-nav-cart:hover { background: #f6ebcc; }
.tw-nav-cart-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--tw-promo); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.tw-nav-cart-count[hidden] { display: none; }

/* ── Toast y WhatsApp flotante ──────────────────────────────── */
.tw-toast-wrap { z-index: 1090; }
.tw-toast { background: var(--tw-ink); color: #fff; border: 0; border-radius: 12px; }
.tw-toast.is-error { background: var(--tw-promo); }
.tw-wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 1035; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--tw-wa); color: #fff; font-size: 1.75rem; box-shadow: 0 8px 24px rgba(37, 211, 102, .4); text-decoration: none; transition: transform .2s; }
.tw-wa-float:hover { color: #fff; transform: scale(1.06); }

/* ── Confirmacion del pedido ────────────────────────────────── */
.tw-next-step { display: flex; gap: 1rem; padding: 1rem 1.1rem; border-radius: 14px; background: #eafaf0; border: 1px solid #c9eed6; }
.tw-next-step-num { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: var(--tw-wa); color: #fff; font-weight: 800; }

/* ── Galeria de producto ────────────────────────────────────── */
.tw-gallery { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: .75rem; align-items: start; }
.tw-gallery:not(:has(.tw-gallery-thumbs)) { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .tw-gallery { position: sticky; top: 96px; } .tw-gallery .tw-pdp-media { position: relative; top: auto; } }
.tw-gallery-thumbs { display: flex; flex-direction: column; gap: .5rem; }
.tw-gallery-thumb { position: relative; width: 76px; height: 76px; padding: 0; border: 1.5px solid var(--tw-line); border-radius: 10px; background: #fff; overflow: hidden; }
.tw-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.tw-gallery-thumb.is-active, .tw-gallery-thumb:hover { border-color: var(--tw-ink); }
.tw-gallery-track { position: absolute; inset: 0; z-index: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tw-gallery-track::-webkit-scrollbar { display: none; }
.tw-gallery-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; position: relative; overflow: hidden; background: #fff; cursor: zoom-in; }
.tw-gallery-slide.is-broken { background: transparent; }
.tw-gallery-slide.is-broken img { display: none; }
.tw-pdp-media .tw-gallery-slide img { position: static; width: 100%; height: 100%; object-fit: contain; padding: 6%; background: transparent; transition: transform .2s ease; }
.tw-gallery-slide.is-zoom img { transform: scale(1.9); }
.tw-gallery-nav { position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--tw-ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.tw-gallery-nav.is-prev { left: .6rem; }
.tw-gallery-nav.is-next { right: .6rem; }
.tw-gallery-dots { position: absolute; left: 0; right: 0; bottom: .7rem; z-index: 2; display: none; justify-content: center; gap: .35rem; }
.tw-gallery-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(31, 23, 11, .25); }
.tw-gallery-dots span.is-active { background: var(--tw-ink); width: 18px; border-radius: 999px; }
.tw-gallery-full { position: absolute; right: .6rem; bottom: .6rem; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--tw-ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
@media (max-width: 767.98px) {
    .tw-gallery { grid-template-columns: minmax(0, 1fr); }
    .tw-gallery-thumbs { display: none; }
    .tw-gallery-dots { display: flex; }
    .tw-gallery-nav { display: none; }
}
.tw-lightbox .modal-content { background: #fff; display: grid; place-items: center; }
.tw-lightbox img { max-width: 100%; max-height: 100vh; object-fit: contain; }
.tw-lightbox-close { position: absolute; top: 1rem; right: 1rem; z-index: 3; background-color: var(--tw-ink); border-radius: 50%; padding: .7rem; opacity: 1; }

/* ── Tonos (familias) ───────────────────────────────────────── */
.tw-variants { margin: 1rem 0 .25rem; }
.tw-variants-label { font-size: .88rem; color: var(--tw-muted); margin-bottom: .5rem; }
.tw-variants-label strong { color: var(--tw-ink); }
.tw-variants-grid { display: flex; flex-wrap: wrap; gap: .45rem; max-height: 236px; overflow-y: auto; padding: 2px; }
.tw-swatch { position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem .25rem .3rem; border: 1.5px solid var(--tw-line); border-radius: 999px; background: #fff; color: var(--tw-ink); font-size: .8rem; font-weight: 600; text-decoration: none; }
.tw-swatch:hover { border-color: var(--gold); color: var(--tw-ink); }
.tw-swatch.is-active { border-color: var(--tw-ink); box-shadow: 0 0 0 1px var(--tw-ink); }
.tw-swatch.is-out { opacity: .5; text-decoration: line-through; }
.tw-swatch-color { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); flex: 0 0 26px; }
.tw-swatch img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.tw-card-tonos { font-size: .76rem; font-weight: 700; color: var(--gold-dark); text-decoration: none; }

/* ── Beneficios, detalles y especificaciones ────────────────── */
.tw-pdp-benefits { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .4rem; }
.tw-pdp-benefits li { display: flex; gap: .55rem; font-size: .92rem; color: #3d3427; }
.tw-pdp-benefits i { color: var(--tw-ok); margin-top: .25rem; font-size: .8rem; }
.tw-pdp-details { max-width: 860px; margin-top: 2rem; }
.tw-accordion .accordion-item { border: 1px solid var(--tw-line); border-radius: 14px !important; overflow: hidden; margin-bottom: .6rem; }
.tw-accordion .accordion-button { font-weight: 800; color: var(--tw-ink); background: #fff; box-shadow: none; }
.tw-accordion .accordion-button:not(.collapsed) { background: var(--tw-soft); }
.tw-accordion .accordion-body { color: #4a4031; line-height: 1.65; }
.tw-specs { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: .4rem 1rem; margin: 0; font-size: .92rem; }
.tw-specs dt { color: var(--tw-muted); font-weight: 600; }
.tw-specs dd { margin: 0; color: var(--tw-ink); }
.tw-specs-full { grid-column: 1 / -1; }

/* ── Comprados juntos ───────────────────────────────────────── */
.tw-combo { margin-top: 2.25rem; padding: 1.25rem; border: 1px solid var(--tw-line); border-radius: 20px; background: #fff; }
.tw-combo-items { display: flex; align-items: flex-start; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; }
.tw-combo-plus { align-self: center; color: var(--tw-muted); padding: 0 .25rem; margin-bottom: 3rem; }
.tw-combo-item { position: relative; flex: 0 0 170px; display: flex; flex-direction: column; gap: .25rem; cursor: pointer; font-size: .85rem; }
.tw-combo-item input { position: absolute; top: .5rem; left: .5rem; z-index: 2; width: 20px; height: 20px; accent-color: var(--tw-ink); }
.tw-combo-item.is-off { opacity: .45; }
.tw-combo-img { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 14px; background: var(--tw-soft); color: var(--gold); overflow: hidden; }
.tw-combo-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; background: #fff; }
.tw-combo-img em { position: absolute; bottom: .4rem; left: .4rem; right: .4rem; z-index: 1; padding: .15rem; border-radius: 6px; background: rgba(31, 23, 11, .75); color: #fff; font-style: normal; font-size: .7rem; font-weight: 700; text-align: center; }
.tw-combo-name { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tw-combo-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; padding-top: .9rem; border-top: 1px solid var(--tw-line); }
.tw-combo-foot strong { font-size: 1.25rem; }

/* ── Banners administrables y secciones de la portada ───────── */
.tw-banner-link { position: absolute; inset: 0; z-index: 1; }
.hero-slide.is-banner-solo .carousel-overlay { display: none; }
.tw-home-products { padding: 2.5rem 0; }
.tw-home-products + .tw-home-products { padding-top: 0; }
.tw-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.tw-home-head .tw-section-title { margin: 0; }
.tw-home-head a { font-weight: 700; color: var(--gold-dark); text-decoration: none; white-space: nowrap; }
.tw-home-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.tw-home-cat { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .9rem 1rem; border: 1px solid var(--tw-line); border-radius: 14px; background: #fff; color: var(--tw-ink); text-decoration: none; font-weight: 700; }
.tw-home-cat span { font-size: .78rem; color: var(--tw-muted); font-weight: 600; }
.tw-home-cat:hover { border-color: var(--gold); color: var(--tw-ink); box-shadow: var(--tw-shadow); }

/* ── Vendedor IA (chat) ─────────────────────────────────────── */
.ag { position: fixed; right: 18px; bottom: 18px; z-index: 1040; }
body:has(.ag) .tw-wa-float { bottom: 88px; }
@media (max-width: 991.98px) { body:has(.tw-sticky-buy) .ag { bottom: 88px; } body:has(.tw-sticky-buy):has(.ag) .tw-wa-float { bottom: 158px; } }
.ag-launcher { display: flex; align-items: center; gap: .55rem; height: 58px; min-width: 58px; padding: 0 1.1rem 0 1.15rem; border: 0; border-radius: 999px;
    background: linear-gradient(135deg, var(--tw-ink), #3b2a12); color: var(--gold-light); font-size: 1.35rem; box-shadow: 0 10px 28px rgba(31, 23, 11, .35); }
.ag-launcher-txt { max-width: 0; overflow: hidden; white-space: nowrap; font-size: .9rem; font-weight: 700; color: #fff; transition: max-width .35s ease; }
.ag.is-hint .ag-launcher-txt { max-width: 180px; }
.ag.is-open .ag-launcher { display: none; }
.ag-panel { position: absolute; right: 0; bottom: 0; width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 110px)); display: flex; flex-direction: column;
    background: #fff; border-radius: 20px; box-shadow: 0 18px 48px rgba(31, 23, 11, .28); overflow: hidden; }
.ag-panel[hidden] { display: none; }
@media (max-width: 575.98px) {
    .ag.is-open { inset: 0; right: 0; bottom: 0; }
    .ag-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; }
}
.ag-head { display: flex; align-items: center; gap: .65rem; padding: .8rem .9rem; background: var(--tw-ink); color: #fff; }
.ag-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-dark), var(--gold-light)); color: var(--tw-ink); font-weight: 800; }
.ag-head-txt { flex: 1; min-width: 0; line-height: 1.2; }
.ag-head-txt small { display: block; color: #d8ccb3; font-size: .74rem; }
.ag-icon { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; }
.ag-icon:hover { background: rgba(255, 255, 255, .2); }
.ag-body { flex: 1; overflow-y: auto; padding: 1rem .85rem; display: flex; flex-direction: column; gap: .55rem; background: var(--tw-soft); }
.ag-msg { max-width: 86%; padding: .6rem .8rem; border-radius: 16px; font-size: .9rem; line-height: 1.45; word-wrap: break-word; }
.ag-msg.is-bot { align-self: flex-start; background: #fff; border: 1px solid var(--tw-line); border-bottom-left-radius: 4px; color: var(--tw-ink); }
.ag-msg.is-user { align-self: flex-end; background: var(--tw-ink); color: #fff; border-bottom-right-radius: 4px; }
.ag-typing { display: inline-flex; gap: 4px; padding: .75rem .9rem; }
.ag-typing span { width: 7px; height: 7px; border-radius: 50%; background: #b9ad97; animation: agDot 1.2s infinite ease-in-out; }
.ag-typing span:nth-child(2) { animation-delay: .15s; }
.ag-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes agDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ag-cards { display: flex; gap: .5rem; overflow-x: auto; padding: .1rem 0 .3rem; scrollbar-width: thin; }
.ag-card { flex: 0 0 150px; background: #fff; border: 1px solid var(--tw-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.ag-card-img { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; background: #fff; color: var(--gold); }
.ag-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; background: #fff; }
.ag-card-promo { position: absolute; top: .35rem; left: .35rem; z-index: 1; background: var(--tw-promo); color: #fff; font-size: .66rem; font-weight: 800; padding: .1rem .4rem; border-radius: 5px; }
.ag-card-body { padding: .5rem .55rem .6rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.ag-card-name { font-size: .78rem; font-weight: 600; color: var(--tw-ink); text-decoration: none; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-card-price { font-size: .82rem; }
.ag-card-price s { color: var(--tw-muted); font-size: .72rem; }
.ag-card-add { margin-top: auto; border: 0; border-radius: 999px; padding: .35rem; font-size: .76rem; font-weight: 700; background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: var(--tw-ink); }
.ag-card-add.is-done { background: var(--tw-ok); color: #fff; }
.ag-order { display: flex; gap: .7rem; align-self: stretch; padding: .75rem .85rem; border-radius: 14px; background: #eafaf0; border: 1px solid #c9eed6; font-size: .88rem; }
.ag-order-ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; background: var(--tw-ok); color: #fff; }
.ag-order-wa { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: var(--tw-wa); color: #fff; font-weight: 700; text-decoration: none; }
.ag-order-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.ag-order-up { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: var(--tw-ink); color: #fff; font-weight: 700; cursor: pointer; margin: 0; }
.ag-order-up.is-loading { opacity: .6; pointer-events: none; }
/* "Ya pague" sin captura: el boton de adjuntar llama la atencion */
.ag-order-up.is-atencion { animation: agAtencion 1s ease-in-out 3; box-shadow: 0 0 0 3px rgba(255, 193, 7, .6); }
@keyframes agAtencion { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .ag-order-up.is-atencion { animation: none; } }
.ag-order-estado { font-size: .8rem; margin-top: .35rem; color: #155d33; }
.tw-pay ul { color: #3d3427; }
.tw-pay-form { background: #fff; border: 1px solid #c9eed6; border-radius: 12px; padding: .75rem; }
.ag-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .5rem .75rem 0; background: #fff; scrollbar-width: none; }
.ag-chips[hidden] { display: none; }
.ag-chips button { flex: 0 0 auto; border: 1px solid var(--tw-line); background: #fff; border-radius: 999px; padding: .3rem .75rem; font-size: .8rem; font-weight: 600; color: var(--tw-ink); }
.ag-chips button:hover { border-color: var(--gold); }
.ag-form { display: flex; align-items: flex-end; gap: .5rem; padding: .6rem .75rem; background: #fff; border-top: 1px solid var(--tw-line); }
.ag-form textarea { flex: 1; resize: none; border: 1.5px solid var(--tw-line); border-radius: 18px; padding: .55rem .85rem; font-size: .92rem; max-height: 110px; outline: 0; }
.ag-form textarea:focus { border-color: var(--gold); }
.ag-send { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; background: var(--tw-ink); color: var(--gold-light); }
.ag-legal { padding: 0 .9rem .55rem; background: #fff; font-size: .68rem; color: var(--tw-muted); text-align: center; }

@media (prefers-reduced-motion: reduce) {
    .ag-launcher-txt, .ag-typing span { transition: none; animation: none; }
    .tw-card, .tw-card-media img, .tw-btn, .tw-wa-float, .tw-gallery-slide img { transition: none; }
    .tw-card:hover, .tw-card:hover .tw-card-media img { transform: none; }
}
