/* =========================================================
   Kimün Aukantün · Tienda
   Fotografía protagonista, mucho aire, texto breve.
   Reutiliza tokens y componentes de estilos.css.
   ========================================================= */

:root {
  --fondo-foto: #f3f1ee;          /* fondo neutro de fotografía de producto */
  --radio-foto: 22px;
  --suave: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Portada de la tienda ---------- */
.t-portada { text-align: center; padding-block: clamp(64px, 10vw, 132px) clamp(40px, 6vw, 72px); }
.t-portada h1 { font-size: var(--t-display); }
.t-portada .eyebrow { margin-bottom: 18px; }
.t-portada__lead { font-size: var(--t-lead); color: var(--texto-2); max-width: 34rem; margin: 22px auto 0; line-height: 1.5; }
.t-nota { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: var(--t-sm); color: var(--texto-2); }
.t-nota::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cobre-boton); flex-shrink: 0; }

.t-filtros { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: clamp(32px, 5vw, 56px); }
.t-filtros button {
  border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: inherit; font-size: .9375rem; color: var(--texto-2); cursor: pointer;
  transition: color .3s var(--suave), background-color .3s var(--suave);
}
.t-filtros button:hover { color: var(--texto); }
.t-filtros button[aria-pressed="true"] { background: var(--negro); color: var(--blanco); }

