.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: 24px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1500; padding: 10px 14px; background: var(--blue); color: var(--white); border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 10px; }
.eyebrow { font: 700 12px/1.4 var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--blue); }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,43,99,.06); }
.site-header-row { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.logo-plate { display: flex; align-items: center; flex: none; text-decoration: none; color: var(--blue); font-weight: 800; }
.logo-plate img { height: 48px; width: auto; }
.search { position: relative; flex: 1; max-width: 560px; margin-inline: auto; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--steel); pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border-radius: 999px; background: var(--soft); border: 1px solid var(--steel); font-size: 16px; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.search input::placeholder { color: var(--steel); opacity: .85; }
.search input:focus { outline: none; background: var(--white); border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint-strong); }
.cart-button { position: relative; display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 16px; flex: none; border-radius: 999px; border: 0; background: var(--blue); color: var(--white); font-weight: 600; transition: background-color .2s, box-shadow .2s; }
.cart-button:hover { background: var(--blue-deep); box-shadow: var(--shadow); }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--white); color: var(--blue); font: 700 12px/1 var(--mono); }
.cart-count.bump { animation: bump .3s ease-out; }
@keyframes bump { 40% { transform: scale(1.3); } }

/* Portada en azul profundo */
.hero { position: relative; overflow: hidden; background: radial-gradient(circle at 18% 10%, var(--blue), transparent 58%), var(--blue-deep); color: var(--white); }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-size: 50px 50px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding-block: 48px; }
.hero .eyebrow { color: var(--silver); }
.hero h1 { margin-top: 14px; color: var(--white); font-size: clamp(30px, 4.1vw, 50px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.hero-sub { margin-top: 16px; max-width: 54ch; color: var(--soft); font-size: 17px; }
.steps { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--white); font-size: 14px; font-weight: 500; }
.steps li { display: flex; align-items: center; gap: 9px; }
.steps span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--white); color: var(--blue); font: 700 12px/1 var(--mono); }
.hero-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mosaic-tile { display: block; overflow: hidden; border-radius: var(--radius); background: var(--white); color: var(--blue-deep); text-decoration: none; transition: box-shadow .25s, transform .25s; }
.mosaic-tile:hover { box-shadow: 0 14px 30px rgba(0,0,0,.35); transform: translateY(-2px); }
.mosaic-tile:focus-visible { outline-color: var(--white); }
.mosaic-media { position: relative; display: block; height: 124px; background: var(--soft); }
.mosaic-media img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
.mosaic-name { display: block; padding: 10px 13px; font-weight: 600; font-size: 13.5px; }

/* Catálogo */
.catalog { padding-block: 28px 64px; scroll-margin-top: 84px; }
.catalog-bar { position: relative; display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--silver); background: var(--white); color: var(--blue-deep); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.chip small { color: var(--steel); font: 500 11.5px/1 var(--mono); }
.chip:hover { border-color: var(--blue); background: var(--soft); }
.chip[aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: var(--white); font-weight: 600; }
.chip[aria-pressed=true] small { color: var(--white); }
.subchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.chip-sm { min-height: 36px; padding: 4px 12px; font-size: 13.5px; }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalog-count { color: var(--steel); font: 500 12.5px/1.4 var(--mono); }
.sort select { height: 38px; padding: 0 10px; border-radius: 10px; background: var(--white); border: 1px solid var(--steel); font-size: 14px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); transition: border-color .25s, box-shadow .25s, transform .25s; }
.card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-3px); }
.card-media { position: relative; display: block; aspect-ratio: 1 / .86; overflow: hidden; background: var(--soft); }
.card-media img { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); object-fit: contain; transition: transform .35s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 14px; }
.card-category { color: var(--steel); font: 500 10.5px/1.4 var(--mono); letter-spacing: .5px; text-transform: uppercase; }
.card-title { color: var(--blue-deep); font-size: 14.5px; line-height: 1.35; font-weight: 600; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--blue); text-decoration: underline; }
.price { margin-top: auto; padding-top: 6px; color: var(--blue); font: 700 16px/1.3 var(--mono); }
.price-ask { color: var(--steel); font: 500 13px/1.4 'Inter', sans-serif; padding-top: 8px; }
.price-lg { margin-top: 16px; font-size: 28px; }
.price-lg.price-ask { font-size: 17px; }
.buy { margin-top: 10px; }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--blue); background: var(--white); overflow: hidden; }
.stepper button { display: grid; place-items: center; height: 44px; border: 0; background: var(--blue-tint); color: var(--blue); transition: background-color .15s, color .15s; }
.stepper button:hover { background: var(--blue); color: var(--white); }
.stepper output { text-align: center; color: var(--blue-deep); font: 700 15px/1 var(--mono); }

