/* =========================================================
   CURSOS DE EQUITACIÓN - HOJA DE ESTILOS
   Paleta: marrón tierra, beige/crema, verde campo, blanco
   ========================================================= */

:root {
  /* Colores */
  --color-brown: #6b4423;
  --color-brown-dark: #4a2f17;
  --color-brown-light: #8a5a32;
  --color-cream: #f7f1e6;
  --color-beige: #ede0c8;
  --color-green: #5c7a4f;
  --color-green-dark: #3f5638;
  --color-white: #ffffff;
  --color-text: #2b2521;
  --color-text-light: #6b6259;
  --color-whatsapp: #25d366;
  --color-whatsapp-dark: #1ebe57;

  /* Tipografía */
  --font-title: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;

  /* Sombras y bordes */
  --shadow-soft: 0 10px 30px rgba(74, 47, 23, 0.12);
  --shadow-hover: 0 16px 40px rgba(74, 47, 23, 0.2);
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

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

.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 2100;
  background-color: var(--color-white);
  color: var(--color-brown-dark);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

:focus-visible {
  outline: 3px solid var(--color-green);
  outline-offset: 2px;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== TIPOGRAFÍA GENERAL ===================== */
.section__tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green-dark);
  margin-bottom: 10px;
}

.section__tag--center {
  display: block;
  text-align: center;
}

.section__title {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--color-brown-dark);
  margin-bottom: 16px;
}

.section__title--center {
  text-align: center;
}

.section__subtitle {
  text-align: center;
  color: var(--color-text-light);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* ===================== BOTONES ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--color-whatsapp);
  color: var(--color-white);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.btn--primary:hover {
  background-color: var(--color-whatsapp-dark);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(37, 211, 102, 0.45);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn--secondary:hover {
  background-color: var(--color-white);
  color: var(--color-brown-dark);
  transform: translateY(-3px);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-brown);
  border: 2px solid var(--color-brown);
  width: 100%;
}

.btn--outline:hover {
  background-color: var(--color-brown);
  color: var(--color-white);
}

.btn--whatsapp {
  display: block;
  text-align: center;
  background-color: var(--color-whatsapp);
  color: var(--color-white);
}

.btn--whatsapp:hover {
  background-color: var(--color-whatsapp-dark);
}

/* ===================== CARRITO ===================== */
.cart-btn {
  position: relative;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.cart-btn__count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--color-whatsapp);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(43, 37, 33, 0.5);
  z-index: 1899;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(380px, 90%);
  height: 100vh;
  background-color: var(--color-white);
  z-index: 1900;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  transition: right 0.35s ease, visibility 0.35s;
  visibility: hidden;
}

.cart-drawer.active {
  right: 0;
  visibility: visible;
}

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--color-beige);
}

.cart-drawer__header h3 {
  font-family: var(--font-title);
  color: var(--color-brown-dark);
}

.cart-drawer__close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--color-text-light);
  line-height: 1;
}

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-drawer__empty {
  color: var(--color-text-light);
  text-align: center;
  margin-top: 30px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-beige);
}

.cart-item__name {
  font-size: 0.92rem;
  color: var(--color-text);
  font-weight: 500;
}

.cart-item__price {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.cart-item__remove {
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}

.cart-item__remove:hover {
  color: var(--color-brown);
}

.cart-drawer__footer {
  padding: 24px;
  border-top: 1px solid var(--color-beige);
}

.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--color-brown-dark);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

/* ===================== HEADER ===================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition: var(--transition);
  padding: 18px 0;
}

.header.scrolled {
  background-color: rgba(247, 241, 230, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(74, 47, 23, 0.08);
  padding: 12px 0;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.logo__icon {
  font-size: 1.6rem;
}

.logo__img {
  height: 68px;
  width: 68px;
  object-fit: contain;
  border-radius: 8px;
}

.logo__text {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--color-white);
  transition: var(--transition);
}

.header.scrolled .logo__text {
  color: var(--color-brown-dark);
}

.logo__text--footer {
  color: var(--color-cream);
  font-size: 1.4rem;
}

.nav__list {
  display: flex;
  gap: 40px;
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-white);
  position: relative;
  transition: var(--transition);
}

.header.scrolled .nav__link {
  color: var(--color-text);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-green);
  transition: var(--transition);
}

.nav__link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1100;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background-color: var(--color-white);
  border-radius: 4px;
  transition: var(--transition);
}

.header.scrolled .hamburger span {
  background-color: var(--color-brown-dark);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: var(--color-brown-dark);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(74, 47, 23, 0.55) 0%, rgba(63, 86, 56, 0.65) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding-top: 80px;
}

.hero__title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero__buttons {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  font-size: 1.5rem;
  z-index: 2;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* ===================== QUIÉNES SOMOS ===================== */
