/* ============================================================
   Beer&Snacks — Minimalist B&W Catalog
   ============================================================ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --bg: #ffffff;
  --bg-card: #fafafa;
  --bg-hover: #f2f2f2;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --accent: #111111;
  --accent-light: #333333;
  --white: #ffffff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 920px;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg: #0e0e0e;
  --bg-card: #161616;
  --bg-hover: #1e1e1e;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border: #2a2a2a;
  --border-light: #1c1c1c;
  --accent: #e8e8e8;
  --accent-light: #cccccc;
  --white: #161616;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* ── Language Selector Overlay ── */
.lang-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  animation: fadeIn 0.5s ease;
}

.lang-overlay.hidden {
  display: none;
}

.lang-overlay__logo {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text-primary);
}

.lang-overlay__title {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: -32px;
}

.lang-overlay__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 280px;
}

.lang-overlay__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.lang-overlay__btn:hover {
  background: var(--text-primary);
  color: var(--white);
  border-color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.lang-overlay__btn:active {
  transform: translateY(0);
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

[data-theme="dark"] .header {
  background: rgba(14,14,14,0.88);
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  user-select: none;
}

.header__logo span {
  color: var(--text-muted);
  font-weight: 400;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switcher {
  position: relative;
}

.lang-switcher__current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switcher__current:hover {
  border-color: var(--text-primary);
  background: var(--bg-hover);
  transform: scale(1.02);
}

.lang-switcher__current svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.lang-switcher.open .lang-switcher__current svg {
  transform: rotate(180deg);
}

.lang-switcher__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  overflow: hidden;
}

.lang-switcher.open .lang-switcher__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__option {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-switcher__option:hover {
  background: var(--bg-hover);
}

.lang-switcher__option.active {
  font-weight: 600;
  background: var(--bg-card);
}

/* ── Category Tabs ── */
.categories {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 0;
}

.categories__list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0;
  margin: -10px 0;
}

.categories__list:hover .category-tab:not(:hover) {
  transform: scale(0.95);
  opacity: 0.6;
}

.categories__list::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  padding: 10px 20px;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.category-tab:hover {
  color: var(--text-primary);
  transform: scale(1.05);
  background: var(--bg-hover);
}

.category-tab.active {
  background: var(--text-primary);
  color: var(--white);
}

/* ── Subcategory Filter ── */
.subcategories {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px 0;
}

.subcategories__list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0;
  margin: -10px 0;
}

.subcategories__list:hover .subcategory-tab:not(:hover) {
  transform: scale(0.95);
  opacity: 0.6;
}

.subcategories__list::-webkit-scrollbar {
  display: none;
}

.subcategory-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.subcategory-tab:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  transform: scale(1.05);
  background: var(--bg-hover);
}

.subcategory-tab.active {
  background: var(--text-primary);
  color: var(--white);
  border-color: var(--text-primary);
}

.subcategories.hidden {
  display: none;
}

