/* Estructura de las páginas: cabecera, secciones, pie, acceso, cuenta y panel. */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 680px; }
.wrap.mid { max-width: 1160px; }

/* Franja legal superior */
.topbar { background: var(--ink); color: var(--on-dark); font-size: 12.5px; letter-spacing: 0.005em; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 20px; min-height: 30px; padding-block: 4px; }
.topbar a { color: #fff; text-decoration: none; transition: color 0.2s; }
.topbar a:hover { color: var(--yellow); }
.topbar-links { display: flex; flex-wrap: wrap; gap: 2px 20px; }
@media (max-width: 1080px) { .topbar .hide-s { display: none; } }

/* Cabecera. El desenfoque va en una capa aparte para que el menú del celular cubra toda la pantalla. */
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); transition: border-color 0.3s; }
.site-header::before { content: ""; position: absolute; z-index: -1; inset: 0; background: rgba(250, 248, 243, 0.84); -webkit-backdrop-filter: saturate(170%) blur(16px); backdrop-filter: saturate(170%) blur(16px); transition: opacity 0.3s; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--head); padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.1; text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand:hover { color: var(--ink); }
.main-nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.main-nav a:not(.btn) { position: relative; padding-block: 4px; color: var(--ink-soft); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.main-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-out); }
.main-nav a:not(.btn):hover, .main-nav a[aria-current="page"]:not(.btn) { color: var(--ink); }
.main-nav a:not(.btn):hover::after, .main-nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); }
.main-nav .row { gap: 16px; }
/* En el inicio flota sobre el muro y toma cuerpo al bajar. */
.home .site-header { margin-bottom: calc(var(--head) * -1 - 1px); border-bottom-color: transparent; }
.home .site-header::before { opacity: 0; }
.home .site-header.scrolled { border-bottom-color: var(--line); }
.home .site-header.scrolled::before { opacity: 1; }
/* Menú del celular */
.nav-toggle { position: relative; z-index: 2; display: none; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(22, 23, 26, 0.24); border-radius: var(--r); background: transparent; color: var(--ink); cursor: pointer; }
.nav-toggle i { display: block; width: 18px; height: 1.5px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; transition: transform 0.3s var(--ease-out), box-shadow 0.3s; }
.nav-toggle[aria-expanded="true"] i { transform: rotate(45deg); box-shadow: none; }
.nav-toggle[aria-expanded="true"] i::after { content: ""; display: block; height: 1.5px; background: currentColor; transform: rotate(90deg); }
.mobile-menu { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; min-height: 100dvh; padding: 92px var(--gutter) 28px; overflow-y: auto; background: var(--cream); animation: rise 0.35s var(--ease-out) both; }
.mobile-menu a { padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--serif); font-size: 23px; letter-spacing: -0.015em; line-height: 1.2; text-decoration: none; }
@media (max-width: 1160px) { .main-nav .hide-s { display: none; } .main-nav { gap: 10px; } .nav-toggle { display: grid; } }
@media (min-width: 1161px) { .mobile-menu { display: none; } }
@media (max-width: 520px) { .site-header .brand span { display: none; } }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* Secciones */
section.block { position: relative; padding-block: clamp(64px, 8vw, 120px); }
section.block.wash { background: var(--wash); }
.sec-head { max-width: 720px; margin-bottom: clamp(28px, 3.6vw, 52px); }
.sec-head h2 { margin-top: 12px; font-size: var(--h2); }
.sec-head > p:not(.eyebrow) { max-width: 58ch; margin-top: 14px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* Videos */
.clip { position: relative; margin: 0; }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink); }
.clip-toggle { position: absolute; z-index: 3; padding: 6px 13px; border: 1px solid rgba(255, 255, 255, 0.34); border-radius: 999px; background: rgba(22, 23, 26, 0.46); color: #fff; font-size: 12.5px; font-weight: 500; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; transition: background 0.2s; }
.clip-toggle:hover { background: rgba(22, 23, 26, 0.8); }

/* Lista con marca */
.check-list { list-style: none; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 28px; font-size: 15.5px; line-height: 1.4; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.500 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Pie de página */
.site-footer { background: var(--ink); color: var(--on-dark); font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr)); gap: 36px; padding-block: clamp(52px, 6vw, 84px) clamp(36px, 4vw, 56px); }
.site-footer .brand { color: #fff; }
.foot-line { margin-top: 20px; color: #fff; font-family: var(--serif); font-size: clamp(25px, 2.3vw, 34px); letter-spacing: -0.018em; line-height: 1.14; }
.foot-brand p:not(.foot-line) { max-width: 36ch; margin-top: 12px; }
.site-footer nav { display: grid; gap: 9px; align-content: start; }
.site-footer h3 { margin-bottom: 6px; color: #fff; font-size: 13.5px; font-weight: 600; letter-spacing: 0; }
.site-footer nav a { width: fit-content; color: var(--on-dark); text-decoration: none; transition: color 0.2s; }
.site-footer nav a:hover { color: #fff; }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-block: 18px 22px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini-footer { padding: 18px 76px; background: var(--cream); border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; text-align: center; }
@media (max-width: 600px) { .mini-footer { padding: 16px 76px 16px 20px; text-align: left; } }

/* Páginas de acceso (ingresar, crear cuenta y recuperar) */
.auth-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100svh - var(--head) - 1px); padding: 12px; gap: 12px; background: var(--cream); }
.auth-side { position: relative; display: flex; flex-direction: column; gap: 14px; overflow: hidden; padding: clamp(28px, 3.6vw, 56px); border-radius: var(--r-xl); background: radial-gradient(ellipse 80% 80% at 74% 0%, rgba(255, 255, 255, 0.5), transparent 74%), radial-gradient(ellipse 80% 60% at 0% 100%, rgba(214, 140, 0, 0.24), transparent 70%), var(--yellow); color: var(--ink); isolation: isolate; }
.auth-side .eyebrow { position: relative; z-index: 1; color: var(--ink); }
.auth-side h2 { position: relative; z-index: 1; max-width: 13em; font-size: clamp(34px, 3.4vw, 52px); }
.auth-points { position: relative; z-index: 1; list-style: none; display: grid; gap: 7px; max-width: 300px; margin-top: 8px; font-size: 15px; font-weight: 500; line-height: 1.3; }
.auth-points li { display: flex; align-items: center; gap: 9px; }
.auth-points svg { flex: none; width: 18px; height: 18px; }
.auth-points circle { fill: var(--ink); }
.auth-garment { position: absolute; z-index: -1; right: 3%; bottom: -5%; width: auto; height: min(62%, 600px); max-width: 74%; object-fit: contain; filter: drop-shadow(18px 26px 24px rgba(110, 76, 0, 0.36)); transform: rotate(-3deg); animation: garment-in 1s var(--ease-out) both; }
@keyframes garment-in { from { opacity: 0; transform: translateY(26px) rotate(-1deg); } to { opacity: 1; transform: rotate(-3deg); } }
.auth-main { display: grid; place-items: center; padding: clamp(24px, 4vw, 56px) var(--gutter); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: clamp(34px, 3.2vw, 46px); }
.auth-card .sub { margin-top: 8px; margin-bottom: 26px; color: var(--muted); }
.auth-card .switch { margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.auth-card .switch a { font-weight: 600; }
@media (max-width: 920px) {
  .auth-page { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 8px; gap: 0; }
  .auth-side { min-height: 170px; padding: 20px; border-radius: var(--r-lg); }
  .auth-side h2 { max-width: 64%; font-size: clamp(25px, 7vw, 40px); }
  .auth-side .auth-points { display: none; }
  .auth-garment { right: -3%; bottom: -26%; height: 132%; max-width: 42%; }
  .auth-main { padding: 26px 12px 40px; place-items: start center; }
}

/* Cuenta del cliente */
.app-page { min-height: calc(100svh - var(--head)); padding-bottom: 72px; background: var(--cream); }
.app-hero { margin-bottom: 22px; }
.app-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; padding-block: clamp(26px, 3.4vw, 44px) clamp(12px, 1.6vw, 20px); }
.app-title h1 { margin-top: 8px; font-size: clamp(32px, 3.4vw, 46px); }
.tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin-bottom: 24px; padding: 4px; overflow-x: auto; border-radius: 999px; background: var(--wash); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 8px 17px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 14.5px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background 0.2s, color 0.2s; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs [aria-current="true"], .tabs [aria-current="true"]:hover { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.pay-layout, .order-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 20px; align-items: start; }
.order-layout .sticky { position: sticky; top: 88px; }
.pay-layout > aside { position: sticky; top: 88px; }
@media (max-width: 880px) {
  .pay-layout, .order-layout { grid-template-columns: minmax(0, 1fr); }
  .order-layout .sticky, .pay-layout > aside { position: static; }
}

/* Panel del negocio: barra lateral y área de trabajo */
.panel-body { background: var(--cream); }
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100svh; }
.panel-side { position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; gap: 22px; height: 100svh; padding: 18px 14px 14px; overflow-y: auto; background: var(--ink); color: #fff; }
.panel-side .brand { padding: 2px 8px; color: #fff; }
.panel-side .brand img { width: 38px; height: 38px; }
.side-nav { display: grid; gap: 2px; }
.side-label { margin: 0 0 6px; padding-inline: 12px; color: #84827a; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm); color: #c7c5bd; font-size: 14.5px; font-weight: 500; text-decoration: none; transition: background 0.18s, color 0.18s; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side-nav a[aria-current="true"] { background: #fff; color: var(--ink); font-weight: 600; }
.side-nav svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { min-width: 21px; margin-left: auto; padding: 1px 6px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 700; text-align: center; }
.side-foot { display: grid; gap: 2px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.side-foot #nav-account { display: grid; gap: 2px; }
.side-foot a, .side-foot button { display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: none; color: #c7c5bd; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: background 0.18s, color 0.18s; }
.side-foot a:hover, .side-foot button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side-foot .btn, .side-foot .btn:hover { min-height: 0; border: 0; justify-content: flex-start; box-shadow: none; transform: none; }
.side-foot .btn.ghost { background: none; color: #c7c5bd; }
.side-foot .btn.ghost:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.work-area { min-width: 0; padding: clamp(20px, 2.8vw, 40px) clamp(18px, 3vw, 48px) 64px; }
.work-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.work-head h1 { margin-top: 6px; font-size: clamp(30px, 3vw, 40px); }
.work-date { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .panel-side { position: sticky; top: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; height: auto; padding: 10px 14px; overflow: visible; }
  .panel-side .brand span { display: none; }
  .side-label { display: none; }
  .side-nav { order: 3; display: flex; flex: 1 0 100%; gap: 4px; margin-inline: -14px; padding-inline: 14px; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { flex: none; padding: 7px 12px; font-size: 14px; }
  .side-foot { flex: 1; margin: 0; padding: 0; border: 0; }
  .side-foot #nav-account { display: flex; justify-content: flex-end; gap: 2px; }
  .side-foot a, .side-foot button { width: auto; padding: 6px 10px; font-size: 13.5px; }
  .side-foot > a { display: none; }
}

/* Página de error */
.error-page { position: relative; display: grid; place-items: center; min-height: calc(100svh - var(--head) - 1px); overflow: hidden; padding: 40px var(--gutter); background: var(--cream); text-align: center; }
.error-box { position: relative; display: grid; justify-items: center; max-width: 560px; }
.error-code { color: var(--red-dark); font-size: 13px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; }
.error-box h1 { margin-top: 12px; font-size: clamp(38px, 4.6vw, 60px); }
.error-box > p:not(.error-code) { margin-top: 12px; color: var(--muted); font-size: 17px; }
.error-box .cta-row { justify-content: center; }
.side-foot a[href="/admin"] { display: none; }
