:root {
  --bg: #f7f1e8;
  --panel: rgba(255, 251, 247, 0.78);
  --panel-strong: #fffaf4;
  --line: rgba(71, 54, 41, 0.12);
  --text: #2d241e;
  --muted: #6e6258;
  --accent: #99643a;
  --accent-deep: #54331e;
  --accent-soft: #edd8c5;
  --success: #355b42;
  --shadow: 0 18px 45px rgba(76, 51, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(230, 194, 167, 0.55), transparent 26%),
    radial-gradient(circle at bottom left, rgba(197, 172, 145, 0.32), transparent 25%),
    linear-gradient(180deg, #f5ede3 0%, #f8f4ee 100%);
}

body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.hero,
.section-block {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
}

.topbar,
.hero-grid,
.section-heading,
.price-row,
.status-row,
.field-row,
.form-actions,
.contact-grid,
.admin-grid,
.header-actions,
.architecture-grid {
  display: flex;
  gap: 16px;
}

.topbar,
.section-heading,
.price-row,
.status-row {
  justify-content: space-between;
  align-items: center;
}

.eyebrow,
.card-label {
  margin: 0 0 6px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.2rem, 3vw, 3.1rem);
}

h2 {
  font-size: clamp(2.3rem, 4vw, 4.8rem);
  line-height: 1.02;
  max-width: 10ch;
}

h3 {
  font-size: clamp(2rem, 3vw, 2.9rem);
}

.contact-chip,
.sync-badge,
.primary-btn,
.secondary-btn,
.ghost-btn,
.contact-link,
.cart-link-btn,
.stepper-btn {
  text-decoration: none;
  border-radius: 999px;
  transition: transform 180ms ease, background 180ms ease;
}

.contact-chip,
.sync-badge,
.secondary-btn,
.ghost-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
}

.contact-chip,
.sync-badge,
.secondary-btn,
.ghost-btn,
.primary-btn {
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.95rem;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  border: 0;
  cursor: pointer;
}

.header-actions {
  align-items: center;
}

.brand-badge {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7d8, #f1d67a);
  border: 1px solid rgba(84, 51, 30, 0.16);
  box-shadow: 0 8px 18px rgba(76, 51, 28, 0.12);
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sync-badge {
  font-weight: 700;
  color: var(--accent-deep);
}

.cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.cart-count {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff;
  font-size: 0.78rem;
}

.hero-grid {
  margin-top: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-card {
  flex: 1;
}

.hero-copy {
  padding: 18px 8px 8px 0;
}

.hero-tag {
  display: inline-flex;
  padding: 8px 12px;
  margin: 0 0 18px;
  border-radius: 999px;
  background: rgba(153, 100, 58, 0.12);
  color: var(--accent-deep);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-text,
.section-note,
.product-description,
.contact-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-card,
.admin-panel,
.contact-panel,
.specials,
.catalog,
.architecture-panel {
  padding: 24px;
}

.admin-hero {
  padding-bottom: 18px;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255, 248, 241, 0.92), rgba(239, 224, 211, 0.92));
  border-radius: 24px;
  border: 1px solid rgba(84, 51, 30, 0.12);
  min-height: 300px;
}

.featured-preview {
  display: grid;
  gap: 14px;
}

.admin-status-stack {
  display: grid;
  gap: 14px;
}

.status-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(84, 51, 30, 0.08);
}

.status-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.featured-preview-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: center;
}

.featured-preview-card img {
  height: 120px;
  object-fit: cover;
  border-radius: 18px;
}

.section-block {
  margin-top: 24px;
}

.architecture-grid,
.admin-grid {
  flex-wrap: wrap;
}

.architecture-grid article,
.auth-card,
.config-card {
  flex: 1 1 240px;
  min-width: 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(84, 51, 30, 0.08);
}

.architecture-grid h4,
.auth-card h4,
.config-card h4 {
  margin-bottom: 8px;
}

.section-heading {
  margin-bottom: 20px;
}

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

.product-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid rgba(84, 51, 30, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(76, 51, 28, 0.12);
}

.product-card:focus-visible {
  outline: 2px solid rgba(153, 100, 58, 0.45);
  outline-offset: 2px;
}

.image-wrap {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #eadbca, #f8f2eb);
  position: relative;
}

.image-wrap img {
  height: 100%;
  object-fit: cover;
}

.card-topline {
  position: absolute;
  inset: 14px 14px auto auto;
}

.spotlight-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(45, 36, 30, 0.82);
  color: #fff;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.product-body {
  padding: 18px;
}

