:root {
  /* Paleta principal */
  --color-bg: #FFFDE8;
  --color-header-bg: #FFFBE8;
  --color-yellow: #FFD60B;
  --color-yellow-dark: #D4B200;
  --color-green: #367C2B;
  --color-success: #25D366;
  --color-black: #222;
  --color-white: #fff;

  --shadow-default: 0 2px 6px rgba(0, 0, 0, .10);
  --radius: .5rem;
  --spacing: 1rem;
  --transition: .2s;

  --outline-focus: 2px solid var(--color-yellow);
  --outline-offset: 2px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-black);
  background: var(--color-bg);
  min-height: 100vh;
}

/* ======== UTILITARIOS Y BOTONES ======== */
.spacer {
  height: 70px;
}

.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
  cursor: pointer;
  border: none;
  outline: none;
  background: var(--color-yellow);
  color: var(--color-black);
}

.btn--green {
  background: var(--color-green);
  color: var(--color-white);
}

.btn--green:hover {
  background: var(--color-yellow-dark);
  color: var(--color-black);
}

.btn--yellow {
  background: var(--color-yellow);
  color: var(--color-black);
}

.btn--yellow:hover {
  background: var(--color-green);
  color: var(--color-white);
}

.btn--whatsapp {
  background: var(--color-success);
  color: var(--color-white);
}

.btn--whatsapp:hover {
  opacity: .92;
}

.btn--black {
  background: var(--color-black);
  color: var(--color-yellow);
  margin-top: 1rem;
}

.btn--black:hover {
  opacity: .86;
}

.btn--inventory {
  width: 3rem;
  height: 3rem;
  background: var(--color-white);
  color: var(--color-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  margin-top: auto;
  transition: background var(--transition), color var(--transition);
}

.btn--inventory:hover {
  background: var(--color-yellow);
  color: var(--color-white);
}

/* ========== HEADER ========== */
header.hdr {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  box-shadow: var(--shadow-default);
  border-bottom: 2px solid var(--color-yellow);
}

.hdr__inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing);
  gap: 1rem;
}

.hdr__logos {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.hdr__logo {
  height: 65px;
  max-width: 92px;
  object-fit: contain;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  transition: height .2s, max-width .2s;
}

/* --- CTA siempre en fila --- */
.hdr__cta {
  display: flex;
  flex-direction: row !important;
  /* Fuerza siempre fila */
  align-items: center;
  gap: 1rem;
}

/* Compacta botones en móvil */
@media (max-width: 900px) {
  .hdr__cta {
    gap: .5rem;
  }

  .hdr__cta .btn {
    padding: .7rem 1rem;
    font-size: 1rem;
    min-width: 0;
    flex: 1 1 auto;
  }
}

/* Logos pequeños en móvil */
@media (max-width: 700px) {
  .hdr__logos {
    gap: .5rem;
    justify-content: center;
  }

  .hdr__logo {
    height: 38px;
    max-width: 54px;
  }
}

/* ========== NAV ========== */
.nav {
  display: flex;
  gap: var(--spacing);
  align-items: center;
  transition: none;
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100vw;
    /* Oculto por defecto */
    width: 220px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -4px 0 16px #2222;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5.5rem 1.5rem 1rem 1.5rem;
    gap: 1.3rem;
    z-index: 2001;
    transition: right .22s cubic-bezier(.5, 1.5, .5, 1);
  }

  .nav.nav--open {
    right: 0;
  }
}

/* SIEMPRE mostrar los botones de contacto */
.hdr__cta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

@media (max-width: 900px) {
  .hdr__cta {
    flex-direction: column;
    gap: .7rem;
  }
}

/* BOTÓN HAMBURGUESA */
.nav-toggle {
  background: none;
  border: none;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  cursor: pointer;
  margin-left: 1rem;
  z-index: 2100;
}

.nav-toggle span {
  width: 26px;
  height: 4px;
  background: var(--color-black);
  border-radius: 3px;
  display: block;
  transition: all .22s cubic-bezier(.5, 1.5, .5, 1);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    align-items: center;
  }
}

/* Animación hamburguesa activa */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========== ENLACES NAV ========== */
.nav__link {
  color: var(--color-black);
  text-decoration: none;
  font-weight: 500;
  padding: .5rem;
  position: relative;
  transition: color var(--transition);
}

.nav__link.active::after,
.nav__link:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-yellow);
}

/* OCULTAR MENÚ, PERO NO BOTONES CTA, EN MÓVIL */
@media (max-width: 900px) {

  /* El nav-toggle ya se encarga de mostrar/ocultar el nav */
  .nav {
    display: flex;
  }

  .hdr__cta {
    display: flex;
  }
}

/* ======== HERO / SLIDER ======== */
.hero {
  position: relative;
  text-align: center;
  overflow: hidden;
  background: var(--color-header-bg);
}

.hero__slider {
  display: flex;
  animation: slide 30s linear infinite;
  will-change: transform;
}

.hero__slider .slide {
  min-width: 100%;
}

