/* ===== Hero / Home =====
   Carrusel de banners de imagen a todo el ancho, como en el sitio de referencia.
   Cada slide es una imagen real (assets/img/banners/*.svg — reemplazables por fotos
   cuando lleguen del cliente); el HTML solo aporta los controles del carrusel. */
.hero-section {
  position: relative; overflow: hidden; background: var(--ink-900);
  aspect-ratio: 16 / 9;
}
.hero-track { position: relative; width: 100%; height: 100%; }
.hero-slide {
  position: absolute; inset: 0; display: block; opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: none; color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5; backdrop-filter: blur(2px);
}
.hero-nav-arrow:hover { background: rgba(255,255,255,.28); }
.hero-nav-arrow.prev { left: 18px; } .hero-nav-arrow.next { right: 18px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; gap: 7px; justify-content: center; z-index: 5; }
.hero-dots button { width: 7px; height: 7px; padding: 0; border: none; border-radius: 999px; background: rgba(255,255,255,.4); cursor: pointer; transition: width .2s ease, background .2s ease; }
.hero-dots button.is-active { background: #fff; width: 20px; }

@media (max-width: 820px) { .hero-nav-arrow { width: 34px; height: 34px; } }

/* ===== Franja de confianza (pagos/retiro/envío) — banda plana, no cards ===== */
.perks-strip { background: #fff; border-bottom: 1px solid var(--neutral-200); display: flex; }
/* Banner horizontal chico — reemplaza la franja de textos; acá va una imagen
   promocional angosta que el cliente sube manualmente (ver assets/img/banners/). */
.promo-banner-slot { display: block; background: var(--neutral-100); }
.promo-banner-slot img { display: block; width: 100%; height: auto; }

.category-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 14px; }
.category-tile { text-align: center; transition: transform .15s ease; }
.category-tile:hover { transform: translateY(-3px); }
.category-tile:hover .icon-wrap { border-color: var(--primary-500); box-shadow: var(--shadow-card-hover); }
.category-tile .icon-wrap {
  position: relative; width: 108px; height: 108px; border-radius: 999px; overflow: hidden; margin: 0 auto 12px;
  border: 3px solid #fff; outline: 1px solid var(--neutral-200); box-shadow: var(--shadow-card); background: var(--neutral-100); transition: all .15s ease;
}
.category-tile .icon-wrap img { width: 100%; height: 100%; object-fit: cover; }
.category-tile .icon-wrap::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.category-tile span { font-size: .84rem; font-weight: 700; color: var(--ink-800); }
@media (max-width: 900px) { .category-tiles { grid-template-columns: repeat(2, 1fr); } .category-tile .icon-wrap { width: 92px; height: 92px; } }

/* ===== Product grid / card ===== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.product-card { background: #fff; border: 1px solid var(--neutral-200); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease; position: relative; }
.product-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.product-card-media { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.product-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product-card.is-out-of-stock .product-card-media img { opacity: .45; filter: grayscale(60%); }
.product-card.is-out-of-stock .price-block { opacity: .55; }
.product-card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.card-badges { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.wishlist-btn { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.92); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-700); }
.wishlist-btn:hover { color: var(--promo-500); }
.product-card-body { padding: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card-brand { font-size: .72rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.product-card-title { font-size: .92rem; font-weight: 600; color: var(--ink-900); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.product-card-title:hover { color: var(--primary-600); }
.price-block { margin-top: 6px; }
.price-compare { font-size: .8rem; color: var(--ink-500); text-decoration: line-through; }
.price-now { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; color: var(--ink-900); }
.price-installments { font-size: .78rem; color: var(--secondary-600); font-weight: 600; margin-top: 2px; }
.product-card-footer { padding: 0 14px 14px; margin-top: auto; }
.stock-warning { font-size: .74rem; color: #b45309; font-weight: 700; margin-top: 4px; }

/* Filtros / sort bar PLP */
.plp-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .plp-layout { grid-template-columns: 1fr; } }
.filters-panel { background: #fff; border: 1px solid var(--neutral-200); border-radius: var(--radius-md); padding: 18px; position: sticky; top: calc(var(--header-h) + 16px); }
.filters-panel h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); margin-bottom: 10px; }
.filters-panel .filter-group { margin-bottom: 22px; }
.filters-panel .price-inputs { display: flex; gap: 8px; align-items: center; }
.plp-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.plp-toolbar .result-count { font-size: .88rem; color: var(--ink-500); }
.sort-select { display: flex; align-items: center; gap: 8px; }

