/* ==========================================================================
   NESSA ATELIER · ficha de producto
   ========================================================================== */

@font-face { font-family: "Mrs Saint Delafield"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/mrs-saint-delafield-latin-400-normal.woff2") format("woff2"); }

.single-product div.product { display: block; }
.pp-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 90px); align-items: start; }
.pp-top > .woocommerce-product-gallery, .pp-top > .summary { width: auto !important; float: none !important; margin: 0 !important; }

/* --------------------------------------------------------------------------
   Galería editorial
   -------------------------------------------------------------------------- */
.ng { position: relative; opacity: 1 !important; transition: opacity .22s var(--ease); }
.ng.is-swapping { opacity: .15 !important; }
.ng-track { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 18px); }
.ng-item { position: relative; margin: 0; overflow: hidden; background: var(--lino); aspect-ratio: 4 / 5; }
.ng-item--hero { grid-column: 1 / -1; aspect-ratio: 5 / 6; border-radius: 50% 50% 0 0 / 34% 34% 0 0; }
/* Ritmo editorial: cada cuarta foto a todo ancho */
.ng-item:nth-child(4n+4):not(:last-child) { grid-column: 1 / -1; aspect-ratio: 16 / 11; }
/* Foto suelta al final: a todo ancho */
.ng-item:not(.ng-item--hero):last-child:nth-child(even) { grid-column: 1 / -1; aspect-ratio: 16 / 11; }
.ng-link { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.ng-item img, .woocommerce div.product div.images.ng .ng-item img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.ng-item--hero::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(247, 243, 238, .7); border-radius: inherit; pointer-events: none; z-index: 2; }
.ng-count { display: none; }
.ng .texture-lens { z-index: 4; }
.ng .texture-hint { z-index: 3; }

@media (max-width: 900px) {
	.pp-top { grid-template-columns: 1fr; }
	.ng { margin-inline: calc(var(--gutter) * -1); }
	.ng-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; scrollbar-width: none; padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); }
	.ng-track::-webkit-scrollbar { display: none; }
	.ng-item, .ng-item--hero, .ng-item:nth-child(4n+4):not(:last-child), .ng-item:not(.ng-item--hero):last-child:nth-child(even) { flex: 0 0 86%; aspect-ratio: 4 / 5; scroll-snap-align: start; }
	.ng-item--hero { border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
	.ng-count { display: block; position: absolute; right: calc(var(--gutter) + 12px); bottom: 12px; margin: 0; padding: 4px 12px; background: rgba(247, 243, 238, .92); border-radius: 20px; font-size: 12px; font-weight: 600; letter-spacing: .1em; z-index: 3; }
	.ng-count[hidden] { display: none; }
	.ng .texture-hint { display: none; }
}

/* Visor a pantalla completa */
.ng-box { position: fixed; inset: 0; z-index: 900; display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; background: rgba(40, 26, 20, .94); opacity: 0; transition: opacity .3s var(--ease); }
.ng-box.is-open { opacity: 1; }
.ng-box[hidden] { display: none; }
.ng-box-stage { margin: 0; height: 100vh; display: grid; place-items: center; padding: 40px 0; }
.ng-box-stage img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
.ng-box-nav, .ng-box-close { width: 50px; height: 50px; border: 1px solid rgba(232, 217, 200, .4); border-radius: 50%; background: none; color: var(--marfil); cursor: pointer; display: grid; place-items: center; justify-self: center; transition: background .3s; }
.ng-box-nav:hover, .ng-box-close:hover { background: rgba(247, 243, 238, .12); }
.ng-box-nav[hidden] { visibility: hidden; }
.ng-box-close { position: absolute; top: 18px; right: 18px; }
.ng-box-count { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; color: var(--lino); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 700px) { .ng-box { grid-template-columns: 0 1fr 0; } .ng-box-nav { display: none; } }

/* --------------------------------------------------------------------------
   Resumen: enlace de encargo
   -------------------------------------------------------------------------- */