.hero__slider img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  filter: brightness(0.7);
  border-radius: var(--radius);
  background: var(--color-yellow);
  transition: filter .2s;
}

.hero__slider img:focus,
.hero__slider img:hover {
  filter: brightness(0.92);
}

.hero__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-white);
  text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
  width: 100%;
  max-width: 650px;
}

.hero__text h1,
.section-title {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 3rem;
  letter-spacing: .03em;
  margin-bottom: .5em;
  color: var(--color-yellow-dark);
  text-shadow: 0 3px 10px #2223;
}

.hero__subtitle,
.inventario__desc {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: .6em;
}

.hero__subdesc {
  font-size: 1rem;
  font-weight: 400;
  color: #444;
}

.hero__text p {
  font-size: 1.25rem;
  background: rgba(34, 34, 34, 0.36);
  padding: .3rem .8rem;
  border-radius: .5rem;
  display: inline-block;
}

/* Centrar el número de teléfono en el HERO */
.hero__phone {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5em 0;
  color: inherit;
  text-decoration: underline;
  filter: brightness(1.1);
}

/* Slider keyframes para 6 imágenes */
@keyframes slide {

  0%,
  11% {
    transform: translateX(0);
  }

  16%,
  27% {
    transform: translateX(-100%);
  }

  32%,
  43% {
    transform: translateX(-200%);
  }

  48%,
  59% {
    transform: translateX(-300%);
  }

  64%,
  75% {
    transform: translateX(-400%);
  }

  80%,
  91% {
    transform: translateX(-500%);
  }

  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slider {
    animation: none !important;
  }
}

/* ======== INVENTARIO (SERVICIOS) ======== */
.inventario {
  padding: 4rem 1rem;
  background: var(--color-white);
}

.inventario__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
}

.inventario__left {
  flex: 1 1 300px;
  background: var(--color-green);
  color: var(--color-yellow);
  padding: 2rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}

.inventario__left h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: .02em;
}

.inventario__left p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.inventario__list {
  flex: none;
  width: 100%;
  max-height: 380px;
  overflow-y: auto;
  margin: 1rem 0;
  padding-right: .5rem;
}

.inventario__list ul {
  list-style: disc inside;
  color: var(--color-white);
  line-height: 1.5;
  padding-left: 1.2em;
}

.inventario__list li {
  margin-bottom: .3rem;
  font-size: 1rem;
}

.inventario__right {
  flex: 2 1 400px;
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-default);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.inventario__mainlogo {
  max-width: 400px;
  height: auto;
  margin-bottom: 1rem;
  display: block;
}

.inventario__brands {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.brand-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 3px 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}

.inventario__contacto p {
  margin: .3rem 0;
  color: var(--color-black);
  font-size: 1rem;
}

@media (max-width: 900px) {
  .inventario__inner {
    flex-direction: column;
  }

  .inventario__right,
  .inventario__left {
    width: 100%;
  }
}

/* ======== PRODUCTOS DESTACADOS - GALERÍA ROBUSTA ======== */
.prod-grid {
  display: grid;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  gap: 1.5rem 1rem;
  grid-template-columns: repeat(5, 1fr);  /* 5 columnas desktop */
}

@media (max-width: 1200px) {
  .prod-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 1000px) {
  .prod-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .prod-grid {
    grid-template-columns: 1fr;
  }
}

.prod-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-default);
  transition: transform .3s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 98vw;
}

.prod-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .13);
}

.prod-card img {
  width: 100%;
  max-width: 220px;
  min-width: 0;
  min-height: 80px;
  height: 110px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fafaf6;
  border-radius: .6rem;
  margin-bottom: .6rem;
  box-shadow: 0 2px 10px #ffd60b1a;
  transition: box-shadow .18s, transform .18s;
  display: block;
}

.prod-card img:active,
.prod-card img:focus {
  outline: 2px solid var(--color-yellow-dark);
  outline-offset: 1px;
  box-shadow: 0 2px 18px #ffd60b60;
  transform: scale(1.03);
}

.prod-card p {
  padding: .7rem .3rem .9rem .3rem;
  font-weight: bold;
  font-size: 1.05rem;
  color: var(--color-black);
  text-align: center;
  width: 100%;
  word-break: break-word;
}

  /* ======== TOGGLE GALERÍA ======== */
#productos .toggle-products {
  margin-top: 1.2rem;
}

/* Ocultar todo excepto la primera fila según el nº de columnas */
#productos.collapsed .prod-card { display: none; }

/* Desktop ≥1200 px → 5 columnas */
#productos.collapsed .prod-card:nth-child(-n+5) { display: flex; }

/* 1000‑1199 px → 4 columnas */
@media (max-width: 1199px) {
  #productos.collapsed .prod-card:nth-child(-n+4) { display: flex; }
}

/* 700‑999 px → 3 columnas */
@media (max-width: 999px) {
  #productos.collapsed .prod-card:nth-child(-n+3) { display: flex; }
}

