/* ============================================================
   Terreno Digital — estilos compartidos por todas las paginas
   (nav, botones, tipografia base, modales, footer, menu mobile)
   Lo especifico de cada pagina (hero, grillas de contenido, etc.)
   va en el <style> propio de cada archivo .html.
   ============================================================ */

:root {
  --espresso: #1E140E;
  --nogal: #4A2F1F;
  --crema: #F5F0EA;
  --blanco: #FFFFFF;
  --negro: #111111;
  --rosa-polvo: #E9CFC6;
  --salvia: #7F8F72;

  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  --nav-h: 80px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--espresso);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1320px, calc(100% - 96px));
  margin: 0 auto;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= NAV ================= */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 300ms var(--ease), border-color 300ms var(--ease);
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: rgba(245, 240, 234, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(30, 20, 14, 0.08);
}

.site-nav.is-scrolled .nav-link,
.site-nav.is-scrolled .nav-signin,
.site-nav.is-scrolled .brand span {
  color: var(--espresso);
}

.site-nav.is-scrolled .brand-mark {
  filter: none;
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.brand span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--blanco);
  white-space: nowrap;
  transition: color 300ms var(--ease);
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--blanco);
  cursor: pointer;
  padding: 10px 0;
  transition: color 300ms var(--ease), opacity 200ms ease;
}

.nav-link:hover {
  opacity: 0.72;
}

.chevron {
  width: 9px;
  height: 9px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 220ms ease;
}

.nav-item.is-open .chevron {
  transform: rotate(225deg) translateY(1px);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 240px;
  padding: 10px;
  background: var(--blanco);
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.16);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
}

.nav-item.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 11px 14px;
  font-size: 13.5px;
  color: var(--espresso);
  border-radius: 2px;
  transition: background 160ms ease;
}

.nav-dropdown a:hover {
  background: var(--crema);
}

/* ---- "mis pedidos" (dropdown de la cuenta en el nav) ---- */

.nav-orders-dropdown {
  left: auto;
  right: 0;
  transform: translateY(6px);
  width: 320px;
  max-height: 420px;
  overflow-y: auto;
}

.nav-item.is-open .nav-orders-dropdown {
  transform: translateY(0);
}

.nav-orders-title {
  margin: 4px 10px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(30, 20, 14, 0.45);
}

.order-item {
  padding: 12px 10px;
  border-top: 1px solid rgba(30, 20, 14, 0.1);
}

.order-item:first-child {
  border-top: 0;
}

.order-item-names {
  display: block;
  font-size: 13px;
  color: var(--espresso);
  line-height: 1.5;
}

.order-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.order-item-amount {
  font-size: 12.5px;
  color: rgba(30, 20, 14, 0.6);
}

.order-item-status {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(30, 20, 14, 0.5);
}

.order-item-status.paid {
  color: var(--salvia);
}

.order-item-date {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: rgba(30, 20, 14, 0.4);
}

.orders-empty {
  margin: 0;
  padding: 14px 10px;
  font-size: 13px;
  color: rgba(30, 20, 14, 0.5);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 0 0 auto;
}

.nav-signin {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--blanco);
  cursor: pointer;
  transition: color 300ms var(--ease), opacity 200ms ease;
  white-space: nowrap;
}

.nav-signin:hover {
  opacity: 0.72;
}

.nav-account {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-account[hidden],
.nav-right [hidden],
.mobile-nav [hidden] {
  display: none;
}

.nav-account-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--blanco);
  white-space: nowrap;
}

.site-nav.is-scrolled .nav-account-name {
  color: var(--espresso);
}

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.hamburger span {
  width: 22px;
  height: 1.4px;
  background: var(--blanco);
  transition: background 300ms var(--ease), transform 260ms var(--ease), opacity 200ms ease;
}

.site-nav.is-scrolled .hamburger span {
  background: var(--espresso);
}

/* mobile nav panel */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--espresso);
  display: flex;
  flex-direction: column;
  padding: 100px 40px 40px;
  transform: translateY(-100%);
  transition: transform 380ms var(--ease);
}

body.nav-open .mobile-nav {
  transform: translateY(0);
}

.mobile-nav a:not(.btn) {
  font-size: 26px;
  font-weight: 400;
  color: var(--blanco);
  padding: 16px 0;
  border-bottom: 1px solid rgba(245, 240, 234, 0.12);
}

.mobile-nav .btn {
  margin-top: 32px;
  align-self: flex-start;
}

