/* ═══════════════════════════════════════════════════════════════
   NANUK · Configurador de model (popup 2D recolorable)
   Estil alineat amb el sistema rl-* / phase-modal. Tipografia heretada
   (TT Firs Neue). Sense em-dashes, sense icones externes.
   ═══════════════════════════════════════════════════════════════ */

.nanuk-cfg {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(1100px, calc(100vw - 40px));
  max-width: min(1100px, calc(100vw - 40px));
  max-height: 92vh;
  border-radius: 24px;
  overflow: visible;
  color: var(--text, #002819);
}
.nanuk-cfg::backdrop {
  background: rgba(0,40,25,0.55);
  backdrop-filter: blur(4px);
}
.nanuk-cfg[open] { animation: nanukCfgIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes nanukCfgIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.nanuk-cfg__inner {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  max-height: 92vh;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 40, 25, 0.28);
}

.nanuk-cfg__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 40, 25, 0.16);
  color: var(--green, #002819);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}
.nanuk-cfg__close:hover { background: #fff; transform: rotate(90deg); }

/* ─── Escenari (preview SVG + controls) ─── */
.nanuk-cfg__stage {
  background: radial-gradient(120% 120% at 50% 8%, #ffffff 0%, #d9e4e0 100%);
  padding: 34px 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.nanuk-cfg__viewer {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 40, 25, 0.04);
}
.nanuk-cfg__img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}
/* Placeholder mentre no existeixin les 16 imatges del model */
.nanuk-cfg__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  background: repeating-linear-gradient(45deg, rgba(0,40,25,0.035) 0 14px, rgba(0,40,25,0.06) 14px 28px);
  color: var(--muted, rgba(0,40,25,0.66));
}
.nanuk-cfg__placeholder[hidden] { display: none; }
.nanuk-cfg__placeholder-tag {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--green, #002819);
  letter-spacing: 0.01em;
}
.nanuk-cfg__placeholder-note {
  text-transform: uppercase;
  opacity: 0.7;
}

/* ─── Tira de miniatures (galeria del model) ─── */
.nanuk-cfg__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.nanuk-cfg__thumbs::-webkit-scrollbar { height: 6px; }
.nanuk-cfg__thumbs::-webkit-scrollbar-thumb { background: rgba(0, 40, 25, 0.18); border-radius: 6px; }
.nanuk-cfg__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 52px;
  border: 0;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.nanuk-cfg__thumb:hover { opacity: 1; }
.nanuk-cfg__thumb[aria-pressed="true"] {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--green, #002819);
}
.nanuk-cfg__thumb:focus-visible { box-shadow: 0 0 0 2px var(--green, #002819); }

.nanuk-cfg__controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nanuk-cfg__group { display: flex; flex-direction: column; gap: 9px; }
.nanuk-cfg__group-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.nanuk-cfg__group-label {
  text-transform: uppercase;
  color: var(--text, #002819);
}
.nanuk-cfg__group-value {
  font-size: 13px;
  color: var(--green, #002819);
  font-weight: 500;
}
.nanuk-cfg__swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.nanuk-cfg__swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease;
}
.nanuk-cfg__swatch:focus-visible { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.14), 0 0 0 2px #fff, 0 0 0 4px var(--green, #002819); }
.nanuk-cfg__swatch:hover { transform: scale(1.09); }
.nanuk-cfg__swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--green, #002819);
}

/* ─── Panell de detall ─── */
.nanuk-cfg__panel {
  padding: 38px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.nanuk-cfg__eyebrow {
  text-transform: uppercase;
  color: var(--text, #002819);
}
.nanuk-cfg__title {
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text, #002819);
}
.nanuk-cfg__title strong { font-weight: 500; }
.nanuk-cfg__tagline {
  font-size: 15px;
  font-weight: 300;
  color: var(--muted, rgba(0,40,25,0.66));
  margin: 0 0 4px;
  line-height: 1.5;
}
.nanuk-cfg__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 10px;
  padding: 18px 0;
  border-top: 1px solid rgba(0, 40, 25, 0.08);
  border-bottom: 1px solid rgba(0, 40, 25, 0.08);
  margin: 4px 0;
}
.nanuk-cfg__spec { display: flex; flex-direction: column; gap: 2px; }
.nanuk-cfg__spec-num {
  font-size: 22px;
  font-weight: 300;
  color: var(--text, #002819);
  line-height: 1;
}
.nanuk-cfg__spec-unit { font-size: 13px; margin-left: 1px; }
.nanuk-cfg__spec-label {
  text-transform: uppercase;
  color: var(--text, #002819);
}
.nanuk-cfg__features {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nanuk-cfg__features li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted, rgba(0,40,25,0.66));
  font-weight: 300;
  padding-left: 16px;
  position: relative;
}
.nanuk-cfg__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green, #002819);
}
.nanuk-cfg__features li strong { color: var(--text, #002819); font-weight: 500; }
.nanuk-cfg__request {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 22px;
  background: var(--green, #002819);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease;
}
.nanuk-cfg__request:hover { background: #000000; }

/* ─── Trigger card · cursor i feedback ─── */
#models .model-card { cursor: pointer; }
#models .model-card__cta { border: 0; font: inherit; width: 100%; cursor: pointer; }

@media (max-width: 820px) {
  .nanuk-cfg__inner {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }
  .nanuk-cfg__stage { padding: 26px 22px 22px; }
  .nanuk-cfg__panel { padding: 26px 22px 30px; }
}