.founder {
  padding: 100px 0;
  background-color: var(--color-white);
}

.founder__grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 60px;
  align-items: center;
}

.founder__photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.founder__text p {
  color: var(--color-text-light);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

/* ===================== SOBRE NOSOTROS ===================== */
.about {
  padding: 100px 0;
  background-color: var(--color-cream);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__text p {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

.about__highlights {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.highlight-card {
  background-color: var(--color-white);
  padding: 24px 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

.highlight-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.highlight-card__icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 10px;
}

.highlight-card h3 {
  font-family: var(--font-title);
  color: var(--color-brown-dark);
  margin-bottom: 6px;
}

.highlight-card p {
  color: var(--color-text-light);
  font-size: 0.92rem;
}

/* ===================== CURSOS ===================== */
.courses {
  padding: 100px 0;
  background-color: var(--color-white);
}

.courses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  justify-content: center;
  gap: 28px;
}

.course-card {
  background-color: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  border: 1px solid transparent;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-green);
}

.course-card__icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.course-card__img {
  width: 160px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.course-card__price {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-green-dark);
  margin-bottom: 18px;
}

.course-card__title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--color-brown-dark);
  margin-bottom: 12px;
}

.course-card__desc {
  color: var(--color-text-light);
  font-size: 0.92rem;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* ===================== GALERÍA ===================== */
.gallery {
  padding: 100px 0;
  background-color: var(--color-cream);
}

.carousel {
  max-width: 1100px;
  margin: 0 auto;
}

.carousel__viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.carousel__track {
  display: flex;
  gap: 16px;
  transition: transform 0.5s ease;
}

.carousel__slide {
  flex: 0 0 calc((100% - 32px) / 3);
  aspect-ratio: 4 / 3;
  background-color: var(--color-beige);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.carousel__slide img:hover {
  transform: scale(1.04);
}

.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(43, 37, 33, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox__arrow:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.lightbox__arrow--prev {
  left: 16px;
}

.lightbox__arrow--next {
  right: 16px;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--color-brown-dark);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.carousel__arrow:hover {
  background-color: var(--color-white);
}

.carousel__arrow--prev {
  left: 16px;
}

.carousel__arrow--next {
  right: 16px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-beige);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.carousel__dot.active {
  background-color: var(--color-green);
  transform: scale(1.2);
}

/* ===================== TESTIMONIOS ===================== */
.testimonials {
  padding: 100px 0;
  background-color: var(--color-beige);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 20px;
}

.testimonial-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  aspect-ratio: 3 / 4;
  background-color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-photo:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.testimonial-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ===================== CONTACTO ===================== */
.contact {
  padding: 100px 0;
  background-color: var(--color-beige);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 50px;
}

.contact__grid--single {
  grid-template-columns: 1fr;
  max-width: 380px;
  margin: 0 auto 50px;
}

.contact__card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.contact__card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.contact__card h3 {
  font-family: var(--font-title);
  color: var(--color-brown-dark);
  margin-bottom: 10px;
}

.contact__card p {
  color: var(--color-text-light);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--color-white);
  font-size: 1.3rem;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

.social-icon:hover {
  transform: translateY(-4px);
  background-color: var(--color-green);
}

.social-icon svg {
  width: 22px;
  height: 22px;
}

.social-icon--whatsapp svg {
  color: var(--color-whatsapp);
}

.social-icon--whatsapp:hover svg {
  color: var(--color-white);
}

.social-icon--instagram svg {
  color: #c13584;
}

.social-icon--instagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-icon--instagram:hover svg {
  color: var(--color-white);
}

/* ===================== FOOTER ===================== */
.footer {
  background-color: var(--color-brown-dark);
  color: var(--color-cream);
  padding-top: 70px;
}

.footer__container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer__brand p {
  margin-top: 12px;
  color: rgba(247, 241, 230, 0.75);
  font-size: 0.92rem;
  max-width: 320px;
}

.footer__links h4,
.footer__socials h4 {
  font-family: var(--font-title);
  margin-bottom: 16px;
  color: var(--color-white);
}

.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  color: rgba(247, 241, 230, 0.75);
  font-size: 0.92rem;
  transition: var(--transition);
}

.footer__links a:hover {
  color: var(--color-white);
}

.footer__social-icons {
  display: flex;
  gap: 14px;
}

.footer__bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 0.85rem;
  color: rgba(247, 241, 230, 0.6);
}

.footer__credit {
  margin-top: 6px;
}

.footer__credit a {
  color: rgba(247, 241, 230, 0.85);
  font-weight: 600;
  transition: var(--transition);
}

.footer__credit a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

/* ===================== BOTÓN FLOTANTE WHATSAPP ===================== */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 60px;
  height: 60px;
  background-color: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 999;
  animation: pulse 2.2s infinite;
}