/* ===== PDP ===== */
.pdp-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .pdp-layout { grid-template-columns: 1fr; gap: 24px; } }

.gallery-main { aspect-ratio: 1/1; background: var(--neutral-100); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--neutral-200); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button { width: 68px; height: 68px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--neutral-200); padding: 0; cursor: pointer; background: var(--neutral-100); }
.gallery-thumbs button.is-active { border-color: var(--primary-500); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp-brand { color: var(--ink-500); font-weight: 600; font-size: .85rem; text-transform: uppercase; }
.pdp-sku { color: var(--ink-500); font-size: .8rem; margin-bottom: 14px; }

/* Bloque de precio destacado: original tachado + badge de % + precio grande + urgencia de stock */
.price-highlight-box {
  background: linear-gradient(180deg, var(--primary-50), #fff); border: 1.5px solid var(--primary-200);
  border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 18px;
}
.pdp-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.pdp-price-compare { font-size: 1.05rem; color: var(--ink-500); text-decoration: line-through; }
.pdp-discount-badge {
  background: var(--promo-500); color: #fff; font-weight: 800; font-size: .8rem; padding: 4px 10px;
  border-radius: var(--radius-sm); letter-spacing: .02em;
}
.pdp-price-now { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--ink-900); line-height: 1.05; }
.pdp-installments { color: var(--secondary-600); font-weight: 700; font-size: .92rem; margin-top: 6px; }
.pdp-savings { color: var(--success-500); font-weight: 700; font-size: .85rem; margin-top: 4px; }
.stock-urgency {
  display: inline-flex; align-items: center; gap: 6px; color: #b45309; font-weight: 700; font-size: .82rem;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--primary-200);
}
.stock-urgency::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: #f59e0b; flex-shrink: 0; animation: pulse-dot 1.6s ease infinite; }
.stock-urgency.is-out { color: var(--ink-500); }
.stock-urgency.is-out::before { background: var(--ink-300); animation: none; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .stock-urgency::before { animation: none; } }

.variant-group { margin-bottom: 20px; }
.variant-group label.group-label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 8px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-chip { padding: 9px 16px; border-radius: var(--radius-md); border: 1.5px solid var(--neutral-300); font-size: .88rem; font-weight: 600; cursor: pointer; background: #fff; }
.variant-chip:hover { border-color: var(--primary-400); }
.variant-chip.is-selected { border-color: var(--primary-500); background: var(--primary-50); color: var(--primary-700); }
.variant-chip.is-disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }

.qty-add-row { display: flex; gap: 12px; align-items: stretch; margin: 22px 0; }
.qty-stepper { display: flex; align-items: center; border: 1.5px solid var(--neutral-300); border-radius: var(--radius-md); overflow: hidden; }
.qty-stepper button { width: 42px; background: var(--neutral-50); border: none; font-size: 1.1rem; cursor: pointer; }
.qty-stepper input { width: 46px; text-align: center; border: none; font-weight: 700; }

/* Selector de cantidad (1 unidad viene preseleccionada) + botón único "Comprar Ahora" */
.qty-select-label { font-size: .82rem; font-weight: 700; color: var(--ink-700); margin-bottom: 8px; }
.qty-select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.qty-option {
  position: relative; border: 2px solid var(--neutral-300); border-radius: var(--radius-md); background: #fff;
  padding: 14px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: all .15s ease;
}
.qty-option:hover { border-color: var(--primary-400); }
.qty-option-label { font-size: .78rem; font-weight: 700; color: var(--ink-600); display: flex; align-items: center; gap: 6px; }
.qty-option-label .check {
  width: 16px; height: 16px; border-radius: 999px; border: 2px solid var(--neutral-300); flex-shrink: 0; position: relative;
}
.qty-option.is-selected .qty-option-label .check { border-color: var(--primary-500); background: var(--primary-500); }
.qty-option.is-selected .qty-option-label .check::after {
  content: ''; position: absolute; inset: 3px; border-radius: 999px; background: #fff;
}
.qty-option-price { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--ink-900); }
.qty-option-unit { font-size: .72rem; color: var(--ink-500); }
.qty-option.is-selected { border-color: var(--primary-500); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary-500); }
.qty-option-badge {
  position: absolute; top: -11px; right: 10px; background: var(--promo-500); color: #fff; font-size: .64rem;
  font-weight: 800; padding: 3px 9px; border-radius: var(--radius-full); white-space: nowrap;
}
.buy-now-btn { font-size: 1.02rem; }
@media (max-width: 420px) { .qty-select-row { grid-template-columns: 1fr; } }

