/* ===================================================
   Letija Ceramics · estilos
   Paleta: Azul cobalto (#0047AB) + beige
   Mobile-first, sin frameworks
   =================================================== */

:root {
  --cobalt: #0047AB;
  --cobalt-dark: #00317a;
  --cobalt-soft: #e7eefb;
  --beige: #f4ecdf;
  --beige-deep: #ece0cc;
  --cream: #fbf7f0;
  --ink: #1c2430;
  --muted: #5b6572;
  --white: #ffffff;
  --shadow-sm: 0 2px 10px rgba(20, 30, 50, .06);
  --shadow-md: 0 12px 32px rgba(20, 30, 50, .10);
  --shadow-lg: 0 24px 60px rgba(0, 49, 122, .16);
  --radius: 22px;
  --radius-lg: 30px;
  --maxw: 1160px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Red de seguridad: NADA (ni imágenes ni video) puede exceder su contenedor,
   pase lo que pase con reglas más específicas. Clave para Brave. */
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}
.container.narrow { max-width: 820px; }

/* ---------- Tipografía de secciones ---------- */
.eyebrow, .tag {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cobalt);
}
.tag {
  background: var(--cobalt-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  margin-bottom: 18px;
}
.lead { font-size: clamp(1.05rem, 2.4vw, 1.22rem); color: var(--muted); }
.section-sub { color: var(--muted); font-size: 1.05rem; }

.section { padding: clamp(64px, 10vw, 116px) 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 17px 36px; font-size: 1.06rem; }
.btn-sm { padding: 10px 20px; font-size: .92rem; }

.btn-primary {
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 71, 171, .28);
}
.btn-primary:hover {
  background: var(--cobalt-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 71, 171, .38);
}
.btn-ghost {
  background: transparent;
  color: var(--cobalt);
  border-color: rgba(0, 71, 171, .28);
}
.btn-ghost:hover {
  background: var(--cobalt-soft);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(251, 247, 240, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); background: rgba(251, 247, 240, .94); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}
.nav-menu > li { position: relative; }
.nav-menu a:not(.btn) {
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: color .2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-menu > li > a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--cobalt);
  transition: width .28s var(--ease);
}
.nav-menu > li > a:not(.btn):hover { color: var(--cobalt); }
.nav-menu > li > a:not(.btn):hover::after { width: 100%; }
.caret { font-size: .7rem; transition: transform .25s var(--ease); }

/* Dropdown */
.has-dropdown .dropdown {
  list-style: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 210px;
  background: var(--white);
  border: 1px solid var(--beige-deep);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.has-dropdown .dropdown::before {
  content: '';
  position: absolute;
  top: -16px; left: 0; right: 0; height: 16px;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.has-dropdown:hover .caret { transform: rotate(180deg); }
.dropdown li a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .95rem;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.dropdown li a::after { display: none; }
.dropdown li a:hover { background: var(--cobalt-soft); color: var(--cobalt); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 148px 0 96px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--cobalt-soft) 0%, transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, var(--beige) 100%);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo {
  width: 112px; height: 112px;
  border-radius: 26px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
}
.hero .eyebrow { margin-bottom: 16px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6.5vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin-bottom: 22px;
}
.hero-subtitle {
  max-width: 640px;
  font-size: clamp(1.05rem, 2.6vw, 1.28rem);
  color: var(--muted);
  margin-bottom: 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-note { margin-top: 24px; color: var(--muted); font-size: .98rem; }
.hero-note strong { color: var(--cobalt); }

/* ---------- Split (problema / artista) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.split-media { text-align: center; }
.split-media img,
.problem-video {
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  /* El tamaño se controla por el ANCHO (lo respetan todos los navegadores,
     incluido Brave). La altura sigue la proporción natural: imagen completa. */
  width: 100%;
  max-width: 320px;
  min-width: 0;
  height: auto;
  object-fit: contain;
  background: var(--beige);
}
.split-text p + p { margin-top: 14px; }
.split-text p:not(.lead) { color: var(--muted); }
.split-text .btn { margin-top: 22px; }

.section-problem { background: var(--white); }
.section-problem .lead em,
.split-text em { color: var(--ink); font-style: italic; }

.section-artist { background: var(--beige); }

/* ---------- Catálogo / categorías ---------- */
.section-catalog { background: var(--white); }
.section-order { background: var(--beige); }

.category-block { margin-top: 54px; scroll-margin-top: 90px; }
.category-block:first-of-type { margin-top: 8px; }
.category-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  margin-bottom: 26px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--beige-deep);
  color: var(--cobalt);
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--beige-deep);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

