/* Marrow — Luxury leather goods. Editorial aesthetic. Mobile-first. */

:root {
  --bg: #0f0d0b;
  --surface: #1a1614;
  --surface-2: #231f1b;
  --fg: #f0ebe3;
  --fg-muted: #9a9088;
  --accent: #c9a96e;
  --accent-dim: rgba(201, 169, 110, 0.15);
  --warm: #8b6a4a;
  --border: rgba(201, 169, 110, 0.2);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button, input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* ── NAV ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--space-md);
  background: rgba(15, 13, 11, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  cursor: pointer;
}

.nav-cart-icon { width: 20px; height: 20px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.btn:hover { background: var(--accent-dim); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover { background: #d4b87a; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.7rem; }

/* ── TYPOGRAPHY ── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--space-sm);
}

.eyebrow-rule {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.eyebrow-text {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}

.display-heading {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ── PRODUCT GRID ── */
.section {
  padding: var(--space-xl) var(--space-md);
}

.section-sm { padding: var(--space-lg) var(--space-md); }

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s;
}

.product-card:hover { transform: translateY(-4px); }

.product-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-2);
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-card-img img { transform: scale(1.04); }

.product-card-body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-card-category {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
}

.product-card-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.2;
}

.product-card-tagline {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.4;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-sm);
}

.price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent);
}

/* ── PRODUCT DETAIL ── */
.product-detail {
  padding-top: 6rem;
  min-height: 100vh;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 768px) {
  .product-detail-grid { grid-template-columns: 1fr; }
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-gallery-main {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-2);
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-thumbs {
  display: flex;
  gap: var(--space-xs);
}

.product-gallery-thumb {
  width: 80px;
  height: 80px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
}

.product-gallery-thumb.active { border-color: var(--accent); }

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info { padding-top: var(--space-md); }

.product-info-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.product-info-tagline {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin-bottom: var(--space-md);
}

.product-info-price {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.product-info-description {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--fg-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.product-meta {
  display: grid;
  gap: 1rem;
  margin-bottom: var(--space-md);
}

.product-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-meta-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
}

.product-meta-value {
  font-size: 0.9rem;
  color: var(--fg);
}

.product-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.product-features li::before {
  content: '';
  display: block;
  width: 16px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.add-to-cart-form {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.add-to-cart-form select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.75rem 1rem;
}

/* ── AI PERSONALIZE ── */
.personalize-hero {
  padding: 8rem var(--space-md) var(--space-lg);
  text-align: center;
  position: relative;
}

.personalize-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(201, 169, 110, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.personalize-form {
  max-width: 560px;
  margin: var(--space-md) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.personalize-form textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 1rem;
  resize: none;
  height: 100px;
  font-size: 0.95rem;
}

.personalize-form textarea::placeholder { color: var(--fg-muted); }

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.recommendation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: relative;
}

.recommendation-card::before {
  content: 'Recommended for you';
  position: absolute;
  top: -1px;
  left: var(--space-sm);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface);
  padding: 0 0.5rem;
}

.recommendation-reason {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-style: italic;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* ── CART ── */
.cart-page {
  padding-top: 6rem;
  min-height: 100vh;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm);
  background: var(--surface);
}

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: var(--surface-2);
}

.cart-item-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-price {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
}

.cart-summary {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-md);
}

.cart-total-label { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.cart-total-value { font-family: var(--font-display); font-size: 1.75rem; color: var(--accent); }

/* ── CHECKOUT ── */
.checkout-page {
  padding-top: 6rem;
  min-height: 100vh;
}

.checkout-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.form-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.order-summary {
  background: var(--surface);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

/* ── SUCCESS / CANCEL ── */
.status-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  text-align: center;
  position: relative;
}

.status-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 80%, rgba(201, 169, 110, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.status-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
}

.status-heading {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: var(--space-sm);
}

/* ── RELATED ── */
.related-section {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}

/* ── ERROR ── */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md);
}

/* ── UTILITY ── */
.text-muted { color: var(--fg-muted); }
.text-accent { color: var(--accent); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.divider { height: 1px; background: var(--border); margin: var(--space-md) 0; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 8rem var(--space-md) var(--space-lg);
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .product-card-img { aspect-ratio: 1/1; }
  .display-heading { font-size: 2.5rem; }
}