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

:root {
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-accent: #c8a96e;
  --color-accent-dark: #a8864e;
  --color-border: #e8e8e3;
  --color-danger: #d94040;
  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-ui: system-ui, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.05);
}

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

main { flex: 1; }

a { color: inherit; text-decoration: none; }

/* ── Layout ────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

/* ── Header ────────────────────────────────────────── */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; font-family: var(--font-heading); }
.logo-img { height: 40px; width: auto; display: block; }
nav { display: flex; gap: 32px; font-family: var(--font-ui); font-size: .875rem; letter-spacing: .03em; }
nav a {
  color: var(--color-muted);
  transition: color .2s;
  position: relative;
  padding-bottom: 2px;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1.5px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
nav a:hover { color: var(--color-text); }
nav a:hover::after { transform: scaleX(1); }
.nav-admin-btn { opacity: 0.45; font-size: .8rem; letter-spacing: .06em; }
.nav-admin-btn:hover { opacity: 1; }

/* ── Hero ──────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(135deg, rgba(42,42,42,0.70) 0%, rgba(74,55,40,0.70) 100%),
    url('/image/hero-bg.jpg') center / cover no-repeat;
  color: #fff;
  min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.hero-content h1 { font-size: clamp(2rem, 6vw, 4rem); margin-bottom: 16px; letter-spacing: .02em; font-weight: 400; font-family: var(--font-heading); }
.hero-content p { font-size: 1.2rem; color: rgba(255,255,255,.65); margin-bottom: 40px; font-family: var(--font-heading); font-style: italic; }

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 11px 28px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
}
.btn:hover {
  background: linear-gradient(135deg, var(--color-accent), #9a7540);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200,169,110,.35);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid currentColor;
  color: var(--color-text);
}
.btn-outline:hover { background: var(--color-border); }
.btn-danger { background: var(--color-danger); }
.btn-danger:hover { background: #b83232; }
.btn-full { width: 100%; text-align: center; }

/* ── Product Grid & Cards ──────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.13); }
.product-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }

/* Image overlay on hover */
.card-img { position: relative; overflow: hidden; }
.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
}
.product-card:hover .card-img::after { opacity: 1; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 1.05rem; margin-bottom: 6px; font-weight: 600; letter-spacing: -.01em; }
.price { color: var(--color-accent-dark); font-size: 1.1rem; font-weight: bold; font-family: var(--font-ui); }

/* ── Filters ───────────────────────────────────────── */
.filters { display: flex; gap: 16px; flex-wrap: wrap; }
.filters select, .filters input {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font-ui);
  background: var(--color-surface);
}

/* ── Product Detail ────────────────────────────────── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 700px) { .product-detail { grid-template-columns: 1fr; } }

.gallery-main img { width: 100%; border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 4px; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s;
}
.gallery-thumbs img.active { border-color: var(--color-accent); }

.product-info h1 { font-size: 2rem; margin-bottom: 12px; letter-spacing: -.02em; font-weight: 300; }
.product-price { font-size: 1.8rem; color: var(--color-accent-dark); margin: 12px 0 24px; font-family: var(--font-ui); }
.dimensions { color: var(--color-muted); font-family: var(--font-ui); font-size: .9rem; margin-bottom: 24px; }

/* ── About ─────────────────────────────────────────── */
.about { background: var(--color-surface); }
.about-inner { max-width: 600px; margin: 0 auto; text-align: center; }
.about h2 { margin-bottom: 16px; font-size: 2rem; }

/* ── Footer ────────────────────────────────────────── */
.site-footer { background: #1a1a1a; color: #aaa; padding: 52px 0; font-family: var(--font-ui); }
.footer-inner { display: flex; gap: 48px; flex-wrap: wrap; }
.site-footer h3 { color: #fff; margin-bottom: 8px; }

/* ── Auth / Login ──────────────────────────────────── */
.login-back-btn {
  position: fixed; top: 16px; left: 20px;
  font-size: 2.2rem; color: var(--color-muted);
  text-decoration: none; line-height: 1;
  transition: color .2s, transform .2s;
}
.login-back-btn:hover { color: var(--color-text); transform: translateX(-3px); }
.auth-card {
  max-width: 400px; margin: 80px auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: 24px; font-size: 1.4rem; white-space: nowrap; }

/* ── Forms ─────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-family: var(--font-ui); font-size: .9rem; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-ui);
  background: var(--color-surface);
}
.form-group textarea { resize: vertical; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.checkbox-group label { display: flex; align-items: center; gap: 8px; font-weight: normal; }

.error { color: var(--color-danger); font-family: var(--font-ui); font-size: .9rem; margin-top: 12px; }
.loading { color: var(--color-muted); font-family: var(--font-ui); }

/* ── Section headings ──────────────────────────────── */
h1, h2, h3 { font-family: var(--font-heading); }
h2 { font-size: 1.75rem; margin-bottom: 6px; letter-spacing: -.01em; }

.section-title, .section > .container > h1, .section > .container > h2,
.featured > .container > h2, .about h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.section-title::after, .section > .container > h1::after, .section > .container > h2::after,
.featured > .container > h2::after, .about h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 2px;
  background: var(--color-accent);
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 600px) {
  nav { gap: 16px; }
  .section { padding: 40px 0; }
}

/* ── Sale badge & pricing ──────────────────────────── */

.sale-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--color-danger);
  color: #fff;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 3px;
  pointer-events: none;
}

.price-sale { color: var(--color-danger); }
.price-original {
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: .9rem;
  text-decoration: line-through;
  margin-left: 6px;
}
.price-original--lg { font-size: 1.1rem; }

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 1000;
}
.lightbox-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  padding: 0 20px;
  user-select: none;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

/* ── Entrance Animations ───────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-card {
  animation: fadeInUp 0.5s ease-out both;
}
.product-card:nth-child(1) { animation-delay: 0ms; }
.product-card:nth-child(2) { animation-delay: 60ms; }
.product-card:nth-child(3) { animation-delay: 120ms; }
.product-card:nth-child(4) { animation-delay: 180ms; }
.product-card:nth-child(5) { animation-delay: 240ms; }
.product-card:nth-child(6) { animation-delay: 300ms; }
.product-card:nth-child(7) { animation-delay: 360ms; }
.product-card:nth-child(8) { animation-delay: 420ms; }

/* ── Language Switcher ─────────────────────────────── */
.lang-switcher { position: relative; display: inline-flex; align-items: center; align-self: flex-start; margin-left: 16px; background: rgba(0,0,0,0.07); border-radius: 20px; padding: 2px; font-size: .85rem; }
.lang-btn { position: relative; z-index: 1; padding: 3px 10px; border-radius: 18px; color: var(--color-text); text-decoration: none; transition: color 0.25s; }
.lang-btn:hover { color: var(--color-accent-dark); }
.lang-btn.lang-active { font-weight: 700; color: #fff; pointer-events: none; }
.lang-thumb { position: absolute; top: 2px; bottom: 2px; width: calc(50% - 2px); background: var(--color-accent); border-radius: 18px; transition: left 0.25s cubic-bezier(0.4,0,0.2,1); }
.lang-switcher.lang-hu .lang-thumb { left: 2px; }
.lang-switcher.lang-sk .lang-thumb { left: calc(50%); }
