/* Contact section flex layout */
.contact-flex {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  margin: 2rem 0;
}
.contact-form {
  max-width: 400px;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex: 1 1 400px;
  margin-left: 5rem;
}
.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.contact-form button {
  background-color: #f0d9b5;
  color: #2c3e50;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  width: 100%;
}
.map-container {
  /* This rule was defined twice. It has been merged into one. */
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
  align-items: center; 
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
}
@media (max-width: 900px) {
  .contact-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  .map-container, .contact-form {
    width: 100%;
    max-width: 100%;
  }
}
/* Modal image viewer styles for desktop */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-content {
  position: relative;
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.modal-img {
  max-width: 60vw;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.modal-prev, .modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(44,62,80,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 2;
}
.modal-prev { left: 10px; }
.modal-next { right: 10px; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  color: #333;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 3;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(44,62,80,0.3);
  z-index: 1;
}
/* Product image slider styles for desktop */
.product-image-slider {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-img {
  max-width: 100%;
  border-radius: 8px;
}
.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(44,62,80,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 2;
}
.slider-prev { left: 8px; }
.slider-next { right: 8px; }

/* =============================================
    Reset and Base
    ============================================= */
:root {
  --primary-color: #2c3e50;
  --highlight-color: #f0d9b5;
  --neutral-dark: #2c3e50;
  --light-bg: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif; /* Use font loaded from Google Fonts */
  background-color: var(--light-bg);
  color: var(--neutral-dark);
  /* WARNING: This can hide layout issues. Recommended to find and fix the source of horizontal scroll instead. */
  overflow-x: hidden;
}

h1, h2 { 
  font-family: 'Playfair Display', serif; 
}

/* =============================================
    Layout & Components
    ============================================= */

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--neutral-dark);
  color: var(--highlight-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--highlight-color);
}

.logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links li a {
  color: var(--highlight-color);
  text-decoration: none;
  font-weight: 500;
}

.nav-links li a:hover {
  color: white;
}

.nav-links a.active {
  color: #f0d9b5;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 11;
}

/* Hero Section with Video */
.hero-section {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  z-index: 0;
}

.bg-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.bg-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  filter: brightness(25%);
}

.bg-slide.active {
  opacity: 1;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  color: white;
  padding: 0 1rem;
}
.hero-overlay h1, .hero-overlay h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-overlay p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-button {
  background-color: var(--highlight-color);
  color: var(--neutral-dark);
  text-decoration: none;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.hero-button:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Page Sections */
section {
  scroll-margin-top: 6rem;
}

.about,
.products,
.contact {
  padding-top: 6rem;
}

.about p,
.products p,
.contact p {
  padding: 0 5rem;
  text-align: center;
}

.about h2,
.products h2,
.contact h2 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
  font-size: 3rem;
}


.products h1,
.faq-section h1 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
  font-size: 3rem;
}

/* Product Specific */
.product-list {
  list-style: none;
  text-align: center;
  padding: 0;
  margin: 1rem auto;
}

.product-intro {
  margin-bottom: 1.5rem;
  text-align: center;
  padding: 0 5rem;
}

.catalog-button-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Maximum 4 columns */
  gap: 2rem;
  margin-top: 2rem;
  margin-left: 2rem;
  margin-right: 2rem;
}

.product-card {
  /* This rule was defined twice. It has been merged into one. */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 1rem 0.5rem;
  text-align: center;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product-card img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
  height: 160px;
  object-fit: cover;
}
.product-card p {
  font-size: 1rem;
  color: var(--neutral-dark);
  margin-left: 0.2rem;
  margin-right: 0.2rem;
  margin-top: 0.5rem;
  padding-left: 0;
  padding-right: 0;
}

/* Footer */
.custom-footer {
  background-color: var(--primary-color);
  color: var(--highlight-color);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 4rem;
  font-size: 0.9rem;
  position: relative;
}

/* Decorative Hummingbird Animation */
.hummingbird-container {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 120px;
  left: -100px;
  z-index: 9999;
  pointer-events: none;
  animation: flyAcross 4s ease-out forwards;
  transform: scale(1.5);
}

.hummingbird-container.second {
  top: 120px;
  animation: flyAcrossAlt 4s ease-out forwards;
}