/* 500‑699 px → 2 columnas */
@media (max-width: 699px) {
  #productos.collapsed .prod-card:nth-child(-n+2) { display: flex; }
}


/* ===== MODAL PRODUCTO ===== */
.modal-producto {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  transition: opacity .25s;
}

.modal-producto.open {
  display: flex;
}

.modal-producto__content {
  position: relative;
  background: #fff;
  border-radius: .5rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .25);
  padding: 2rem;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-producto__img {
  max-width: 80vw;
  max-height: 60vh;
  object-fit: contain;
  border-radius: .5rem;
  margin-bottom: 1rem;
}

.modal-producto__close,
.modal-producto__arrow {
  position: absolute;
  background: #ffd60b;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.6rem;
  color: #222;
  cursor: pointer;
  box-shadow: 0 1px 4px #2222;
  opacity: 0.88;
  transition: background .2s, color .2s;
}

.modal-producto__close {
  top: 1rem;
  right: 1rem;
}

.modal-producto__arrow--left {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.modal-producto__arrow--right {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.modal-producto__arrow:hover,
.modal-producto__close:hover {
  background: #367C2B;
  color: #fff;
}

@media (max-width:600px) {
  .modal-producto__content {
    padding: .8rem;
  }

  .modal-producto__img {
    max-width: 98vw;
    max-height: 40vh;
  }

  .modal-producto__close,
  .modal-producto__arrow {
    width: 2rem;
    height: 2rem;
    font-size: 1.15rem;
  }
}



/* ======== UBICACION ======== */
.ubicacion {
  padding: 4rem 1rem;
  background: #f0f0e2;
}

.ubicacion h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.ubicacion__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1000px;
  margin: auto;
}

.ubicacion__tarjeta {
  flex: 1 1 350px;
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-default);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ubicacion__tarjeta img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: none;
  background: var(--color-yellow);
  margin-bottom: 0;
  /* elimina separación extra */
}

.ubicacion__map iframe {
  width: 100%;
  min-height: 160px;
  border-radius: var(--radius);
  box-shadow: none;
}

.ubicacion__tarjeta p {
  font-size: 1.1rem;
  line-height: 2.2;
  color: var(--color-black);
  margin-bottom: .7rem;
}

/* Responsive */
@media (max-width: 800px) {
  .ubicacion__inner {
    flex-direction: column;
  }

  .ubicacion__tarjeta {
    padding: 1.2rem;
  }
}


/* ======== ¿POR QUÉ? (BENEFICIOS) ======== */
.por-que {
  padding: 4rem 1rem;
  text-align: center;
  background: var(--color-header-bg);
}

.por-que h2,
.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--color-black);
}

.por-que__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.por-que .card {
  background: var(--color-yellow);
  padding: 2rem 1rem;
  border-radius: var(--radius);
  color: var(--color-black);
  box-shadow: var(--shadow-default);
  font-size: 1.05rem;
}

.por-que .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* ======== CONTACTO ======== */
.contacto {
  padding: 4rem 1rem;
  background: var(--color-yellow);
}

.contacto h2,
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--color-black);
}

.contacto__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1000px;
  margin: auto;
}

.contacto__info {
  flex: 1 1 300px;
  background: var(--color-green);
  color: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius);
  line-height: 3;
}

.contacto__info a {
  color: var(--color-yellow);
  text-decoration: underline;
}

.contacto__form {
  flex: 1 1 300px;
  display: grid;
  gap: 1rem;
}

.contacto__form input,
.contacto__form textarea {
  width: 100%;
  padding: .75rem;
  border: 2px solid var(--color-green);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-black);
  font-size: 1rem;
}

.contacto__form input:focus,
.contacto__form textarea:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 2px var(--color-header-bg);
}

/* ======== FOOTER ======== */
.footer {
  background: var(--color-black);
  color: var(--color-yellow);
  text-align: center;
  padding: 1rem;
  font-size: .9rem;
  letter-spacing: 1px;
}

/* ======== REVEAL ANIMATION ======== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all .6s cubic-bezier(.23, .84, .64, 1.02);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) {
  .hdr__inner {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 900px) {
  .inventario__inner {
    flex-direction: column;
  }

  .inventario__right,
  .inventario__left {
    width: 100%;
  }
}

@media (max-width: 768px) {

  .hero__text h1,
  .section-title {
    font-size: 2.1rem;
  }

  .hero__text p {
    font-size: 1rem;
  }

  .hdr__logo {
    height: 42px;
    max-width: 60px;
  }

  .prod-card img {
    height: 90px;
  }

  .contacto__inner,
  .ubicacion__inner {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {

  .hero__text h1,
  .section-title {
    font-size: 1.25rem;
  }

  .prod-card p {
    font-size: .97rem;
  }

  .footer {
    font-size: .8rem;
  }
}

/* ======== ACCESIBILIDAD: FOCUS VISIBLE ======== */
.btn:focus,
.nav__link:focus {
  outline: var(--outline-focus);
  outline-offset: var(--outline-offset);
}