/* ==========================================================================
   DTI Barcelona · Página DTI textil (productos.php)
   Base, botones y cabecera en header.css · Secciones compartidas en componentes.css
   Referencia visual: láminas DTIBCN 02, 03, 08 y 09 (crema, negro y amarillo)
   ========================================================================== */

/* Botones propios de esta página */


/* ==========================================================================
   HERO
   ========================================================================== */
.dhero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); background: radial-gradient(120% 90% at 85% 10%, #FBF6EE 0%, var(--sand) 55%, #EADFCF 100%); }
.dhero::before { content: ""; position: absolute; inset: auto -10% -40% auto; width: 60vw; height: 60vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 194, 0, .22), transparent 70%); pointer-events: none; }
.dhero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.dhero__title { font-size: clamp(54px, 7.4vw, 112px); color: var(--ink); isolation: isolate; }
.dhero__title .line { display: block; overflow: hidden; padding: .12em 0 .04em; margin-top: -.12em; }
.dhero__title .line > span { display: inline-block; }
.dhero__claim { font-size: .5em; line-height: 1.05; }
.dhero__lead { margin: 26px 0 30px; font-size: 18px; max-width: 460px; }
.dhero__features { list-style: none; margin: 0 0 34px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.dhero__features li { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.dhero__features svg { flex: none; width: 42px; height: 42px; padding: 9px; border-radius: 50%; border: 1.5px solid var(--ink); fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: background .3s ease, stroke .3s ease; }
.dhero__features li:hover svg { background: var(--ink); stroke: var(--yellow); }
.dhero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.dhero__media { position: relative; margin: 0; }
.dhero__photo { border-radius: 26px; overflow: hidden; box-shadow: 0 40px 80px rgba(60, 45, 20, .28); background: #E7DCCB; }
.dhero__photo img { display: block; width: 100%; height: auto; }
.dhero__label { position: absolute; left: -24px; bottom: 28px; background: var(--bg); color: var(--cream); padding: 16px 22px; border-radius: 16px; display: grid; gap: 4px; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.dhero__name { font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); }
.dhero__sub { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--yellow); font-weight: 700; }
.dhero__badge { position: absolute; top: -18px; right: 22px; width: 92px; height: 92px; border-radius: 50%; background: var(--yellow); color: var(--bg); display: grid; place-items: center; font-family: var(--display); font-size: 30px; box-shadow: 0 16px 34px rgba(0, 0, 0, .2); }
.dhero__badge::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1.5px dashed rgba(14, 14, 14, .45); }

@media (max-width: 960px) {
  .dhero__grid { grid-template-columns: 1fr; }
  .dhero__media { max-width: 560px; margin-inline: auto; width: 100%; }
  .dhero__label { left: 16px; }
}
@media (max-width: 480px) {
  .dhero__features { grid-template-columns: 1fr; }
  .dhero__badge { width: 72px; height: 72px; font-size: 24px; right: 12px; }
}

/* ==========================================================================
   ATRIBUTOS: IMPRESIÓN DTI TEXTIL
   ========================================================================== */
.attrs { background: var(--bg); padding: clamp(64px, 8vw, 112px) 0; }
.attrs__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.attrs__title { font-size: clamp(42px, 5.4vw, 76px); }
.attrs__intro p { color: var(--muted); max-width: 440px; margin: 0; }
.attrs__intro strong { color: var(--cream); }
.attrs__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.attr { display: grid; justify-items: center; gap: 18px; padding: 28px 12px; text-align: center; border-left: 1px solid var(--line-2); }
.attr:first-child { border-left: 0; }
.attr svg { width: 52px; height: 52px; fill: none; stroke: var(--yellow); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.attr:hover svg { transform: translateY(-6px) scale(1.08); }
.attr .d { font-size: 22px; line-height: 1; }
@media (max-width: 960px) {
  .attrs__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .attrs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attr:nth-child(3) { border-left: 0; }
  .attr:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}

/* ==========================================================================
   MACRO ZOOM INTERACTIVO (lupa en productos.js)
   ========================================================================== */
.dmacro { background: var(--bg); padding: 0 0 clamp(72px, 9vw, 128px); }
.dmacro__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 64px); align-items: center; border-top: 1px solid var(--line-2); padding-top: clamp(64px, 8vw, 104px); }
.dmacro__title { font-size: clamp(44px, 5.4vw, 76px); }
.dmacro__text p { color: var(--muted); margin: 24px 0 0; max-width: 420px; }
.dmacro__hint { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--yellow) !important; }
.dmacro__hint svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.hint-touch { display: none; }
@media (hover: none) { .hint-desk { display: none; } .hint-touch { display: inline; } }