/* ── Product List ── */
.product-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.product-list__items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-light);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.product-list__items > .product-card:first-child {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.product-list__items > .product-card:last-child {
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

/* ── Product Card ── */
.product-card {
  display: flex;
  align-items: stretch;
  background: var(--white);
  cursor: default;
  transition: background 0.15s;
  animation: cardFadeIn 0.3s ease both;
}

.product-card:hover {
  background: var(--bg-card);
}

.product-card__info {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.product-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.product-card__specs {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.2px;
}

.product-card__spec-item {
  white-space: nowrap;
}

.product-card__spec-divider {
  margin: 0 8px;
  color: var(--border);
  user-select: none;
}

.product-card__divider {
  width: 32px;
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

.product-card__description {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.product-card__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-top: 2px;
}

.product-card__image-wrap {
  flex-shrink: 0;
  width: auto;
  min-width: 140px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.product-card__image {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  padding: 8px;
}

/* ── Card stagger animation ── */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:nth-child(1) { animation-delay: 0.02s; }
.product-card:nth-child(2) { animation-delay: 0.04s; }
.product-card:nth-child(3) { animation-delay: 0.06s; }
.product-card:nth-child(4) { animation-delay: 0.08s; }
.product-card:nth-child(5) { animation-delay: 0.10s; }
.product-card:nth-child(6) { animation-delay: 0.12s; }
.product-card:nth-child(7) { animation-delay: 0.14s; }
.product-card:nth-child(8) { animation-delay: 0.16s; }
.product-card:nth-child(9) { animation-delay: 0.18s; }
.product-card:nth-child(10) { animation-delay: 0.20s; }
.product-card:nth-child(11) { animation-delay: 0.22s; }
.product-card:nth-child(12) { animation-delay: 0.24s; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-card);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer__about {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 360px;
}

.footer__details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer__detail-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 400;
}

.footer__bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ── Theme Toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--text-primary);
  background: var(--bg-hover);
  transform: scale(1.05) rotate(5deg);
}

.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.theme-toggle__sun,
.theme-toggle__moon {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.theme-toggle__sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle__sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle__moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content {
  animation: slideUp 0.4s ease;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .header__inner {
    padding: 12px 16px;
  }

  .header__logo {
    font-size: 18px;
  }

  .lang-switcher__current {
    padding: 7px 12px;
    font-size: 12px;
  }

  .categories {
    padding: 16px 16px 0;
  }

  .categories__list {
    gap: 4px;
  }

  .category-tab {
    padding: 8px 16px;
    font-size: 13px;
  }

  .subcategories {
    padding: 10px 16px 0;
  }

  .subcategory-tab {
    padding: 6px 12px;
    font-size: 11px;
  }

  .product-list {
    padding: 16px 16px 32px;
  }

  .product-card__info {
    padding: 14px 16px;
    gap: 4px;
  }

  .product-card__name {
    font-size: 14px;
  }

  .product-card__specs {
    font-size: 11px;
  }

  .product-card__description {
    font-size: 11px;
  }

  .product-card__price {
    font-size: 15px;
  }

  .product-card__image-wrap {
    width: 80px;
    padding: 10px;
  }

  .product-card__image {
    width: 76px;
    height: 76px;
    padding: 6px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    padding: 32px 16px;
    gap: 24px;
  }

  .lang-overlay__logo {
    font-size: 28px;
  }

  .lang-overlay__buttons {
    width: 240px;
  }

  .lang-overlay__btn {
    padding: 14px 20px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .product-card__image-wrap {
    width: auto;
    min-width: 88px;
    padding: 8px;
  }

  .product-card__image {
    width: 64px;
    height: 64px;
    padding: 4px;
  }

  .product-card__info {
    padding: 12px 14px;
  }

  .product-card__badge {
    font-size: 8px;
    padding: 3px 5px;
    letter-spacing: 0;
  }
}

/* ── Product Badges ── */
.product-card__badge {
  flex-shrink: 0;
  display: inline-block;
  min-width: max-content;
  align-self: center;
  justify-self: center;
  margin: 10px auto 0 auto;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.product-card__badge.in-stock {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .product-card__badge.in-stock {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.product-card__badge.out-of-stock {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .product-card__badge.out-of-stock {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ── Scroll To Top Button ── */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--text-secondary);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
}

/* ── Footer Socials and Delivery ── */
.footer__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  margin-bottom: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  width: 100%;
}

.footer__socials {
  display: flex;
  gap: 16px;
}

.footer__socials a {
  color: var(--text-secondary);
  transition: color 0.2s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
}

.footer__socials a:hover {
  color: var(--text-primary);
  transform: translateY(-3px) scale(1.05);
  background: var(--border);
}

.footer__delivery {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.delivery-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.delivery-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.delivery-btn--wolt:hover {
  color: #00c8e5; /* Wolt color */
  border-color: #00c8e5;
  background: rgba(0, 200, 229, 0.05);
}

.delivery-btn--bolt:hover {
  color: #34d186; /* Bolt color */
  border-color: #34d186;
  background: rgba(52, 209, 134, 0.05);
}

/* ── Premium Card Hover Animations ── */
.product-card {
  will-change: transform, box-shadow;
  transition:
    background 0.2s ease,
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card:hover {
  transform: translateX(-3px);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.06),
    0 8px 24px rgba(0,0,0,0.10);
  background: var(--bg-hover) !important;
}

.product-card__image {
  transition:
    transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1),
    filter 0.3s ease;
  will-change: transform;
}

.product-card:hover .product-card__image {
  transform: scale(1.1) rotate(-1.5deg);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
}

/* Stagger fade-in on list render */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: fadeInUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
