/* Waveform — dummy vinyl record store. Minimal dark theme. */

:root {
  --bg: #121212;
  --surface: #1C1C1C;
  --text: #F2F0EB;
  --muted: #9B9790;
  --accent: #E8A33D;
  --border: #2A2A2A;
  --radius: 6px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.logo svg { height: 32px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 15px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text) !important;
  font-weight: 600;
}

.cart-count {
  background: var(--accent);
  color: #1a1308;
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ---------- Buttons & forms ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #1a1308;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.88; }

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

.btn-block { display: block; width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input, textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  min-width: 0;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

.field { margin-bottom: 18px; }

.form-note { font-size: 13px; color: var(--muted); }

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}

.hero p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 24px;
  font-size: 16px;
}

/* ---------- Product grid ---------- */

.section-title {
  font-size: 22px;
  margin: 0 0 24px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  padding: 48px 0;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.product-card:hover { border-color: var(--accent); }

.product-card .cover { aspect-ratio: 1 / 1; background: #0e0e0e; }
.product-card .cover img { width: 100%; height: 100%; object-fit: cover; }

.product-card .info { padding: 14px 16px 18px; }
.product-card .genre {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 6px;
}
.product-card h3 { font-size: 16px; margin: 0 0 2px; }
.product-card .artist { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.product-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
}
.product-card .compare-at {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  font-size: 13px;
}

/* ---------- Product detail ---------- */

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 440px) 1fr;
  gap: 48px;
  padding: 48px 0 64px;
}

.product-detail .cover { border-radius: var(--radius); overflow: hidden; background: #0e0e0e; }

.product-detail .genre {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 10px;
}

.product-detail h1 { font-size: 30px; margin: 0 0 4px; }
.product-detail .artist { font-size: 17px; color: var(--muted); margin: 0 0 20px; }

.product-detail .price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.product-detail .description { color: var(--muted); margin-bottom: 20px; }

.product-detail .details-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}
.product-detail .details-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty-stepper button {
  background: var(--surface);
  color: var(--text);
  border: none;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
}
.qty-stepper input {
  width: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 0;
  height: 36px;
  padding: 0;
}

/* ---------- Cart & checkout ---------- */

.cart-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: 40px;
  padding: 48px 0 64px;
  align-items: start;
}

.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cart-line .thumb {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  background: #0e0e0e;
}
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-line h3 { font-size: 15px; margin: 0 0 2px; }
.cart-line .variant { font-size: 13px; color: var(--muted); }
.cart-line .line-total { font-weight: 600; white-space: nowrap; }

.remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.remove-btn:hover { color: var(--text); }

#cart-summary, #checkout-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  padding: 6px 0;
}
.summary-row.total {
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 14px;
}

.cart-empty {
  text-align: center;
  padding: 64px 0;
}
.cart-empty h2 { margin: 0 0 10px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
  .cart-layout { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 36px; }
  .cart-line { grid-template-columns: 56px 1fr auto; }
  .cart-line .thumb { width: 56px; height: 56px; }
}

@media (max-width: 480px) {
  .site-header .wrap { gap: 10px; }
  .main-nav { gap: 16px; }
  .wrap { padding: 0 16px; }
}
