/* Base Styles */
:root {
  --primary-color: #E1D6BC;
  --primary-dark: #C9BEA3;
  --primary-light: #F4EEE0;
  --text-dark: #34302D;
  --text-light: #6B6560;
  --white: #FFFFFF;
  --black: #111111;
  --accent: #A67E5B;
  --accent-light: #D2B48C;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  --border-radius: 4px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Raleway', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.8rem;
}

p {
  margin-bottom: var(--spacing-sm);
  font-weight: 300;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-light);
}

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-md); /* Reducido de --spacing-lg a --spacing-md */
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background-color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background-color: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  text-align: center;
}

.btn:hover {
  background-color: var(--accent-light);
  color: var(--text-dark);
  transform: translateY(-2px);
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: var(--spacing-sm) 0;
}

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

.logo img {
  height: 50px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: var(--spacing-md);
}

nav ul li a {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

nav ul li a:hover::after {
  width: 100%;
}

mobile-menu-btn {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  margin: 2px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--spacing-xl) 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  /* Transición de imagen de fondo más suave */
  transition: background-image 1.5s cubic-bezier(0.4, 0, 0.2, 1); 
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  width: 100%;
  max-width: 800px;
  text-align: center;
  padding: 0 var(--spacing-md);
  color: var(--white);
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  margin-bottom: var(--spacing-sm);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hero Slideshow Styles */
.hero-slide-caption {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--white);
  padding: 8px 15px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  z-index: 2;
  opacity: 0;
  /* Transición de opacidad más suave para la leyenda */
  transition: opacity 0.8s ease-in-out; 
}

.hero-slide-caption.active {
  opacity: 1;
}

/* Slideshow Indicators */
.slideshow-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.slideshow-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--white);
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slideshow-indicator.active {
  opacity: 1;
  transform: scale(1.2);
  background-color: var(--accent);
}

/* Placeholder Styles */
.placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--accent-light);
  color: var(--white);
  font-size: 2rem;
  height: 200px;
}

/* Gallery Section */
.gallery {
  padding: var(--spacing-lg) 0; /* Reducido de --spacing-xl a --spacing-lg */
  background-color: var(--primary-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: var(--spacing-md);
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  position: relative;
  background-color: var(--white);
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-info {
  padding: var(--spacing-sm);
  background-color: var(--white);
}

.gallery-item-info h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.2rem; /* Ajustado para consistencia, subordinado a h2 */
  color: var(--text-dark);
  font-weight: 600; /* Un poco menos bold que el h2 general */
}

.gallery-item-info p {
  color: var(--text-light);
  font-size: 0.9rem; /* Mantenido para info secundaria, legible */
  margin-bottom: var(--spacing-xs);
  line-height: 1.5;
}

.gallery-item-info p strong {
  color: var(--text-dark);
  font-weight: 500; /* Ajustado para que no sea excesivamente bold */
}

.gallery-item-info .artwork-description {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: var(--spacing-sm);
  font-style: italic;
  line-height: 1.4; /* Ajuste para mejor legibilidad */
}

/* Estilo para el botón Ver más */
.gallery-more {
  text-align: center;
  margin-top: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
}

/* Estilos para centrar el botón en la sección de trayectoria y exposiciones */
.trajectory-more {
  text-align: center;
  margin-top: var(--spacing-md);
}

/* Featured Products Carousel */
.carousel-info {
  text-align: center;
  font-style: italic;
  margin-bottom: var(--spacing-sm);
  color: var(--text-light);
}

.featured-products-carousel {
  width: 100%;
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  min-height: 150px; /* Reducido a 150px */
}

.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.products-slider {
  display: flex;
  overflow-x: hidden; /* Ocultar la barra de scroll horizontal */
  scroll-behavior: smooth;
  gap: var(--spacing-sm);
  width: 100%;
  padding: var(--spacing-sm) 0;
  min-height: 150px; /* Reducido a 150px */
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  opacity: 0.8;
}

.carousel-button:hover {
  opacity: 1;
  background-color: var(--accent-light);
}

.carousel-button.prev {
  left: 10px;
}

.carousel-button.next {
  right: 10px;
}

.product-card {
  flex: 0 0 auto;                 /* ancho fijo según contenido */
  scroll-snap-align: start;       /* snap a cada tarjeta */
  min-width: 180px;               /* Ajustado a 180px */
  max-width: 220px;               /* Ajustado a 220px */
  height: 150px;                  /* Ajustado a 150px */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  background-color: var(--white);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 992px) {
  .product-card {
    flex: 0 0 calc(33.33% - var(--spacing-sm));
  }
}

@media (max-width: 768px) {
  .product-card {
    flex: 0 0 calc(50% - var(--spacing-sm));
  }
}

@media (max-width: 576px) {
  .product-card {
    flex: 0 0 calc(100% - var(--spacing-sm));
  }
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
  max-height: 90%; /* Ajustado para que quepa en la tarjeta */
  max-width: 90%; /* Ajustado para que quepa en la tarjeta */
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* Override para que las imágenes del carrusel se muestren */
.featured-products-carousel .products-slider .product-card .product-image {
  position: static !important;
  width: auto !important;
  height: auto !important;
  opacity: 1 !important;
  object-fit: contain !important;
}

.product-info {
  padding: var(--spacing-sm);
  text-align: center;
}

.product-name {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-dark);
  font-weight: 500;
}

.product-price {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.product-category {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
}

.products-slider-loading {
  width: 100%;
  text-align: center;
  padding: var(--spacing-md);
  color: var(--text-light);
}

/* About Section */
.about {
  padding: var(--spacing-lg) 0; /* Reducido de --spacing-xl a --spacing-lg */
  background-color: var(--primary-light);
}

.about .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md); /* Reducido de --spacing-lg a --spacing-md */
}

