/* Rock'n'Roll Beer Theme */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@400;700;900&display=swap');

:root {
  /* Primati Ale Logo Colors */
  --primary: #f5a623;
  --secondary: #d63384;
  --accent: #2ecc71;
  --accent-cyan: #17a2b8;
  --danger: #e74c3c;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Montserrat', sans-serif;

  /* Theme transition */
  --transition-theme: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Theme (default) */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1f1f1f;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #bbbbbb;
  --text-muted: #888888;
  --border-color: #333333;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8e8e8;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6a6a6a;
  --border-color: #dddddd;
}

/* Legacy variable mapping */
body {
  --dark: var(--bg-primary);
  --darker: #050505;
  --light: var(--text-primary);
  --gray: var(--bg-secondary);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--dark);
  background-image: url('assets/cave.jpg');
  background-attachment: fixed;
  /* FIXE - ne défile pas */
  background-size: cover;
  /* Couvre tout l'écran */
  background-position: center center;
  background-repeat: no-repeat;
  /* Pas de répétition */
  color: var(--light);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--darker);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.95);
  /* Plus opaque pour pas de teinte */
  z-index: 1000;
  border-bottom: 2px solid var(--gray);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 80px;
  width: auto;
  transition: all 0.3s ease;
  border-radius: 8px;
}

/* Glow effect on hover */
.logo-link {
  position: relative;
  display: inline-block;
}

.logo-link:hover img {
  box-shadow:
    0 0 10px var(--primary),
    0 0 20px var(--primary),
    0 0 30px rgba(245, 166, 35, 0.5);
  transform: scale(1.05);
}

/* Speech bubble tooltip */
.logo-tooltip {
  position: absolute;
  left: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s ease;
  z-index: 1000;
  border: 1px solid var(--primary);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Arrow pointing left */
.logo-tooltip::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: var(--primary);
}

.logo-tooltip::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: rgba(0, 0, 0, 0.9);
}

/* Show tooltip on hover */
.logo-link:hover .logo-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.logo-tooltip strong {
  color: var(--primary);
  font-size: 1rem;
}

.logo:hover {
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.backup-btn {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border: none;
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.backup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}

.backup-btn:active {
  transform: translateY(0);
}

.backup-btn.loading {
  background: #95a5a6;
  cursor: not-allowed;
  animation: pulse 1.5s infinite;
}

.backup-btn.success {
  background: linear-gradient(135deg, #f39c12, #f1c40f);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.burger-menu {
  width: 40px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  background: #333;
  padding: 8px;
  border-radius: 6px;
}

.burger-menu span {
  display: block;
  height: 4px;
  width: 100%;
  background: #008f39;
  /* Dark Green - feuillage foncé */
  border-radius: 4px;
  transition: 0.3s;
}

.burger-menu:hover span:nth-child(1) {
  width: 50%;
}

.burger-menu:hover span:nth-child(2) {
  width: 80%;
}

.burger-menu:hover span:nth-child(3) {
  width: 100%;
  background: #008f39;
}

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/cave.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.4) contrast(1.2) grayscale(0.2);
  z-index: -1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 40%, var(--dark) 100%);
}

.hero-content {
  text-align: center;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

h1 {
  font-family: var(--font-display);
  font-size: 8rem;
  line-height: 0.85;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 2rem;
  text-shadow: 4px 4px 0px var(--secondary);
}

h1 span {
  display: block;
  color: var(--primary);
  text-shadow: 4px 4px 0px var(--accent);
}

.cta-btn {
  display: inline-block;
  padding: 1rem 3rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--dark);
  background: var(--primary);
  text-decoration: none;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: 0.3s;
  clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%);
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: 0.5s;
}

.cta-btn:hover {
  background: var(--light);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 20px rgba(242, 255, 0, 0.4);
}

.cta-btn:hover::before {
  left: 100%;
}

/* Catalogue Section */
.catalogue {
  padding: 10rem 2rem 4rem;
  background: transparent;
  min-height: 100vh;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: 5rem;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.section-title span {
  color: var(--primary);
  /* Orange doré comme 'PRIMATI' */
  position: relative;
  display: inline-block;
  text-shadow: 2px 2px 0 var(--secondary);
  /* Ombre magenta */
}

.section-title span::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  transform: skewX(-15deg);
  z-index: -1;
  border-radius: 2px;
}

/* Style Filters (like Stock-app) */
/* Nouveau Conteneur Global pour le Header du Catalogue */
.catalogue-header {
  max-width: 1400px;
  margin: 0 auto 3rem;
  padding: 2rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  position: relative;
  z-index: 500;
}

.style-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
  /* Prend toute la largeur du parent */
  margin: 0;
  /* Plus de marge, géré par le gap du parent */
  padding: 0;
  /* Plus de padding ni de fond */
}

