/* ===========================
   AURUM — Design System
   =========================== */

:root {
  --black:      #000000;
  --dark:       #2A2A2A;
  --gold:       #C5A059;
  --gold-light: #D4B577;
  --gold-dim:   #8A6E3A;
  --white:      #FFFFFF;
  --surface:    #111111;
  --surface-2:  #1A1A1A;
  --border:     rgba(197,160,89,.18);
  --muted:      rgba(255,255,255,.45);

  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;

  --ease: cubic-bezier(.4,0,.2,1);
  --trans: .25s var(--ease);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Scrollbar ─────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ── Utility ────────────────────────────── */
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ── Buttons ────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--black);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--trans), transform var(--trans);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; justify-content: center; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid var(--gold-dim);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--trans);
}
.btn-outline:hover { background: rgba(197,160,89,.1); border-color: var(--gold); }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--white);
  font-size: 17px;
  transition: color var(--trans), background var(--trans);
  position: relative;
}
.icon-btn:hover { color: var(--gold); background: rgba(197,160,89,.08); }

/* ── Toast ──────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--white);
  pointer-events: auto;
  animation: toastIn .3s var(--ease) both;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.toast.removing { animation: toastOut .3s var(--ease) both; }
.toast i { color: var(--gold); font-size: 15px; }
@keyframes toastIn  { from { opacity:0; transform: translateX(24px); } to { opacity:1; transform: none; } }
@keyframes toastOut { from { opacity:1; transform: none; } to { opacity:0; transform: translateX(24px); } }

/* ── Header ─────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--trans);
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--gold);
  flex-shrink: 0;
}

.header-nav { display: flex; gap: 28px; margin-left: auto; }
.nav-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--trans);
}
.nav-link:hover { color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 4px; }

.cart-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 17px; height: 17px;
  background: var(--gold);
  color: var(--black);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Hero ───────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 32px 60px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(197,160,89,.06) 0%, transparent 70%),
    var(--black);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(197,160,89,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(197,160,89,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--white);
  margin-bottom: 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
  font-weight: 300;
}

.hero-ornament {
  position: absolute;
  bottom: -120px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  border: 1px solid rgba(197,160,89,.06);
  border-radius: 50%;
  pointer-events: none;
}

/* ── Catalog ────────────────────────────── */
.catalog {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 32px 100px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--ff-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  color: var(--white);
}

/* Filters */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-divider { width: 1px; height: 20px; background: var(--border); }
.filter-btn {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: all var(--trans);
}
.filter-btn:hover { color: var(--white); }
.filter-btn.active {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(197,160,89,.08);
}
#category-filters { display: flex; gap: 8px; flex-wrap: wrap; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Skeleton */
.skeleton-card {
  background: var(--surface-2);
  border-radius: var(--r-lg);
  height: 380px;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; }
}

/* Product Card */
.product-card {
  background: var(--surface-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(197,160,89,.4);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}
.product-card.out-of-stock { opacity: .5; pointer-events: none; }

.product-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

.product-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}
.badge-sale  { background: #C5595A; color: #fff; }
.badge-new   { background: var(--gold); color: var(--black); }

.product-info { padding: 20px; }
.product-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.product-name {
  font-family: var(--ff-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.3;
}
.product-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.product-price {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
}
.add-cart-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: background var(--trans), transform var(--trans);
}
.add-cart-btn:hover { background: var(--gold-light); transform: scale(1.1); }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: .4; }

/* ── About Strip ────────────────────────── */
.about-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.about-strip-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px;
  display: flex;
  justify-content: space-around;
  gap: 32px;
  flex-wrap: wrap;
}
.about-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-item i { color: var(--gold); font-size: 18px; }

/* ── Footer ─────────────────────────────── */
.site-footer { padding: 40px 32px; background: var(--surface-2); border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner p { font-size: 12px; color: var(--muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 18px; color: var(--muted); transition: color var(--trans); }
.footer-links a:hover { color: var(--gold); }

/* ── Cart Sidebar ───────────────────────── */
.cart-sidebar {
  position: fixed; top: 0; right: 0;
  width: min(420px, 100vw);
  height: 100%;
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
}
.cart-sidebar.open { transform: none; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-header h2 {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 500;
}

.cart-body { flex: 1; overflow-y: auto; padding: 20px 24px; }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--muted);
  gap: 12px;
}
.cart-empty i { font-size: 40px; opacity: .3; }
.cart-empty p { font-size: 14px; }

.cart-list { display: flex; flex-direction: column; gap: 16px; }

.cart-item {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 14px;
  border: 1px solid var(--border);
  animation: fadeIn .2s var(--ease) both;
}
@keyframes fadeIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }

.cart-item-img {
  width: 68px; height: 68px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--dark);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price { font-size: 13px; color: var(--gold); margin-bottom: 10px; }
.cart-item-controls { display: flex; align-items: center; gap: 10px; }
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--trans);
}
.qty-btn:hover { border-color: var(--gold); color: var(--gold); }
.qty-val { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }
.remove-btn { margin-left: auto; font-size: 14px; color: var(--muted); transition: color var(--trans); }
.remove-btn:hover { color: #c55; }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cart-total span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.cart-total strong { font-family: var(--ff-display); font-size: 24px; color: var(--gold); }

.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.cart-overlay.visible { opacity: 1; pointer-events: auto; }

/* ── Product Modal ──────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.modal-overlay.visible { opacity: 1; pointer-events: auto; }

.product-modal {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform .3s var(--ease);
}
.modal-overlay.visible .product-modal { transform: none; }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  color: var(--muted);
  z-index: 1;
}
.modal-close:hover { color: var(--white); }

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.modal-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.modal-info { padding: 40px 32px; display: flex; flex-direction: column; gap: 16px; }
.modal-category {
  font-size: 10px; font-weight: 600;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--gold);
}
.modal-name { font-family: var(--ff-display); font-size: 28px; font-weight: 400; }
.modal-desc { font-size: 14px; color: var(--muted); line-height: 1.7; }
.modal-price { font-family: var(--ff-display); font-size: 32px; color: var(--gold); }
.modal-stock { font-size: 12px; color: var(--muted); }
.modal-add-btn { margin-top: auto; }

/* ── Admin link ─────────────────────────── */
.admin-hint {
  position: fixed; bottom: 24px; left: 24px;
  font-size: 11px; color: rgba(255,255,255,.15);
  z-index: 10;
}
.admin-hint:hover { color: var(--gold); }

/* ── Responsive ─────────────────────────── */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-inner { padding: 0 20px; }
  .hero { padding: 100px 20px 60px; }
  .catalog { padding: 60px 20px 80px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-img { border-radius: var(--r-lg) var(--r-lg) 0 0; aspect-ratio: 16/9; }
  .modal-info { padding: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .cart-sidebar { width: 100vw; }
  .about-strip-inner { flex-direction: column; align-items: center; }
}
