/* CSS Design System for El Legado Premium Wine Menu */

:root {
  /* Colors */
  --gold-primary: #c1a571;
  --gold-dark: #c6a465;
  --bg-dark: #2d2a26;
  --bg-dark-card: #3a3632;
  --bg-light: #f9f3e4;
  --bg-light-card: #f7e7c1;
  
  --text-light-primary: #fefefe;
  --text-light-secondary: #d4cebd;
  --text-dark-primary: #2d2a26;
  --text-dark-secondary: #5c5954;
  
  /* Spacing */
  --gap-mobile: 0.75rem;
  --gap-desktop: 1.5rem;
  
  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset and Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-light-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Header & Language Bar */
.lang-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(45, 42, 38, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 0;
}

.lang-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  flex-wrap: wrap;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-light-secondary);
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn span {
  font-size: 1rem;
}

.lang-btn:hover {
  border-color: var(--gold-primary);
  color: var(--text-light-primary);
  background: rgba(193, 165, 113, 0.08);
}

.lang-btn.active {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #2d2a26;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(193, 165, 113, 0.3);
}

/* Hero / Brand Section */
.hero-brand {
  padding: 5.5rem 1.5rem 2.5rem 1.5rem;
  text-align: center;
  background-color: #f4efe6;
  border-bottom: 1px solid rgba(45, 42, 38, 0.08);
}

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