.about-content {
  flex: 1;
}

.about-content h2 {
  text-align: left;
}

.about-content h2::after {
  left: 0;
  transform: none;
}

.about-content p {
  margin-bottom: var(--spacing-sm);
  text-align: justify;
}

.about-image {
  flex: 1;
  text-align: center;
}

.about-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Store Section */
.store {
  padding: var(--spacing-lg) 0; /* Reducido de --spacing-xl a --spacing-lg */
  background-color: var(--white); /* Cambiado de var(--primary-light) a var(--white) */
}

.store-description {
  text-align: justify;
  max-width: 1000px;
  margin: 0 auto var(--spacing-xs); /* Reduced bottom margin */
  line-height: 1.8;
}

.store-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.store-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
  width: 100%;
  margin-bottom: var(--spacing-sm); /* Reducido de --spacing-lg a --spacing-sm */
}

.store-product {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  background-color: var(--white);
}

.store-product:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.product-image-container {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
  opacity: 0;
}

.product-image.active {
  opacity: 1;
}

.product-info {
  padding: var(--spacing-sm);
  background-color: var(--white);
  text-align: center;
}

.product-info h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.1rem;
}

.product-info p {
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
  font-size: 0.9rem;
}

.product-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-link {
  display: none;
  padding: 8px 12px;
  background-color: var(--primary-color);
  color: var(--text-dark);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.product-link.active {
  display: inline-block;
}

.product-link:hover {
  background-color: var(--accent);
  color: var(--white);
}

.store-cta {
  text-align: center;
  margin-top: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
}

/* Responsive styles for store section */
@media (max-width: 1200px) {
  .store-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .store-products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .store-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .store-products {
    grid-template-columns: 1fr;
  }
}

/* Trayectoria Section */
.trajectory {
  padding: var(--spacing-lg) 0 var(--spacing-sm) 0; /* Reducido de --spacing-xl a --spacing-lg en la parte superior */
  background-color: var(--white);
}

.trajectory-content {
  max-width: 800px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  padding: 1rem 0; /* Reducido de 2rem a 1rem */
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  width: 2px;
  background-color: var(--accent);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 0.25rem; /* Reducido aún más */
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--accent);
  border: 4px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.timeline-content {
  padding: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
  background-color: var(--primary-light);
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
  margin-bottom: var(--spacing-xs);
  color: var(--accent);
  font-size: 1.4rem;
}

.timeline-content p {
  margin-bottom: 0;
}

.timeline-item-hidden {
  display: none;
}

/* Media queries for timeline */
@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
  }
  
  .timeline-item {
    padding-left: 0;
    width: 50%;
    margin-bottom: 0.25rem; /* Asegurar consistencia en responsive */
  }
  
  .timeline-item:nth-child(odd) {
    padding-right: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
    text-align: right;
  }
  
  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
  }
  
  .timeline-dot {
    left: auto;
    right: -10px;
  }
  
  .timeline-item:nth-child(even) .timeline-dot {
    right: auto;
    left: -10px;
  }
}

/* Contact Section */
.contact {
  padding: var(--spacing-lg) 0; /* Reducido de --spacing-xl a --spacing-lg */
  background-color: var(--white);
}

.contact-wrapper {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

.contact-info, .contact-form {
  flex: 1;
}

.contact-info h3 {
  margin-bottom: var(--spacing-sm);
}

.contact-details {
  margin-top: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.contact-item .icon {
  font-size: 1.5rem;
  margin-right: var(--spacing-sm);
  color: var(--accent);
}

.contact-item p {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: var(--spacing-sm);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: 'Raleway', sans-serif;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(166, 126, 91, 0.2);
}

/* Contact Simple Section */
.contact-simple {
  padding: var(--spacing-lg) 0; /* Reducido de --spacing-xl a --spacing-lg */
  background-color: var(--white);
}

.contact-details-wrapper {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-details-wrapper p {
  margin-bottom: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
  font-size: 1.1rem;
  color: var(--text-light);
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.1rem;
}

.contact-item i {
  color: var(--accent);
  font-size: 1.5rem;
}

.contact-item p {
  margin-bottom: 0;
}

.contact-item a {
  color: var(--text-dark);
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: var(--text-dark);
  padding: var(--spacing-md) 0;
  border-top: 1px solid #ddd;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.footer-logo h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 0;
}

.footer-logo img {
  height: 35px;
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #FFFFFF;
  transition: var(--transition);
}

.social-icon i {
  font-size: 20px;
  color: var(--accent);
  transition: var(--transition);
}

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

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

.footer-copyright {
  text-align: center;
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Responsive Styles */
@media (max-width: 992px) {
  h1 {
    font-size: 2.8rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    width: 100%;
    padding: var(--spacing-sm); /* Reducido de --spacing-md a --spacing-sm */
  }
  
  .about .container {
    flex-direction: column;
  }
  
  .about-content, .about-image {
    width: 100%;
  }
  
  .about-content h2 {
    text-align: center;
  }
  
  .about-content h2::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .about-image {
    margin-top: var(--spacing-md);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  header {
    padding: var(--spacing-sm) 0;
  }
  
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: var(--spacing-sm) 0;
  }
  
  nav ul.active {
    display: flex;
  }
  
  nav ul li {
    margin: 0;
    text-align: center;
    padding: var(--spacing-xs) 0;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .contact-wrapper {
    flex-direction: column;
  }
  
  .contact-info, .contact-form {
    width: 100%;
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--spacing-md);
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .section-title {
    margin-bottom: var(--spacing-md);
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}