/* Imagen: se muestra COMPLETA (contain), sin recortar */
.product-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4; /* móvil: vertical */
  border: none;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  background: linear-gradient(160deg, var(--cream), var(--beige));
  overflow: hidden;
}
.product-media img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .5s var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.04); }
.media-badge {
  position: absolute;
  right: 12px; bottom: 12px;
  background: rgba(28, 36, 48, .78);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.product-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.product-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  margin-bottom: 8px;
}
.product-desc { color: var(--muted); font-size: .97rem; margin-bottom: 12px; flex: 1; }
.product-dims {
  font-size: .86rem;
  color: var(--cobalt);
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-dims::before { content: '↔'; font-size: 1rem; }
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.product-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--cobalt);
}
.product-price span { font-size: .8rem; font-weight: 500; color: var(--muted); }

/* Categoría vacía */
.empty-category {
  text-align: center;
  background: var(--cream);
  border: 1px dashed var(--beige-deep);
  border-radius: var(--radius);
  padding: 40px 24px;
}
.empty-category p { color: var(--muted); margin-bottom: 18px; }

/* ---------- FAQ ---------- */
.section-faq { background: var(--white); }
.faq-list { display: grid; gap: 14px; }
.faq-item {
  background: var(--cream);
  border: 1px solid var(--beige-deep);
  border-radius: 16px;
  padding: 4px 22px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.faq-item[open] { border-color: var(--cobalt); box-shadow: var(--shadow-sm); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.06rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  color: var(--cobalt);
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform .3s var(--ease);
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); padding-bottom: 20px; }

/* ---------- CTA final ---------- */
.section-cta {
  background:
    radial-gradient(100% 120% at 50% 0%, var(--cobalt-soft) 0%, transparent 60%),
    var(--cream);
  text-align: center;
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.cta-sub { color: var(--muted); font-size: 1.14rem; max-width: 540px; margin: 0 auto 30px; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd5e0; padding: 56px 0 30px; }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-logo { width: 52px; height: 52px; border-radius: 13px; object-fit: contain; background: #fff; padding: 5px; }
.footer-brand p { font-size: .95rem; line-height: 1.5; }
.footer-links { list-style: none; display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-weight: 500; transition: color .2s var(--ease); }
.footer-links a:hover { color: #fff; }
.footer-copy { text-align: center; font-size: .86rem; color: #8b95a4; padding-top: 26px; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 14px 32px rgba(37, 211, 102, .6); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 18, 28, .92);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .28s var(--ease);
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lb-figure {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
}
.lb-img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  background: #0c121c;
}
.lb-caption { color: #eef2f8; font-size: 1rem; font-weight: 500; text-align: center; }
.lb-btn {
  position: absolute;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.lb-btn:hover { background: rgba(255,255,255,.26); }
.lb-close {
  top: 20px; right: 20px;
  width: 46px; height: 46px;
  font-size: 1.3rem;
}
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 54px; height: 54px;
  font-size: 2rem;
  line-height: 1;
}
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.08); }
.lb-counter {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  color: #eef2f8;
  font-size: .92rem;
  font-weight: 600;
  background: rgba(255,255,255,.12);
  padding: 6px 16px;
  border-radius: 999px;
}
.lb-single .lb-prev,
.lb-single .lb-next,
.lb-single .lb-counter { display: none; }

/* ---------- Animaciones al hacer scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* =================================================
   Responsive
   ================================================= */
@media (min-width: 620px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: row; align-items: center; }
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 60px; }
  .split-reverse .split-media { order: 2; }
  /* Escritorio: tarjetas HORIZONTALES (imagen a la izquierda, texto a la derecha) */
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card { flex-direction: row; }
  .product-media { width: 44%; flex-shrink: 0; aspect-ratio: auto; }
  .product-body { width: 56%; justify-content: center; }
}

@media (min-width: 1100px) {
  /* Se mantienen 2 columnas para que las tarjetas horizontales tengan espacio */
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Menú móvil ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: rgba(251, 247, 240, .98);
    backdrop-filter: blur(14px);
    padding: 18px 22px 26px;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    transform: translateY(-140%);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s var(--ease), opacity .35s var(--ease);
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu li { width: 100%; }
  .nav-menu a:not(.btn) { display: flex; padding: 13px 0; width: 100%; }

  /* Dropdown en móvil: acordeón */
  .has-dropdown .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 6px 14px;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s var(--ease);
  }
  .has-dropdown.open-sub .dropdown { max-height: 320px; }
  .has-dropdown.open-sub .caret { transform: rotate(180deg); }
  .dropdown li a { padding: 10px 10px; }
  .nav-menu .btn { width: 100%; margin-top: 10px; }

  .lb-prev { left: 8px; width: 46px; height: 46px; font-size: 1.6rem; }
  .lb-next { right: 8px; width: 46px; height: 46px; font-size: 1.6rem; }
}

/* ---------- Accesibilidad ---------- */
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
.lightbox :focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .problem-video { /* respeta reduce-motion: el usuario puede pausar con el navegador */ }
}