.close-mobile {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  cursor: pointer;
}

.close-mobile span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1.4px;
  background: var(--blanco);
}

.close-mobile span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.close-mobile span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }

/* ================= BUTTONS ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  padding: 18px 36px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blanco);
  color: var(--negro);
}

.btn-primary:hover {
  background: var(--crema);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--espresso);
  color: var(--crema);
}

.btn-dark:hover {
  background: var(--nogal);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--espresso);
  border: 1px solid rgba(30, 20, 14, 0.3);
  gap: 10px;
}

.btn-outline svg {
  width: 16px;
  height: 16px;
}

.btn-outline:hover {
  background: var(--espresso);
  color: var(--crema);
  border-color: var(--espresso);
  transform: translateY(-1px);
}

/* ================= TIPOGRAFIA / SECCIONES GENERICAS ================= */

.eyebrow {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rosa-polvo);
}

.section {
  padding: 130px 0;
}

.section.tight {
  padding: 90px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 64px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nogal);
}

h2 {
  margin: 0;
  max-width: 640px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--espresso);
}

h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.section-copy {
  max-width: 340px;
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(30, 20, 14, 0.62);
}

.section-dark {
  background: var(--espresso);
  color: var(--crema);
}

.section-dark .kicker {
  color: var(--rosa-polvo);
}

.section-dark h2 {
  color: var(--blanco);
}

.section-dark .section-copy {
  color: rgba(245, 240, 234, 0.62);
}

/* ---- pagina interior: encabezado tipo "mini hero" para subpaginas ---- */

.page-header {
  position: relative;
  padding: calc(var(--nav-h) + 90px) 0 70px;
  background: linear-gradient(120deg, #241811 0%, #1E140E 46%, #150D08 100%);
  color: var(--crema);
}

.page-header h1 {
  margin: 10px 0 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--blanco);
}

.page-header h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.page-header-copy {
  margin: 22px 0 0;
  max-width: 560px;
  font-size: 16.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.page-placeholder {
  padding: 32px;
  border: 1px dashed rgba(30, 20, 14, 0.25);
  color: rgba(30, 20, 14, 0.55);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ---- grilla de tarjetas numeradas (servicios, que podemos construir, etc.) ---- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(30, 20, 14, 0.12);
  border-left: 1px solid rgba(30, 20, 14, 0.12);
}

.service-card {
  background: var(--crema);
  padding: 48px 40px;
  border-right: 1px solid rgba(30, 20, 14, 0.12);
  border-bottom: 1px solid rgba(30, 20, 14, 0.12);
  transition: background 260ms ease;
}

.service-card:hover {
  background: var(--blanco);
}

.service-index {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--salvia);
}

.service-card h3 {
  margin: 28px 0 0;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.service-card p {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(30, 20, 14, 0.62);
}

@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}


/* ---- banda de contacto final ---- */

.contact-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 90px 0;
  border-top: 1px solid rgba(30, 20, 14, 0.12);
}

.contact-band h2 {
  max-width: 620px;
  margin: 0;
}

.contact-band-copy {
  margin: 0;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(30, 20, 14, 0.62);
}

.contact-band .btn {
  margin-top: 8px;
}

/* ---- footer ---- */

footer {
  padding: 40px 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 12.5px;
  color: rgba(30, 20, 14, 0.5);
  flex-wrap: wrap;
}

footer .foot-links {
  display: flex;
  gap: 24px;
}

footer .foot-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.foot-signature {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: rgba(30, 20, 14, 0.4);
}

/* ---- scroll reveal ----
   Solo se ocultan si el JS realmente corrio (clase .js en <html>);
   sin JS, el contenido queda visible de entrada en vez de escondido. */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms var(--ease), transform 650ms var(--ease);
}

.stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger.is-visible > *:nth-child(2) { transition-delay: 90ms; }
.stagger.is-visible > *:nth-child(3) { transition-delay: 180ms; }
.stagger.is-visible > *:nth-child(4) { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================= MODALES (login / registro) ================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 12, 8, 0.7);
  backdrop-filter: blur(6px);
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--crema);
  padding: 48px 40px 40px;
  animation: fadeInUp 380ms var(--ease) both;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--espresso);
  cursor: pointer;
}

.modal-card .kicker {
  margin: 0 0 8px;
}

.modal-card h3 {
  margin: 0 0 28px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.01em;
  color: var(--espresso);
}