.pdp-trust { display: flex; gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--neutral-200); flex-wrap: wrap; }
.pdp-trust > div { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--ink-600); }
.pdp-trust svg { color: var(--primary-500); flex-shrink: 0; }

.sticky-buy-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 3px solid var(--promo-500);
  box-shadow: 0 -6px 20px rgba(0,0,0,.10); padding: 10px 0; z-index: 150; display: none; transform: translateY(100%);
  transition: transform .25s ease;
}
.sticky-buy-bar.is-visible { display: block; transform: translateY(0); }
.sticky-buy-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sticky-buy-bar .sb-info { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.sticky-buy-bar .sb-title { font-size: .74rem; font-weight: 600; color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.sticky-buy-bar .sb-price-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.sticky-buy-bar .sb-price { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink-900); line-height: 1; }
.sticky-buy-bar .sb-badge { background: var(--promo-500); color: #fff; font-weight: 800; font-size: .7rem; padding: 3px 8px; border-radius: var(--radius-full); line-height: 1.3; }
.sticky-buy-bar .btn { flex-shrink: 0; white-space: nowrap; padding: 12px 24px; }
@media (max-width: 560px) {
  .sticky-buy-bar { padding: 8px 0; }
  .sticky-buy-bar .sb-title { display: none; }
  .sticky-buy-bar .sb-info { justify-content: center; }
  .sticky-buy-bar .sb-price { font-size: 1.05rem; }
  .sticky-buy-bar .btn { padding: 10px 18px; font-size: .86rem; }
}

.pdp-specs-table { width: 100%; border-collapse: collapse; }
.pdp-specs-table tr { border-bottom: 1px solid var(--neutral-100); }
.pdp-specs-table td { padding: 10px 4px; font-size: .9rem; }
.pdp-specs-table td:first-child { color: var(--ink-500); width: 40%; }

/* ===== Cart / Checkout ===== */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .cart-layout, .checkout-layout { grid-template-columns: 1fr; } }

.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--neutral-100); align-items: center; }
.cart-line img, .cart-line svg { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); background: var(--neutral-100); }
.cart-line-title { font-weight: 600; font-size: .92rem; }
.cart-line-variant { font-size: .8rem; color: var(--ink-500); }
.cart-line-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.cart-line-price { text-align: right; font-weight: 700; }
.remove-link { font-size: .78rem; color: var(--promo-500); }

.summary-box { position: sticky; top: calc(var(--header-h) + 16px); }
.summary-row { display: flex; justify-content: space-between; font-size: .92rem; padding: 8px 0; }
.summary-row.total { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--neutral-200); margin-top: 8px; padding-top: 14px; }
.summary-row .discount { color: var(--success-500); }

