/* TACTIKA KIDS · rediseño responsive (cabecera, portada, catálogo, carrito).
   Se carga DESPUÉS de style.css: sustituye reglas sin tocar el archivo original (reversible borrando este archivo). */
:root{--red:#c8261c;--red-bg:#e63b2e;--card-line:#e6e3d6;--shadow-soft:0 6px 22px rgba(37,62,54,.08)}

/* ---------- Cabecera ---------- */
header{position:sticky;top:0;z-index:30;background:var(--cream);padding-top:12px;padding-bottom:12px}
header .brand{width:auto;flex:0 0 auto}
.cart-trigger{position:relative;width:48px;height:48px;min-width:48px;justify-content:center;gap:0;border-radius:50%;background:#fff;border:1.5px solid var(--ink);transition:background .15s}
.cart-trigger:hover{background:var(--yellow)}
.cart-trigger .cart-icon{display:block}
.cart-trigger .cart-count{position:absolute;top:-6px;right:-6px;min-width:22px;width:auto;height:22px;padding:0 6px;border-radius:999px;background:var(--red-bg);color:#fff;font-size:12px;font-weight:800;line-height:1;display:grid;place-items:center;border:2px solid var(--cream)}
.cart-trigger .cart-count[data-empty="true"]{background:var(--ink)}
@media(max-width:1000px){header{padding:10px 16px}header nav{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;white-space:nowrap;scrollbar-width:none;padding-top:8px;gap:20px}header nav::-webkit-scrollbar{display:none}header nav a{padding:8px 0}.cart-trigger{margin-left:auto}}

/* ---------- Navegación por categorías ---------- */
.cat-nav{display:flex;gap:8px;overflow-x:auto;max-width:1440px;margin:0 auto;padding:12px 5%;scrollbar-width:none;-webkit-overflow-scrolling:touch;font-size:14px}
.cat-nav::-webkit-scrollbar{display:none}
.cat-pill{flex:0 0 auto;min-height:44px;padding:0 20px;border-radius:999px;background:#fff;border:1.5px solid var(--card-line);font-weight:700;color:var(--ink);white-space:nowrap}
.cat-pill:hover{border-color:var(--ink)}
.cat-pill[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
@media(max-width:700px){.cat-nav{padding:10px 16px}}

/* ---------- Portada ---------- */
.hero-editorial{grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);align-items:center;gap:48px;padding-top:34px;padding-bottom:44px}
.hero-collage{background:none;border-radius:0;overflow:visible;min-height:0;position:relative;aspect-ratio:5/6;max-height:660px;width:100%}
.hero-collage .hero-main{position:absolute;right:0;top:0;width:76%;height:100%;object-fit:cover;object-position:center 22%;border-radius:200px 200px 28px 28px;box-shadow:var(--shadow-soft)}
.hero-collage .hero-side{position:absolute;left:0;width:34%;height:auto;aspect-ratio:4/5;object-fit:cover;border-radius:22px;border:5px solid var(--cream);box-shadow:var(--shadow-soft)}
.hero-collage .hero-side-a{top:9%}
.hero-collage .hero-side-b{bottom:9%}
.hero-editorial h1{font-size:clamp(46px,5.4vw,84px)}
@media(max-width:900px){
  .hero-editorial{grid-template-columns:1fr;gap:22px;padding:18px 16px 30px}
  .hero-editorial .hero-copy{order:2;text-align:left}
  .hero-collage{order:1;aspect-ratio:4/4.2;max-height:none}
  .hero-collage .hero-main{width:72%;border-radius:140px 140px 22px 22px}
  .hero-collage .hero-side{width:32%;border-width:4px;border-radius:16px}
  .hero-editorial h1{font-size:clamp(40px,12vw,54px);margin-bottom:14px}
  .hero-actions{flex-direction:row;flex-wrap:wrap}.hero-actions .button{width:auto;flex:1 1 150px;min-height:48px;gap:10px}
}

/* ---------- Catálogo ---------- */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:34px 22px}
@media(min-width:1180px){.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 10px}}
@media(max-width:339px){.product-grid{grid-template-columns:1fr}}
.product-card{display:flex;flex-direction:column;min-width:0}
.product-link{display:block;flex:1 1 auto;min-width:0}
.product-card .product-image{height:auto;aspect-ratio:4/5;border-radius:16px}
.product-card .product-image img{width:100%;height:100%;object-fit:cover;object-position:center;padding:0}
.product-card:hover .product-image img{transform:scale(1.03)}
.product-card .badge{left:10px;top:10px;font-size:10px;padding:5px 9px;border-radius:999px;font-weight:700}
.discount-badge{position:absolute;right:10px;top:10px;z-index:1;background:var(--red-bg);color:#fff;font-weight:800;font-size:13px;line-height:1;padding:7px 10px;border-radius:999px;letter-spacing:.2px}
.product-card .product-meta{display:block;margin-top:12px}
.product-card .product-meta p{font-size:11px;margin:0 0 2px;text-transform:uppercase;letter-spacing:.8px}
.product-card .product-meta h3{font-size:16px;line-height:1.3;margin:0 0 6px;overflow-wrap:anywhere}
.price-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px}
.price-now{font-size:18px;font-weight:800;color:var(--ink)}
.price-now.on-sale{color:var(--red)}
.price-was{font-size:14px;font-weight:600;color:var(--red);text-decoration:line-through;text-decoration-thickness:1.5px}
.price-was .price-original{display:none}
.product-meta .price-row .price-converted,.product-meta .price-row .price-original{display:inline}
.quick-add{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;margin-top:10px;padding:0 10px;border-radius:12px;background:var(--ink);color:#fff;font-weight:800;font-size:14px;text-align:center;line-height:1.2}
.quick-add:hover:not(:disabled){background:#1a2d27}
.quick-add:disabled{background:#d9dccd;color:#6a7569;opacity:1}
a.quick-add{background:#fff;color:var(--ink);border:1.5px solid var(--ink)}
a.quick-add:hover{background:var(--yellow)}
@media(max-width:700px){.product-card .product-image{border-radius:12px}.product-card .product-meta h3{font-size:14px}.price-now{font-size:16px}.price-was{font-size:13px}.quick-add{font-size:13px;min-height:44px}.discount-badge{font-size:12px;padding:6px 8px}}

/* ---------- Ficha de producto ---------- */
.detail-image{height:auto;aspect-ratio:4/5;max-height:760px}
.detail-image img{object-fit:cover;padding:0}
.detail-price{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;font-size:26px}
.detail-price .price-now{font-size:28px}
.detail-price .price-was{font-size:18px}
.detail-price .discount-badge{position:static}
.variant{min-height:44px}
@media(max-width:700px){
  .detail-layout{grid-template-columns:1fr;gap:18px}
  .detail-copy h1{font-size:30px;letter-spacing:-1px}
  #add-cart{position:sticky;bottom:10px;z-index:5;min-height:54px;font-size:16px;box-shadow:0 8px 24px rgba(37,62,54,.28)}
}

/* ---------- Carrito ---------- */
.cart-line{gap:14px;padding:18px 0}
.cart-line>img{width:84px;height:104px;object-fit:cover;border-radius:10px}
.cart-line h3{font-size:15px}
.cart-line .price-now{font-size:15px}.cart-line .price-was{font-size:12px}
.quantity{gap:8px}
.quantity button:not(.remove){min-width:44px;min-height:44px;border-radius:10px;font-size:20px;font-weight:700}
.quantity span{min-width:24px;text-align:center;font-weight:800}
.quantity .remove{min-height:44px;padding:0 6px;color:#9b2c22}
.subtotal{font-size:18px}
#checkout{min-height:54px;font-size:16px;border-radius:12px}
@media(max-width:700px){dialog{width:100%;padding:16px}.drawer-head h2{font-size:22px}}

/* ---------- Varios ---------- */
.skeleton{aspect-ratio:4/5;border-radius:16px}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
html{scroll-padding-top:150px}
/* correcciones tras pruebas visuales */
.cat-nav{flex-wrap:nowrap;justify-content:flex-start}
.product-card .product-meta>.price-row{white-space:normal;margin-top:0;width:auto;font-size:inherit}
@media(max-width:1000px){header{position:static}html{scroll-padding-top:12px}}
#continue-shopping{min-height:44px;width:100%;background:none;font-weight:700;text-decoration:underline;text-underline-offset:4px}
#close-cart{min-width:44px;min-height:44px;font-size:26px;background:none}
/* ajustes con catálogo real */
header nav a{white-space:nowrap}
@media(min-width:1001px){header{gap:20px}header nav{gap:clamp(14px,1.8vw,30px)}}
.detail-image{background:#fff}
.detail-image img{object-fit:contain}
