/* mejoras.css v4: zoom y vista rápida sin JavaScript (la CSP bloquea scripts inline) */

.card-img { display:block; overflow:hidden; }
.card-img img { transition: transform .3s ease; width:100%; }
.card-img:hover img { transform: scale(1.04); }

/* Zoom: se activa con :target */
.zoom { display:none; position:fixed; inset:0; z-index:200; align-items:center; justify-content:center; background:rgba(0,0,0,.78); }
.zoom:target { display:flex; animation: zFade .25s ease; }
.zoom img { max-width:90vw; max-height:90vh; border-radius:10px; box-shadow:0 10px 40px rgba(0,0,0,.5); animation: zIn .35s cubic-bezier(.2,.8,.2,1); }
.zoom-fondo { position:absolute; inset:0; }
@keyframes zFade { from{opacity:0} to{opacity:1} }
@keyframes zIn   { from{transform:scale(.6);opacity:0} to{transform:scale(1);opacity:1} }
@media (prefers-reduced-motion: reduce) { .zoom, .zoom img { animation:none; } }

/* Vista rápida (details) */
.qv { margin-top:.5rem; border-top:1px solid #e5e7eb; padding-top:.5rem; }
.qv summary { cursor:pointer; font-weight:600; }
.qv[open] summary { margin-bottom:.5rem; }
.qv .compra { display:flex; gap:.5rem; flex-wrap:wrap; }
.qv .compra input[type=number] { width:4.5rem; }

/* Galería de ficha: radios sin JS */
.galeria { position:relative; }
.galeria input.g-radio { position:absolute; opacity:0; pointer-events:none; }
.galeria .principal label { display:block; cursor:zoom-in; }
.galeria .principal img { width:100%; transition: opacity .25s; }
.galeria .thumbs { display:flex; gap:.5rem; margin-top:.5rem; flex-wrap:wrap; }
.galeria .thumbs label { cursor:pointer; opacity:.6; }
.galeria .thumbs img { width:72px; height:72px; object-fit:cover; border-radius:6px; }
.galeria input.g-radio:checked + .thumbs label { opacity:1; }

/* Carrito con vista previa */
.lista-carrito { list-style:none; padding:0; margin:0 0 1rem; }
.item-carrito { display:grid; grid-template-columns:84px 1fr auto auto; gap:1rem; align-items:center; padding:.75rem 0; border-bottom:1px solid #e5e7eb; }
.item-carrito img { border-radius:8px; object-fit:cover; width:84px; height:84px; }
.item-cant input { width:4.5rem; }
.item-sub { font-weight:700; min-width:6rem; text-align:right; }
@media (max-width:600px) { .item-carrito { grid-template-columns:64px 1fr; } .item-carrito img { width:64px; height:64px; } }

/* Estado de pago en el panel */
.badge.sin_pago { background:#fde68a; }
.badge.comprobante_recibido { background:#bfdbfe; }
.badge.confirmado { background:#bbf7d0; }


/* =========================================================
   CHINCOL · PROTOTIPO E-COMMERCE RESPONSIVE
   Conserva la paleta cálida original y unifica alineaciones.
   ========================================================= */
:root { --naranja:#E8A23A; --ink:#3e372f; --muted:#756e64; --cream:#FBF7EF; --line:#eee5d9; }
* { min-width:0; }
body { overflow-x:hidden; background:var(--cream); color:var(--ink); }
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible { outline:3px solid rgba(232,162,58,.55); outline-offset:2px; }
.bar { min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:22px; }
.brand { flex:0 0 auto; }
.brand img { width:48px; height:48px; }
.nav { flex:1 1 auto; }
.nav a.nav-cart { background:#fff5e5; color:#8b5b16; border:1px solid #f0d7ad; }
.nav-cart .cuenta { display:inline-grid; place-items:center; min-width:22px; height:22px; padding:0 6px; border-radius:99px; background:var(--naranja); color:#fff; font-size:12px; }
.nav-form { margin:0; }
.nav-form button.link { width:auto; min-height:42px; margin:0; padding:9px 14px; border:0; background:transparent; color:#4b463f; font:600 14px Arial,sans-serif; cursor:pointer; }
.main { padding-top:24px; }
.contenedor { width:min(1160px,calc(100% - 40px)); margin:0 auto; padding:42px 0 56px; }
.hero { min-height:clamp(340px,44vw,510px); padding:48px 24px; background-image:linear-gradient(90deg,rgba(35,28,20,.60),rgba(35,28,20,.20)),url('img/slider-1-1024x512.jpg'); }
.hero-txt { width:min(720px,100%); }
.hero-txt p { max-width:560px; margin:0 auto 24px; font-size:clamp(15px,2vw,18px); }
.hero h1 { font-size:clamp(34px,5vw,58px); letter-spacing:-.035em; }
.eyebrow { display:inline-block; margin-bottom:7px; color:#a96c16; font-size:11px; font-weight:800; letter-spacing:.15em; text-transform:uppercase; }
.section-heading { display:flex; justify-content:space-between; align-items:end; gap:18px; margin-bottom:24px; }
.section-heading .titulo-sec { margin:0; }
.text-link { color:#986016; font-weight:700; font-size:14px; }
.titulo-sec { line-height:1.2; }
.seccion-destacados { padding-top:54px; }
.grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:22px; align-items:stretch; }
.product-card { display:flex; flex-direction:column; padding:12px; border:1px solid #f0e8dd; border-radius:15px; box-shadow:0 7px 24px rgba(55,40,22,.055); }
.product-card:hover { transform:translateY(-3px); box-shadow:0 14px 30px rgba(55,40,22,.10); }
.product-card .card-img { display:block; aspect-ratio:1/1; border-radius:10px; background:#f1ece4; }
.product-card .card-img img { width:100%; height:100%; object-fit:cover; }
.product-card .card-body { display:flex; flex:1; flex-direction:column; gap:9px; padding:15px 5px 5px; }
.product-card h3 { margin:0; font-size:16px; line-height:1.35; }
.product-card h3 a:hover { color:#a96c16; }
.product-excerpt { min-height:38px; color:var(--muted); font-size:13px; line-height:1.45; }
.product-card .precio { margin-top:auto; font-size:19px; }
.product-add { margin:0; }
.product-add .btn { width:100%; }
.btn,.btn-sec { min-height:46px; border-radius:8px; }
.btn.ghost { background:#fff; color:#805313; border:1px solid #e6c58f; }
.btn.disabled { opacity:.6; cursor:not-allowed; }
.placeholder { border-radius:10px; color:#a96c16; background:#f3eadb; }
.banner { min-height:190px; height:auto; padding:36px 20px; text-align:center; background:linear-gradient(135deg,#d7c5a8,#b99d75); }
.banner h1 { font-size:clamp(30px,4vw,42px); }
.banner p { margin-top:6px; }
.tienda-section { padding-top:30px; }
.search-store { display:flex; gap:10px; max-width:560px; margin:0 auto 22px; }
.search-store input { flex:1; min-width:0; margin:0; min-height:46px; border:1px solid #e5dbcc; border-radius:9px; padding:10px 14px; }
.search-store .btn { flex:0 0 auto; }
.subcat { justify-content:flex-start; border:0; border-radius:12px; padding:10px; background:#fff; }
.results-meta { display:flex; justify-content:space-between; gap:12px; margin:20px 0 14px; color:var(--muted); font-size:13px; }
.empty-state { max-width:640px; margin:30px auto; padding:clamp(28px,5vw,48px); text-align:center; background:#fff; border:1px solid var(--line); border-radius:18px; }
.empty-state h2 { margin:8px 0; }
.empty-state p { margin:0 0 20px; color:var(--muted); }
.empty-icon { font-size:36px; }
.cart-page,.checkout-page { padding-top:32px; }
.cart-layout { display:grid; grid-template-columns:minmax(0,1fr) 340px; align-items:start; gap:28px; }
.cart-items { margin:0; padding:0; background:#fff; border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.cart-item { display:grid; grid-template-columns:92px minmax(0,1fr) 110px 110px; align-items:center; gap:16px; padding:18px; border-bottom:1px solid #f0ece6; }
.cart-item:last-of-type { border-bottom:0; }
.cart-thumb { display:grid; place-items:center; width:92px; aspect-ratio:1; border-radius:10px; overflow:hidden; background:#f4eee5; }
.cart-thumb img { width:100%; height:100%; object-fit:cover; }
.cart-info h2 { margin:0 0 5px; font-size:16px; }
.cart-info p,.cart-info small { color:var(--muted); font-size:13px; }
.qty-control { margin:0; color:var(--muted); font-size:12px; }
.qty-control input { width:100%; margin-top:5px; }
.cart-subtotal { text-align:right; white-space:nowrap; }
.cart-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:16px 18px; background:#fff; border:1px solid var(--line); border-top:0; border-radius:0 0 16px 16px; }
.help-text { color:var(--muted); font-size:13px; line-height:1.55; }
.order-summary,.checkout-form-card { padding:24px; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 8px 25px rgba(55,40,22,.045); }
.order-summary { position:sticky; top:100px; }
.order-summary h2,.checkout-form-card h2 { margin:0 0 18px; font-size:20px; }
.summary-line,.summary-product { display:flex; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid #f0ece6; font-size:14px; }
.summary-line.total { margin:8px 0 14px; padding:16px 0; border-bottom:0; font-size:16px; }
.summary-line.total strong { color:#986016; font-size:21px; }
.summary-product { align-items:start; font-size:13px; }
.summary-product small { color:var(--muted); }
.order-summary .btn { margin-top:10px; }
.secure-note { margin-top:14px; color:var(--muted); text-align:center; font-size:12px; }
.checkout-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr); gap:26px; align-items:start; }
.checkout-form-card > .help-text { margin:-10px 0 20px; }
.checkout-form { margin:0; }
.checkout-form label { display:block; margin-bottom:16px; color:#514a41; font-size:14px; font-weight:700; }
.checkout-form input:not([type=hidden]),.checkout-form textarea { min-height:48px; padding:12px 14px; border:1px solid #ded8ce; border-radius:9px; background:#fffdf9; }
.checkout-form textarea { min-height:96px; resize:vertical; }
.checkout-form .privacy-consent { display:flex; align-items:flex-start; gap:10px; font-weight:400; line-height:1.5; }
.checkout-form .privacy-consent input { width:18px; min-height:18px; margin:2px 0 0; flex:0 0 auto; }
.checkout-form .privacy-consent a { color:#986016; text-decoration:underline; }
.payment-explainer { margin-top:18px; padding:16px; border-radius:12px; background:#fbf7ef; font-size:13px; }
.payment-explainer ol { margin:10px 0 0 20px; padding:0; color:#5e574e; }
.payment-explainer li { margin:7px 0; padding-left:3px; }
.checkout-summary > .help-text { margin-top:14px; }
.producto { align-items:start; }
.producto .info { padding:10px 0; }
.producto .info h1 { font-size:clamp(26px,3vw,36px); line-height:1.2; }
.producto .galeria { min-width:0; }
.producto .galeria .principal { display:block; margin-bottom:10px; }
.producto .galeria .principal img { width:100%; max-height:620px; object-fit:contain; background:#f2ece2; }
.site-footer { margin-top:24px; }
.foot { padding-top:28px; padding-bottom:28px; text-align:center; line-height:1.8; }
.skip { position:absolute; left:-9999px; top:8px; z-index:2000; padding:10px; background:#fff; }
.skip:focus { left:10px; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }

@media (max-width:1000px) {
 .grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .cart-layout { grid-template-columns:minmax(0,1fr) 300px; gap:18px; }
 .cart-item { grid-template-columns:78px minmax(0,1fr) 90px; }
 .cart-subtotal { grid-column:2 / -1; text-align:left; }
 .checkout-grid { grid-template-columns:minmax(0,1fr) 330px; gap:18px; }
}
@media (max-width:760px) {
 .bar { position:relative; min-height:68px; flex-wrap:wrap; gap:10px; }
 .menu-btn { display:inline-flex; }
 .nav { top:100%; }
 .nav a { min-height:44px; }
 .nav-form { width:100%; }
 .nav-form button.link { width:100%; text-align:left; }
 .grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
 .product-card { padding:9px; }
 .product-card .card-body { padding:10px 3px 3px; }
 .product-card h3 { font-size:14px; }
 .product-card .precio { font-size:17px; }
 .contenedor { width:calc(100% - 30px); padding-top:28px; padding-bottom:38px; }
 .hero { min-height:340px; background-position:center; }
 .section-heading { align-items:flex-start; flex-direction:column; }
 .cart-layout,.checkout-grid { grid-template-columns:1fr; }
 .order-summary { position:static; }
 .checkout-form-card,.order-summary { padding:20px; }
 .cart-item { grid-template-columns:68px minmax(0,1fr) 88px; gap:11px; padding:14px; }
 .cart-thumb { width:68px; }
 .cart-subtotal { grid-column:2 / -1; }
}
@media (max-width:460px) {
 .brand span { font-size:17px; }
 .brand img { width:40px; height:40px; }
 .menu-btn { width:46px; }
 .hero { min-height:310px; padding:38px 18px; }
 .hero h1 { font-size:clamp(30px,9vw,40px); }
 .grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .product-card .card-img { aspect-ratio:4/5; }
 .product-card .btn { min-height:42px; padding:9px 7px; font-size:12px; }
 .product-excerpt { display:none; }
 .search-store { flex-direction:column; }
 .search-store .btn { width:100%; }
 .results-meta { flex-direction:column; gap:3px; }
 .cart-item { grid-template-columns:58px minmax(0,1fr); }
 .cart-thumb { width:58px; }
 .qty-control { grid-column:2; max-width:110px; }
 .cart-subtotal { grid-column:2; }
 .cart-actions { align-items:stretch; flex-direction:column; }
 .cart-actions .btn { width:100%; }
 .checkout-form-card,.order-summary { padding:16px; }
 .summary-line.total strong { font-size:19px; }
}
@media (prefers-reduced-motion:reduce) {
 *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}

.main:has(> .hero),.main:has(> .banner) { width:100%; max-width:none; padding:0; }

@media (max-width:760px) {
 .menu-check { display:block; position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; opacity:0; }
 .menu-check:focus-visible + .menu-btn { outline:3px solid rgba(232,162,58,.55); outline-offset:3px; }
}
