:root {
  --burgundy: #7a1f35;
  --gold: #d4af37;
  --gold-soft: #f2dd92;
  --cream: #fbf7ef;
  --paper: #fffdf9;
  --ink: #2f2728;
  --muted: #725f62;
  --line: #eadfd4;
  --shadow: 0 20px 60px rgba(76, 24, 37, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  padding: 10px 18px;
  background: var(--burgundy);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid rgba(234, 223, 212, 0.85);
  box-shadow: 0 8px 30px rgba(76, 24, 37, 0.08);
  backdrop-filter: blur(16px);
}

.logo {
  color: var(--burgundy);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 900;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  color: #433638;
  font-size: 0.95rem;
  font-weight: 750;
}

.desktop-nav a, .footer-nav a { padding: 8px 0; }
.desktop-nav a:hover, .footer-nav a:hover { color: var(--burgundy); }

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--burgundy);
  font-weight: 900;
}

.page-hero, .auth-shell {
  padding: clamp(44px, 7vw, 84px) clamp(20px, 8vw, 112px);
  background:
    linear-gradient(135deg, rgba(122, 31, 53, 0.08), rgba(212, 175, 55, 0.18)),
    var(--cream);
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--burgundy);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  color: var(--burgundy);
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 13ch;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  line-height: 1;
}

h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
p { color: var(--muted); line-height: 1.7; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 8px;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1;
}

.button.primary {
  background: var(--burgundy);
  color: #fff;
  box-shadow: 0 14px 26px rgba(122, 31, 53, 0.24);
}

.button.secondary {
  background: var(--gold);
  color: #27190b;
}

.button.pay {
  background: #162f57;
  color: #fff;
  box-shadow: 0 14px 26px rgba(22, 47, 87, 0.2);
}

.section {
  padding: clamp(42px, 7vw, 76px) clamp(20px, 8vw, 112px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.field, .select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
}

.product-grid, .module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card, .product-card, .auth-card, .detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(76, 24, 37, 0.08);
}

.product-card { overflow: hidden; }
.product-image {
  min-height: 210px;
  position: relative;
  background:
    linear-gradient(135deg, rgba(122, 31, 53, 0.16), rgba(212, 175, 55, 0.28)),
    repeating-linear-gradient(45deg, #fffdf9 0 14px, #f8efd9 14px 28px);
}

.product-image span {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--burgundy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.product-copy, .card { padding: 18px; }
.product-copy h3, .card h3 { margin: 0 0 8px; }
.price { margin: 0 0 14px; color: var(--burgundy); font-weight: 900; }

.auth-shell {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 460px);
  padding: clamp(24px, 5vw, 42px);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: #493d3f;
  font-size: 0.92rem;
  font-weight: 800;
}

.notice {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff4d2;
  color: #5e4212;
  font-weight: 800;
}

.notice.show { display: block; }

.summary-strip {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8ed;
  color: var(--burgundy);
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.detail-visual {
  min-height: 420px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(122, 31, 53, 0.1)),
    linear-gradient(45deg, #d4af37, #f8e7a1 48%, #7a1f35);
  box-shadow: var(--shadow);
}

.detail-card { padding: clamp(22px, 4vw, 36px); }
.meta-list { display: grid; gap: 10px; padding: 0; margin: 20px 0; list-style: none; }
.meta-list li { padding: 12px 14px; border-radius: 8px; background: #fff8ed; color: var(--muted); }

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

.site-footer {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 48px 20px 104px;
  background: var(--burgundy);
  color: #fff;
  text-align: center;
}

.site-footer h2 { color: #fff; font-size: 2rem; }
.site-footer p { margin: 0; color: rgba(255, 255, 255, 0.82); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  font-weight: 800;
}
.footer-nav a:hover { color: var(--gold-soft); }

.mobile-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 -14px 30px rgba(76, 24, 37, 0.12);
}

.mobile-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 8px;
  color: var(--burgundy);
  font-size: 0.72rem;
  font-weight: 900;
}

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .page-hero, .detail-layout { grid-template-columns: 1fr; }
  .product-grid, .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  body { padding-bottom: 72px; }
  .site-header { min-height: 68px; padding: 12px 18px; }
  .header-actions .hide-mobile { display: none; }
  .mobile-nav { display: grid; }
  .cart-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar span { width: 100%; text-align: center; }
  .product-grid, .module-grid { grid-template-columns: 1fr; }
  .button { width: 100%; }
}