.pp-custom { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px; border: 1px solid var(--line); text-decoration: none; transition: border-color .3s, background .3s; }
.pp-custom > svg:first-child { color: var(--champan); flex: none; }
.pp-custom span { flex: 1; display: grid; font-size: 14px; line-height: 1.4; }
.pp-custom strong { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.pp-custom:hover { border-color: var(--chocolate); background: #fffdfa; }
.pp-custom:hover > svg:last-child { transform: translateX(4px); }
.pp-custom > svg:last-child { transition: transform .4s var(--ease-out); }

/* --------------------------------------------------------------------------
   Secciones bajo la ficha
   -------------------------------------------------------------------------- */
.pp { grid-column: 1 / -1; padding-block: clamp(56px, 7vw, 110px); }
.pp-head { margin-bottom: clamp(26px, 3.5vw, 46px); }
.pp-head .section-title { margin: 0; }

/* Cartela + nota */
.pp-cartela { margin-top: clamp(40px, 6vw, 90px); margin-inline: calc(50% - 50vw); padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2)); background: var(--lino); }
.pp-cartela-inner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.pp-cartela--solo .pp-cartela-inner { grid-template-columns: minmax(0, 720px); justify-content: center; }
.cartela { background: #fffdfa; padding: clamp(26px, 3.5vw, 48px); border: 1px solid rgba(199, 168, 122, .55); box-shadow: 0 30px 60px -45px rgba(90, 59, 46, .6); position: relative; }
.cartela::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(199, 168, 122, .35); pointer-events: none; }
.cartela-top { display: flex; justify-content: space-between; margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .24em; }
.cartela-title { font-size: clamp(34px, 3.4vw, 52px); margin: 0 0 6px; }
.cartela-line { font-family: var(--accent); font-style: italic; font-size: 18px; margin: 0 0 22px; }
.cartela-rows { margin: 0; }
.cartela-rows > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 10px 0; border-top: 1px dotted var(--champan); font-size: 15px; }
.cartela-rows dt { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding-top: 3px; }
.cartela-rows dd { margin: 0; }
.cartela-foot { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.cartela-leaf { width: 16px; color: var(--champan); }
.note { position: relative; margin: 0; padding: clamp(28px, 3.5vw, 46px) clamp(26px, 3vw, 42px) 34px; background: var(--marfil); transform: rotate(-1.4deg); box-shadow: 0 24px 50px -30px rgba(90, 59, 46, .6); background-image: repeating-linear-gradient(transparent 0 33px, rgba(199, 168, 122, .3) 33px 34px); background-position: 0 22px; }
.note blockquote { margin: 0; font-family: var(--accent); font-style: italic; font-size: clamp(19px, 1.6vw, 23px); line-height: 34px; }
.note blockquote p { margin: 0 0 34px; }
.note blockquote p:last-child { margin: 0; }
.note figcaption { margin-top: 10px; text-align: right; }
.note-sign { font-family: "Mrs Saint Delafield", var(--accent); font-size: clamp(40px, 4vw, 56px); line-height: 1; color: var(--chocolate); }
.note-stamp { position: absolute; left: -22px; bottom: -22px; width: 74px; height: 74px; padding: 8px; border-radius: 50%; background: var(--marfil); box-shadow: 0 0 0 1px var(--line); transform: rotate(-8deg); }

/* ¿Cómo queda en tu casa? */
.pp-scale-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px 40px; margin-bottom: 30px; }
.pp-scale-head .section-title { margin: 0 0 8px; }
.pp-scale-size { margin: 0; font-family: var(--accent); font-style: italic; font-size: 20px; }
.pp-scale-refs { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-scale-ref { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer; font-size: 14px; transition: .3s; }
.pp-scale-ref:hover { border-color: var(--chocolate); }
.pp-scale-ref.is-active { background: var(--chocolate); color: var(--marfil); border-color: var(--chocolate); }
.pp-scene { position: relative; width: 100%; margin: 0 auto; background: linear-gradient(var(--lino), #efe3d4); border-radius: 4px; overflow: hidden; }
.pp-scene > * { position: absolute; }
.sc-floor { left: 0; right: 0; bottom: 0; height: 1px; background: var(--champan); }
.sc-ref svg { width: 100%; height: 100%; display: block; fill: rgba(90, 59, 46, .22); }
.sc-ref-label { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); font-size: 11px; font-weight: 600; letter-spacing: .1em; white-space: nowrap; opacity: .7; }
.sc-piece { box-shadow: 0 14px 26px -12px rgba(40, 26, 20, .55); background: var(--champan); }
.sc-piece-img { position: absolute; inset: 0; background-size: cover; background-position: center; border-radius: inherit; }
.sc-piece--round { border-radius: 50%; }
.sc-piece--arch { border-radius: 50% 50% 0 0 / 40% 40% 0 0; }
.sc-dim { position: absolute; font-size: 12px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; color: var(--chocolate); }
.sc-dim--w { left: 0; right: 0; top: -26px; text-align: center; border-bottom: 1px solid var(--chocolate); padding-bottom: 2px; }
.sc-dim--h { top: 0; bottom: 0; right: -14px; transform: translateX(100%); display: flex; align-items: center; padding-left: 8px; border-left: 1px solid var(--chocolate); }
.pp-scene .sc-piece, .pp-scene .sc-ref { transition: left .6s var(--ease-out), bottom .6s var(--ease-out), width .6s var(--ease-out), height .6s var(--ease-out), opacity .5s; opacity: 0; }
.pp-scene.is-in .sc-piece, .pp-scene.is-in .sc-ref { opacity: 1; }
.pp-scale-note { margin: 14px 0 0; font-size: 13px; opacity: .8; }

/* Proceso */
.pp-process-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 36px); }
.pp-process-list li:nth-child(even) { margin-top: clamp(24px, 4vw, 60px); }
.pp-process-list figure { margin: 0; }
.pp-process-list img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.pp-process-list figcaption { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; font-family: var(--serif); font-size: 22px; }
.pp-process-list figcaption span { font-size: 15px; color: var(--champan); font-family: var(--sans); font-weight: 700; letter-spacing: .1em; }