.style-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--gray);
  border: 1px solid #444;
  border-radius: 20px;
  color: #ccc;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.style-filter-btn:hover {
  border-color: #666;
  background: #2a2a2a;
  transform: translateY(-2px);
}

.style-filter-btn.active {
  background: #2a2a2a;
  border-color: var(--primary);
  color: var(--light);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(242, 255, 0, 0.2);
}

.style-filter-btn .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.style-filter-btn .count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #999;
}

.style-filter-btn.active .count {
  background: var(--primary);
  color: var(--dark);
}

/* Controls */
.controls {
  max-width: 1400px;
  width: 100%;
  margin: 0;
  /* Marge gérée par .catalogue-header */
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.search-box,
.filter-select {
  padding: 0.8rem 1.2rem;
  background: var(--gray);
  border: 2px solid #333;
  color: var(--light);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.3s;
}

.search-box {
  flex: 1;
  min-width: 250px;
}

.filter-select {
  min-width: 180px;
  cursor: pointer;
}

.search-box:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(242, 255, 0, 0.3);
}

.result-count {
  color: var(--primary);
  /* Orange doré */
  font-weight: 700;
  font-size: 1.2rem;
  margin-left: auto;
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.15), rgba(214, 51, 132, 0.1));
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(245, 166, 35, 0.3);
  text-shadow: 0 0 10px rgba(245, 166, 35, 0.3);
}

/* Custom Sort Dropdown */
.custom-sort-dropdown {
  position: relative;
  min-width: 200px;
  z-index: 9999;
}

.sort-toggle {
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: var(--gray);
  border: 2px solid #333;
  color: var(--light);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.sort-toggle:hover,
.sort-toggle:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(242, 255, 0, 0.3);
}

.sort-arrow {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.sort-toggle[aria-expanded="true"] .sort-arrow {
  transform: rotate(180deg);
}

.sort-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 2px solid #444;
  border-radius: 10px;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-height: 400px;
  overflow-y: auto;
}

.custom-sort-dropdown.open .sort-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Group Labels */
.sort-group-label {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  pointer-events: none;
}

/* Separators */
.sort-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, #444, transparent);
  margin: 0.5rem 1rem;
}

/* Sort Options */
.sort-option {
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sort-option:hover {
  background: rgba(255, 255, 255, 0.1);
  padding-left: 1.5rem;
}

/* Themed Colors */
.sort-name {
  color: #ffffff;
}

.sort-price {
  color: #f1c40f;
}

.sort-abv {
  color: #33Eaff;
}

.sort-random {
  color: #ff6b6b;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 193, 7, 0.1));
  font-weight: 700;
}

.sort-random:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 193, 7, 0.2));
}

/* Active Option */
.sort-option.active {
  background: rgba(245, 166, 35, 0.2);
  border-left: 3px solid var(--primary);
  font-weight: 700;
}

.sort-option.active::after {
  content: '✓';
  margin-left: auto;
  color: var(--primary);
}

/* Animated Arrows */
.arrow-anim {
  display: inline-block;
  transition: transform 0.3s ease;
}

.sort-option:hover .arrow-anim {
  animation: bounce-arrow 0.5s ease infinite;
}

@keyframes bounce-arrow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.beer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Beer Card Styles */
.beer-card {
  background: var(--gray);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #333;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.beer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: 0.4s;
}

.beer-card:hover {
  transform: translateY(-15px);
  background: #252525;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: #555;
}

.beer-card:hover::before {
  transform: scaleX(1);
}

.beer-card-img-container {
  height: 350px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.beer-card img {
  max-height: 100%;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
  transition: transform 0.5s ease;
  z-index: 2;
}

/* Blob Background behind beer */
.blob {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0;
  border-radius: 50%;
  filter: blur(20px);
  transition: 0.5s;
  transform: scale(0.5);
  z-index: 1;
}

.beer-card:hover .blob {
  opacity: 0.2;
  transform: scale(1.2);
}

.beer-card:hover img {
  transform: scale(1.1) rotate(3deg);
}

/* Brewery Logo Hover - 3x scale */
.brewery-logo {
  transition: transform 0.3s ease, z-index 0s;
  cursor: pointer;
}

.brewery-logo:hover {
  transform: scale(3) !important;
  z-index: 100 !important;
}

.beer-info {
  text-align: center;
  z-index: 2;
  width: 100%;
  flex-grow: 1;
  /* Prend tout l'espace restant */
  display: flex;
  flex-direction: column;
}

.beer-style {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--light);
  margin-bottom: 0;
  /* Marge gérée par .catalogue-header */
  text-transform: uppercase;
  line-height: 1;
}

.beer-name {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--light);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.beer-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #888;
}

