/* Base styles */
:root {
  --primary-color: #5a7247; /* Green from logo */
  --secondary-color: #f0e6d2; /* Cream color */
  --accent-color: #e6c619; /* Yellow accent */
  --text-color: #333333;
  --light-text: #ffffff;
  --footer-bg: #4a5f3a; /* Darker green for footer */
}

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

body {
  font-family: 'Arial', sans-serif;
  color: var(--text-color);
  background-color: var(--secondary-color);
  line-height: 1.6;
}

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

/* Header styles */
header {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  width: 150px;
  height: auto;
}

/* Navigation styles */
nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  color: var(--light-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: var(--accent-color);
}

/* Language selector */
.language-selector {
  display: flex;
  align-items: center;
}

.language-selector button {
  background: none;
  border: none;
  color: var(--light-text);
  cursor: pointer;
  margin-left: 0.5rem;
  font-weight: 500;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.language-selector button.active {
  opacity: 1;
  text-decoration: underline;
}

.language-selector button:hover {
  opacity: 1;
}

/* Flag icons for language selector */
.flag-icon {
  display: inline-block;
  width: 1.5em;
  height: 1em;
  margin-right: 0.3em;
  vertical-align: middle;
  background-size: cover;
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(0,0,0,0.15);
}
.flag-icon-br {
  background-image: url('../images/flag-br.png');
}
.flag-icon-es {
  background-image: url('../images/flag-es.png');
}
.flag-icon-gb {
  background-image: url('../images/flag-gb.png');
}
.flag-icon-en {
  background-image: url('../images/flag-en.png');
}

/* Main content */
main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Footer styles */
footer {
  background-color: var(--footer-bg);
  color: var(--light-text);
  padding: 2rem 0;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--light-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--light-text);
  font-size: 1.2rem;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive styles */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  nav ul {
    margin-top: 1rem;
    justify-content: center;
  }
  
  nav ul li {
    margin: 0 0.75rem;
  }
  
  .language-selector {
    margin-top: 1rem;
    justify-content: center;
  }
  
  .footer-container {
    flex-direction: column;
  }
}

/* Desktop (default) */
.products-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(4, 1fr);
}

/* Tablet grande (≤1024px): también 4 */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet pequena (≤768px): 2 */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Teléfono (≤480px): 2 */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    /*border: 2px solid red;*/
  }
}
/* Teléfono (≤380px): 1 */
@media (max-width: 380px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* Carousel styles */
.carousel {
  position: relative;
  overflow-x: hidden;
  overflow-y: hidden;
  height: 460px;
  margin-bottom: 2rem;
  width: 130%;
  left: -15%;
  right: 0;
  margin-left: 0;
  margin-right: 0;
  max-width: 110vw;
  display: flex;
  scroll-snap-type: x mandatory;
}

@media (max-width: 900px) {
  .carousel {
    width: 100%;
    left: 0;
    max-width: 100vw;
    margin-left: auto;
    margin-right: auto;
    height: 320px;
  }
  .carousel-content {
    padding: 1rem;
    max-width: 90vw;
  }
  .carousel-content h2 {
    font-size: 1.5rem;
  }
  .carousel-slide {
    height: 320px;
  }
}

@media (max-width: 600px) {
  .carousel {
    height: 220px;
  }
  .carousel-content {
    padding: 0.5rem;
    max-width: 98vw;
  }
  .carousel-content h2 {
    font-size: 1.1rem;
  }
  .carousel-slide {
    height: 220px;
  }
}

.carousel-slide {
  flex: 0 0 100%;
  height: 320px;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-content {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2rem;
  max-width: 600px;
  text-align: center;
  border-radius: 5px;
}

.carousel-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

/* Product styles */
.product-categories {
  margin-bottom: 2rem;
}

.category-title {
  color: var(--primary-color);
  font-size: 2rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.product-card {
  padding: 10px 8px;
  margin: 10px 6px;
  background: #bdc6b5;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  max-width: 150px;
  min-height: 180px;
  box-sizing: border-box;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.product-image.thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 0 auto 10px auto;
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.product-info p {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.product-price {
  margin-top: 1rem;
}

.product-price li {
  list-style: none;
  margin-bottom: 0.25rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #d4b617;
}

/* Contact page styles */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-info {
  margin-bottom: 2rem;
}

.contact-info h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-links {
  margin-top: 2rem;
}

.whatsapp-btn {
  background-color: #25D366;
  color: white;
}

.whatsapp-btn:hover {
  background-color: #128C7E;
}

.instagram-icon {
  font-size: 2rem;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.phone-icon {
  font-size: 1.3rem;
  color: #25D366;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Modal styles */
.modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem 2.5rem;
  max-width: 400px;
  width: 90vw;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
}
.close-modal:hover {
  color: #c00;
}

.modal-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

#modalTitle {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
#modalDesc {
  color: var(--text-color);
  margin-bottom: 1rem;
}
#modalPrices {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--primary-color);
  font-weight: bold;
}
#modalPrices li {
  margin-bottom: 0.3rem;
}
