/* =========================================
   CSS Variables & Theme
   ========================================= */
:root {
  --bg-color:      #0d0b07;
  --surface-color: #111111;
  --panel-bg:      #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --accent-primary: #D4AF37;
  --accent-hover: #b5952f;
  --border-color: rgba(212, 175, 55, 0.25);
  --border-light: rgba(255, 255, 255, 0.1);
  --transition-speed: 0.3s;
}

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

html { overflow-x: clip; }

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(ellipse 140% 55% at 50% 0%,   rgba(212, 175, 55, 0.18), transparent 55%),
    radial-gradient(ellipse 80%  35% at 50% 100%, rgba(212, 175, 55, 0.07), transparent 50%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

main { flex: 1; }
a { text-decoration: none; color: inherit; transition: color var(--transition-speed) ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================
   Container
   ========================================= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}
.btn-primary { background-color: var(--accent-primary); color: #000; border: none; }
.btn-primary:hover { background-color: var(--accent-hover); }
.btn-outline { background-color: transparent; color: var(--accent-primary); border: 1px solid var(--border-color); }
.btn-outline:hover { border-color: var(--accent-primary); background-color: rgba(212, 175, 55, 0.05); }

/* =========================================
   Navbar
   ========================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(9, 9, 9, 0.95);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  white-space: nowrap;
}
@media (min-width: 400px) { .nav-brand { font-size: 1.5rem; } }
.nav-brand span { color: var(--accent-primary); }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

/* German flag badge — SVG, no emoji */
.german-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  background-color: rgba(212, 175, 55, 0.08);
  border-radius: 8px;
}

.hamburger {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color var(--transition-speed) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}
.hamburger:hover { border-color: var(--accent-primary); }

/* =========================================
   Drawer Nav (mobile)
   ========================================= */
.nav-links {
  display: flex;
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100vh;
  background-color: #0d0d0d;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  border-left: 1px solid var(--border-color);
  transform: translateX(100%);
  transition: transform var(--transition-speed) ease;
  z-index: 1001;
}
.nav-links.active { transform: translateX(0); }

.nav-links li { width: 100%; text-align: center; }

/* Divider lines between drawer items — inset, not full width */
@media (max-width: 767px) {
  .nav-links li:not(:last-child)::after {
    content: "";
    display: block;
    height: 1px;
    background: var(--border-light);
    margin: 0 32px;
  }
}

/* Single unified .nav-links a */
.nav-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  line-height: 1;
  transition: color var(--transition-speed) ease;
}
.nav-links a:hover { color: var(--accent-primary); }

.nav-links a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Active page indicator */
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--accent-primary);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.nav-overlay.active { display: block; }

/* Desktop nav */
@media (min-width: 768px) {
  .hamburger { display: none; }
  .nav-overlay { display: none !important; }
  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    width: auto;
    height: auto;
    background: none;
    border: none;
    gap: 28px;
    justify-content: flex-start;
    align-items: center;
    z-index: auto;
    transform: none;
    transition: none;
  }
  .nav-links li { width: auto; }
  .nav-links li::after { display: none !important; }
  .nav-links a {
    padding: 0;
    font-size: 0.8rem;
    justify-content: flex-start;
  }
}

/* =========================================
   Section Header (shared)
   ========================================= */
.section-header {
  margin-bottom: 30px;
  text-align: center;
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* =========================================
   Product Grid & Cards (shared)
   ========================================= */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 50px;
}
@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}

.product-image-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  margin-bottom: 16px;
  background-color: var(--panel-bg);
}
.product-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-speed) ease;
}
.product-card:hover .product-image { transform: scale(1.04); }

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.product-purity {
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  flex-grow: 1;
}

/* =========================================
   Showcase Buttons (home CTA row)
   ========================================= */
.showcase-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 60px;
}

/* =========================================
   Footer
   ========================================= */
.footer {
  background-color: #0b0b0b;
  border-top: 1px solid var(--border-color);
  padding: 40px 20px;
  margin-top: 60px;
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-container { grid-template-columns: 2fr 1fr 1fr; text-align: left; }
}
.footer-brand p { color: var(--text-secondary); font-size: 0.875rem; margin-top: 10px; }
.footer-nav h4 { color: var(--text-primary); margin-bottom: 15px; }
.footer-nav a { display: block; color: var(--text-secondary); margin-bottom: 8px; }
.footer-nav a:hover { color: var(--accent-primary); }

.footer-contact-list { display: flex; flex-direction: column; gap: 12px; }
.footer-contact-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
@media (min-width: 768px) {
  .footer-contact-list li { justify-content: flex-start; }
}
.footer-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
}

.footer-bottom {
  max-width: 1280px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
}

/* =========================================
   Purchase Modal
   ========================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2000;
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}
.modal-overlay.active { display: flex; }

.modal {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  width: calc(100vw - 24px);
  max-width: 420px;
  border-radius: 1rem;
  padding: 20px 18px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
}
.modal-close:hover { border-color: var(--accent-primary); color: var(--text-primary); }

.modal-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.modal-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.modal-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background-color: var(--panel-bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all var(--transition-speed) ease;
  overflow: hidden;
  min-width: 0;
}
.modal-contact-item:hover,
.modal-contact-item:active {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}
.modal-contact-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--accent-primary);
}
.modal-contact-item span:not(.modal-contact-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 540px) {
  .modal {
    padding: 36px 28px;
    gap: 12px;
    animation: fadeScaleIn 0.25s ease;
  }
  .modal-title { font-size: 1.35rem; }
  .modal-contact-item { font-size: 0.9rem; padding: 14px 16px; }
}

@keyframes fadeScaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}


/* =========================================
   Inline Loader
   ========================================= */

.inline-loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    grid-column: 1 / -1;

    padding: 40px 20px;

    color: var(--text-secondary);
}

.inline-loader {
    width: 20px;
    height: 20px;

    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--accent-primary);

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Image Skeleton Loader Architecture
   ========================================= */
.product-image-wrapper {
  width: 100%;
  aspect-ratio: 1127 / 787; /* Locks it into a clean square block before the image loads */
  overflow: hidden;
  border-radius: 0.5rem;
  margin-bottom: 16px;
  background-color: var(--panel-bg);
  position: relative;
}

.product-image-wrapper.skeleton {
  background: linear-gradient(
    90deg,
    var(--panel-bg) 25%,
    rgba(212, 175, 55, 0.05) 50%,
    var(--panel-bg) 75%
  );
  background-size: 200% 100%;
  animation: dynamicShimmer 1.6s infinite linear;
}

/* Force the image to elegantly fill the aspect-ratio box without stretching */
.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* change to 'contain' if you don't want your vial images cropped at all */
  opacity: 0;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

/* Smooth structural fade-in upon fully executing onload pipeline hook */
.product-image.loaded {
  opacity: 1;
}

@keyframes dynamicShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}