:root {
  --bg: #0a0a09;
  --bg-soft: #121110;
  --card: #17140f;
  --card-2: #1e1a13;
  --line: rgba(191, 164, 106, 0.22);
  --line-strong: rgba(191, 164, 106, 0.4);
  --gold: #bfa46a;
  --gold-bright: #e8c874;
  --gold-deep: #9b7d3e;
  --text: #f3ead6;
  --text-soft: #b7ac96;
  --up: #4ade80;
  --down: #f87171;
  --danger: #e0765f;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 20% -5%, rgba(232, 200, 116, 0.1), transparent 34vw),
    radial-gradient(circle at 92% 8%, rgba(191, 164, 106, 0.07), transparent 40vw),
    linear-gradient(180deg, #0b0a08 0%, #060605 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Kur şeridi ---------- */
.rate-ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(191, 164, 106, 0.12), rgba(191, 164, 106, 0.03));
}
.rate-track {
  display: inline-flex;
  gap: 34px;
  white-space: nowrap;
  padding: 7px 0;
  animation: rate-marquee 38s linear infinite;
}
.rate-ticker:hover .rate-track {
  animation-play-state: paused;
}
@keyframes rate-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.rate-chip {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.8rem;
  padding-left: 34px;
  border-left: 1px solid var(--line);
}
.rate-chip:first-child { border-left: none; }
.rate-label { color: var(--gold-bright); font-weight: 600; }
.rate-vals { font-variant-numeric: tabular-nums; color: var(--text-soft); }
.rate-up { color: var(--up); }
.rate-down { color: var(--down); }
@media (prefers-reduced-motion: reduce) {
  .rate-ticker { overflow-x: auto; }
  .rate-track { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(10, 10, 9, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  letter-spacing: 0.12em;
}
.brand-mark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(180deg, #fff7cf 0%, #f0c861 40%, #b98a2e 70%, #ffe6a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  color: var(--gold);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ghost-button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color 0.2s, color 0.2s;
}
.ghost-button:hover { border-color: var(--gold); color: var(--gold-bright); }
.account-chip { color: var(--gold-bright); }
.cart-button {
  position: relative;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cart-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cart-button:hover { border-color: var(--gold); color: var(--gold-bright); }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold-deep);
  color: #1a1206;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 9vw, 110px) clamp(16px, 4vw, 44px) clamp(36px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 30%, rgba(232, 200, 116, 0.12), transparent 40%);
}
.hero-inner { max-width: 720px; }
.hero-eyebrow {
  margin: 0 0 14px;
  letter-spacing: 0.34em;
  font-size: 0.72rem;
  color: var(--gold);
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 18px;
  text-wrap: balance;
  background: linear-gradient(180deg, #fff7cf 0%, #f0c861 44%, #b98a2e 72%, #ffe6a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-text {
  margin: 0 0 28px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.primary-button {
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1206;
  padding: 13px 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7e6af 0%, #d7b55c 48%, #9b6e22 100%);
  box-shadow: 0 8px 24px rgba(155, 110, 34, 0.28);
  transition: transform 0.15s, box-shadow 0.2s;
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(155, 110, 34, 0.4); }
.primary-button:active { transform: translateY(0); }

/* ---------- Catalog ---------- */
.catalog-wrap {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 44px) 64px;
}
.catalog-filters { position: sticky; top: 90px; align-self: start; }
.filters-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin: 0 0 14px;
  color: var(--gold-bright);
}
.group-nav { display: flex; flex-direction: column; gap: 4px; }
.group-nav button {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-soft);
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}
.group-nav button:hover { color: var(--text); background: rgba(191, 164, 106, 0.08); }
.group-nav button.is-active { color: var(--gold-bright); background: rgba(191, 164, 106, 0.14); }
.catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.catalog-head h2 { font-family: var(--serif); margin: 0; font-size: 1.5rem; }
.catalog-count { color: var(--text-soft); font-size: 0.85rem; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 20px;
}
.product-card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.product-thumb {
  aspect-ratio: 1;
  background: #0e0c08;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .thumb-empty {
  font-family: var(--serif);
  color: var(--gold-deep);
  font-size: 2rem;
  opacity: 0.5;
}
.product-info { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-name { font-weight: 600; font-size: 0.98rem; }
.product-meta { font-size: 0.78rem; color: var(--text-soft); }
.product-price {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}
.catalog-empty { color: var(--text-soft); padding: 40px 0; text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px clamp(16px, 4vw, 44px);
  text-align: center;
  color: var(--text-soft);
}
.footer-brand {
  font-family: var(--serif);
  letter-spacing: 0.3em;
  color: var(--gold-bright);
  margin-bottom: 12px;
}
.footer-note { max-width: 60ch; margin: 0 auto 14px; font-size: 0.82rem; line-height: 1.6; }
.footer-legal { font-size: 0.78rem; opacity: 0.7; }

/* ---------- Modals / drawers ---------- */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 4, 3, 0.72);
  backdrop-filter: blur(4px);
}
.modal-layer[hidden] { display: none; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--gold-bright); border-color: var(--gold); }

