:root {
  color-scheme: light;
  --ink: #201f25;
  --muted: #686672;
  --paper: #fffaf8;
  --surface: #ffffff;
  --line: #e7dfda;
  --rose: #c94f70;
  --coral: #e97b5f;
  --sage: #7f9a74;
  --gold: #c99b46;
  --charcoal: #30323a;
  --shadow: 0 18px 45px rgba(44, 35, 35, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

button,
select,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 250, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.main-nav,
.header-tools,
.hero-actions,
.filter-row,
.cart-header,
.cart-summary,
.admin-toolbar {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--charcoal);
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0;
}

.main-nav {
  justify-content: center;
  gap: clamp(16px, 3vw, 36px);
  color: var(--muted);
  font-weight: 650;
}

.main-nav a:hover,
.admin-link:hover {
  color: var(--rose);
}

.header-tools {
  justify-content: flex-end;
  gap: 10px;
}

.select-label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

select,
input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

select {
  padding: 0 30px 0 10px;
}

input {
  width: 100%;
  padding: 0 12px;
}

.icon-button,
.primary-button,
.secondary-button,
.ghost-button,
.admin-link,
.filter-chip,
.order-filter {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 750;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  background: #fff;
  border-color: var(--line);
}

.primary-button,
.secondary-button,
.ghost-button,
.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.primary-button {
  color: #fff;
  background: var(--rose);
}

.secondary-button {
  color: var(--charcoal);
  background: #fff;
  border-color: var(--line);
}

.ghost-button {
  color: var(--charcoal);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
}

.admin-link {
  color: var(--charcoal);
  background: #fff;
  border-color: var(--line);
}

.hero {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 6vw, 78px);
  background:
    linear-gradient(90deg, rgba(32, 31, 37, 0.72), rgba(32, 31, 37, 0.26), rgba(255, 250, 248, 0.05)),
    url("https://images.unsplash.com/photo-1596462502278-27bfdc403348?auto=format&fit=crop&w=1800&q=85")
      center / cover;
}

.hero-content {
  width: min(640px, 100%);
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #ffd7cc;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--charcoal);
  color: #fff;
}

.stats-band article {
  display: grid;
  gap: 6px;
  padding: 24px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.stats-band strong {
  font-size: 28px;
}

.stats-band span {
  color: rgba(255, 255, 255, 0.7);
}

.section-shell,
.about-section,
.admin-section {
  padding: clamp(48px, 8vw, 86px) clamp(18px, 5vw, 64px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.filter-row {
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip,
.order-filter {
  padding: 0 14px;
  color: var(--muted);
  background: #fff;
  border-color: var(--line);
}

.filter-chip.active,
.order-filter.active {
  color: #fff;
  background: var(--charcoal);
  border-color: var(--charcoal);
}

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

.product-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(70, 49, 45, 0.07);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #f5ece8;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.product-card h3 {
  min-height: 48px;
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-row strong {
  color: var(--rose);
  font-size: 19px;
}

.price-row button {
  white-space: nowrap;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 42px;
  background: #fff;
}

.about-section p {
  color: var(--muted);
  line-height: 1.8;
}

.about-list {
  display: grid;
  gap: 12px;
  align-content: center;
}

.about-list span {
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
}

.admin-section {
  background: #f6f0ed;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-card span {
  color: var(--muted);
}

.metric-card strong {
  font-size: 30px;
}

.admin-toolbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 13px;
}

td {
  vertical-align: top;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.status-paid {
  background: var(--gold);
}

.status-processing {
  background: var(--coral);
}

.status-shipped {
  background: var(--sage);
}

.status-cancelled {
  background: var(--muted);
}

.admin-page {
  min-height: 100vh;
  background: #f6f0ed;
}

.admin-shell {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px);
}

.admin-login {
  display: grid;
  gap: 22px;
  width: min(480px, 100%);
  margin: 8vh auto;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-login h1 {
  margin-bottom: 10px;
  color: var(--charcoal);
  font-size: clamp(36px, 6vw, 58px);
}

.admin-login p {
  color: var(--muted);
  line-height: 1.7;
}

.admin-message {
  min-height: 22px;
  color: var(--rose);
  font-weight: 750;
}

.admin-private {
  padding: 0;
  background: transparent;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: flex-end;
  background: rgba(32, 31, 37, 0.38);
}

.cart-drawer.open {
  display: flex;
}

.cart-panel {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  width: min(430px, 100%);
  height: 100%;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.cart-header {
  justify-content: space-between;
}

.cart-header h2 {
  font-size: 28px;
}

.cart-items {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 10px 0;
}

.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-line img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.cart-summary {
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.checkout-form {
  display: grid;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  padding: 12px 16px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 8px;
  transition: 0.2s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(18px, 5vw, 64px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.site-footer a {
  color: var(--rose);
  font-weight: 750;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .main-nav,
  .header-tools {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-section,
  .section-heading,
  .admin-toolbar {
    display: grid;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 620px;
    align-items: flex-end;
  }

  .stats-band,
  .product-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .header-tools {
    gap: 8px;
  }

  .select-label {
    width: calc(50% - 4px);
  }

  .select-label select {
    width: 100%;
  }

  .cart-panel {
    width: 100%;
  }

  .site-footer {
    display: grid;
  }
}