.dmacro__stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.loupe { position: relative; border-radius: 22px; overflow: hidden; cursor: none; touch-action: none; background: #1d1d1d; }
.loupe img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.loupe__lens { position: absolute; left: 0; top: 0; width: 190px; height: 190px; border-radius: 50%; pointer-events: none; border: 3px solid var(--yellow); box-shadow: 0 0 0 6px rgba(14, 14, 14, .35), 0 20px 50px rgba(0, 0, 0, .6); background-repeat: no-repeat; opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .25s ease, transform .25s cubic-bezier(.2, .7, .2, 1); }
.loupe.is-on .loupe__lens { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.dmacro__real .ph { aspect-ratio: 1 / 1.1; border-radius: 22px; }
@media (max-width: 960px) {
  .dmacro__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dmacro__stage { grid-template-columns: 1fr; }
  .loupe__lens { width: 140px; height: 140px; }
}

/* ==========================================================================
   SELECTOR DE PRENDAS
   ========================================================================== */
.showcase { padding: clamp(72px, 9vw, 128px) 0; }
.tabs { position: relative; display: inline-flex; padding: 6px; border-radius: 999px; background: #E7DCCB; }
.tabs__btn { position: relative; z-index: 1; border: 0; background: none; cursor: pointer; padding: 12px 22px; border-radius: 999px; font: 700 14px/1 var(--body); letter-spacing: .03em; color: #4A433A; transition: color .3s ease; }
.tabs__btn[aria-selected="true"] { color: var(--yellow); }
.tabs__ink { position: absolute; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 999px; background: var(--bg); transition: transform .45s cubic-bezier(.2, .7, .2, 1), width .45s cubic-bezier(.2, .7, .2, 1); }

.panel { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 18px; }
.panel[hidden] { display: none; }
.panel__main { grid-row: span 2; }
.panel__main .ph { aspect-ratio: 4 / 4.2; border-radius: 22px; }
.panel__side .ph { aspect-ratio: 16 / 11; }
.panel__info { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 6px; border-top: 1px solid rgba(20, 20, 20, .14); }
.panel__name { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); }
.panel__meta { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #5E5548; }
.panel.is-entering figure { animation: panelIn .7s cubic-bezier(.2, .7, .2, 1) both; }
.panel.is-entering figure:nth-child(2) { animation-delay: .08s; }
.panel.is-entering figure:nth-child(3) { animation-delay: .16s; }
@keyframes panelIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .panel { grid-template-columns: 1fr 1fr; }
  .panel__main { grid-column: 1 / -1; grid-row: auto; }
}

/* ==========================================================================
   CÓMO FUNCIONA: LÍNEA DE TIEMPO
   ========================================================================== */
.dprocess { background: var(--bg); padding: clamp(72px, 9vw, 128px) 0; }
.dprocess__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.dprocess__intro p { color: var(--muted); margin: 0 0 22px; }
.checks.checks--dark { font-size: 15px; }
.checks.checks--dark svg { stroke: var(--yellow); }
.timeline { --fill: 0; position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 2px; border-radius: 2px; }
.timeline::before { background: var(--line-2); }
.timeline::after { background: var(--yellow); transform: scaleX(var(--fill)); transform-origin: left; transition: transform .2s linear; }
.timeline__step { position: relative; z-index: 1; display: grid; gap: 8px; align-content: start; }
.timeline__n { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); border: 2px solid var(--line-2); color: var(--yellow); font-size: 24px; margin-bottom: 10px; transition: background .4s ease, color .4s ease, border-color .4s ease; }
.timeline__step.is-lit .timeline__n { background: var(--yellow); color: var(--bg); border-color: var(--yellow); }
.timeline__step strong { font-size: 16px; }
.timeline__step span:last-child { font-size: 14px; color: var(--muted); }
@media (max-width: 960px) {
  .dprocess__head { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 26px; padding-left: 0; }
  .timeline::before, .timeline::after { left: 29px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform: scaleY(var(--fill)); transform-origin: top; }
  .timeline::before { transform: none; }
  .timeline__step { grid-template-columns: 60px 1fr; column-gap: 18px; }
  .timeline__n { grid-row: span 2; margin: 0; }
  .timeline__step span:last-child { grid-column: 2; }
}

/* ==========================================================================
   DETALLES REALES: MOSAICO
   ========================================================================== */
.details { padding: clamp(72px, 9vw, 128px) 0; }
.details__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.details__a { grid-column: span 7; }
.details__b { grid-column: span 5; }
.details__c { grid-column: span 5; }
.details__d { grid-column: span 7; }
.details__grid .ph { aspect-ratio: 16 / 9; height: 100%; }
@media (max-width: 760px) {
  .details__grid > * { grid-column: 1 / -1; }
}

/* Qué personalizamos: 5 tarjetas en una fila */
.items__grid.items__grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 860px) { .items__grid.items__grid--five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .items__grid.items__grid--five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   ANIMACIONES DE ENTRADA DEL HERO (productos.js añade .is-ready)
   ========================================================================== */
.js .dhero__title .line > span { transform: translateY(105%); transition: transform 1.1s cubic-bezier(.19, 1, .22, 1); }
.js .dhero__title .line:nth-child(2) > span { transition-delay: .1s; }
.js .dhero__title .line:nth-child(3) > span { transition-delay: .2s; }
.js .dhero.is-ready .dhero__title .line > span { transform: none; }
.js .mark::after { transform: scaleX(0); transition: transform .9s cubic-bezier(.2, .7, .2, 1) .75s; }
.js .dhero.is-ready .mark::after { transform: scaleX(1); }
.js .dhero__eyebrow, .js .dhero__lead, .js .dhero__ctas, .js .crumbs { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
.js .dhero.is-ready .crumbs, .js .dhero.is-ready .dhero__eyebrow { opacity: 1; transform: none; }
.js .dhero.is-ready .dhero__lead { opacity: 1; transform: none; transition-delay: .35s; }
.js .dhero.is-ready .dhero__ctas { opacity: 1; transform: none; transition-delay: .5s; }
.js .dhero__media { opacity: 0; transform: translateY(40px) rotate(2deg); transition: opacity 1.1s cubic-bezier(.2, .7, .2, 1) .15s, transform 1.1s cubic-bezier(.2, .7, .2, 1) .15s; }
.js .dhero.is-ready .dhero__media { opacity: 1; transform: none; }
.js .dhero__badge { transform: scale(0) rotate(-90deg); transition: transform .8s cubic-bezier(.34, 1.56, .64, 1) .9s; }
.js .dhero.is-ready .dhero__badge { transform: none; }
.dhero.is-ready .dhero__badge::before { animation: spinSlow 14s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.dhero__photo img { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.dhero__media:hover .dhero__photo img { transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
  .js .dhero__title .line > span, .js .mark::after, .js .dhero__eyebrow, .js .dhero__lead, .js .dhero__ctas, .js .crumbs, .js .dhero__media, .js .dhero__badge { transform: none; opacity: 1; transition: none; }
  .dhero.is-ready .dhero__badge::before { animation: none; }
  .panel.is-entering figure { animation: none; }
  .timeline::after { transform: scaleX(1); }
}