.product-modal {
  position: relative;
  width: min(760px, 96vw);
  max-height: 92vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-strong);
  border-radius: 18px;
}
.pm-media { background: #0e0c08; min-height: 320px; display: grid; place-items: center; }
.pm-media img { width: 100%; height: 100%; object-fit: cover; }
.pm-media .thumb-empty { font-family: var(--serif); color: var(--gold-deep); font-size: 3rem; opacity: 0.5; }
.pm-body { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.pm-group { letter-spacing: 0.2em; font-size: 0.72rem; color: var(--gold); margin: 0; }
.pm-body h3 { font-family: var(--serif); margin: 0; font-size: 1.6rem; }
.pm-specs, .pm-note { color: var(--text-soft); font-size: 0.88rem; margin: 0; line-height: 1.5; }
.pm-price { font-family: var(--serif); font-size: 1.8rem; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.pm-qty { display: flex; align-items: center; gap: 14px; }
.qty-btn {
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font-size: 1.2rem; cursor: pointer;
}
.qty-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.pm-add { margin-top: 6px; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(420px, 96vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-left: 1px solid var(--line-strong);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}
.drawer[hidden] { display: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-family: var(--serif); margin: 0; font-size: 1.3rem; }
.drawer-head .modal-close { position: static; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { padding: 18px 20px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 1.05rem; }
.cart-total strong { font-family: var(--serif); color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.drawer-foot .primary-button { width: 100%; }

.cart-line {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.cart-line-thumb { width: 54px; height: 54px; border-radius: 8px; background: #0e0c08; overflow: hidden; display: grid; place-items: center; }
.cart-line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-line-name { font-size: 0.9rem; font-weight: 600; }
.cart-line-price { font-size: 0.82rem; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.cart-line-qty { display: flex; align-items: center; gap: 8px; }
.cart-line-qty button { width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.cart-line-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 0.78rem; }
.drawer-empty { color: var(--text-soft); text-align: center; padding: 30px 0; }

/* ---------- Auth / checkout ---------- */
.auth-card, .checkout-card {
  position: relative;
  width: min(440px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 28px;
}
.checkout-card { width: min(560px, 96vw); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; padding: 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text-soft);
  font-family: var(--sans); font-size: 0.9rem;
}
.auth-tab.is-active { color: var(--gold-bright); border-color: var(--gold); background: rgba(191, 164, 106, 0.1); }
.auth-form, .checkout-form { display: flex; flex-direction: column; gap: 14px; }
.checkout-card h2 { font-family: var(--serif); margin: 0 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 0.82rem; color: var(--text-soft); }
.field input, .field textarea {
  background: #0d0b07;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--down); font-size: 0.85rem; margin: 0; }
.checkout-summary { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.checkout-summary .co-total { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 1.15rem; color: var(--gold-bright); }
.checkout-hint { font-size: 0.8rem; color: var(--text-soft); line-height: 1.5; margin: 0; }

.order-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.order-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.order-no { font-weight: 600; }
.order-status { font-size: 0.75rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--gold-bright); }
.order-meta { font-size: 0.82rem; color: var(--text-soft); }
.order-lines { margin-top: 8px; font-size: 0.82rem; color: var(--text-soft); display: flex; flex-direction: column; gap: 3px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: #17140f;
  border: 1px solid var(--gold);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}
.toast[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .catalog-wrap { grid-template-columns: 1fr; }
  .catalog-filters { position: static; }
  .group-nav { flex-direction: row; flex-wrap: wrap; }
  .product-modal { grid-template-columns: 1fr; }
  .pm-media { min-height: 220px; }
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
  .header-actions .ghost-button { padding: 8px 12px; font-size: 0.8rem; }
}
