@charset "UTF-8";
/* Tienda: carrito, ficha de producto (producto.html), botón "+" de las tarjetas y WhatsApp.
   Usa las variables de .catalog-page (catalogo.css): --surface, --hairline, --pill, --red, --ink, --font. */

.has-cart-open{overflow:hidden}

/* Botón del carrito en la cabecera */
.cart-button{position:relative;flex-shrink:0;width:44px;height:44px;border-radius:50%;border:1px solid #e6e8ec;background:linear-gradient(120deg,#fff,var(--surface));color:var(--ink);display:grid;place-items:center;cursor:pointer;transition:border-color .2s,color .2s}
.cart-button:hover{border-color:var(--red);color:var(--red)}
.cart-button svg{width:20px;height:20px}
.cart-count[hidden],.cart-foot[hidden]{display:none}
.cart-count{position:absolute;top:-5px;right:-5px;min-width:21px;height:21px;padding:0 5px;border:2px solid #fff;border-radius:var(--pill);background:var(--red);color:#fff;font-size:11px;font-weight:700;line-height:17px;text-align:center}
.catalog-nav{margin-left:auto;margin-right:auto}
.catalog-header-inner>.cart-button{margin-left:-10px}

/* Tarjetas: toda la tarjeta es clicable (el nombre es un enlace estirado sobre ella)
   y el precio va destacado abajo. */
.product-card{position:relative;cursor:pointer}
.product-card .product-name,.product-card .product-card-body{position:static}
.product-card .product-name::after{content:'';position:absolute;inset:0;z-index:1;border-radius:inherit}
.product-card .product-name:focus-visible{outline:none}
.product-list-reference{display:none}
.product-card:has(.product-name:focus-visible){outline:3px solid #f6b2a8;outline-offset:3px}
.product-card:hover .product-name{color:var(--red)}
.product-card-summary{display:block;color:#5f6570;font-size:.9em;font-weight:400;line-height:1.45}
.product-card-foot{margin-top:auto;padding-top:14px;border-top:1px solid var(--hairline);display:flex;align-items:flex-end;justify-content:space-between;gap:10px}
.product-card-foot .product-price{margin:0;font:700 28px/1 var(--font);letter-spacing:-1px;color:var(--ink)}
.product-card-foot .product-price small{margin-top:6px;font:500 11px var(--font);letter-spacing:0;color:#8a909b}
.product-card-foot .product-availability{margin:0 0 3px;font-size:11px;white-space:nowrap}
.buy-primary.is-added{background:#17191f}

/* Panel lateral del carrito */
.cart-drawer{position:fixed;inset:0 0 0 auto;width:min(440px,100vw);height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#fff;color:var(--ink);box-shadow:-24px 0 60px #17191f2e}
.cart-drawer[open]{animation:cart-in .28s cubic-bezier(.22,.7,.2,1) both}
.cart-drawer::backdrop{background:#111821a8}
body:not(.catalog-page) .cart-drawer {
  --ink:#17191f; --red:#e8462e; --hairline:#eceef1; --surface:#f6f7f9;
  --pill:999px; --font:Inter,Arial,Helvetica,sans-serif;
  font-family:var(--font); line-height:1.45; color-scheme:light;
}
.cart-item.cart-unavailable{grid-template-columns:1fr auto}
.cart-unavailable p{margin:4px 0;color:#5f6570;font-size:13px}
@keyframes cart-in{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}
.cart-panel{display:flex;flex-direction:column;height:100%}
.cart-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid var(--hairline)}
.cart-head h2{margin:0;font-size:22px;font-weight:600;letter-spacing:-.6px}
.cart-head small{display:block;margin-top:2px;font-size:12px;color:#8a909b}
.cart-close{width:40px;height:40px;flex-shrink:0;border:1px solid #e3e5e9;border-radius:50%;background:#fff;color:var(--ink);display:grid;place-items:center;cursor:pointer;transition:border-color .2s,color .2s}
.cart-close:hover{border-color:var(--red);color:var(--red)}
.cart-close svg{width:18px;height:18px}
.cart-body{flex:1;overflow:auto;padding:4px 24px}
.cart-items{list-style:none;margin:0;padding:0}
.cart-item{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:14px;align-items:start;padding:16px 0;border-bottom:1px solid var(--hairline)}
.cart-thumb{display:block;width:72px;height:72px;border-radius:12px;overflow:hidden;background:var(--surface)}
.cart-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.cart-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;font-weight:600;line-height:1.4}
.cart-name:hover{color:var(--red)}
.cart-unit{display:block;margin:4px 0 10px;font-size:12px;color:#8a909b}
.cart-row{display:flex;align-items:center;gap:14px}
/* Papelera: botón redondo pequeño a la derecha de la fila */
.cart-remove{margin-left:auto;width:34px;height:34px;flex-shrink:0;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:#8a909b;cursor:pointer;transition:background .2s,color .2s,transform .2s}
.cart-remove svg{width:17px;height:17px}
.cart-remove:hover{background:#e8462e14;color:var(--red);transform:rotate(-8deg)}
.cart-remove:focus-visible{outline:2px solid #f6b2a8;outline-offset:2px}

/* Miniatura que vuela al carrito (animada desde tienda.js) */
.cart-flyer{position:fixed;z-index:90;pointer-events:none}
.cart-flyer-inner{width:100%;height:100%;border-radius:18px;overflow:hidden;background:var(--red);color:#fff;display:grid;place-items:center;box-shadow:0 18px 40px #17191f47,0 0 0 3px #fff}
.cart-flyer-inner img{display:block;width:100%;height:100%;object-fit:cover}
.cart-flyer-inner>svg{width:45%;height:45%}
.cart-line{font-size:14px;font-weight:600;white-space:nowrap}
.cart-foot{display:flex;flex-direction:column;gap:12px;padding:18px 24px 24px;border-top:1px solid var(--hairline);background:#fff}
.cart-total{display:flex;align-items:baseline;justify-content:space-between}
.cart-total span{font-size:14px;font-weight:600}
.cart-total small{font-size:11px;font-weight:500;color:#8a909b;margin-left:4px}
.cart-total strong{font-size:26px;letter-spacing:-.8px}
.cart-note{margin:0;font-size:12px;line-height:1.6;color:#6a6f78}
.cart-primary{display:flex;align-items:center;justify-content:center;gap:10px;height:52px;padding:0 24px;border-radius:var(--pill);background:var(--red);color:#fff;font-size:14px;font-weight:700;transition:background .2s,transform .2s}
.cart-primary:hover{background:#f25a41;transform:translateY(-1px)}
.cart-primary svg{width:20px;height:20px}
.cart-clear{align-self:center;border:0;background:none;font:500 12px var(--font);color:#8a909b;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.cart-clear:hover{color:var(--red)}
.cart-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:70px 10px;text-align:center;color:#6a6f78;font-size:13px}
.cart-empty>svg{width:46px;height:46px;color:#c3c6cc;margin-bottom:6px}
.cart-empty strong{font-size:17px;color:var(--ink)}
.cart-empty p{margin:0 0 10px;max-width:260px;line-height:1.6}

/* Selector de cantidad (carrito y ficha) */
.qty{display:inline-flex;align-items:center;height:34px;border:1px solid #e3e5e9;border-radius:var(--pill);background:#fff}
.qty button{width:32px;height:100%;border:0;border-radius:var(--pill);background:none;color:#4a4f59;font:500 16px var(--font);cursor:pointer;transition:background .15s,color .15s}
.qty button:hover:not(:disabled){background:#e8462e12;color:var(--red)}
.qty button:disabled{opacity:.35;cursor:default}
.qty>span{min-width:24px;text-align:center;font-size:13px;font-weight:600}
.qty-lg{height:52px}
.qty-lg button{width:44px;font-size:18px}
.qty-lg input{width:40px;border:0;background:transparent;color:var(--ink);text-align:center;font:600 15px var(--font);-moz-appearance:textfield;appearance:textfield}
.qty-lg input::-webkit-outer-spin-button,.qty-lg input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.qty-lg input:focus{outline:none}
.qty-lg:focus-within{border-color:var(--red)}

/* Aviso "Añadido al carrito" */
.cart-toast{position:fixed;left:50%;bottom:24px;z-index:60;display:flex;align-items:center;gap:12px;max-width:min(460px,calc(100vw - 32px));padding:8px 8px 8px 10px;border-radius:var(--pill);background:#17191f;color:#fff;box-shadow:0 18px 40px #17191f40;opacity:0;transform:translate(-50%,16px);pointer-events:none;transition:opacity .25s,transform .25s}
.cart-toast.is-visible{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.cart-toast-icon{width:32px;height:32px;flex-shrink:0;border-radius:50%;background:var(--red);display:grid;place-items:center}
.cart-toast-icon svg{width:16px;height:16px}
.cart-toast-text{display:flex;flex-direction:column;min-width:0}
.cart-toast-text strong{font-size:13px}
.cart-toast-text small{font-size:11px;color:#c3c6cc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cart-toast button{flex-shrink:0;border:0;border-radius:var(--pill);background:#fff;color:var(--ink);font:600 12px var(--font);padding:10px 16px;cursor:pointer}

/* Botón flotante de WhatsApp */
.wa-float{position:fixed;right:24px;bottom:24px;z-index:50;display:flex;align-items:center;height:58px;min-width:58px;padding:0 15px;border-radius:var(--pill);background:#25d366;color:#fff;box-shadow:0 14px 34px #0b8f4a59;transition:transform .2s,box-shadow .2s}
.wa-float svg{width:28px;height:28px;flex-shrink:0}
.wa-label{max-width:0;overflow:hidden;white-space:nowrap;font-size:14px;font-weight:700;transition:max-width .3s,margin .3s}
.wa-float:hover,.wa-float:focus-visible{transform:translateY(-2px);box-shadow:0 18px 40px #0b8f4a73}
.wa-float:hover .wa-label,.wa-float:focus-visible .wa-label{max-width:120px;margin-left:10px}

/* Ficha de producto */
.product-page .catalog-topbar{padding-bottom:4px}
.product-detail{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:32px 48px;align-items:start;padding-top:18px;padding-bottom:64px}
.product-loading{grid-column:1/-1;padding:120px 0;text-align:center;color:#8a909b}
/* The photo spans both rows of the left column, so it stays fixed while the buy box and
   specs scroll by on the right (sticky only works inside its own grid area). */
.product-gallery{grid-column:1;grid-row:1/span 2;position:sticky;top:24px}
.product-photo {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: clamp(12px, 3vw, 32px);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px #17191f14;
}
.product-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-kicker{margin:6px 0 14px;font-size:11px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:var(--red)}
.product-title{max-width:none;margin:0 0 10px;font-size:clamp(30px,3vw,44px);line-height:1.1;letter-spacing:-1.4px;font-weight:600}
.product-ref{margin:0 0 26px;font-size:13px;color:#8a909b}
.product-buy{display:flex;flex-direction:column;gap:14px;padding:24px;border:1px solid var(--hairline);border-radius:20px;background:#fff;box-shadow:0 18px 45px #17191f0a}
.product-page-price{font-size:40px;font-weight:600;letter-spacing:-1.2px;line-height:1}
.product-page-price small{display:block;margin-top:8px;font-size:12px;font-weight:500;letter-spacing:0;color:#8a909b}
.product-buy .product-availability{margin:0}
.product-buy-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.product-warranty{display:flex;align-items:flex-start;gap:7px;margin:0;color:#5f6570;font-size:13px;line-height:1.45}
.product-warranty svg{flex-shrink:0;margin-top:1px}
.buy-primary{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:10px;height:52px;padding:0 24px;border:0;border-radius:var(--pill);background:var(--red);color:#fff;font:700 15px var(--font);white-space:nowrap;cursor:pointer;transition:background .2s,transform .2s}
.buy-primary:hover{background:#f25a41;transform:translateY(-1px)}
.buy-primary svg{width:20px;height:20px}
.buy-secondary{display:inline-flex;align-items:center;justify-content:center;gap:10px;height:50px;border:1px solid #e3e5e9;border-radius:var(--pill);background:#fff;color:var(--ink);font-size:14px;font-weight:600;transition:border-color .2s}
.buy-secondary svg{width:20px;height:20px;color:#25d366}
.buy-secondary:hover{border-color:#25d366}
.product-perks{display:grid;gap:10px;margin:22px 0 0;padding:0;list-style:none;font-size:13px;color:#5f6570}
.product-perks li{display:flex;align-items:center;gap:12px}
.product-perks li::before{content:'';width:8px;height:8px;flex-shrink:0;border-radius:50%;background:var(--red);box-shadow:0 0 0 4px #e8462e1f}
.product-info{grid-column:2;grid-row:1}
.product-specs{grid-column:2;grid-row:2;padding:28px 32px;border:1px solid var(--hairline);border-radius:20px}
.product-specs h2{margin:0 0 14px;font-size:24px;font-weight:500;letter-spacing:-.6px}
.product-specs dl{display:grid;grid-template-columns:1fr;margin:0}
.product-specs dl>div{display:flex;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid var(--hairline);font-size:13px}
.product-specs dt{color:#8a909b}
.product-specs dd{margin:0;font-weight:600;text-align:right;overflow-wrap:anywhere}
.product-demo-note{margin:18px 0 0;font-size:11px;color:#8a909b}
.product-related{padding-bottom:70px}
.product-related .products-heading{margin-bottom:22px}
.related-all{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--red);white-space:nowrap}
.product-missing{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;gap:10px;padding:90px 20px;border:1px solid var(--hairline);border-radius:20px;text-align:center;color:#6a6f78}
.product-missing strong{font-size:20px;color:var(--ink)}
.product-missing .buy-primary{flex:none;margin-top:10px}

@media(min-width:1500px){.product-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:900px){
  .product-detail{grid-template-columns:1fr;gap:20px}
  .product-gallery,.product-info,.product-specs{grid-column:auto;grid-row:auto}
  .product-gallery{position:static}
  .product-photo{height:clamp(155px,28svh,280px);aspect-ratio:auto}
}
@media(max-width:820px){
  .catalog-header-inner>.cart-button{margin-left:auto}
  .catalog-header-inner{gap:12px}
}
@media(max-width:700px){
  .product-card-foot{padding-top:10px;flex-direction:column;align-items:flex-start;gap:6px}
  .product-card-foot .product-price{font-size:22px}
  .cart-head,.cart-foot{padding-left:18px;padding-right:18px}
  .cart-body{padding:4px 18px}
  .cart-item{grid-template-columns:60px minmax(0,1fr);gap:12px}
  .cart-thumb{width:60px;height:60px}
  .cart-line{grid-column:2}
  .cart-toast{bottom:92px}
  .wa-float{right:16px;bottom:16px;height:54px;min-width:54px;padding:0 13px}
  .product-detail{padding-top:10px;padding-bottom:40px}
  .product-photo{border-radius:18px;height:clamp(144px,24svh,215px);padding:10px}
  .product-title{font-size:clamp(23px,6vw,30px);letter-spacing:-.7px;line-height:1.16}
  .product-kicker{margin:0 0 7px;font-size:10px;letter-spacing:1.2px}
  .product-page-price{font-size:34px}
  .product-buy{padding:15px;gap:11px}
  .product-buy-row{gap:8px}
  .product-buy-row .qty-lg{height:46px}
  .product-buy-row .qty-lg button{width:33px}
  .product-buy-row .qty-lg input{width:30px}
  .product-buy-row .buy-primary{height:46px;padding:0 12px;font-size:14px;gap:7px}
  .product-specs{padding:20px}
  .product-related .products-heading{align-items:flex-start;flex-direction:column;gap:10px}
}
@media(prefers-reduced-motion:reduce){.cart-drawer[open]{animation:none}.cart-toast,.wa-float,.wa-label{transition:none}.buy-primary:hover,.cart-primary:hover,.wa-float:hover,.cart-remove:hover{transform:none}}

.product-navigation{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-block:12px 0}
.product-return{min-height:44px;display:inline-flex;align-items:center;gap:9px;color:#383d46;font:600 13px var(--font)}
.product-return:hover{color:var(--red)}
.product-info{min-width:0}
.product-title{overflow-wrap:anywhere}
.product-summary{margin:0 0 13px;font-size:15px;line-height:1.45;color:#515865}
.product-info .product-buy{margin-top:15px}
@media(max-width:700px){
  .product-navigation{padding-block:2px 0}
  .product-navigation .catalog-breadcrumb{display:none}
  .product-info .product-buy{margin-top:11px}
  .product-summary{margin-bottom:10px;font-size:14px}
}
