/* DealPulse — Store CSS
   Vibe: editorial marketplace — warm off-white, deep charcoal, amber accent
   Fonts: Instrument Serif (headings) + Satoshi (body)
*/

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Cormorant+Garamond:wght@400;500;600&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');

:root {
  --bg: #faf9f6;
  --bg-alt: #f3f0ea;
  --bg-dark: #1a1714;
  --text: #1a1714;
  --text-muted: #6b6460;
  --text-light: #a09b96;
  --border: #e8e3dc;
  --accent: #c8773a;
  --accent-hover: #b5652b;
  --accent-light: #fdf3ec;
  --premium: #2d3a2e;
  --premium-light: #eef3ee;
  --deals: #c8773a;
  --deals-light: #fdf3ec;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(26,23,20,0.07);
  --shadow-hover: 0 8px 32px rgba(26,23,20,0.14);
  --radius: 4px;
  --radius-lg: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Satoshi', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Instrument Serif', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }

/* ─── Nav ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,249,246,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.nav-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
}
.nav-badge.premium { background: var(--premium); color: white; }
.nav-badge.deals { background: var(--accent); color: white; }

/* ─── Hero ───────────────────────────────────────── */
.hero {
  background: var(--bg-dark);
  color: white;
  padding: 80px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200,119,58,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  color: white;
  margin-bottom: 20px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 em { color: var(--accent); font-style: italic; }
.hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  max-width: 480px;
  margin: 0 auto 40px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,119,58,0.35); }
.btn-outline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.06); }
.btn-dark {
  background: var(--bg-dark);
  color: white;
}
.btn-dark:hover { background: #2a2623; transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-buy {
  background: var(--accent);
  color: white;
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 15px;
}
.btn-buy:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,119,58,0.35); }

/* ─── Container ──────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Section Header ─────────────────────────────── */
.section-header {
  padding: 64px 0 32px;
}
.section-header.center { text-align: center; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-label.premium { color: var(--premium); }
.section-label.deals { color: var(--accent); }
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
}
.section-header h2 { font-size: clamp(28px, 4vw, 42px); }
.section-header p { color: var(--text-muted); margin-top: 8px; font-size: 16px; }
.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: opacity 0.2s;
  margin-top: 8px;
  display: inline-block;
}
.section-link:hover { opacity: 0.75; }