/* Reborn */
.pp-reborn { margin-inline: calc(50% - 50vw); padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2)); background: var(--chocolate); color: var(--marfil); }
.pp-reborn .eyebrow { color: var(--marfil); }
.pp-reborn-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; max-width: 980px; }
.pp-reborn .reborn-seal { width: 170px; height: 170px; margin: 0; }
.pp-reborn .reborn-ring text { fill: var(--lino); }
.pp-reborn-title { font-size: clamp(32px, 3.4vw, 50px); margin: 0 0 14px; color: var(--marfil); }
.pp-reborn-text { font-size: 18px; max-width: 56ch; }

/* Ambiente */
.pp-room-stage { position: relative; line-height: 0; }
.pp-room-stage > img { width: 100%; max-height: 72vh; object-fit: cover; }
.pp-room-me { position: absolute; z-index: 2; width: 0; height: 0; }
.pp-room-me::before { content: ""; position: absolute; width: 40px; height: 40px; left: -20px; top: -20px; border-radius: 50%; background: var(--champan); box-shadow: 0 0 0 6px rgba(247, 243, 238, .7); }
.pp-room-me::after { content: ""; position: absolute; width: 40px; height: 40px; left: -20px; top: -20px; border-radius: 50%; border: 1px solid var(--marfil); animation: pulse 2.4s var(--ease) infinite; }
.pp-room-me span { position: absolute; left: 30px; top: -15px; white-space: nowrap; padding: 6px 12px; background: var(--chocolate); color: var(--marfil); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.4; }
.pp-room-dot { position: absolute; z-index: 2; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(247, 243, 238, .9); box-shadow: 0 4px 12px rgba(40, 26, 20, .35); transition: transform .3s; }
.pp-room-dot:hover { transform: scale(1.25); }
.pp-room-also { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 0; }
.pp-room-also > span { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.pp-room-also .link-arrow { margin-left: auto; }

/* Combina con: tarjetas de producto normales */
.pp-pairs ul.products { margin: 0; }

@media (max-width: 900px) {
	.pp-cartela-inner { grid-template-columns: 1fr; }
	.note { transform: none; }
	.pp-process-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.pp-process-list li { scroll-snap-align: start; margin-top: 0 !important; }
	.pp-reborn-inner { grid-template-columns: 1fr; }
	.pp-reborn .reborn-seal { width: 120px; height: 120px; }
	.cartela-rows > div { grid-template-columns: 100px 1fr; }
	.pp-room-also .link-arrow { margin-left: 0; }
	.sc-dim--h { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pp-room-me::after { animation: none; } }