@keyframes flyAcross {
  0% { transform: translateX(0) translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateX(100px) translateY(0px); opacity: 1; }
}

@keyframes flyAcrossAlt {
  0% { transform: translateX(0) translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateX(950px) translateY(0px); opacity: 1; }
}

/* =============================================
    Thank You Page Styles (gracias.html)
    ============================================= */
.thank-you-section {
  padding: 5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.thank-you-section h1 {
  color: #2c3e50;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.thank-you-section p {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.thank-you-section .thank-you-notice {
  font-size: 1rem;
  font-weight: bold;
  color: #d32f2f;
}

.thank-you-section .thank-you-notice a {
  color: #d32f2f;
  text-decoration: underline;
}

/* =============================================
    FAQ Page Styles
    ============================================= */
.faq-section {
  position: relative;
  overflow: hidden;
  padding: 80px 20px;
  max-width: 1000px;
  margin: 0 auto;
  z-index: 2;
}
.faq-section p {
  text-align: center;
  margin-bottom: 40px;
  color: #4b5563;
  font-size: 1.05rem;
}
.faq-list details {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffffc9;
  margin-bottom: 15px;
  backdrop-filter: blur(6px);
  transition: box-shadow 0.25s ease;
}
.faq-list details[open] {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px 20px;
  position: relative;
  list-style: none;
  font-size: 1.05rem;
}
.faq-list summary::after {
  content: '▸';
  position: absolute;
  right: 20px;
  transition: transform 0.25s ease;
}
.faq-list details[open] summary::after {
  transform: rotate(90deg);
}
.faq-list div {
  padding: 0 20px 18px 20px;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-list details[open] div {
  max-height: 400px;
}
.faq-section h3 {
  margin-bottom: 12px;
}

/* =============================================
    Styles for Catalog & Image Modal (catalogo.js)
    ============================================= */

/* --- Main Image Modal --- */

/* 1. Hide the modal by default. */
.image-modal {
  display: none;
  /* Note: Your other .image-modal styles (position, z-index, etc.) remain unchanged. */
}

/* 2. When catalogo.js adds the .modal-open class, display the modal. */
.image-modal.modal-open {
  display: flex;
}

/* 3. Hide the previous/next navigation buttons inside the modal by default. */
.image-modal .modal-prev,
.image-modal .modal-next {
  display: none;
}

/* 4. If the modal has multiple images, catalogo.js adds .has-multiple-images, which shows the buttons. */
.image-modal.has-multiple-images .modal-prev,
.image-modal.has-multiple-images .modal-next {
  display: block;
}


/* --- Product Card Image Slider --- */

/* 1. Hide the previous/next navigation buttons on the product card sliders by default. */
.product-image-slider .slider-prev,
.product-image-slider .slider-next {
  display: none;
}

/* 2. If a product has multiple images, catalogo.js adds .has-multiple-images, which shows the buttons. */
.product-image-slider.has-multiple-images .slider-prev,
.product-image-slider.has-multiple-images .slider-next {
  display: block;
}



/* =============================================
    Media Queries (Responsive Design)
    ============================================= */

/* Tablet & Mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    color: var(--highlight-color);
    margin-left: 2.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: flex-start;
    width: 200px;
    padding: 1rem;
    gap: 1rem;
    z-index: 20;
  }

  .nav-links.active {
    display: flex;
    background-color: var(--primary-color);
    color: var(--highlight-color);
    z-index: 1000;
    outline: 3px;
  }

  .hero-overlay h1, .hero-overlay h2 {
    font-size: 2rem;
  }

  .hero-overlay p {
    font-size: 1rem;
  }

  .logo img {
    height: 30px;
  }

  .logo span {
    font-size: 1.2rem;
  }

  .about p,
  .products p,
  .contact p {
    padding: 0 1rem;
  }

  .product-intro {
    padding: 0 1rem;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .product-card {
    padding: 1rem;
  }
  /* Unify heading sizes on mobile for consistency */
  .about h2, .products h1, .products h2, .contact h2, .faq-section h1, .faq-section h2 {
    font-size: 2rem;
  }
}

/* Product Grid Breakpoints */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-form {
    margin-left: 0; /* Removed !important */
  }
  /* Hide hummingbird animation on smaller screens to prevent overflow */
  .hummingbird-container {
    display: none;
  }
}
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

