/* ═══════════════════════════════════════════════════════════
   «TODAS LAS COLECCIONES» — Parquet de madera
   Mismo componente que Suelos vinílicos SPC y WPC
   (cantovi-gt-flooring/assets/css/suelos-spc-wpc.css, bloque
   «Todas las colecciones» + botones y muestrario). Valores copiados
   tal cual: si cambia allí, cambiar aquí.
   Los tokens viven en .cv-collections (en GT están en .spc-page).
   ═══════════════════════════════════════════════════════════ */
.cv-collections {
  --spc-dark: #1b2124;
  --spc-light: #f7f8f8;
  --spc-beige: #f3f0ea;
  --spc-tile: #ececec;
  --spc-text: #333d48;
  --spc-muted: #666d76;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--spc-dark);
}
.cv-collections *, .cv-collections *::before, .cv-collections *::after { box-sizing: border-box; }
.cv-collections h2, .cv-collections h3, .cv-collections p, .cv-collections ul, .cv-collections dl, .cv-collections dd, .cv-collections figure { margin: 0; padding: 0; }
.cv-collections img { display: block; width: 100%; height: 100%; object-fit: cover; max-width: 100%; }
.cv-collections figure { overflow: hidden; }
.cv-collections button { cursor: pointer; border: none; background: none; font: inherit; }
.cv-collections a { text-decoration: none; }

.cv-collections .spc-container { width: 100%; max-width: 1128px; margin: 0 auto; padding: 0 24px; }