.beer-meta span.abv {
  color: var(--secondary);
}

.beer-desc {
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.add-btn {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.8rem 2rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.3s;
  width: 100%;
  margin-top: auto;
  /* Toujours en bas de la carte */
}

.add-btn:hover {
  background: var(--primary);
  color: var(--dark);
}

/* Footer */
footer {
  background: var(--darker);
  padding: 3rem;
  text-align: center;
  border-top: 1px solid #333;
}

footer p {
  color: #666;
  font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */

/* Tablette */
@media (max-width: 1024px) {
  .beer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .section-title {
    font-size: 3.5rem;
  }

  .style-filters {
    gap: 0.5rem;
  }
}

/* Mobile Paysage / Petite Tablette */
@media (max-width: 768px) {
  header {
    padding: 0.5rem 1rem;
  }

  .logo img {
    height: 60px;
  }

  .section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
  }

  .catalogue {
    padding: 8rem 1rem 2rem;
  }

  .beer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .controls {
    flex-direction: column;
    gap: 0.8rem;
  }

  .search-box {
    width: 100%;
    min-width: unset;
  }

  .style-filters {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .style-filter-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .beer-card {
    padding: 1.5rem;
  }

  .beer-card-img-container {
    height: 250px;
  }

  .beer-name {
    font-size: 1.8rem;
  }

  .beer-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .add-btn {
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  header {
    padding: 0.3rem 0.8rem;
  }

  .logo img {
    height: 50px;
  }

  .burger-menu span {
    width: 20px;
  }

  .section-title {
    font-size: 2rem;
  }

  .catalogue {
    padding: 7rem 0.8rem 1.5rem;
  }

  .style-filter-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .style-filter-btn .dot {
    width: 8px;
    height: 8px;
  }

  .beer-card {
    padding: 1rem;
  }

  .beer-card-img-container {
    height: 200px;
  }

  .beer-name {
    font-size: 1.5rem;
  }

  .beer-desc {
    font-size: 0.85rem;
  }

  .add-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }
}

/* ========== NEW COMPONENTS ========== */

/* Accessibility - Screen Reader Only */
.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;
}

/* Hero Mini Section */
.hero-mini {
  padding: 120px 2rem 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.hero-logo {
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.main-title {
  font-family: var(--font-display);
  line-height: 1;
}

.title-small {
  display: block;
  font-size: 1.5rem;
  color: var(--text-secondary, #bbb);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.title-big {
  display: block;
  font-size: clamp(3rem, 10vw, 7rem);
  color: var(--text-primary, #fff);
  text-transform: uppercase;
}

.title-big .highlight {
  color: var(--primary);
  text-shadow: 3px 3px 0 var(--secondary);
}

.title-tagline {
  display: block;
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 15px;
  letter-spacing: 2px;
}

/* Cart & Wishlist Buttons in Header */
.cart-btn,
.wishlist-btn {
  background: transparent;
  border: 2px solid var(--border-color, #333);
  color: var(--text-primary, #fff);
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.cart-btn:hover,
.wishlist-btn:hover {
  border-color: var(--primary);
  background: rgba(245, 166, 35, 0.1);
}

.cart-count,
.wishlist-count {
  background: var(--primary);
  color: #000;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-secondary, #1f1f1f);
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu.open {
  right: 0;
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-primary, #fff);
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s;
}

.close-menu:hover {
  color: var(--primary);
}

.menu-nav {
  padding: 80px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-link {
  color: var(--text-primary, #fff);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 15px 20px;
  border-radius: 10px;
  transition: all 0.3s;
}

.menu-link:hover {
  background: var(--bg-tertiary, #2a2a2a);
  color: var(--primary);
  transform: translateX(5px);
}

.menu-link.social {
  font-size: 1rem;
  color: var(--text-secondary, #bbb);
}

.menu-nav hr {
  border: none;
  border-top: 1px solid var(--border-color, #333);
  margin: 15px 0;
}

.menu-footer {
  margin-top: auto;
  padding: 30px;
  border-top: 1px solid var(--border-color, #333);
}

.theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: var(--bg-tertiary, #2a2a2a);
  border: 2px solid var(--border-color, #333);
  border-radius: 10px;
  color: var(--text-primary, #fff);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.theme-toggle:hover {
  border-color: var(--primary);
}

.theme-icon {
  font-size: 1.3rem;
}

/* Product Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary, #1f1f1f);
  border-radius: 20px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color, #333);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-primary, #fff);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--primary);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 40px;
}

.modal-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary, #2a2a2a);
  border-radius: 15px;
  padding: 20px;
}

.modal-image img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-style {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text-primary, #fff);
  line-height: 1.1;
}

.modal-brewery {
  color: var(--text-muted, #888);
  font-style: italic;
}

.modal-stats {
  display: flex;
  gap: 20px;
  font-weight: 700;
}

.modal-abv {
  color: var(--accent-cyan);
}

.modal-price {
  color: var(--primary);
  font-size: 1.5rem;
}

.modal-desc {
  color: var(--text-secondary, #bbb);
  line-height: 1.6;
  flex-grow: 1;
}

.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  flex: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #e09b1d);
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(245, 166, 35, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #c0392b;
}

/* Cart Sidebar */
.cart-sidebar,
.wishlist-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-secondary, #1f1f1f);
  z-index: 2500;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.cart-sidebar:not([hidden]),
.wishlist-sidebar:not([hidden]) {
  right: 0;
}

.cart-header,
.wishlist-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color, #333);
}

.cart-header h3,
.wishlist-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary, #fff);
}

.cart-close,
.wishlist-close {
  background: transparent;
  border: none;
  color: var(--text-primary, #fff);
  font-size: 2rem;
  cursor: pointer;
}

.cart-close:hover,
.wishlist-close:hover {
  color: var(--primary);
}

.cart-items,
.wishlist-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item,
.wishlist-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: var(--bg-tertiary, #2a2a2a);
  border-radius: 10px;
  margin-bottom: 10px;
}

.cart-item-img,
.wishlist-item-img {
  width: 60px;
  height: 80px;
  object-fit: contain;
  background: var(--bg-secondary, #1f1f1f);
  border-radius: 5px;
}

.cart-item-info,
.wishlist-item-info {
  flex: 1;
}

.cart-item-name,
.wishlist-item-name {
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin-bottom: 5px;
}

.cart-item-price {
  color: var(--primary);
  font-weight: 700;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color, #333);
  background: transparent;
  color: var(--text-primary, #fff);
  border-radius: 5px;
  cursor: pointer;
}

.qty-btn:hover {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

.cart-item-remove,
.wishlist-item-remove {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.2rem;
  align-self: flex-start;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color, #333);
}

.cart-total {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
}

.cart-total span {
  color: var(--primary);
}

.cart-empty,
.wishlist-empty {
  text-align: center;
  color: var(--text-muted, #888);
  padding: 40px 20px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 15px 25px;
  background: var(--bg-secondary, #1f1f1f);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  color: var(--text-primary, #fff);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 350px;
}

.toast.success {
  border-color: var(--accent);
}

.toast.error {
  border-color: var(--danger);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(50px);
  }
}

/* About & Contact Sections */
.about-section,
.contact-section {
  padding: 80px 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-section h2,
.contact-section h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.about-section p,
.contact-section p {
  color: var(--text-secondary, #bbb);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 15px;
}

/* Wishlist Button on Cards */
.beer-card-wishlist {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s;
  z-index: 10;
}

.beer-card-wishlist:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.beer-card-wishlist.active {
  background: rgba(0, 0, 0, 0.5);
  /* Only heart emoji is red, not the background */
}

/* Modal Responsive */
@media (max-width: 768px) {
  .modal-body {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .modal-image {
    max-height: 250px;
  }

  .modal-title {
    font-size: 1.8rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .cart-btn span,
  .wishlist-btn span {
    display: none;
  }

  .header-actions {
    gap: 0.8rem;
  }
}

/* Overlay when sidebars are open */
.overlay-active::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1999;
}

/* ========== FLOATING BREWERY LOGOS ========== */
.floating-logos-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.floating-logo {
  position: absolute;
  width: 50px;
  height: 50px;
  object-fit: contain;
  opacity: 0.5;
  filter: grayscale(0%) brightness(1.2);
  will-change: transform;
  border-radius: 8px;
  pointer-events: auto;
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}

.floating-logo:hover {
  opacity: 1;
  filter: grayscale(0%) brightness(1.3);
  z-index: 100;
  transform: scale(3);
}

/* Burst animation when logos collide */
.floating-logo.burst {
  animation: burstAnim 0.4s ease-out forwards;
  pointer-events: none;
}

@keyframes burstAnim {
  0% {
    transform: scale(1);
    opacity: 0.3;
    filter: grayscale(0%) brightness(1.5);
  }

  50% {
    transform: scale(1.8);
    opacity: 0.5;
    filter: grayscale(0%) brightness(2);
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* FIX: Allow clicks to pass through content containers to reach floating logos */
main,
.catalogue,
.beer-grid {
  pointer-events: none;
}

/* Re-enable clicks on interactive content */
.catalogue-header,
.beer-card,
.about-section,
.contact-section,
footer {
  pointer-events: auto;
}

/* Specific interactive elements ensure they are clickable */
.search-box,
.filter-select,
.style-filter-btn {
  pointer-events: auto;
}