@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #f8f7fc;
  --paper: #ffffff;
  --ink: #1e1b2e;
  --accent: #6b4c9a;
  --gold: #2a9d8f;
  --blush: #ece8f4;
  --sage: #2a9d8f;
  --muted: #6b6380;
  --border: #e4e0ed;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 4px;
  --max-w: 1280px;
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

/* === TOP NAVBAR === */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,251,249,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2.5rem;
}
.topnav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0 0;
}
.topnav-brand {
  display: block;
  height: 52px;
  width: auto;
  margin-bottom: 0.75rem;
}
.topnav-brand img {
  height: 100%;
  width: auto;
}
.topnav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
  padding-bottom: 0.75rem;
}
.topnav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.topnav-links a:hover,
.topnav-links a.active { color: var(--ink); }
.cart-btn {
  position: relative;
  background: none;
  border: none;
  padding: 0.4rem;
}
.cart-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; }
.cart-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-count:empty { display: none; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
}
.menu-toggle svg { width: 22px; height: 22px; stroke: var(--ink); }

/* === LAYOUT === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2.5rem;
}

/* === HERO === */
.hero {
  background: var(--blush);
  padding: 6rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(200,144,126,0.08);
}
.hero h1 {
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
  position: relative;
}
.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  position: relative;
}
.hero-btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 0.9rem 2.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s;
  position: relative;
}
.hero-btn:hover { background: var(--accent); }

/* === SECTION HEADERS === */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}
.section-header h2 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
}
.section-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* === PRODUCT GRID === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
.product-card {
  background: var(--paper);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.product-card:hover {
  box-shadow: 0 12px 32px rgba(44,35,33,0.08);
  transform: translateY(-3px);
}
.product-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: var(--blush);
}
.product-card-body {
  padding: 1.25rem 1.5rem;
}
.product-card-body h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.product-card-body .price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
}
.product-card-body .cat {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

/* === PRODUCT DETAIL === */
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
  margin-top: 2rem;
}
.product-detail img {
  width: 100%;
  background: var(--blush);
}
.product-detail h1 {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.product-detail .price {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.product-detail .description {
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 0.92rem;
}
.product-detail .features {
  list-style: none;
  margin-bottom: 2rem;
}
.product-detail .features li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.88rem;
  color: var(--muted);
}
.product-detail .features li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.add-to-cart-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 1rem 3rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s;
}
.add-to-cart-btn:hover { background: var(--accent); }

/* === CART === */
.cart-items { margin-top: 1.5rem; }
.cart-item {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-family: var(--serif); font-size: 1rem; font-weight: 500; margin-bottom: 0.2rem; }
.cart-item-info .price { color: var(--gold); font-weight: 600; font-size: 0.9rem; }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-item-qty button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: var(--paper);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: underline;
}
.cart-summary {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--blush);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}
.cart-summary-row.total {
  font-weight: 700;
  font-size: 1.1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.75rem;
}
.checkout-btn {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  transition: all 0.3s;
}
.checkout-btn:hover { background: var(--accent); }

/* === CHECKOUT === */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  margin-top: 2rem;
}
.form-section h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-row.full { grid-template-columns: 1fr; }
.form-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-field input,
.form-field select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--paper);
  transition: border-color 0.2s;
}
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.order-summary-side {
  background: var(--blush);
  padding: 2rem;
  position: sticky;
  top: 90px;
}
.order-summary-side h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.payment-methods { margin-top: 2rem; }
.paymethod {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.paymethod:hover,
.paymethod.selected { border-color: var(--accent); }
.paymethod input[type="radio"] { accent-color: var(--accent); }
.paymethod-label { font-size: 0.88rem; font-weight: 500; }

/* === PAGE CONTENT === */
.page-content {
  max-width: 680px;
  margin: 2rem auto;
}
.page-content h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}
.page-content h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.page-content p {
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.9;
  font-size: 0.92rem;
}
.page-content ul {
  color: var(--muted);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  font-size: 0.92rem;
}
.page-content ul li { margin-bottom: 0.5rem; line-height: 1.7; }

/* === FOOTER === */
.site-footer {
  margin-top: 5rem;
  padding: 3rem 2.5rem;
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  text-align: center;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 1.25rem;
}
.footer-links a {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }
.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

/* === SUCCESS === */
.success-box {
  text-align: center;
  padding: 5rem 2rem;
}
.success-box .checkmark {
  width: 72px;
  height: 72px;
  background: var(--sage);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}
.success-box .checkmark svg { width: 32px; height: 32px; stroke: #fff; }
.success-box h1 { font-family: var(--serif); font-size: 2.2rem; font-weight: 400; margin-bottom: 0.5rem; }
.success-box p { color: var(--muted); font-size: 0.95rem; }

/* === EMPTY === */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
}
.empty-state h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; margin-bottom: 0.5rem; color: var(--ink); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .topnav { padding: 0 1.5rem; }
  .topnav-inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding: 0.75rem 0; }
  .topnav-brand { margin-bottom: 0; height: 40px; }
  .topnav-links { display: none; width: 100%; justify-content: center; padding: 0.5rem 0 0.75rem; border-top: 1px solid var(--border); margin-top: 0.5rem; }
  .topnav-links.open {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
  .menu-toggle { display: block; }
  .hero { padding: 4rem 1.5rem; }
  .hero h1 { font-size: 2.2rem; }
  .container { padding: 2rem 1.5rem; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .product-card img { height: 200px; }
  .product-detail { grid-template-columns: 1fr; gap: 2rem; }
  .checkout-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
}