.modal-card label {
  display: block;
  margin-bottom: 18px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(30, 20, 14, 0.62);
}

.modal-card input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid rgba(30, 20, 14, 0.18);
  background: var(--blanco);
  font-family: inherit;
  font-size: 15px;
  color: var(--espresso);
  transition: border-color 200ms ease;
}

.modal-card input:focus {
  outline: none;
  border-color: var(--nogal);
}

.modal-password-hint {
  margin: -8px 0 18px;
  font-size: 12px;
  color: var(--salvia);
}

.modal-error {
  min-height: 18px;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #B3261E;
}

.modal-error:empty {
  margin: 0 0 0;
  min-height: 0;
}

.modal-submit {
  width: 100%;
  border: 0;
}

.modal-submit[disabled] {
  opacity: 0.6;
  cursor: default;
}

.modal-switch {
  margin: 22px 0 0;
  font-size: 13px;
  text-align: center;
  color: rgba(30, 20, 14, 0.6);
}

.modal-switch a {
  color: var(--nogal);
  text-decoration: underline;
  cursor: pointer;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(30, 20, 14, 0.22);
  border-radius: 0;
  background: var(--blanco);
  color: var(--espresso);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.btn-google:hover {
  border-color: var(--nogal);
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  color: rgba(30, 20, 14, 0.5);
}

.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(30, 20, 14, 0.14);
}

/* ================= PLANES / PRECIOS ================= */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(30, 20, 14, 0.14);
  border-left: 1px solid rgba(30, 20, 14, 0.14);
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-right: 1px solid rgba(30, 20, 14, 0.14);
  border-bottom: 1px solid rgba(30, 20, 14, 0.14);
  background: var(--blanco);
  transition: background 260ms ease;
}

.plan-card:hover,
.plan-card:focus-within {
  background: var(--crema);
}

.plan-card.featured {
  background: var(--espresso);
  color: var(--crema);
}

.plan-card.featured:hover,
.plan-card.featured:focus-within {
  background: var(--nogal);
}

.plan-tag {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 12px;
  color: #B08463;
}

.plan-preview {
  height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0 -4px;
  border-radius: 6px;
  transition: height 450ms ease, opacity 350ms ease, margin 450ms ease;
}

.plan-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.plan-card:hover .plan-preview,
.plan-card:focus-within .plan-preview {
  height: 172px;
  margin-bottom: 24px;
  opacity: 1;
}

.plan-name {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  color: var(--espresso);
}

.featured .plan-name {
  color: var(--blanco);
}

.plan-desc {
  margin: 6px 0 26px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(30, 20, 14, 0.6);
  min-height: 2.6em;
}

.featured .plan-desc {
  color: #B9A999;
}

.plan-price {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.01em;
  color: var(--espresso);
}

.featured .plan-price {
  color: var(--blanco);
}

.plan-nota {
  margin: 4px 0 22px;
  font-size: 12.5px;
  color: rgba(30, 20, 14, 0.55);
}

.featured .plan-nota {
  color: #B9A999;
}

.plan-features {
  margin: 0 0 28px;
  list-style: none;
  flex: 1;
}

.plan-features li {
  padding: 10px 0;
  border-top: 1px solid rgba(30, 20, 14, 0.14);
  font-size: 13.5px;
  line-height: 1.4;
  color: rgba(30, 20, 14, 0.75);
}

.featured .plan-features li {
  border-color: #3A2A20;
  color: rgba(245, 240, 234, 0.82);
}

.plan-cta {
  width: 100%;
  margin-top: auto;
  border: 0;
}

.featured .plan-cta {
  background: var(--crema);
  color: var(--espresso);
}

.featured .plan-cta:hover {
  background: var(--blanco);
}

.plan-cta[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* ---- botón de contacto (elegir WhatsApp o correo) ---- */

.contact-cta {
  position: relative;
  display: inline-flex;
}

.contact-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 232px;
  padding: 8px;
  background: var(--blanco);
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.16);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 20;
}

.contact-cta.is-open .contact-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.contact-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--espresso);
  border-radius: 2px;
  transition: background 160ms ease;
}

.contact-menu a:hover {
  background: var(--crema);
}

.contact-menu svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.55;
}

.plan-card .contact-cta {
  width: 100%;
  margin-top: auto;
}

.plan-card .contact-trigger {
  width: 100%;
  border: 0;
}

.plan-card.featured .contact-trigger {
  background: var(--crema);
  color: var(--espresso);
}

