@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

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

:root {
  --bg:        #1a2229;
  --surface:   #25343f;
  --card:      #2c3e4a;
  --border:    #3a4f5c;
  --gold:      #ff9b51;
  --gold-dim:  #d4763a;
  --white:     #eaefef;
  --muted:     #8fa3af;
  --accent:    #bfc9d1;
  --red:       #c0392b;
  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'Montserrat', sans-serif;
  --transition:   0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
}
/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 5rem;
  transition: all 0.4s ease;
}
nav.scrolled {
  padding: 0.9rem 5rem;
  background: rgba(26, 34, 41, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,155,81,0.12);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.7rem; font-weight: 900;
  letter-spacing: 0.18em;
  color: #EAEFEF; text-decoration: none;
}
.nav-logo em { color: #FF9B51; font-style: normal; }
.nav-links { display: flex; gap: 2.8rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: #EAEFEF;
  font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 500;
  position: relative; transition: color 0.25s;
}
.nav-links a::after {
  content: ''; position: absolute;
  bottom: -5px; left: 0; right: 0;
  height: 1px; background: #FF9B51;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s ease;
}
.nav-links a:hover { color: #FF9B51; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active { color: #FF9B51; }
.nav-links a.active::after { transform: scaleX(1); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.hamburger span { width: 24px; height: 1.5px; background: #EAEFEF; transition: all 0.3s; display: block; }

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 190;
  background: rgba(26, 34, 41, 0.97);
  backdrop-filter: blur(20px);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 2.8rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--serif); font-size: 2.4rem;
  color: #EAEFEF; text-decoration: none;
  letter-spacing: 0.1em; transition: color 0.2s;
}
.mobile-menu a:hover { color: #FF9B51; }
.mobile-close {
  position: absolute; top: 1.8rem; right: 2.5rem;
  font-size: 1.5rem; cursor: pointer;
  color: #EAEFEF; background: none; border: none;
  font-family: var(--font-body);
}
 /* ── SCROLL REVEAL ── */
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.75s ease, transform 0.75s ease; }
  .reveal.visible { opacity: 1; transform: translateY(0); }
/* ===================== NOISE TEXTURE ===================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

/* ===================== HEADER ===================== */
header {
  text-align: center;
  padding: 70px 20px 40px;
  position: relative;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #1a2229 0%, #25343f 100%);
}

header::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 20px auto 0;
}

.brand-tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

header h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 6vw, 5rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--white);
}

header h1 em {
  font-style: italic;
  color: var(--gold);
}

.header-sub {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
}

/* ===================== FILTER BAR ===================== */
.filter-section {
  padding: 32px 40px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 65px;
  background: rgba(26,34,41,0.97);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.filter-label {
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 8px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 18px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  z-index: -1;
}

.filter-btn:hover { color: var(--white); border-color: var(--gold); }
.filter-btn:hover::before { transform: scaleX(1); }

.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a2229;
}

/* ===================== GRID ===================== */
#catalog {
  padding: 50px 40px 80px;
}

.result-count {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
}

/* ===================== PRODUCT CARD ===================== */
.product-card {
  background: var(--card);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid transparent;
  animation: fadeUp 0.5s ease both;
}

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

.product-card:hover {
  border-color: var(--gold-dim);
  z-index: 2;
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--gold-dim);
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #2c3e4a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: brightness(0.92);
}

.product-card:hover .card-img-wrap img {
  transform: scale(1.07);
  filter: brightness(1);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: #1a2229;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  z-index: 2;
}

.card-info {
  padding: 20px 22px 22px;
  border-top: 1px solid var(--border);
}

.card-type {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.card-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.card-price .currency { font-size: 0.75rem; color: var(--muted); margin-right: 2px; }

.card-arrow {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  transition: var(--transition);
}

.product-card:hover .card-arrow {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a2229;
}

/* ===================== DETAIL PANEL ===================== */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(6px);
}

.detail-overlay.open {
  opacity: 0;
  pointer-events: all;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(680px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 600;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.detail-panel.open {
  transform: translateX(0);
}

.detail-panel::-webkit-scrollbar { width: 4px; }
.detail-panel::-webkit-scrollbar-track { background: var(--surface); }
.detail-panel::-webkit-scrollbar-thumb { background: var(--border); }

.detail-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  font-family: var(--font-body);
}

.detail-close:hover { background: var(--gold); color: #1a2229; border-color: var(--gold); }

.detail-hero {
  width: 100%;
  aspect-ratio: 4/3;
  background: #2c3e4a;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9);
}

.detail-body {
  padding: 32px 36px 40px;
  flex: 1;
}

.detail-type {
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.detail-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 6px;
}

.detail-tagline {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.detail-price-block {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.detail-price {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.detail-price .curr { font-size: 1rem; color: var(--muted); }

.origin-chip {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 6px 12px;
  color: var(--muted);
}

/* Specs table */
.specs-heading {
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.specs-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
}

.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }

.specs-table td {
  padding: 11px 4px;
  font-size: 12px;
  vertical-align: top;
}

.specs-table td:first-child {
  color: var(--muted);
  width: 42%;
  letter-spacing: 0.5px;
  padding-right: 16px;
}

.specs-table td:last-child {
  color: var(--white);
  font-weight: 500;
}

/* Features */
.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.feat-tag {
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 12px;
  color: var(--accent);
  transition: var(--transition);
}

.feat-tag:hover { border-color: var(--gold); color: var(--gold); }

/* CTA buttons */
.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.btn-cart, .btn-buy {
  padding: 16px;
  border: none;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.btn-cart {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.btn-cart:hover { background: var(--gold); color: #1a2229; }

.btn-buy {
  background: var(--gold);
  color: #1a2229;
}

.btn-buy:hover { background: #ffb87a; }

/* ===================== HIDDEN STATE ===================== */
.product-card.hidden { display: none; }

/* ===================== EMPTY STATE ===================== */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1000px) {
  nav, nav.scrolled { padding: 1.2rem 2.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  #catalog { padding: 30px 16px 60px; }
  .filter-section { padding: 20px 16px; }
  .detail-body { padding: 24px 20px 32px; }
  .cta-row { grid-template-columns: 1fr; }
  .detail-name { font-size: 1.7rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; }
}
