/* ---------- Sections ---------- */
.section { padding: 38px 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 1.5rem; }

/* ---------- Hero ---------- */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding: 56px 18px 46px; text-align: center; }
.hero-eyebrow { color: var(--primary); font-weight: 700; letter-spacing: .5px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 14px 0 10px; line-height: 1.12; }
.hero .hl { color: var(--primary); }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto 22px; font-size: 1.06rem; }
.hero-search { display: flex; gap: 8px; max-width: 520px; margin: 0 auto 18px; position: relative; }
.hero-search .search-results { text-align: left; }
.detail-cat { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.detail-cat:hover { color: var(--accent); }
.hero-search input {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 16px; font-size: 1rem; outline: none;
  background: var(--surface); color: var(--text);
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.hero-cats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 14px; text-align: center; display: grid; gap: 4px; box-shadow: var(--shadow);
  transition: .15s;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d6d9dd; }
.cat-icon { font-size: 2rem; }

/* ---------- Product grid + cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 16px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-media { position: relative; aspect-ratio: 1/1; background: var(--surface-2); display: block; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .card-media img { transform: scale(1.05); }
.media-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; }
.media-placeholder.big { aspect-ratio: 1/1; font-size: 5rem; border-radius: var(--radius); }
.badge { position: absolute; top: 10px; left: 10px; font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.badge-featured { background: #fff; color: #b45309; border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-cat { font-size: .78rem; color: var(--muted); }
.card-title { margin: 0; font-size: 1rem; line-height: 1.3; }
.card-desc { margin: 0; font-size: .86rem; color: var(--muted); flex: 1; }
.card-price { display: flex; align-items: baseline; gap: 8px; }
.price { font-weight: 800; color: var(--text); }
.price.big { font-size: 1.6rem; color: var(--text); }
.price-old { text-decoration: line-through; color: var(--muted); font-size: .85rem; }

/* ---------- How it works ---------- */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.how-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.how-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 10px; }
.how-step h3 { margin: 0 0 4px; }

/* ---------- CTA final ---------- */
.cta-final { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-inner { text-align: center; padding: 52px 18px; }
.cta-inner h2 { margin: 0 0 8px; font-size: 1.7rem; }
.cta-inner p { margin: 0 0 20px; color: var(--muted); }

/* ---------- Category / detail pages ---------- */
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--primary); }
.cat-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cat-header-icon { font-size: 2.6rem; }
.cat-header h1 { margin: 0; }
.filters { display: flex; gap: 8px; margin-bottom: 20px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: .9rem; }
.chip:hover { border-color: var(--primary); }
.chip-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.detail-media { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.detail-media img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.detail-info h1 { margin: 8px 0 10px; font-size: 1.9rem; }
.tag { display: inline-block; font-size: .76rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: #ecfdf5; color: #047857; }
.detail-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.lead { font-size: 1.05rem; }
.detail-desc { color: #374151; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.detail-actions .i-count { background: rgba(17,24,39,.08); padding: 1px 8px; border-radius: 999px; font-size: .82rem; }

/* ---------- Search ---------- */
.search-bar { display: flex; gap: 8px; max-width: 560px; margin: 14px 0 22px; position: relative; }
.search-bar input { flex: 1; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 1rem; background: var(--surface); color: var(--text); outline: none; }
.search-bar input::placeholder { color: var(--muted); }
.search-bar input:focus { border-color: var(--primary); }

/* Pros / contras */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 4px 0 18px; }
.proscons ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.proscons li { font-size: .92rem; line-height: 1.35; }
.proscons .cons li { color: var(--muted); }

/* Chips de etiquetas (scopeadas para no chocar con los filtros .chip) */
.tag-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag-chips .chip { background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 0; }

@media (max-width: 760px) {
  .product-detail { grid-template-columns: 1fr; }
  .proscons { grid-template-columns: 1fr; }
}

/* ====================================================================
   Pulido elegante (capa adicional, ligera)
   ==================================================================== */

/* Hero: limpio, blanco, mínimo */
.hero { background: var(--bg); }
.hero-inner { padding: 64px 18px 52px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 13px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  color: var(--muted);
}
.hero h1 { font-weight: 800; letter-spacing: -.025em; font-size: clamp(2rem, 4.4vw, 3.1rem); }
.hero .hl { color: var(--accent); }

/* Encabezados de sección: simples, sin barra (menos ruido) */
.section-head h2 { letter-spacing: -.015em; }

/* Cards: borde+sombra más finos, hover elegante */
.product-card, .cat-card, .how-step { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d6d9dd; }
.cat-card:hover { transform: translateY(-2px); }
.card-cat { text-transform: uppercase; letter-spacing: .4px; font-weight: 600; font-size: .72rem; }
.card-title { font-weight: 700; letter-spacing: -.01em; }

/* Pills de categoría en el header más definidas */
.cat-pill { transition: background .18s, color .18s, border-color .18s; }
.cat-pill:hover { border-color: var(--ink); color: var(--ink); }

/* Detalle: media con un leve realce */
.detail-media { box-shadow: var(--shadow-md); }

/* Monogramas en tarjetas y cabeceras */
.card-cat { display: inline-flex; align-items: center; gap: 6px; }
.cat-pill { display: inline-flex; align-items: center; gap: 7px; }
.cat-icon .monogram { width: 54px; height: 54px; border-radius: 14px; font-size: 1.5rem; }
.cat-header-icon .monogram { width: 58px; height: 58px; border-radius: 16px; font-size: 1.7rem; }
.cat-header-icon { color: var(--ink); }

/* Eyebrow del hero con icono */
.hero-eyebrow .icon { color: var(--accent); }

/* Placeholders de imagen ahora con icono SVG */
.media-placeholder { color: #c2c7ce; }

/* Estados vacíos con icono */
.empty-state { text-align: center; padding: 48px 18px; }
.empty-icon { display: inline-grid; place-items: center; width: 72px; height: 72px;
  border-radius: 18px; background: var(--surface-2); color: var(--muted); margin-bottom: 14px; }

/* Pros / contras con iconos alineados */
.proscons li { display: flex; align-items: flex-start; gap: 8px; }
.proscons .pros .icon { color: var(--accent); margin-top: .12em; }
.proscons .cons .icon { color: var(--muted); margin-top: .12em; }

/* Botón “Ver producto” empuja la flecha al hover */
.product-card .btn-primary .icon { transition: transform .2s ease; }
.product-card:hover .btn-primary .icon { transform: translateX(3px); }

/* Micro-interacción de press (scale-feedback, §7) */
.product-card:active, .cat-card:active { transform: scale(.992); }

/* Pill de destacado en tabla admin / badge en card */
.badge-featured .icon { color: #b45309; }

/* Galería de producto (portada + miniaturas) */
.detail-media { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.detail-main-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
#detail-main { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.media-placeholder.big { background: var(--surface-2); border: 1px solid var(--border); }
.detail-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.detail-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid var(--border); padding: 0; cursor: pointer; background: var(--surface-2); transition: border-color .15s; }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumb:hover { border-color: var(--muted); }
.detail-thumb.is-active { border-color: var(--ink); }

/* Paginación */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 34px 0 6px; }
.page-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; transition: .15s; }
.page-btn:hover { border-color: var(--ink); }
.page-btn.is-disabled { opacity: .4; pointer-events: none; }
.page-info { color: var(--muted); font-size: .9rem; font-weight: 600; }
.icon-flip { transform: rotate(180deg); }

/* Curtain respeta usuarios con menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .page-curtain { display: none; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