.plan-card.featured .contact-trigger:hover {
  background: var(--blanco);
}

/* .reveal/.stagger animan con transform, lo que crea un nuevo contexto de
   apilamiento por tarjeta/fila — sin esto, el menú de contacto de una fila
   queda atrapado detrás de la fila siguiente. */
.plan-card:has(.contact-cta.is-open) {
  z-index: 5;
}

.plans-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1000px) {
  .plans-grid,
  .plans-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .plans-grid,
  .plans-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .plan-preview {
    height: auto;
    opacity: 1;
    margin-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-preview {
    transition: none;
  }
}

/* ================= CARRITO ================= */

.cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--blanco);
  transition: color 300ms var(--ease), opacity 200ms ease;
}

.cart-toggle:hover {
  opacity: 0.72;
}

.site-nav.is-scrolled .cart-toggle {
  color: var(--espresso);
}

.cart-toggle svg {
  width: 21px;
  height: 21px;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--nogal);
  color: var(--crema);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
}

.cart-count[hidden] {
  display: none;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 210;
  visibility: hidden;
}

.cart-drawer:not(.is-open) {
  pointer-events: none;
}

.cart-drawer.is-open {
  visibility: visible;
}

.cart-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 8, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 320ms var(--ease);
}

.cart-drawer.is-open .cart-drawer-backdrop {
  opacity: 1;
}

.cart-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100%);
  background: var(--crema);
  display: flex;
  flex-direction: column;
  padding: 32px;
  transform: translateX(100%);
  transition: transform 380ms var(--ease);
}

.cart-drawer.is-open .cart-drawer-panel {
  transform: translateX(0);
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex: 0 0 auto;
}

.cart-drawer-head h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--espresso);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
}

.cart-empty {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(30, 20, 14, 0.55);
}

.cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(30, 20, 14, 0.12);
}

.cart-item-name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--espresso);
}

.cart-item-price {
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(30, 20, 14, 0.55);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.cart-item-qty button {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(30, 20, 14, 0.25);
  background: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--espresso);
  transition: border-color 200ms ease;
}

.cart-item-qty button:hover {
  border-color: var(--espresso);
}

.cart-item-qty span {
  min-width: 16px;
  text-align: center;
  font-size: 13.5px;
}

.cart-item-remove {
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(30, 20, 14, 0.45);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cart-item-remove:hover {
  color: var(--espresso);
}

.cart-drawer-foot {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(30, 20, 14, 0.12);
}

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 14.5px;
  color: var(--espresso);
}

.cart-total strong {
  font-size: 21px;
  font-weight: 500;
}

.cart-drawer-foot .btn {
  width: 100%;
}

.cart-drawer-foot .btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

.cart-doc {
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--espresso);
}

.cart-doc-titulo {
  margin: 0 0 8px;
  font-weight: 500;
}

.cart-doc-opciones {
  display: flex;
  gap: 22px;
  margin-bottom: 12px;
}

.cart-doc-opciones label,
.cart-acepto {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.cart-factura {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.cart-factura[hidden] {
  display: none;
}

.cart-factura p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(30, 20, 14, 0.65);
}

.cart-factura label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: rgba(30, 20, 14, 0.7);
}

.cart-factura input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(30, 20, 14, 0.22);
  background: var(--blanco);
  color: var(--espresso);
  font: inherit;
  font-size: 14px;
}

.cart-acepto a {
  color: var(--nogal);
  text-decoration: underline;
}

.cart-nota {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: rgba(30, 20, 14, 0.55);
}

.order-item-doc {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--nogal);
}

a.order-item-doc {
  text-decoration: underline;
}

.cart-pay-error {
  min-height: 16px;
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #B3261E;
}

.cart-pay-error:empty {
  margin: 0;
  min-height: 0;
}

@media (max-width: 560px) {
  .cart-drawer-panel {
    padding: 26px 22px;
  }
}

/* ================= RESPONSIVE (compartido) ================= */

@media (max-width: 980px) {
  .shell { width: min(100% - 48px, 1320px); }

  .nav-center { display: none; }
  .nav-signin { display: none; }
  .nav-right .btn-primary { display: none; }
  .nav-right { gap: 0; }
  .hamburger { display: flex; }

  .section-head { flex-direction: column; align-items: flex-start; }
  .section-copy { max-width: 100%; }
}

@media (max-width: 560px) {
  .nav-inner { padding: 0 24px; }
}