.empty { padding: 56px 20px; text-align: center; background: var(--soft); border: 1px dashed var(--silver); border-radius: var(--radius); }
.empty h1, .empty h2 { font-size: 21px; }
.empty p { margin-top: 8px; color: var(--steel); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.empty-page { margin-block: 56px; }

/* Producto */
.product-page { padding-block: 22px 64px; }
.breadcrumb { display: flex; gap: 8px; margin-bottom: 16px; color: var(--steel); font-size: 13.5px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); text-decoration: underline; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.gallery-main { position: relative; aspect-ratio: 1 / .88; border-radius: var(--radius); background: var(--soft); }
.gallery-main img { position: absolute; inset: 32px; width: calc(100% - 64px); height: calc(100% - 64px); object-fit: contain; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.gallery-thumb { position: relative; width: 72px; height: 72px; padding: 0; border-radius: 10px; border: 2px solid transparent; background: var(--soft); }
.gallery-thumb img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }
.gallery-thumb[aria-pressed=true] { border-color: var(--blue); }
.product-info { padding: 26px; overflow: hidden; }
.product-info::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--blue); }
.product-info .eyebrow { color: var(--steel); }
.product-info h1 { margin-top: 10px; font-size: clamp(23px, 2.7vw, 32px); line-height: 1.18; font-weight: 800; letter-spacing: -.01em; }
.sku { margin-top: 8px; color: var(--steel); font: 500 12.5px/1.4 var(--mono); }
.description { margin-top: 16px; color: var(--steel); }
.product-info .buy { margin-top: 22px; margin-bottom: 10px; }
.related { margin-top: 44px; }
.related h2 { margin-bottom: 16px; font-size: 20px; }

/* Pie */
.site-footer { background: var(--blue-deep); color: var(--white); padding-block: 26px; }
.site-footer p { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--silver); font-size: 13.5px; }
.site-footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.site-footer-links a { color: var(--silver); text-decoration: none; font-size: 14px; }
.site-footer-links a:hover { color: var(--white); text-decoration: underline; }
.site-footer-links .footer-whatsapp { display: inline-flex; align-items: center; gap: 7px; color: var(--white); font: 700 14px/1 var(--mono); }
.site-footer :focus-visible { outline-color: var(--white); }

/* Carrito */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--white); color: var(--blue-deep); box-shadow: -14px 0 40px rgba(0,43,99,.25); }
.drawer[open] { animation: drawer-in .26s cubic-bezier(.2,.8,.2,1); }
.drawer::backdrop { background: rgba(0,43,99,.55); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { flex: 1; font-size: 18px; font-weight: 700; }
.drawer-step { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--soft); display: flex; flex-direction: column; gap: 10px; }
.drawer-lead { color: var(--steel); font-size: 14px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.total-row span { color: var(--steel); }
.total-row strong { color: var(--blue); font: 700 19px/1.2 var(--mono); text-align: right; }
.total-note { color: var(--steel); font-size: 13px; }
.cart-line { display: grid; grid-template-columns: 68px 1fr auto; gap: 12px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line-media { position: relative; display: block; width: 68px; height: 68px; border-radius: 10px; background: var(--soft); }
.cart-line-media img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.cart-line-name { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.cart-line-name:hover { color: var(--blue); text-decoration: underline; }
.cart-line-price { margin-top: 3px; color: var(--steel); font-size: 13px; }
.cart-line-warn { margin-top: 3px; color: var(--error); font-size: 13px; font-weight: 600; }
.cart-line .stepper { width: 124px; grid-template-columns: 38px 1fr 38px; min-height: 38px; margin-top: 8px; }
.cart-line .stepper button { height: 38px; }
.cart-line-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; }
.cart-line-total { font: 700 13.5px/1.4 var(--mono); }
.line-remove { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--steel); }
.line-remove:hover { background: var(--error-tint); color: var(--error); }
.cart-empty { margin: auto; padding: 24px; text-align: center; color: var(--steel); }
.cart-empty .i { width: 42px; height: 42px; margin: 0 auto 14px; color: var(--silver); }
.cart-empty strong { display: block; margin-bottom: 4px; color: var(--blue); font-size: 16px; }
.choice-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.choice { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--steel); font-size: 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
.choice input { accent-color: var(--blue); width: 17px; height: 17px; margin: 0; }
.done { text-align: center; align-items: center; justify-content: center; }
.done-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--ok-tint); color: var(--ok); }
.done-icon .i { width: 30px; height: 30px; }
.done h3 { font-size: 20px; }
.done p { color: var(--steel); }
.done p strong { color: var(--blue-deep); }

.mobile-cart-bar { display: none; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-block: 28px; }
  .hero-mosaic { display: none; }
  .hero-sub { font-size: 15.5px; }
  .product-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .site-header-row { flex-wrap: wrap; gap: 10px; padding-block: 10px; min-height: 0; }
  .logo-plate img { height: 40px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .cart-button { margin-left: auto; }
  .steps { gap: 8px 14px; font-size: 13px; }
  .catalog { padding-top: 18px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; padding-bottom: 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .subchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .subchips::-webkit-scrollbar { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-media img { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .card-body { padding: 11px; }
  .card-title { font-size: 13.5px; }
  .card:hover { transform: none; }
  .gallery-main img { inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); }
  .product-info { padding: 20px; }
  .site-footer { padding-bottom: 84px; }
  .mobile-cart-bar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90;
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    min-height: 52px; padding: 8px 16px; border: 0; border-radius: 14px;
    background: var(--blue); color: var(--white); font-weight: 600; font-size: 14px;
    box-shadow: 0 10px 26px rgba(0,43,99,.4);
  }
  .mobile-cart-bar > span { display: inline-flex; align-items: center; gap: 8px; }
  .mobile-cart-bar[hidden] { display: none; }
  .drawer { width: 100vw; }
}
