/* ============================================
   EL WHISKY - Amber & Oak Design System
   elwhisky.es - Meta-Bewertungsportal
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Primary Colors */
  --color-primary-dark: #1C1410;
  --color-primary: #8B5E3C;
  --color-primary-light: #D4A76A;
  --color-accent-gold: #D4AF37;
  --color-bg: #FAF6F1;
  --color-text: #2C2016;
  --color-border: #E8DFD5;
  --color-white: #FFFFFF;

  /* Score Colors */
  --score-exceptional: #D4AF37;
  --score-excellent: #2D5016;
  --score-very-good: #3B7A1E;
  --score-good: #6B8E23;
  --score-acceptable: #CC7722;
  --score-below: #8B0000;

  /* Typography */
  --font-headline: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-score: 'Roboto Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --border-radius: 4px;
  --border-radius-lg: 8px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  color: var(--color-primary-dark);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: var(--space-md);
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

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

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

/* --- Sticky Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary-dark);
  border-bottom: 3px solid var(--color-accent-gold);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-white);
}

.site-logo:hover {
  color: var(--color-accent-gold);
}

.logo-icon {
  width: 36px;
  height: 36px;
  fill: var(--color-accent-gold);
}

.logo-text {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--color-white);
}

.logo-text .logo-suffix {
  font-size: 0.85rem;
  color: var(--color-primary-light);
  font-weight: 400;
  margin-left: 2px;
}

.logo-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-accent-gold);
  margin-top: 2px;
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.main-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #2C1E14 100%);
  color: var(--color-white);
  padding: var(--space-3xl) 0;
  text-align: center;
}

.hero h1 {
  color: var(--color-white);
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.hero p {
  color: var(--color-primary-light);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: 0.85rem;
  color: var(--color-primary);
}

.breadcrumbs a {
  color: var(--color-primary);
}

.breadcrumbs a:hover {
  color: var(--color-accent-gold);
}

.breadcrumbs span {
  color: var(--color-primary-light);
  margin: 0 var(--space-xs);
}

/* --- El Whisky Score Card --- */
.score-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom: 4px solid var(--color-accent-gold);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.score-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.score-badge {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.score-badge-number {
  font-family: var(--font-score);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1;
}

.score-badge-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.9);
  position: absolute;
  bottom: 12px;
}

/* Score color classes */
.score-exceptional { background: var(--score-exceptional); }
.score-excellent { background: var(--score-excellent); }
.score-very-good { background: var(--score-very-good); }
.score-good { background: var(--score-good); }
.score-acceptable { background: var(--score-acceptable); }
.score-below { background: var(--score-below); }

.score-breakdown {
  flex-grow: 1;
}

.score-breakdown h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.score-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  font-size: 0.85rem;
}

.score-bar-label {
  width: 140px;
  flex-shrink: 0;
  color: var(--color-text);
}

.score-bar-track {
  flex-grow: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.score-bar-value {
  width: 35px;
  text-align: right;
  font-family: var(--font-score);
  font-weight: 600;
  font-size: 0.85rem;
}

.score-label-text {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-top: var(--space-sm);
}

/* --- Quick Facts Table --- */
.quick-facts {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom: 4px solid var(--color-primary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.quick-facts h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}

.quick-facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.quick-fact {
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.quick-fact:nth-child(odd) {
  border-right: 1px solid var(--color-border);
}

.quick-fact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.quick-fact-value {
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  font-weight: 500;
}

/* --- Product Page Two-Column Layout --- */
.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
}

.product-sidebar {
  order: 1;
}

.product-main {
  order: 2;
}

.product-image {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.product-image img {
  max-height: 500px;
  margin: 0 auto;
}

/* --- Tasting Notes --- */
.tasting-notes {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom: 4px solid var(--color-primary-light);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.tasting-notes h2 {
  font-size: 1.35rem;
  margin-bottom: var(--space-lg);
}

.tasting-note {
  margin-bottom: var(--space-lg);
}

.tasting-note:last-child {
  margin-bottom: 0;
}

.tasting-note h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-gold);
  margin-bottom: var(--space-xs);
}

.tasting-note p {
  color: var(--color-text);
  margin-bottom: 0;
}

/* --- Flat Cards (with Bottom Border) --- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom: 3px solid var(--color-primary);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-bottom-color: var(--color-accent-gold);
}

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

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.card-title a {
  color: var(--color-primary-dark);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--color-accent-gold);
}

.card-meta {
  font-size: 0.8rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.card-score {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-score);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 2px 8px;
  border-radius: var(--border-radius);
  color: var(--color-white);
}

.card-text {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* --- Ranking Table --- */
.ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: var(--space-xl);
}

.ranking-table thead {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

.ranking-table th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-md) var(--space-lg);
  text-align: left;
}

