:root {
  --brand: #9c0005;
  --brand-dark: #780004;
  --brand-light: #c21a20;
  --ink: #1a1a1a;
  --muted: #666666;
  --line: #e6e1de;
  --soft: #f6f3f1;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: "Oxanium", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
  font-family: "Oxanium", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

img {
  max-width: 100%;
}

img,
html {
  -webkit-user-drag: none;
}

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

::selection {
  background-color: var(--brand);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
  background-color: #f2eeec;
}

::-webkit-scrollbar-thumb {
  width: 6px;
  background-color: var(--brand);
}

/* ---------- Navegación ---------- */
.nav-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-dropdown-menu {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 60;
  width: 380px;
  margin-top: 0.9rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 24px 60px -28px rgba(26, 26, 26, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* Puente invisible sobre el espacio (0.9rem) que separa el botón del menú.
   Sin esto el :hover se pierde al cruzar el hueco y el dropdown se cierra
   antes de poder entrar con el mouse. */
.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 380px;
  height: 0.9rem;
  transform: translateX(-50%);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown.is-open #products-toggle i {
  transform: rotate(180deg);
}

#site-header.is-scrolled {
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.65);
}

.mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.mobile-link:hover {
  color: #fff;
}

.mobile-link-group #mobile-products-menu {
  padding: 0.35rem 0 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-sm {
  padding: 0.7rem 1.15rem;
  font-size: 0.875rem;
}

.btn-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-outline-light:hover {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

.btn-outline-dark {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline-dark:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Forms ---------- */
.form-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: #999;
}

.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(156, 0, 5, 0.1);
}

textarea.form-input {
  resize: vertical;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 1;
  transform: none;
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-ready .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(10, 10, 10, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lightbox-button:hover {
  border-color: var(--brand);
  background: var(--brand);
}

body.lightbox-open {
  overflow: hidden;
}

body.menu-open .whatsapp-float {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.9);
}

/* ---------- Hero con video ---------- */
/* La geometría (cover 16:9, centrado y escalado) se resuelve con clases
   Tailwind en components/hero.php. Acá sólo queda el fade de entrada. */
#hero-video {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

#hero-video.is-playing {
  opacity: 1;
}

/* ---------- Intro de carga ---------- */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  pointer-events: none;
}

.intro-overlay.is-active {
  display: block;
}

.intro-panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  will-change: transform;
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
}

.intro-panel-top {
  top: 0;
  height: calc(50% + 1px);
  background-image: linear-gradient(to bottom, var(--brand-dark), var(--brand));
}

.intro-panel-bottom {
  bottom: 0;
  height: calc(50% + 1px);
  background-image: linear-gradient(to top, var(--brand-dark), var(--brand));
}

.intro-overlay.is-open .intro-panel-top {
  transform: translateY(-100%);
}

.intro-overlay.is-open .intro-panel-bottom {
  transform: translateY(100%);
}

.intro-brand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: opacity 0.25s ease;
}

.intro-brand img {
  display: block;
  width: 190px;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.intro-overlay.is-open .intro-brand {
  opacity: 0;
}

body.intro-active {
  overflow: hidden;
}

/* ---------- Helpers ---------- */
.text-balance {
  text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .intro-overlay {
    display: none !important;
  }
}