.product-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.category-pill,
.tag-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.category-pill {
  background: rgba(84, 51, 30, 0.08);
}

.tag-pill {
  background: rgba(153, 100, 58, 0.14);
  color: var(--accent-deep);
}

.product-name {
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.price-current {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.price-original {
  color: var(--muted);
  text-decoration: line-through;
}

.mini-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.mini-info {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(84, 51, 30, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
}

.status-pill {
  background: rgba(53, 91, 66, 0.12);
  color: var(--success);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-link {
  color: var(--accent-deep);
  font-weight: 700;
}

.product-form {
  display: grid;
  gap: 16px;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(84, 51, 30, 0.08);
}

.search-group,
.filter-stack {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.search-group {
  flex: 1 1 240px;
}

.search-group label,
.filter-label {
  font-weight: 600;
}

.search-group input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(84, 51, 30, 0.14);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  color: var(--text);
}

.filter-stack {
  flex: 1 1 260px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-btn {
  border: 1px solid rgba(84, 51, 30, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.pill-btn.is-active {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #fff;
  border-color: transparent;
}

.pill-btn:hover {
  transform: translateY(-1px);
}

.compact-form {
  margin-top: 12px;
}

.field {
  display: grid;
  gap: 8px;
  flex: 1;
}

.field label,
.toggle span {
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(84, 51, 30, 0.14);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  color: var(--text);
}

.field textarea {
  resize: vertical;
}

.toggles {
  align-items: center;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact-grid article {
  flex: 1;
  min-width: 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(84, 51, 30, 0.08);
}

.helper-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.error-text {
  color: #8c2e2e;
}

.steps-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.empty-state {
  padding: 26px;
  border-radius: 20px;
  border: 1px dashed rgba(84, 51, 30, 0.18);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
}

.modal-shell[hidden] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 36, 30, 0.44);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: min(920px, calc(100% - 24px));
  margin: min(6vh, 48px) auto;
  background: #fffaf4;
  border-radius: 28px;
  border: 1px solid rgba(84, 51, 30, 0.12);
  box-shadow: 0 30px 70px rgba(39, 24, 13, 0.26);
  overflow: hidden;
}

.modal-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.modal-image-wrap {
  background: linear-gradient(135deg, #eadbca, #f8f2eb);
  min-height: 520px;
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 28px;
}

.modal-price-row {
  margin: 18px 0 14px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent-deep);
  font-size: 1.4rem;
  cursor: pointer;
}

.drawer-shell[hidden] {
  display: none;
}

.drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 31;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 36, 30, 0.28);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(460px, 100%);
  height: 100%;
  background: #fffaf4;
  border-left: 1px solid rgba(84, 51, 30, 0.12);
  box-shadow: -12px 0 40px rgba(39, 24, 13, 0.18);
  display: flex;
  flex-direction: column;
}

.drawer-header,
.drawer-footer {
  padding: 20px;
  border-bottom: 1px solid rgba(84, 51, 30, 0.08);
}

.drawer-footer {
  border-top: 1px solid rgba(84, 51, 30, 0.08);
  border-bottom: 0;
  margin-top: auto;
}

.cart-items {
  padding: 16px 20px;
  overflow: auto;
  display: grid;
  gap: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(84, 51, 30, 0.08);
}

.cart-item img {
  width: 88px;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
}

.cart-item-body {
  display: grid;
  gap: 8px;
}

.cart-item-top,
.cart-item-bottom,
.cart-summary,
.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-actions {
  margin-top: 14px;
}

.cart-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(84, 51, 30, 0.06);
}

.stepper-btn,
.cart-link-btn {
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.stepper-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(84, 51, 30, 0.1);
}

.contact-chip:hover,
.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.contact-link:hover {
  transform: translateY(-1px);
}

@media (max-width: 960px) {
  .hero-grid,
  .product-grid,
  .contact-grid,
  .field-row,
  .section-heading,
  .admin-grid,
  .header-actions,
  .architecture-grid,
  .filters-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .modal-layout {
    grid-template-columns: 1fr;
  }

  .modal-image-wrap {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding-top: 10px;
  }

  .hero,
  .section-block {
    border-radius: 22px;
  }

  .hero,
  .hero-card,
  .admin-panel,
  .contact-panel,
  .specials,
  .catalog {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .featured-preview-card {
    grid-template-columns: 1fr;
  }

  .featured-preview-card img {
    height: 180px;
  }

  .drawer-panel {
    width: 100%;
  }
}