.ranking-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.ranking-table tbody tr {
  background: var(--color-white);
  transition: background 0.15s ease;
}

.ranking-table tbody tr:hover {
  background: #FDF8F0;
}

.ranking-rank {
  font-family: var(--font-score);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-accent-gold);
  width: 40px;
}

.ranking-product {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.ranking-thumb {
  width: 50px;
  height: 65px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.ranking-name {
  font-family: var(--font-headline);
  font-size: 1rem;
}

.ranking-name a {
  color: var(--color-primary-dark);
}

.ranking-name a:hover {
  color: var(--color-accent-gold);
}

.ranking-detail {
  font-size: 0.85rem;
  color: var(--color-primary);
}

/* --- Donde Comprar (Affiliate) --- */
.donde-comprar {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom: 4px solid var(--color-accent-gold);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.donde-comprar h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-lg);
}

.shop-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-sm);
  transition: border-color 0.2s ease;
}

.shop-link:hover {
  border-color: var(--color-accent-gold);
}

.shop-name {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.shop-price {
  font-family: var(--font-score);
  font-weight: 700;
  color: var(--color-primary);
}

.btn-comprar {
  display: inline-block;
  background: var(--color-accent-gold);
  color: var(--color-primary-dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn-comprar:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* --- Related Products --- */
.related-products {
  margin: var(--space-2xl) 0;
}

.related-products h2 {
  margin-bottom: var(--space-lg);
}

/* --- FAQ Section --- */
.faq-section {
  margin: var(--space-2xl) 0;
}

.faq-section h2 {
  margin-bottom: var(--space-lg);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
}

.faq-item:first-of-type {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  font-family: var(--font-headline);
  font-size: 1.05rem;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
  cursor: default;
}

.faq-answer {
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --- Destileria Info Table --- */
.destileria-info {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-bottom: 4px solid var(--color-primary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
}

.destileria-info table {
  width: 100%;
  border-collapse: collapse;
}

.destileria-info th,
.destileria-info td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.destileria-info th {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  width: 35%;
  background: #FDF8F0;
}

/* --- Article Content --- */
.article-content {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.article-content h2 {
  margin-top: var(--space-2xl);
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content img {
  border-radius: var(--border-radius-lg);
  margin: var(--space-xl) 0;
}

.article-content blockquote {
  border-left: 4px solid var(--color-accent-gold);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  font-style: italic;
  color: var(--color-primary);
}

/* --- Homepage Sections --- */
.section {
  padding: var(--space-2xl) 0;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent-gold);
}

.section-subtitle {
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: var(--space-xl);
}

/* --- Top Rated Strip --- */
.top-rated-strip {
  background: var(--color-primary-dark);
  padding: var(--space-xl) 0;
  overflow-x: auto;
}

.top-rated-strip h2 {
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.top-rated-scroll {
  display: flex;
  gap: var(--space-lg);
  padding-bottom: var(--space-sm);
}

.top-rated-item {
  flex-shrink: 0;
  width: 200px;
  text-align: center;
}

.top-rated-item img {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin: 0 auto var(--space-sm);
}

.top-rated-item .card-title {
  color: var(--color-white);
  font-size: 0.9rem;
}

.top-rated-item .card-title a {
  color: var(--color-white);
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-col h4 {
  color: var(--color-accent-gold);
  font-family: var(--font-headline);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

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

.footer-col li {
  margin-bottom: var(--space-xs);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-decoration: none;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Prose Content --- */
.prose p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.prose h2 {
  margin-top: var(--space-2xl);
}

.prose h3 {
  margin-top: var(--space-xl);
}

.prose ul, .prose ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.prose li {
  margin-bottom: var(--space-xs);
}

.prose img {
  border-radius: var(--border-radius-lg);
  margin: var(--space-xl) 0;
}

/* --- Schema / SEO hidden --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Media Queries --- */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

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

  .product-layout {
    grid-template-columns: 350px 1fr;
  }

  .product-sidebar {
    order: 1;
  }

  .product-main {
    order: 2;
  }

  h1 { font-size: 2.5rem; }
  .hero h1 { font-size: 3rem; }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    flex-direction: column;
    padding: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav a {
    padding: var(--space-md);
    width: 100%;
  }

  .header-inner {
    padding: var(--space-sm) var(--space-md);
  }

  .score-card-header {
    flex-direction: column;
    text-align: center;
  }

  .score-bar-label {
    width: 100px;
  }

  .ranking-table {
    display: block;
    overflow-x: auto;
  }

  .quick-facts-grid {
    grid-template-columns: 1fr;
  }

  .quick-fact:nth-child(odd) {
    border-right: none;
  }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .donde-comprar, .related-products {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    break-inside: avoid;
  }
}
