/* COTA · componente 3 — cocina 3D interactiva. */
.cota-3d {
  --c3-carbon: var(--cota-carbon, #20201E);
  --c3-papel: var(--cota-papel, #EDE9E1);
  --c3-piedra: var(--cota-piedra, #D6D1C5);
  --c3-acento: var(--cota-terracota, #8A4B33);
  background: var(--c3-papel);
  color: var(--c3-carbon);
  font-family: var(--cota-fuente, 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif);
  padding: clamp(3.5rem, 8vw, 7rem) clamp(16px, 4vw, 56px);
}
.cota-3d *, .cota-3d *::before, .cota-3d *::after { box-sizing: border-box; }
.cota-3d__in { max-width: 1120px; margin: 0 auto; }

.cota-3d__cab { margin-bottom: clamp(20px, 3vw, 36px); }
.cota-3d__etq { margin: 0 0 10px; font-size: 12px; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; color: #77736B; }
.cota-3d__titulo { margin: 0; font-weight: 300; line-height: 1.12; letter-spacing: -.01em; font-size: clamp(1.7rem, 4.2vw, 3.1rem); }
.cota-3d__txt { margin: 12px 0 0; max-width: 48ch; font-size: clamp(.9rem, 1.4vw, 1rem); line-height: 1.55; color: #4a4943; }

.cota-3d__controles { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-bottom: 16px; }
.cota-3d__tabs { display: flex; border: 1px solid var(--c3-carbon); }
.cota-3d__tab {
  appearance: none; border: 0; background: transparent; color: var(--c3-carbon); cursor: pointer;
  min-height: 44px; min-width: 76px; padding: 0 18px;
  font: 500 12px/1 var(--cota-fuente, 'Montserrat', system-ui, sans-serif); letter-spacing: .22em; text-transform: uppercase;
  transition: background-color .2s ease, color .2s ease;
}
.cota-3d__tab + .cota-3d__tab { border-left: 1px solid var(--c3-carbon); }
.cota-3d__tab[aria-selected="true"] { background: var(--c3-carbon); color: var(--c3-papel); }
.cota-3d__tab:focus-visible, .cota-3d__muestra:focus-visible { outline: 2px solid var(--c3-acento); outline-offset: 3px; }
@media (hover: hover) { .cota-3d__tab[aria-selected="false"]:hover { background: rgba(32, 32, 30, .07); } }

.cota-3d__acabados { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.cota-3d__acabados[hidden] { display: none; }
.cota-3d__muestras { display: flex; gap: 4px; }
.cota-3d__muestra {
  appearance: none; border: 0; background: transparent; cursor: pointer; padding: 0;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.cota-3d__muestra i {
  display: block; width: 28px; height: 28px; border-radius: 50%;
  background: var(--c); box-shadow: inset 0 0 0 1px rgba(32, 32, 30, .28);
  transition: transform .2s ease;
}
.cota-3d__muestra[aria-checked="true"] { box-shadow: inset 0 0 0 1px var(--c3-carbon); }
.cota-3d__muestra[aria-checked="true"] i { transform: scale(.82); }
.cota-3d__acabado-etq { font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: #77736B; }
.cota-3d__acabado-nombre { color: var(--c3-carbon); }

.cota-3d__escena {
  position: relative; width: 100%; aspect-ratio: 1600 / 1100; overflow: hidden;
  background: var(--c3-papel); box-shadow: 0 0 0 1px rgba(32, 32, 30, .16);
}
.cota-3d__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
.cota-3d__canvas:active { cursor: grabbing; }
.cota-3d__fijo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
.cota-3d.is-fijo .cota-3d__fijo { display: block; }
.cota-3d__cargando {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; color: #77736B; pointer-events: none;
}
.cota-3d.is-cargando .cota-3d__cargando { display: flex; }
.cota-3d__pie { margin: 14px 0 0; font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: #77736B; display: flex; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; }

@media (max-width: 900px) { .cota-3d__escena { aspect-ratio: 4 / 3; } }
@media (max-width: 700px) {
  .cota-3d__tabs { width: 100%; }
  .cota-3d__tab { flex: 1 1 0; min-width: 0; padding: 0 4px; letter-spacing: .16em; }
  .cota-3d__acabado-etq, .cota-3d__pie { letter-spacing: .14em; }
  .cota-3d__muestras { gap: 8px; }
}
