/* IMAC · Catálogo "Comprar aire acondicionado". Usa los tokens y componentes de /styles.css */

/* ---------- Portada ---------- */
.shop-hero {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px 20px; align-items: center;
  padding: calc(76px + 9svh) var(--m) 50px;
}
.shop-hero-copy { grid-column: 1 / 7; }
.shop-hero-photo { grid-column: 8 / 13; margin: 0; padding-inline: clamp(20px, 2.4vw, 40px); }
.shop-hero-photo .frame { height: min(64svh, 600px); }
.crumbs { font-size: 15px; color: var(--acero); margin-bottom: 24px; }
.crumbs a { color: var(--tinta); }
.shop-hero h1 { font-size: var(--s-display); margin-bottom: 24px; }
/* Ventajas con la barra del logotipo como viñeta */
.perks { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 14px 36px; }
.perks li { position: relative; padding-left: 28px; font-weight: 600; }
.perks li::before {
  content: ""; position: absolute; left: 2px; top: 3px; width: 10px; height: 20px;
  background: var(--rojo); transform: skewX(var(--slant));
}

/* ---------- Encabezado y filtros ---------- */
.shop { padding: 28px var(--m) 0; }
.shop-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 20px; align-items: end; margin-bottom: 36px; }
.shop-head h2 { grid-column: 1 / 7; font-size: var(--s-h2); }
.shop-head p { grid-column: 7 / 13; font-size: 17px; }
.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 18px 0; margin-bottom: 40px;
  position: sticky; top: 76px; z-index: 20; background: var(--papel);
}
.filters-label { font-weight: 600; margin-right: 6px; }
.chip {
  min-height: 44px; padding: 0 18px; border: 0; cursor: pointer;
  background: var(--blanco); color: var(--tinta); font: 500 15px/1 var(--f-texto);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background-color .2s, color .2s;
}
.chip:hover { background: var(--niebla); }
.chip.is-on { background: var(--tinta); color: var(--blanco); }
.only { display: inline-flex; align-items: center; gap: 8px; margin-left: 14px; font-size: 15px; cursor: pointer; }
.only input { width: 18px; height: 18px; accent-color: var(--rojo); }

/* ---------- Modelo: dibujo del equipo y tabla de precios, en zigzag ---------- */
.model {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 20px; align-items: center;
  padding: 39px 0; background: var(--papel);
}
.model + .model { margin-top: 24px; }
.model-art { grid-column: 1 / 6; position: relative; aspect-ratio: 1400 / 939; overflow: hidden; background: var(--papel); }
/* Foto del equipo (ya trae la barra inclinada de IMAC detrás; su fondo es el mismo papel de la página) */
.model-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.model-info { grid-column: 7 / 13; }
.model--alt .model-art { grid-column: 8 / 13; grid-row: 1; }
.model--alt .model-info { grid-column: 1 / 7; grid-row: 1; }

.model-info h2 { font-size: var(--s-h2); margin-bottom: 12px; }
.model-lema { font-size: 19px; margin-bottom: 18px; }
.model-feats { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.model-feats li { position: relative; padding-left: 20px; font-size: 15px; color: var(--tinta-2); }
.model-feats li::before {
  content: ""; position: absolute; left: 2px; top: 4px; width: 7px; height: 14px;
  background: var(--acero); transform: skewX(var(--slant));
}

/* Tabla de precios (las tablas reales sí llevan líneas) */
.prices { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prices thead th { font-size: 13px; font-weight: 600; color: var(--acero); text-align: left; padding: 0 0 10px; }
.prices tbody tr { border-top: 1px solid var(--linea, #DCDCD8); }
.prices tbody th, .prices td { padding: 12px 8px 12px 0; text-align: left; font-weight: 500; }
.prices tbody th small { display: block; font-size: 13px; font-weight: 400; color: var(--acero); }
.prices .price { font-family: var(--f-titulo); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.prices td:last-child { text-align: right; padding-right: 0; }
.soldout { font: 600 15px/1 var(--f-texto); color: var(--rojo-hondo); }
.row-cta {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 20px;
  background: var(--rojo); color: var(--blanco); text-decoration: none; font-weight: 600; font-size: 15px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background-color .2s, transform .2s var(--ease);
}
.row-cta:hover { background: var(--rojo-hondo); transform: translateX(3px); }
.row-cta--ghost { background: var(--papel-2); color: var(--tinta); }
.row-cta--ghost:hover { background: var(--niebla); }
tr.is-hidden { display: none; }
.model.is-hidden { display: none; }
.empty { padding: 48px 0; font-size: 19px; }

/* Entre la tabla del último modelo y esta sección: la mitad del espacio normal entre secciones (−30% y otro −30%) */
.install { padding: calc(var(--gap-section) * .49 - 20px) var(--m) 0; }
.install-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 20px; align-items: end; margin-bottom: 40px; }
.install-head h2 { grid-column: 1 / 13; font-size: var(--s-h2); }   /* en un solo renglón */
/* Texto debajo de las fotos, alineado con la orilla de la primera */
.install-note { max-width: 1040px; margin: 32px 0 0; padding-inline: clamp(24px, 2.7vw, 43px); font-size: 17px; }
.install-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-inline: clamp(24px, 2.7vw, 43px); }
.install-grid figure { margin: 0; }
.install-grid .frame { height: clamp(260px, 26vw, 420px); }
.order-alt { text-align: center; margin-top: 28px; }
.order-alt a { font-weight: 600; }

/* ---------- Tableta ---------- */
@media (max-width: 1000px) {
  .shop-hero-copy, .shop-hero-photo { grid-column: 1 / 13; }
  .shop-hero-photo .frame { height: 52vw; }
  .install-head h2 { grid-column: 1 / 13; }
  .install-grid { grid-template-columns: 1fr 1fr; }
  .install-grid figure:last-child { grid-column: 1 / -1; }
  .shop-head h2, .shop-head p { grid-column: 1 / 13; }
  .shop-head h2 { margin-bottom: 14px; }
  .model, .model--alt { grid-template-columns: 1fr; gap: 28px; }
  .model-art, .model-info, .model--alt .model-art, .model--alt .model-info { grid-column: 1; grid-row: auto; }
  .model-art { aspect-ratio: 16 / 9; }   /* a lo ancho: se recorta fondo de los lados, el equipo queda al centro */
}

/* ---------- Celular ---------- */
@media (max-width: 700px) {
  .shop-hero { padding-top: calc(64px + 6svh); }
  .perks { grid-template-columns: 1fr; }
  .install-grid { grid-template-columns: 1fr; }
  .install-grid .frame { height: 64vw; }
  /* En celular los filtros no se quedan fijos: ocupan dos renglones y taparían los modelos */
  .filters { position: static; padding: 0; margin-bottom: 24px; }
  .chip { min-height: 40px; padding: 0 14px; }
  .only { margin-left: 0; width: 100%; }
  .model-art { aspect-ratio: 1400 / 939; }
  .prices thead { display: none; }
  .prices tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; }
  .prices tbody th { grid-column: 1; padding: 0; }
  .prices td { padding: 0; }
  .prices td:nth-of-type(1) { grid-column: 1; grid-row: 2; color: var(--acero); font-size: 15px; }
  .prices td.price { grid-column: 2; grid-row: 1; text-align: right; }
  .prices td:last-child { grid-column: 2; grid-row: 2; }
}