/* ─── Product Grid ───────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding-bottom: 64px;
}

/* ─── Product Card ───────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.product-card-image {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg-alt);
  overflow: hidden;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-image img { transform: scale(1.04); }
.product-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--bg-alt), var(--border));
  color: var(--text-muted);
}
.badge-stock {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #2d6a4f;
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}
.badge-section {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}
.badge-section.premium { background: var(--premium); color: white; }
.badge-section.deals { background: var(--accent); color: white; }
.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-card-name {
  font-family: 'Instrument Serif', serif;
  font-size: 17px;
  line-height: 1.3;
  color: var(--text);
}
.product-card-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-current {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.price-original {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
}
.price-savings {
  font-size: 12px;
  font-weight: 600;
  color: #2d6a4f;
}
.product-card-footer { margin-top: auto; }

/* ─── Section Page Header ────────────────────────── */
.section-page-hero {
  padding: 56px 24px 48px;
  border-bottom: 1px solid var(--border);
}
.section-page-hero.premium-theme {
  background: linear-gradient(135deg, #1e2a1f 0%, #2d3a2e 100%);
  color: white;
}
.section-page-hero.deals-theme {
  background: linear-gradient(135deg, #2a1f0f 0%, #3d2a12 100%);
  color: white;
}
.section-page-hero h1 { color: white; font-size: clamp(32px, 5vw, 56px); }
.section-page-hero p { color: rgba(255,255,255,0.65); font-size: 18px; margin-top: 10px; }
.section-page-hero .section-label { opacity: 0.8; }

/* ─── Product Detail ──────────────────────────────── */
.product-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.product-detail-image {
  aspect-ratio: 3/4;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 88px;
}
.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-detail-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}
.product-detail-info { padding-top: 8px; }
.product-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.product-detail-breadcrumb a:hover { color: var(--text); }
.product-detail-breadcrumb span { color: var(--text-light); }
.product-detail-info h1 { font-size: clamp(28px, 3.5vw, 42px); margin-bottom: 16px; }
.product-detail-pricing {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.product-detail-pricing .price-current { font-size: 32px; }
.product-detail-pricing .price-original { font-size: 18px; }
.product-detail-desc {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 32px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.product-detail-features {
  list-style: none;
  margin-bottom: 32px;
}
.product-detail-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.product-detail-features li::before {
  content: '✓';
  color: #2d6a4f;
  font-weight: 700;
  flex-shrink: 0;
}
.trust-badges {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.trust-badge {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ─── Order Success ───────────────────────────────── */
.success-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.success-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-hover);
}
.success-icon {
  width: 64px;
  height: 64px;
  background: #eef8f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 24px;
}
.success-card h1 { font-size: 32px; margin-bottom: 12px; }
.success-card p { color: var(--text-muted); font-size: 16px; margin-bottom: 8px; }
.success-order-details {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}
.success-order-details div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.success-order-details div span:last-child { font-weight: 600; }

/* ─── Admin ───────────────────────────────────────── */
.admin-page { padding: 40px 24px 80px; }
.admin-header { margin-bottom: 40px; }
.admin-header h1 { font-size: 36px; margin-bottom: 6px; }
.admin-header p { color: var(--text-muted); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.stat-card .stat-label { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.stat-card .stat-value { font-family: 'Instrument Serif', serif; font-size: 36px; color: var(--text); }
.stat-card .stat-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-card.premium .stat-value { color: var(--premium); }
.stat-card.deals .stat-value { color: var(--accent); }
.orders-table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.orders-table-wrap h2 { padding: 20px 24px; font-size: 20px; border-bottom: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }
.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 2px;
  text-transform: capitalize;
}
.tag.premium { background: var(--premium-light); color: var(--premium); }
.tag.deals { background: var(--deals-light); color: var(--deals); }
.empty-state {
  padding: 64px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
}
.empty-state p { margin-top: 8px; font-size: 14px; }

/* ─── Two-section feature strip (homepage) ────────── */
.sections-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.section-strip-card {
  padding: 56px 48px;
  transition: background 0.25s;
}
.section-strip-card:first-child { border-right: 1px solid var(--border); }
.section-strip-card:hover { background: var(--bg-alt); }
.section-strip-card .section-label { margin-bottom: 14px; }
.section-strip-card h2 { font-size: 32px; margin-bottom: 10px; }
.section-strip-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; max-width: 320px; }

/* ─── Footer ──────────────────────────────────────── */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.5);
  padding: 40px 24px;
  text-align: center;
  font-size: 13px;
}
footer a { color: rgba(255,255,255,0.5); }
footer a:hover { color: white; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-logo { font-family: 'Instrument Serif', serif; font-size: 18px; color: white; }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 20px; }

/* ─── Error page ──────────────────────────────────── */
.error-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.error-page h1 { font-size: 48px; margin-bottom: 12px; }
.error-page p { color: var(--text-muted); font-size: 16px; margin-bottom: 24px; }

/* ─── Mobile ──────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); padding: 24px; border-bottom: 1px solid var(--border); z-index: 99; }
  .hero { padding: 56px 20px 52px; }
  .sections-strip { grid-template-columns: 1fr; }
  .section-strip-card:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  .section-strip-card { padding: 40px 24px; }
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .product-detail-image { position: static; aspect-ratio: 4/3; }
  .success-card { padding: 32px 24px; }
  th, td { padding: 10px 12px; }
  .admin-page { padding: 24px 16px 64px; }
  .section-page-hero { padding: 40px 20px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-body { padding: 12px; }
  .product-card-name { font-size: 15px; }
}
