/* Google Fonts se importa via <link> en el HTML con preconnect */

/* ---- Custom Properties ---- */
:root {
  /* Colores Primarios */
  --color-orange:            #FE5000;
  --color-orange-dark:       #D54300; /* hover de botón Primary */
  --color-orange-ultra-dark: #AD3600; /* badges, texto de categoría */
  --color-white:             #F4F4F4; /* Secondary hover fill + texto sobre oscuro */
  --color-white-pure:        #ffffff;
  --color-white-ultra:       #FCFCFC; /* texto y bordes sobre fondos fotográficos */

  /* Colores Secundarios */
  --color-navy:          #263238;
  --color-navy-light:    #37474F;

  /* Colores Complementarios */
  --color-cream:         #FFF6EE;
  --color-gray:          #7F7F7F;
  --color-gray-light:    #9ca3af;
  --color-icon:          #636363;

  /* Fondo de sección */
  --color-bg-white:      #ffffff;
  --color-bg-section:    #ffffff;
  --color-bg-dark:       #263238;

  /* Tipografía */
  --font-primary:        'Montserrat', sans-serif;

  /* Tamaños de fuente */
  --fs-h1:    4rem;        /* 64px */
  --fs-h4:    2.25rem;     /* 36px */
  --fs-h5:    2rem;        /* 32px */
  --fs-h6:    1.75rem;     /* 28px */
  --fs-xl:    1.5rem;      /* 24px */
  --fs-lg:    1.25rem;     /* 20px */
  --fs-md:    1rem;        /* 16px */
  --fs-sm:    0.875rem;    /* 14px */

  /* Pesos */
  --fw-light:     300;
  --fw-regular:   400;
  --fw-semibold:  600;
  --fw-bold:      700;

  /* Line heights */
  --lh-heading:  1.1;
  --lh-body:     1.875;   /* 30px en base 16 */

  /* Espaciados */
  --space-xs:    0.5rem;
  --space-sm:    1rem;
  --space-md:    1.5rem;
  --space-lg:    2rem;
  --space-xl:    3rem;
  --space-2xl:   4rem;
  --space-3xl:   5rem;

  /* Contenedor */
  --container-max:  1312px;
  --container-pad:  1rem;

  /* Border radius */
  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   1rem;
  --radius-xl:   1.5rem;

  /* Transiciones */
  --transition:  0.3s ease;

  /* Sombras */
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md:   0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg:   0 8px 40px rgba(0, 0, 0, 0.16);

  /* Z-index */
  --z-navbar:    1000;
  --z-dropdown:  1010;
  --z-modal:     2000;
  --z-toast:     3000;
}

/* ---- Box-sizing & Font Smoothing ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Reset base ---- */

/* Los paneles inactivos del tab-selector se ocultan con el atributo [hidden],
   pero .tab-selector__panel declara display: flex y lo gana. Hoy no se nota
   porque el reboot de Bootstrap trae esta misma regla; el tema la declara por
   su cuenta para no depender de una hoja que se usa solo por su grid. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--color-navy);
  background-color: var(--color-bg-white);
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  color: var(--color-navy);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h4); }
h3 { font-size: var(--fs-h5); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

p {
  margin: 0;
}

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

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* ---- Token responsive global ---- */
@media (max-width: 575.98px) {
  :root {
    --space-3xl: 2rem;
  }
}

/* ---- Utilidades de contenedor ---- */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + 4rem);
  margin-inline: auto;
  padding-inline: calc(2rem + 30px);
}

/* ---- Visually hidden (accesibilidad) ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Lazy load fade in ---- */
img[data-src] {
  opacity: 0;
  transition: opacity var(--transition);
}

img.loaded {
  opacity: 1;
}

/* =====================
   PÁGINA 404
   ===================== */
.error-404 {
  position: relative;
  min-height: 901px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-navy);
}

.error-404__bg {
  position: absolute;
  inset: 0;
}

.error-404__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.error-404__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.error-404__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 618px;
  padding-inline: var(--container-pad);
  text-align: center;
}

.error-404__code {
  font-weight: var(--fw-bold);
  font-size: 200px;
  line-height: 1;
  color: var(--color-white);
  margin: 0;
}

.error-404__title {
  font-weight: var(--fw-bold);
  font-size: 28px;
  line-height: 38px;
  text-transform: uppercase;
  color: var(--color-white);
  margin: 0;
}

.error-404__text {
  font-weight: var(--fw-regular);
  font-size: 20px;
  line-height: 30px;
  color: var(--color-white);
  margin: 0;
}

.error-404__inner .btn {
  align-self: center;
}

@media (max-width: 991.98px) {
  .error-404 {
    min-height: 700px;
  }

  .error-404__code {
    font-size: 140px;
  }
}

@media (max-width: 575.98px) {
  .error-404 {
    min-height: 600px;
  }

  .error-404__code {
    font-size: 96px;
  }

  .error-404__title {
    font-size: 22px;
    line-height: 30px;
  }

  .error-404__text {
    font-size: var(--fs-md);
  }
}

/* ---- Reset mobile: el padding alineado al navbar (calc(2rem + 30px)) solo aplica en desktop; en mobile se usa el gutter estándar ---- */
@media (max-width: 991.98px) {
  .container {
    padding-inline: var(--container-pad);
  }
}