.whatsapp-float__icon {
  width: 32px;
  height: 32px;
  color: var(--color-white);
}

.cart-float {
  position: fixed;
  bottom: 26px;
  right: 96px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--color-brown);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(74, 47, 23, 0.35);
  z-index: 999;
  transition: var(--transition);
}

.cart-float:hover {
  background-color: var(--color-brown-dark);
}

.cart-float__count {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--color-whatsapp);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ===================== BARRA DE SCROLL CON CABALLO ===================== */
.scroll-rail {
  position: fixed;
  top: 0;
  right: 10px;
  height: 100vh;
  width: 32px;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-rail__track {
  position: relative;
  width: 4px;
  height: 70vh;
  max-height: 600px;
  background-color: var(--color-beige);
  border-radius: 4px;
  overflow: visible;
}

.scroll-rail__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background-color: var(--color-green);
  border-radius: 4px;
  transition: height 0.05s linear;
}

.scroll-rail__horse {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  line-height: 1;
  transition: top 0.05s linear;
}

@media (max-width: 768px) {
  .scroll-rail {
    display: none;
  }
}

/* ===================== ANIMACIONES SCROLL ===================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 992px) {
  .carousel__slide {
    flex: 0 0 calc((100% - 16px) / 2);
  }

  .founder__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .founder__photo img {
    max-width: 320px;
    margin: 0 auto;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .footer__container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 80%);
    height: 100vh;
    background-color: var(--color-cream);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.35s ease, visibility 0.35s;
    visibility: hidden;
    z-index: 1050;
    padding: 100px 30px 30px;
  }

  .nav.active {
    right: 0;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    gap: 24px;
  }

  .nav__link {
    color: var(--color-brown-dark) !important;
    font-size: 1.05rem;
  }

  .hamburger {
    display: flex;
  }

  .carousel__arrow {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

  .testimonials__grid {
    grid-template-columns: 1fr;
  }

  .hero__buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero__buttons .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .section__title {
    font-size: 1.6rem;
  }

  .hero__title {
    font-size: 2rem;
  }

  .whatsapp-float {
    width: 54px;
    height: 54px;
    bottom: 18px;
    right: 18px;
  }

  .cart-float {
    width: 54px;
    height: 54px;
    bottom: 18px;
    right: 86px;
  }

  /* El carrito flotante ya cubre esta función; se oculta el del header para no duplicar */
  .cart-btn {
    display: none;
  }
}

/* ===================== PRELOADER / ANIMACIÓN DE BIENVENIDA ===================== */
.site-wrapper {
  opacity: 0;
}

.site-wrapper.is-visible {
  opacity: 1;
  transition: opacity 0.6s ease;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-brown-dark);
  transition: opacity 0.5s ease;
}

.preloader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: preloader-fade-in 0.6s ease-out;
}

.preloader__brand {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--color-cream);
  letter-spacing: 0.02em;
}

.preloader__bar {
  width: 200px;
  height: 4px;
  border-radius: 4px;
  background-color: rgba(247, 241, 230, 0.25);
  overflow: hidden;
  margin-top: 6px;
}

.preloader__bar-fill {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 4px;
  background-color: var(--color-green);
  overflow: hidden;
  animation: preloader-bar-fill 1.8s cubic-bezier(0.3, 0, 0.2, 1) forwards;
}

.preloader__bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: preloader-bar-shimmer 0.9s linear infinite;
}

@keyframes preloader-bar-fill {
  0% { width: 0%; }
  25% { width: 30%; }
  45% { width: 38%; }
  70% { width: 72%; }
  85% { width: 80%; }
  100% { width: 100%; }
}

@keyframes preloader-bar-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes preloader-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== MOVIMIENTO REDUCIDO ===================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .hero__scroll,
  .whatsapp-float {
    animation: none;
  }

  .carousel__track {
    transition: none;
  }

  .preloader__content,
  .preloader__bar-fill,
  .preloader__bar-fill::after {
    animation: none;
  }

  .preloader__bar-fill {
    width: 100%;
  }

  .site-wrapper.is-visible {
    transition: none;
  }
}
