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

:root {
  --bg: #030303;
  --bg-elevated: #0b0b0b;
  --text: #f7f4ef;
  --text-muted: #8c877c;
  --accent: #c9a86c;
  --accent-dim: rgba(201, 168, 108, 0.12);
  --accent-hover: #dbbc82;
  --border: rgba(201, 168, 108, 0.1);
  --radius: 12px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Preloader ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #030303;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.preloader-logo-img {
  height: 72px;
  width: auto;
  margin-bottom: 28px;
  filter: invert(1);
  opacity: 0.9;
  animation: preloaderFade 1.4s ease-in-out infinite;
}

.preloader-bar {
  width: 100px;
  height: 1px;
  background: rgba(201, 168, 108, 0.2);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 2px;
}

.preloader-progress {
  height: 100%;
  width: 0;
  background: var(--accent);
  animation: loadProgress 1.1s var(--ease) forwards;
}

@keyframes preloaderFade {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

@keyframes loadProgress {
  to { width: 100%; }
}

/* ===== Background ===== */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #050505;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(201, 168, 108, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 90%, rgba(201, 168, 108, 0.035) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 70%, rgba(255, 255, 255, 0.015) 0%, transparent 45%);
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 3, 3, 0.7);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.header.scrolled {
  background: rgba(3, 3, 3, 0.88);
  border-bottom-color: rgba(201, 168, 108, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.85;
}

.logo-img {
  height: 42px;
  width: auto;
  /* A logó fekete, ezért inverzáljuk a sötét háttérhez */
  filter: invert(1);
  opacity: 0.95;
}

.nav {
  display: flex;
  gap: 40px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.cart-btn {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s var(--ease);
}

.cart-btn:hover {
  color: var(--accent);
  border-color: rgba(201, 168, 108, 0.25);
  background: var(--accent-dim);
}

.cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.65rem;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ===== Hero ===== */
.hero {
  padding: 130px 0 70px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--accent);
  border: 1px solid rgba(201, 168, 108, 0.35);
  padding: 7px 18px;
  border-radius: 40px;
  margin-bottom: 32px;
  background: var(--accent-dim);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 9.5vw, 6.2rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  margin-bottom: 18px;
  line-height: 1.05;
  /* Kompenzálja a letter-spacing extra helyét a végén, hogy középre essen */
  margin-right: -0.3em;
}

.title-line {
  display: inline-block;
  background: linear-gradient(135deg, #f7f4ef 0%, #c9a86c 50%, #f7f4ef 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
  /* Biztosítja, hogy a betűk ne vágódjanak le */
  padding: 0 0.05em;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 28px;
  font-weight: 400;
  font-style: italic;
  margin-right: -0.2em;
}

.hero-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 440px;
  margin: 0 auto 40px;
  line-height: 1.75;
  font-weight: 300;
}

.hero-divider {
  display: flex;
  justify-content: center;
}

.hero-divider span {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.22s; }
.reveal:nth-child(3) { transition-delay: 0.34s; }
.reveal:nth-child(4) { transition-delay: 0.46s; }
.reveal:nth-child(5) { transition-delay: 0.58s; }

/* ===== Empty state ===== */
.products-placeholder {
  padding: 30px 0 110px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.empty-state {
  text-align: center;
  padding: 80px 36px;
  background: rgba(11, 11, 11, 0.65);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.empty-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.ornament-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 108, 0.5));
}

.ornament-line:last-child {
  background: linear-gradient(90deg, rgba(201, 168, 108, 0.5), transparent);
}

.ornament-diamond {
  color: var(--accent);
  font-size: 1.1rem;
  opacity: 0.85;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.empty-state h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
  font-weight: 300;
}

/* ===== Cart ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease);
  z-index: 200;
  backdrop-filter: blur(6px);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.45s var(--ease);
}

.cart-sidebar.active {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 30px 24px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.close-cart {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.25s;
}

.close-cart:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 30px;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0 40px;
}

.empty-cart-visual {
  margin-bottom: 18px;
}

.cart-footer {
  padding: 24px 30px 32px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.cart-total strong {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 32px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(201, 168, 108, 0.22);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 42px 38px;
  width: 100%;
  max-width: 460px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s var(--ease);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  margin-bottom: 32px;
  text-align: center;
  letter-spacing: 0.05em;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.25s;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.form-group .optional {
  opacity: 0.6;
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(201, 168, 108, 0.12);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(201, 168, 108, 0.45);
  box-shadow: 0 0 0 3px rgba(201, 168, 108, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 78px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
  margin-top: auto;
  position: relative;
  z-index: 1;
  background: rgba(3, 3, 3, 0.5);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.footer-logo-img {
  height: 48px;
  width: auto;
  filter: invert(1);
  opacity: 0.85;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 300;
}

/* ===== Responsive ===== */
@media (max-width: 680px) {
  .nav {
    display: none;
  }

  .header-inner {
    height: 68px;
  }

  .logo-img {
    height: 36px;
  }

  .hero {
    padding: 100px 0 50px;
  }

  .hero-title {
    letter-spacing: 0.18em;
    margin-right: -0.18em;
  }

  .hero-subtitle {
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    margin-right: -0.12em;
  }

  .cart-sidebar {
    max-width: 100%;
  }

  .modal {
    padding: 34px 24px;
  }

  .empty-state {
    padding: 60px 24px;
  }

  .container {
    padding: 0 20px;
  }
}