/* Botón (spc-btn / spc-btn--outline) */
.cv-collections .spc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 16px; font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: .01em; border: 1.5px solid transparent; transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out); }
.cv-collections .spc-btn--outline { align-self: flex-start; background: transparent; color: var(--spc-dark); border-color: var(--spc-dark); font-size: 14px; min-height: 40px; padding: 8px 14px; }
.cv-collections .spc-btn--outline:hover { background: var(--spc-dark); color: #fff; }
.cv-collections .spc-btn:focus-visible { outline: 2px solid var(--spc-dark); outline-offset: 2px; }

/* Muestrario (spc-swatches) */
.cv-collections .spc-swatches { display: flex; flex-wrap: wrap; gap: 16px 12px; list-style: none; margin: 0; padding: 0; }
.cv-collections .spc-swatch { display: flex; flex-direction: column; gap: 6px; width: 80px; }
.cv-collections .spc-swatch img { width: 80px; height: 80px; }
.cv-collections .spc-swatch strong { font-size: 12px; line-height: 16px; font-weight: 700; }
.cv-collections .spc-swatch span { font-size: 11px; line-height: 12px; font-weight: 300; opacity: .8; }

/* Sección, cabecera y pestañas */
.spc-collections.cv-collections { background: var(--spc-beige); padding: 96px 0; scroll-margin-top: 72px; }
.cv-collections .spc-container { display: flex; flex-direction: column; gap: 32px; }
.cv-collections .spc-collections__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.cv-collections .spc-collections__title { max-width: 520px; font-size: 56px; line-height: 64px; font-weight: 300; letter-spacing: 0; text-transform: uppercase; color: var(--spc-dark); }
.cv-collections .spc-collections__sub { max-width: 296px; font-size: 18px; line-height: 24px; text-align: right; color: var(--spc-text); }
.cv-collections .spc-tabbar { display: flex; align-items: stretch; background: #fff; border-radius: 9999px; overflow: hidden; }
.cv-collections .spc-tabbar__nav { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 48px; padding: 0; border: 0; background: #fff; color: #666d76; cursor: pointer; transition: color .2s var(--ease-out), background .2s var(--ease-out); }
.cv-collections .spc-tabbar__nav[hidden] { display: none; }
.cv-collections .spc-tabbar__nav--prev { border-right: 1px solid rgba(27,33,36,.08); }
.cv-collections .spc-tabbar__nav--next { border-left: 1px solid rgba(27,33,36,.08); }
.cv-collections .spc-tabbar__nav:hover { color: var(--spc-dark); background: rgba(27,33,36,.04); }
.cv-collections .spc-tabbar__nav:focus-visible { outline: 2px solid var(--spc-dark); outline-offset: -4px; }
.cv-collections .spc-tabs { flex: 1 1 auto; min-width: 0; display: flex; gap: 0; padding: 4px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: x proximity; }
.cv-collections .spc-tabs::-webkit-scrollbar { display: none; }
.cv-collections .spc-tab { flex: 1 0 auto; padding: 12px 16px; border-radius: 24px; font-size: 16px; line-height: 24px; letter-spacing: .04em; color: #1a2431; white-space: nowrap; scroll-snap-align: start; transition: background .2s var(--ease-out), color .2s var(--ease-out); }
.cv-collections .spc-tab:hover { background: rgba(27,33,36,.06); }
.cv-collections .spc-tab:focus-visible { outline: 2px solid var(--spc-dark); outline-offset: -2px; }
.cv-collections .spc-tab.is-active { background: var(--spc-dark); color: var(--spc-light); }

/* Panel de cada colección */
.cv-collections .spc-panel { display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 96px; }
.cv-collections .spc-panel[hidden] { display: none; }
.cv-collections .spc-panel__intro { font-size: 16px; line-height: 24px; color: var(--spc-text); }
.cv-collections .spc-panel__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.cv-collections .spc-sub { display: flex; flex-direction: column; gap: 16px; }
.cv-collections .spc-sub__media { aspect-ratio: 524 / 300; background: var(--spc-tile); margin-bottom: 4px; }
.cv-collections .spc-sub__kicker { font-size: 12px; line-height: 12px; font-weight: 300; text-transform: uppercase; color: var(--spc-muted); }
.cv-collections .spc-sub__title { font-size: 24px; line-height: 30px; font-weight: 700; color: var(--spc-dark); }
.cv-collections .spc-sub__spec { font-size: 14px; line-height: 20px; font-weight: 300; color: var(--spc-text); }
.cv-collections .spc-panel__grid--1 .spc-sub__media { aspect-ratio: 1080 / 420; }
.cv-collections .spc-panel__grid--1 { grid-template-columns: minmax(0, 1fr); }

/* ─── Layout 2 columnas (Figma «Section» 1298×940, 23-nov-2026) ───────────
   Escritorio: foto/galería a la izquierda (≈55 %, 594 px en 1080) con tipo y
   nombre debajo; a la derecha resumen técnico, desplegable y muestrario.
   La foto se muestra cerca de su tamaño real (las del catálogo miden 480–800 px):
   antes ocupaba 1080 px y se veía pixelada. */
.cv-collections .spc-panel__intro { font-size: var(--font-size-18, 18px); line-height: 26px; font-weight: 300; }
.cv-collections .cv-sub { display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); grid-template-rows: auto 1fr; grid-template-areas: "media info" "meta info"; column-gap: 32px; row-gap: 20px; align-items: start; }
.cv-collections .cv-sub__media { grid-area: media; min-width: 0; }
.cv-collections .cv-sub__meta { grid-area: meta; display: flex; flex-direction: column; gap: 8px; }
.cv-collections .cv-sub__info { grid-area: info; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cv-collections .cv-sub .spc-sub__media,
.cv-collections .spc-panel__grid--1 .cv-sub .spc-sub__media { aspect-ratio: 594 / 420; margin-bottom: 0; }
.cv-collections .spc-sub__spec { font-size: var(--font-size-18, 18px); line-height: 26px; font-weight: 300; color: var(--spc-text); }
.cv-collections .spc-swatch strong { font-size: var(--font-size-14, 14px); line-height: 18px; }
.cv-collections .spc-swatch span { font-size: var(--font-size-12, 12px); line-height: 16px; }

/* Galería / carrusel: una foto visible; flechas y contador debajo */
.cv-gallery { position: relative; }
.cv-gallery__frame { position: relative; }
.cv-gallery__slide { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.cv-gallery__slide[hidden] { display: none; }
.cv-gallery__controls { position: absolute; right: 12px; bottom: 12px; z-index: 1; display: flex; align-items: center; gap: 0; padding: 2px; border-radius: 9999px; background: #fff; box-shadow: 0 1px 4px rgba(27,33,36,.12); }
.cv-gallery__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9999px; background: #fff; color: #666d76; transition: color .2s var(--ease-out), background .2s var(--ease-out); }
.cv-gallery__btn:hover { color: var(--spc-dark); background: rgba(27,33,36,.06); }
.cv-gallery__btn:focus-visible { outline: 2px solid var(--spc-dark); outline-offset: 2px; }
.cv-gallery__count { min-width: 40px; text-align: center; font-size: var(--font-size-14, 14px); line-height: 20px; color: var(--spc-text); font-variant-numeric: tabular-nums; }

/* «Imagen no disponible» (theme) dentro de la foto principal */
.cv-collections .spc-sub__media .media-unavailable { width: 100%; height: 100%; }

/* Características técnicas completas (las «Especificaciones» de la ficha) */
.cv-specs { border-top: 1px solid rgba(27,33,36,.12); border-bottom: 1px solid rgba(27,33,36,.12); }
.cv-specs__toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 0; font-size: var(--font-size-16, 16px); line-height: 24px; color: var(--spc-dark); cursor: pointer; list-style: none; }
.cv-specs__toggle::-webkit-details-marker { display: none; }
.cv-specs__toggle::after { content: ''; flex: 0 0 auto; width: 8px; height: 8px; margin-right: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease-out); }
.cv-specs[open] > .cv-specs__toggle::after { transform: translateY(2px) rotate(-135deg); }
.cv-specs__toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
.cv-specs__toggle:focus-visible { outline: 2px solid var(--spc-dark); outline-offset: 2px; }
.cv-specs__list { display: grid; grid-template-columns: minmax(0, 1fr); padding: 4px 0 12px; }
.cv-specs__list > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgba(27,33,36,.08); font-size: var(--font-size-16, 16px); line-height: 24px; }
.cv-specs__list dt { font-weight: 300; color: var(--spc-muted); }
.cv-specs__list dd { font-weight: 400; color: var(--spc-dark); text-align: right; }
/* 1.5.0 · Bloques de información (Instalación, Mantenimiento…): se apilan bajo las características */
.cv-specs + .cv-specs { border-top: 0; }
.cv-notes__list { margin: 0; padding: 4px 0 12px; list-style: none; }
.cv-notes__list li { position: relative; padding: 6px 0 6px 18px; font-size: var(--font-size-16, 16px); line-height: 24px; color: var(--spc-dark); }
.cv-notes__list li::before { content: ''; position: absolute; left: 2px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--spc-muted); }

@media (prefers-reduced-motion: reduce) {
  .cv-collections *, .cv-collections *::before, .cv-collections *::after { transition: none !important; }
}

@media (max-width: 1024px) {
  .cv-collections .cv-sub { column-gap: 24px; }
}
/* Tablet: dos columnas iguales (la foto no pasa de ~350 px, cerca de su tamaño real) */
@media (max-width: 900px) {
  .cv-collections .cv-sub { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .cv-collections .spc-container { padding: 0 20px; }
  .spc-collections.cv-collections { padding: 56px 0; }
  .cv-collections .spc-collections__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cv-collections .spc-collections__title { font-size: 32px; line-height: 36px; }
  .cv-collections .spc-collections__sub { text-align: left; max-width: none; font-size: 16px; }
  .cv-collections .spc-tab { flex: 0 0 auto; }
  .cv-collections .spc-tabbar { margin-right: -20px; border-radius: 9999px 0 0 9999px; }
  .cv-collections .spc-tabbar__nav--next { padding-right: 8px; width: 56px; }
  /* Móvil: descripción, nombre, foto/galería, características, muestrario */
  .cv-collections .cv-sub { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "meta" "media" "info"; row-gap: 16px; }
  .cv-collections .cv-sub .spc-sub__media,
  .cv-collections .spc-panel__grid--1 .cv-sub .spc-sub__media { aspect-ratio: 335 / 237; }
  .cv-collections .spc-sub .spc-swatches { margin-bottom: 8px; }
  .cv-collections .spc-panel__grid { grid-template-columns: minmax(0, 1fr); }
  .cv-collections .spc-swatch { width: 64px; }
  .cv-collections .spc-swatch img { width: 64px; height: 64px; }
  .cv-collections .spc-btn--outline { align-self: stretch; min-height: 48px; padding: 12px 16px; background: #e6e7e8; font-size: 16px; }
  .cv-specs__list > div { flex-direction: column; gap: 2px; }
  .cv-specs__list dd { text-align: left; }
}