.checkout-steps { display: flex; gap: 8px; margin-bottom: 28px; }
.checkout-step { flex: 1; text-align: center; padding: 10px 6px; border-radius: var(--radius-md); background: var(--neutral-100); font-size: .8rem; font-weight: 700; color: var(--ink-500); }
.checkout-step.is-active { background: var(--primary-500); color: #fff; }
.checkout-step.is-done { background: var(--success-100); color: var(--success-500); }

.address-card { border: 1.5px solid var(--neutral-200); border-radius: var(--radius-md); padding: 14px; cursor: pointer; margin-bottom: 10px; }
.address-card.is-selected { border-color: var(--primary-500); background: var(--primary-50); }
.payment-option { border: 1.5px solid var(--neutral-200); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; }
.payment-option.is-selected { border-color: var(--primary-500); background: var(--primary-50); }

/* ===== Auth / account ===== */
.auth-shell { max-width: 440px; margin: 48px auto; }
.auth-shell .card { padding: 32px; }
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
@media (max-width: 800px) { .account-layout { grid-template-columns: 1fr; } }
.account-nav a { display: block; padding: 10px 12px; border-radius: var(--radius-md); font-weight: 600; font-size: .9rem; color: var(--ink-700); }
.account-nav a:hover { background: var(--neutral-100); }
.account-nav a.is-active { background: var(--primary-50); color: var(--primary-700); }

/* Order summary tables */
.order-table { width: 100%; border-collapse: collapse; }
.order-table th { text-align: left; font-size: .75rem; text-transform: uppercase; color: var(--ink-500); padding: 10px 8px; border-bottom: 1px solid var(--neutral-200); }
.order-table td { padding: 12px 8px; border-bottom: 1px solid var(--neutral-100); font-size: .9rem; }

/* Institucional */
.prose { max-width: 76ch; font-size: .95rem; }
.prose h2 { margin-top: 1.6em; }
.prose ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: .4em; }

.legal-page { max-width: 760px; margin: 0 auto; }
.legal-page .breadcrumb { margin-bottom: 22px; }
.legal-page h1 { margin-bottom: 6px; }
.legal-updated { font-size: .82rem; color: var(--ink-500); margin-bottom: 24px; }
.legal-page .prose { max-width: none; }
.legal-page .prose h2 { font-size: 1.05rem; padding-bottom: 8px; border-bottom: 1px solid var(--neutral-100); }
.legal-page .prose p { margin-bottom: 1em; line-height: 1.65; }
.legal-page .prose > h2:first-child { margin-top: 0; }

/* ===== Reviews de producto ===== */
.reviews-avg { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-600); font-weight: 600; }
.reviews-avg .stars { color: #f5a623; letter-spacing: 1px; font-size: .95rem; }
.reviews-list { display: flex; flex-direction: column; gap: 26px; max-width: 820px; }
.review { display: flex; gap: 14px; }
.review-avatar {
  width: 44px; height: 44px; border-radius: 999px; background: var(--secondary-100); color: var(--secondary-600);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; flex-shrink: 0;
}
.review-body { flex: 1; min-width: 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.review-head strong { font-size: .92rem; }
.review-head .stars { color: #f5a623; letter-spacing: 1px; font-size: .85rem; }
.review-head .review-date { font-size: .76rem; color: var(--ink-500); margin-left: auto; }
.review-body p { font-size: .9rem; color: var(--ink-700); margin: 0 0 12px; line-height: 1.55; }
.store-reply {
  display: flex; gap: 10px; background: var(--neutral-50); border-radius: var(--radius-md); padding: 12px 14px;
  margin-left: 14px; border-left: 3px solid var(--primary-500);
}
.store-reply .reply-avatar {
  width: 28px; height: 28px; border-radius: 999px; background: var(--primary-500); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: .74rem; flex-shrink: 0; overflow: hidden;
}
.store-reply strong { font-size: .8rem; display: block; margin-bottom: 3px; color: var(--ink-900); }
.store-reply p { font-size: .85rem; margin: 0; color: var(--ink-700); line-height: 1.5; }
@media (max-width: 560px) { .store-reply { margin-left: 0; } }

/* ===== Preguntas y respuestas del producto ===== */
.qa-list { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.qa-item { border: 1px solid var(--neutral-200); border-radius: var(--radius-md); padding: 14px 16px; background: #fff; }
.qa-question { display: flex; gap: 10px; font-size: .9rem; font-weight: 700; color: var(--ink-900); margin-bottom: 8px; }
.qa-question .qa-tag { flex-shrink: 0; color: var(--secondary-600); }
.qa-answer { display: flex; gap: 10px; font-size: .88rem; color: var(--ink-700); line-height: 1.5; padding-left: 22px; }
.qa-answer .qa-tag { flex-shrink: 0; color: var(--primary-600); font-weight: 700; }
.qa-answer .qa-avatar {
  width: 22px; height: 22px; border-radius: 999px; overflow: hidden; flex-shrink: 0; background: var(--primary-500);
}
.qa-answer .qa-avatar img { width: 100%; height: 100%; object-fit: cover; }