/* ---------- Cuadrícula ---------- */
.t-grilla { display: grid; gap: clamp(40px, 5vw, 64px) clamp(16px, 2.4vw, 28px); grid-template-columns: 1fr; padding-bottom: var(--seccion); }
@media (min-width: 620px) { .t-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .t-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.t-card { display: grid; gap: 18px; align-content: start; text-decoration: none; color: inherit; min-width: 0; }
.t-card__foto { border-radius: var(--radio-foto); overflow: hidden; background: var(--fondo-foto); aspect-ratio: 4 / 5; position: relative; }
.t-card__foto img { width: 100%; height: 100%; object-fit: contain; transition: transform .8s var(--suave); }
.t-card:hover .t-card__foto img { transform: scale(1.035); }
.t-card__txt { display: grid; gap: 6px; padding-inline: 4px; }
.t-card__n { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.t-card__d { color: var(--texto-2); font-size: .9875rem; }
.t-card__mas { font-size: var(--t-sm); font-weight: 600; color: var(--cobre); margin-top: 4px; display: inline-flex; gap: 6px; }
.t-card__mas::after { content: "→"; transition: transform .3s var(--suave); }
.t-card:hover .t-card__mas::after { transform: translateX(4px); }
.t-card:focus-visible { outline: none; }
.t-card:focus-visible .t-card__foto { outline: 3px solid var(--cobre-claro); outline-offset: 3px; }

/* Estado de disponibilidad */
.t-estado { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); }
.t-estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.t-estado--abiertos { color: #2f7a43; }
.t-estado--proximamente { color: var(--cobre); }
.t-estado--encargo { color: var(--texto); }
.t-estado--cerrados { color: var(--texto-2); }
.t-estado--historico { color: #8a6d3b; }
.t-estado--pendiente { color: var(--texto-2); }
.t-estado--pendiente::before { background: none; border: 1.5px dashed currentColor; width: 6px; height: 6px; }

/* Foto pendiente (clara, sin presentarse como real) */
.t-ph { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center; padding: 24px; color: var(--texto-2); }
div.t-ph > img { width: min(30%, 120px); height: auto; opacity: .09; filter: invert(1); transform: none; }
.t-ph .pend__tag { margin: 0; }
.t-ph small { font-size: var(--t-sm); max-width: 18rem; line-height: 1.4; }

/* Aparición suave al hacer scroll */
.aparece { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--suave), transform .9s var(--suave); }
.aparece.visible { opacity: 1; transform: none; }

/* ---------- Ficha de producto ---------- */
.p-barra {
  position: sticky; z-index: 40; top: calc(var(--alto-cabecera) + env(safe-area-inset-top, 0px));
  background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--linea);
}
.p-barra__in { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.p-barra__n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.p-barra__volver { font-size: var(--t-sm); color: var(--texto-2); text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.p-barra__volver:hover { color: var(--texto); }
.p-barra .subnav__lista { margin-left: auto; }
@media (max-width: 720px) { .p-barra__n { display: none; } .p-barra .subnav__lista { margin-left: 0; } }

.p-hero { text-align: center; padding-top: clamp(48px, 8vw, 104px); }
.p-hero .t-estado { margin-bottom: 18px; }
.p-hero h1 { font-size: var(--t-display); max-width: 16ch; margin-inline: auto; }
.p-hero__frase { font-size: var(--t-lead); color: var(--texto-2); max-width: 32rem; margin: 18px auto 0; line-height: 1.45; }
.p-hero__foto { margin-top: clamp(36px, 6vw, 64px); border-radius: var(--radio-foto); overflow: hidden; background: var(--fondo-foto); aspect-ratio: 16 / 10; position: relative; }
.p-hero__foto img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 620px) { .p-hero__foto { aspect-ratio: 4 / 5; } }

.p-sec { padding-block: clamp(72px, 10vw, 128px) 0; scroll-margin-top: calc(var(--alto-cabecera) + 64px); }
.p-sec__t { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: clamp(24px, 4vw, 40px); }
.p-sec .eyebrow { margin-bottom: 12px; }
.p-historia { display: grid; gap: 18px; max-width: 42rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.65; }
.p-historia p:first-child { font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.45; color: var(--texto); }

/* Galería */
.p-galeria { display: grid; gap: clamp(10px, 1.6vw, 18px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .p-galeria { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.p-galeria__item {
  position: relative; border: 0; padding: 0; margin: 0; border-radius: calc(var(--radio-foto) - 6px); overflow: hidden; background: var(--fondo-foto);
  aspect-ratio: 1 / 1; cursor: zoom-in; display: block; width: 100%;
}
.p-galeria__item img { width: 100%; height: 100%; object-fit: contain; transition: transform .8s var(--suave); } /* sin recortes: se ve el diseño completo */
.p-galeria__item:hover img { transform: scale(1.04); }
.p-galeria__item--ph { cursor: default; }
.p-galeria__item:first-child:nth-last-child(n+3) { grid-column: span 2; aspect-ratio: 2 / 1; }
@media (min-width: 900px) { .p-galeria__item:first-child:nth-last-child(n+3) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; } }

/* Visor de imágenes */
.visor { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: rgba(15,14,13,.96); color: var(--blanco); }
.visor::backdrop { background: rgba(15,14,13,.96); }
.visor[open] { display: grid; grid-template-rows: auto 1fr auto; animation: visor-in .35s var(--suave); }
@keyframes visor-in { from { opacity: 0; } to { opacity: 1; } }
.visor__barra { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter-r) 12px var(--gutter-l); font-size: var(--t-sm); color: var(--texto-inv-2); }
.visor__img { display: grid; place-items: center; min-height: 0; padding: 0 clamp(8px, 4vw, 72px); }
.visor__img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.visor__pie { display: flex; justify-content: center; gap: 12px; padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
.visor button { background: rgba(255,255,255,.1); color: var(--blanco); border: 0; border-radius: 999px; min-width: 44px; height: 44px; padding: 0 16px; font: inherit; font-family: system-ui, sans-serif; cursor: pointer; }
.visor button:hover { background: rgba(255,255,255,.2); }

/* Ficha de características */
.p-ficha { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--linea); margin: 0; }
.p-ficha > div { display: grid; grid-template-columns: 1fr; gap: 6px 32px; padding-block: 20px; border-bottom: 1px solid var(--linea); }
@media (min-width: 720px) { .p-ficha > div { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.p-ficha dt { font-weight: 600; }
.p-ficha dd { margin: 0; color: var(--texto-2); }
.p-ficha dd ul { list-style: none; display: grid; gap: 6px; }

/* Valor y disponibilidad: dos bloques limpios */
.p-dos { display: grid; gap: clamp(48px, 7vw, 96px); grid-template-columns: 1fr; }
@media (min-width: 880px) { .p-dos { grid-template-columns: 1fr 1fr; } }
.p-precio { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.p-precio--pend { font-size: clamp(1.75rem, 4vw, 2.5rem); color: var(--texto-2); font-weight: 500; }
.p-lineas { list-style: none; display: grid; margin-top: 24px; border-top: 1px solid var(--linea); }
.p-lineas li { display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--linea); font-size: .9875rem; }
.p-lineas li span:last-child { color: var(--texto-2); text-align: right; font-variant-numeric: tabular-nums; }
.p-bloque { display: grid; gap: 14px; align-content: start; scroll-margin-top: calc(var(--alto-cabecera) + 72px); }
.p-bloque .apoyo { max-width: 32rem; }
.p-fechas { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 6px; }
.p-fechas div { display: grid; gap: 2px; }
.p-fechas dt { font-size: var(--t-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); }
.p-fechas dd { margin: 0; font-weight: 600; }

/* Fabricante */
.p-contacto { margin-top: clamp(72px, 10vw, 128px); background: var(--negro); color: var(--texto-inv); border-radius: var(--radio-foto); padding: clamp(32px, 6vw, 72px); display: grid; gap: 24px; }
@media (min-width: 880px) { .p-contacto { grid-template-columns: 1fr auto; align-items: end; } }
.p-contacto .eyebrow { color: var(--cobre-claro); }
.p-contacto h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
.p-contacto p { color: var(--texto-inv-2); margin-top: 10px; max-width: 32rem; }
.p-contacto .pend { color: var(--texto-inv-2); }
.p-contacto .pend__tag { color: var(--cobre-claro); }

.p-fin { text-align: center; padding-block: clamp(72px, 10vw, 128px) var(--seccion); }

/* ---------- Administración de la tienda ---------- */
.ta-fila { display: grid; grid-template-columns: auto 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--linea); }
.ta-fila:first-child { border-top: 0; }
.ta-mini { width: 64px; height: 64px; border-radius: 12px; background: var(--fondo-foto); overflow: hidden; display: grid; place-items: center; }
.ta-mini img { width: 100%; height: 100%; object-fit: contain; }
.ta-mini span { font-size: .625rem; color: var(--texto-2); text-align: center; line-height: 1.2; padding: 4px; }
@media (max-width: 640px) { .ta-fila { grid-template-columns: auto 56px 1fr; } .ta-fila .adm-acciones { grid-column: 1 / -1; justify-content: flex-start; } .ta-mini { width: 56px; height: 56px; } }

.ta-editor { display: grid; gap: 40px; }
.ta-grupo { display: grid; gap: 18px; padding-top: 28px; border-top: 1px solid var(--linea); }
.ta-grupo > h2 { font-size: 1.25rem; }
.ta-grupo > p.apoyo { margin-top: -10px; font-size: var(--t-sm); }
.ta-filas { display: grid; gap: 10px; }
.ta-filas__item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 10px; align-items: center; }
.ta-filas__item input { min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--linea); border-radius: var(--radio-sm); font: inherit; width: 100%; background: var(--blanco); }
@media (max-width: 560px) { .ta-filas__item { grid-template-columns: 1fr auto; } .ta-filas__item > :nth-child(2) { grid-column: 1; } .ta-filas__item > :last-child { grid-row: 1 / span 2; grid-column: 2; } }
.ta-fotos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ta-foto { display: grid; gap: 8px; }
.ta-foto__img { aspect-ratio: 1; border-radius: 12px; background: var(--fondo-foto); overflow: hidden; display: grid; place-items: center; }
.ta-foto__img img { width: 100%; height: 100%; object-fit: contain; }
.ta-foto input { min-height: 38px; padding: 6px 10px; border: 1.5px solid var(--linea); border-radius: 8px; font: inherit; font-size: var(--t-sm); width: 100%; }
.ta-foto__acc { display: flex; gap: 6px; }
.ta-principal { display: grid; gap: 14px; grid-template-columns: 160px 1fr; align-items: center; }
@media (max-width: 560px) { .ta-principal { grid-template-columns: 1fr; } }
.ta-pie {
  position: sticky; bottom: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--linea);
}
.ta-pie .mensaje { margin-right: auto; }