.brand-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dark-primary);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-dark-primary);
  margin-bottom: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.brand-desc {
  font-size: 1rem;
  color: var(--text-dark-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.7;
}

/* Collection Layout */
.collection-section {
  padding: 4rem 1.5rem;
  transition: background-color 0.4s ease;
}

/* Espumosos Section: Dark Theme */
.collection-section.dark-theme {
  background-color: var(--bg-dark);
  color: var(--text-light-primary);
}

/* Tranquilos Section: Light Theme */
.collection-section.light-theme {
  background-color: var(--bg-light);
  color: var(--text-dark-primary);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Left Column Info */
.collection-info {
  position: sticky;
  top: 6rem;
}

.collection-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.dark-theme .collection-title {
  color: var(--gold-primary);
}

.light-theme .collection-title {
  color: #530a11;
}

.collection-highlight {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 2rem;
  opacity: 0.85;
}

.collection-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.collection-features li {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.collection-features .icon {
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50px;
}

.dark-theme .collection-features .icon {
  background: rgba(255, 255, 255, 0.05);
}

.light-theme .collection-features .icon {
  background: rgba(0, 0, 0, 0.05);
}

.feature-text {
  font-size: 0.95rem;
  font-weight: 400;
}

.dark-theme .feature-text {
  color: var(--text-light-secondary);
}

.light-theme .feature-text {
  color: var(--text-dark-secondary);
}

/* Wines Grid & Cards */
.wines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-desktop);
}

.wine-card {
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme .wine-card {
  background: var(--bg-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.light-theme .wine-card {
  background: var(--bg-light-card);
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* Premium Arched Wrapper for Mockup Image */
.wine-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 120px 120px 16px 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme .wine-image-wrapper {
  border: 1px solid rgba(229, 193, 88, 0.25);
}

.light-theme .wine-image-wrapper {
  border: 1px solid rgba(156, 122, 60, 0.2);
}

.wine-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects */
.wine-card:hover {
  transform: translateY(-8px);
}

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

.dark-theme .wine-card:hover {
  border-color: rgba(229, 193, 88, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.light-theme .wine-card:hover {
  border-color: rgba(156, 122, 60, 0.3);
  box-shadow: 0 12px 30px rgba(156, 122, 60, 0.08);
}

/* Details Section */
.wine-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.wine-code {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  display: inline-block;
}

.dark-theme .wine-code {
  color: var(--gold-primary);
}

.light-theme .wine-code {
  color: #530a11;
}

.wine-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.dark-theme .wine-name {
  color: var(--gold-primary);
}

.light-theme .wine-name {
  color: var(--gold-dark);
}

.wine-desc {
  font-size: 0.9rem;
  min-height: 2.7rem;
}

.dark-theme .wine-desc {
  color: var(--text-light-secondary);
}

.light-theme .wine-desc {
  color: var(--text-dark-secondary);
}

/* Pairing Info */
.wine-pairing {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed;
  font-size: 0.85rem;
}

.dark-theme .wine-pairing {
  border-color: rgba(255, 255, 255, 0.1);
}

.light-theme .wine-pairing {
  border-color: rgba(0, 0, 0, 0.1);
}

.pairing-label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.dark-theme .pairing-label {
  color: var(--gold-primary);
}

.light-theme .pairing-label {
  color: #530a11;
}

.pairing-content {
  font-style: italic;
}

.dark-theme .pairing-content {
  color: var(--text-light-secondary);
}

.light-theme .pairing-content {
  color: var(--text-dark-secondary);
}

/* Footer Styling */
.main-footer {
  padding: 4rem 1.5rem;
  text-align: center;
  background-color: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

.footer-desc {
  color: var(--text-light-secondary);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-light-primary);
  font-weight: 500;
  transition: color 0.3s;
}

.footer-link:hover {
  color: var(--gold-primary);
}

.footer-links .separator {
  color: rgba(255, 255, 255, 0.2);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
}

/* Responsive Rules */

/* Tablets and small desktops */
@media (max-width: 1024px) {
  .section-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .collection-info {
    position: relative;
    top: 0;
    text-align: center;
  }
  
  .collection-features {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
}

/* Phones (Optimized Mobile Gapping and Carousel Snap) */
@media (max-width: 600px) {
  .lang-container {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 1rem;
    scrollbar-width: none;
  }
  
  .lang-container::-webkit-scrollbar {
    display: none;
  }
  
  .lang-btn {
    flex: 0 0 auto;
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  .hero-brand {
    padding: 5rem 1rem 1.5rem 1rem;
  }
  
  .brand-title {
    font-size: 2.25rem;
  }
  
  .collection-section {
    padding: 3rem 0; /* Full width scroll viewport container */
  }
  
  .collection-info {
    padding: 0 1.25rem;
  }
  
  .collection-title {
    font-size: 1.75rem;
  }
  
  /* Horizontal scroll snap layout */
  .wines-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1rem 1.25rem 2rem 1.25rem;
    gap: var(--gap-mobile);
    scrollbar-width: none; /* Hide standard firefox scrollbar */
  }
  
  .wines-grid::-webkit-scrollbar {
    display: none; /* Hide chrome/safari scrollbar */
  }
  
  .wine-card {
    flex: 0 0 82%; /* Cards occupy 82% of screen width so the next card peeks */
    scroll-snap-align: center;
    padding: 0.85rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }
  
  .collection-features {
    flex-direction: column;
    align-items: flex-start;
    max-width: 320px;
    margin: 0 auto 1.5rem auto;
    padding: 0 1rem;
  }
  
  .collection-features li {
    font-size: 0.9rem;
  }
}

/* Premium Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #c6a465 0%, #c1a571 100%);
  color: #000000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(193, 165, 113, 0.4);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.whatsapp-float:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 30px rgba(193, 165, 113, 0.6);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: #000000;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 54px;
    height: 54px;
  }
  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}

/* Brand and Footer Logo Styles */
.brand-logo-wrapper {
  margin: 0 auto 1.5rem auto;
  display: flex;
  justify-content: center;
}

.brand-logo {
  max-width: 195px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.footer-logo-wrapper {
  margin: 0 auto 1.5rem auto;
  display: flex;
  justify-content: center;
}

.footer-logo {
  max-width: 120px;
  width: 100%;
  height: auto;
  opacity: 0.85;
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.footer-logo:hover {
  opacity: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Section Intro (for relocated main description) */
.section-intro {
  max-width: 800px;
  margin: 0 auto 2.5rem auto;
  text-align: center;
  padding: 0 1.5rem;
}

.intro-desc {
  font-size: 1.15rem;
  color: var(--text-light-secondary);
  font-weight: 300;
  line-height: 1.8;
  font-family: var(--font-sans);
  letter-spacing: 0.03em;
}

@media (max-width: 768px) {
  .section-intro {
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  .intro-desc {
    font-size: 1rem;
    line-height: 1.6;
  }
}

/* Tasting Sheet Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(18, 16, 14, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.modal-body {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #fcfbfa; /* Matches cata sheet white bg */
}

.modal-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.modal-close-btn {
  position: absolute;
  top: -3.5rem;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}

.modal-close-btn:hover {
  color: var(--gold-primary);
  background-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Adjust close button on mobile viewports */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 1rem;
  }
  
  .modal-close-btn {
    top: 1rem;
    right: 1rem;
    color: #2d2a26;
    background-color: rgba(0, 0, 0, 0.08);
    z-index: 2010;
  }
  
  .modal-close-btn:hover {
    color: #530a11;
    background-color: rgba(0, 0, 0, 0.15);
  }
  
  .modal-img {
    max-height: 80vh;
  }
}

/* Tasting Sheet Action Button */
.wine-action {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
  padding-top: 1rem;
}

.view-ficha-btn {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(193, 165, 113, 0.35);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

.dark-theme .view-ficha-btn:hover {
  background-color: var(--gold-primary);
  color: #2d2a26;
  border-color: var(--gold-primary);
  box-shadow: 0 4px 12px rgba(193, 165, 113, 0.25);
}

.light-theme .view-ficha-btn {
  color: #530a11;
  border-color: rgba(83, 10, 17, 0.35);
}

.light-theme .view-ficha-btn:hover {
  background-color: #530a11;
  color: #fefefe;
  border-color: #530a11;
  box-shadow: 0 4px 12px rgba(83, 10, 17, 0.2);
}



