/* ==========================================================
   华丰超市商务平台演示站 — 样式
   配色：绿 + 橙，超市生活感，干净明快
   ========================================================== */

:root {
  --green-900: #0a4f3d;
  --green-800: #0e7a5f;
  --green-700: #12916c;
  --green-600: #16a878;
  --green-100: #e6f5ee;
  --green-050: #f2faf5;
  --orange-700: #d94f0a;
  --orange-600: #e8590c;
  --orange-500: #f76707;
  --orange-100: #fff0e6;
  --ink-900: #12261f;
  --ink-700: #33483f;
  --ink-500: #5c7168;
  --line: #dce9e2;
  --paper: #ffffff;
  --paper-soft: #f6f9f7;
  --shadow-sm: 0 2px 10px rgba(10, 79, 61, 0.07);
  --shadow-md: 0 12px 34px rgba(10, 79, 61, 0.13);
  --shadow-lg: 0 22px 60px rgba(10, 79, 61, 0.2);
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1180px;
  --ease: 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink-900);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--green-800);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

/* ---------- 通用工具类 ---------- */
.container {
  width: min(100% - 40px, var(--maxw));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--green-800);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  transition: top var(--ease);
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease), border-color var(--ease);
  text-align: center;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--green-800);
  color: #fff;
  box-shadow: 0 8px 20px rgba(14, 122, 95, 0.24);
}

.btn-primary:hover {
  background: var(--green-900);
  box-shadow: 0 12px 26px rgba(14, 122, 95, 0.32);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--green-800);
  border-color: var(--green-800);
}

.btn-outline:hover {
  background: var(--green-100);
  color: var(--green-900);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-700);
  font-size: 1.05rem;
  line-height: 1;
  transition: background var(--ease), color var(--ease);
}

.icon-btn:hover {
  background: var(--orange-100);
  color: var(--orange-700);
}

/* ---------- 公告条 ---------- */
.announce {
  background: var(--green-900);
  color: #eaf7f0;
  font-size: 0.85rem;
}

.announce-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding-block: 7px;
  flex-wrap: wrap;
}

.announce-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.announce-tel {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.announce-tel:hover {
  color: var(--orange-500);
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  color: #fff;
  font-weight: 900;
  font-size: 1.4rem;
}

.brand-mark::before {
  content: "H";
}

.brand-mark-leaf {
  position: absolute;
  right: -4px;
  top: -4px;
  width: 15px;
  height: 15px;
  background: var(--orange-500);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-20deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  color: var(--green-900);
}

.brand-text small {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--orange-700);
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline: auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-700);
  font-size: 0.94rem;
  font-weight: 600;
  transition: background var(--ease), color var(--ease);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--green-100);
  color: var(--green-900);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.lang-switch,
.footer-lang {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-btn {
  min-width: 38px;
  padding: 6px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-500);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  transition: background var(--ease), color var(--ease);
}

.lang-btn:hover {
  color: var(--green-800);
}

.lang-btn.is-active {
  background: var(--green-800);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 122, 95, 0.28);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--green-900);
  transition: transform var(--ease), opacity var(--ease);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 24%, rgba(247, 103, 7, 0.14), transparent 42%),
    linear-gradient(135deg, #f4fbf7 0%, #eaf6ef 55%, #fff7f0 100%);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(14, 122, 95, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, #000, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
  padding-block: 80px;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--green-900);
  margin-bottom: 20px;
}

.hero-desc {
  max-width: 560px;
  font-size: 1.05rem;
  color: var(--ink-700);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-note {
  margin: 22px 0 0;
  font-size: 0.8rem;
  color: var(--ink-500);
}

.hero-art {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 122, 95, 0.16), transparent 68%);
}

.hero-card {
  position: absolute;
  width: 280px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  overflow: hidden;
}

.hero-card-back {
  transform: rotate(-9deg) translate(-52px, -18px);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(145deg, var(--orange-100), #fff);
}

.hero-card-front {
  position: relative;
  transform: rotate(4deg) translate(26px, 22px);
  padding: 16px;
  background: #fff;
}

.hero-card-head {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-100);
}

.hero-dot:first-child { background: var(--orange-500); }
.hero-dot:nth-child(2) { background: #f2b705; }
.hero-dot:nth-child(3) { background: var(--green-600); }

.hero-card-line {
  height: 10px;
  border-radius: 6px;
  background: var(--paper-soft);
  margin-bottom: 10px;
}

.hero-line-1 { width: 70%; }
.hero-line-2 { width: 45%; }

.hero-card-row {
  display: flex;
  gap: 10px;
  margin: 18px 0 14px;
}

.hero-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 14px;
  font-size: 1.9rem;
  background: linear-gradient(145deg, var(--green-100), #fff);
}

.hero-card-price {
  text-align: right;
  font-weight: 900;
  color: var(--orange-700);
  font-size: 1.1rem;
}

.hero-badge {
  position: absolute;
  right: 8px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--green-800);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
}

/* ---------- 区块通用 ---------- */
.section-heading {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.25;
  color: var(--green-900);
  margin-bottom: 12px;
}

.section-desc {
  color: var(--ink-500);
  font-size: 1rem;
}

/* ---------- 商品区 ---------- */
.products-section {
  padding-block: 78px;
}

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

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-700);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.cat-tab:hover {
  border-color: var(--green-600);
  color: var(--green-800);
  transform: translateY(-1px);
}

.cat-tab.is-active {
  background: var(--green-800);
  border-color: var(--green-800);
  color: #fff;
  box-shadow: 0 6px 16px rgba(14, 122, 95, 0.22);
}

.cat-tab .cat-emoji {
  font-size: 1.05rem;
  line-height: 1;
}

.product-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
  flex: 0 1 300px;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 0.95rem;
  opacity: 0.65;
  pointer-events: none;
}

.product-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-900);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.product-search input:focus {
  outline: none;
  background: #fff;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(14, 122, 95, 0.14);
}

.products-meta {
  margin-bottom: 16px;
  font-size: 0.86rem;
  color: var(--ink-500);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(14, 122, 95, 0.3);
}

.product-thumb {
  position: relative;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.6rem;
  filter: saturate(1.05);
}

.product-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.45), transparent 45%);
  pointer-events: none;
}

.product-cat-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--green-900);
  font-size: 0.7rem;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 16px;
}

.product-name {
  min-height: 44px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.4;
  margin-bottom: 8px;
}

.product-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 13px;
}

.product-price {
  color: var(--orange-700);
  font-weight: 900;
  font-size: 1.22rem;
  line-height: 1.1;
  white-space: nowrap;
}

.product-unit {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-500);
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 13px;
  border: 0;
  border-radius: 10px;
  background: var(--green-800);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background var(--ease), transform var(--ease);
}

.add-btn:hover {
  background: var(--green-900);
  transform: scale(1.04);
}

.add-btn .plus {
  font-size: 1.05rem;
  line-height: 1;
}

.no-result {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  color: var(--ink-500);
}

.no-result-icon {
  display: block;
  font-size: 2.6rem;
  margin-bottom: 12px;
}

/* ---------- 关于 ---------- */
.about-section {
  padding-block: 78px;
  background: var(--paper-soft);
  border-block: 1px solid var(--line);
}

.about-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.about-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  color: var(--green-900);
  margin-bottom: 18px;
}

.about-copy p:not(.section-eyebrow) {
  color: var(--ink-700);
  margin-bottom: 14px;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 22px;
}

.text-link {
  font-weight: 700;
  border-bottom: 2px solid var(--green-100);
}

.text-link:hover {
  border-color: var(--orange-500);
  text-decoration: none;
}

.about-art {
  display: flex;
  justify-content: center;
}

.about-art-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 320px;
  padding: 40px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--green-800), var(--green-900));
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.about-art-emoji {
  font-size: 3.6rem;
  margin-bottom: 8px;
}

.about-art-card strong {
  font-size: 1.15rem;
}

.about-art-card span:last-child {
  color: #cdeadd;
  font-size: 0.9rem;
}

/* ---------- 联系 ---------- */
.contact-section {
  padding-block: 78px;
  background:
    radial-gradient(circle at 12% 20%, rgba(247, 103, 7, 0.16), transparent 40%),
    linear-gradient(135deg, var(--green-900), #0c6450);
  color: #fff;
}

.section-heading-light h2 {
  color: #fff;
}

.section-heading-light .section-eyebrow {
  background: rgba(255, 255, 255, 0.14);
  color: #d7f3e5;
}

.section-heading-light .section-desc {
  color: #cbe7da;
}

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

.contact-card {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.contact-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.contact-card p {
  margin: 0;
  color: #d9efe4;
  font-size: 0.95rem;
}

.contact-tel {
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
}

.contact-tel:hover {
  color: #ffd2b0;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: #0a3f32;
  color: #cfe8dc;
  padding-block: 40px 26px;
  font-size: 0.9rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.1rem;
}

.footer-brand span {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: #ffb37a;
  font-weight: 800;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #dff2e8;
}

.footer-links a:hover {
  color: #ffb37a;
}

.footer-lang {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.footer-lang .lang-btn {
  color: #cfe8dc;
}

.footer-lang .lang-btn.is-active {
  background: var(--orange-600);
  color: #fff;
}

.footer-copy {
  margin: 20px 0 0;
  font-size: 0.82rem;
  color: #9cc6b3;
}

/* ---------- 购物车悬浮按钮 ---------- */
.cart-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--orange-600);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(232, 89, 12, 0.4);
  transition: transform var(--ease), background var(--ease);
}

.cart-fab:hover {
  transform: translateY(-3px) scale(1.03);
  background: var(--orange-700);
}

.cart-fab-icon {
  font-size: 1.55rem;
  line-height: 1;
}

.cart-badge {
  position: absolute;
  top: -6px;
  left: -4px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green-800);
  border: 2px solid #fff;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

/* ---------- 遮罩层 ---------- */
.cart-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(8, 32, 24, 0.5);
  backdrop-filter: blur(2px);
  animation: fade-in var(--ease);
}

/* ---------- 购物车抽屉 ---------- */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: slide-in var(--ease);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--green-900);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 22px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
  color: var(--ink-500);
}

.cart-empty-icon {
  font-size: 3.2rem;
  margin-bottom: 12px;
}

.cart-empty p {
  margin: 0;
}

.cart-items {
  display: flex;
  flex-direction: column;
}

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

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  font-size: 1.6rem;
}

.cart-item-info {
  min-width: 0;
}

.cart-item-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.cart-item-price {
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--orange-700);
  font-weight: 800;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-800);
  font-weight: 900;
  line-height: 1;
}

.qty-btn:hover {
  background: var(--green-100);
}

.qty-num {
  min-width: 22px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
}

.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-item-sum {
  font-weight: 900;
  color: var(--ink-900);
  font-size: 0.92rem;
  white-space: nowrap;
}

.remove-btn {
  border: 0;
  background: transparent;
  color: var(--ink-500);
  font-size: 0.78rem;
  text-decoration: underline;
  padding: 2px;
}

.remove-btn:hover {
  color: var(--orange-700);
}

.cart-footer {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 1rem;
}

.cart-total-row strong {
  font-size: 1.5rem;
  color: var(--orange-700);
}

/* ---------- 模态框 ---------- */
.order-modal,
.success-modal {
  position: fixed;
  z-index: 205;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 26px 28px 28px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: pop-in var(--ease);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--green-900);
}

.modal-note {
  font-size: 0.83rem;
  color: var(--ink-500);
  margin-bottom: 18px;
}

.form-field {
  margin-bottom: 15px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-700);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  color: var(--ink-900);
  resize: vertical;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(14, 122, 95, 0.14);
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--orange-600);
  box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.12);
}

.field-error {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--orange-700);
}

#orderForm .btn {
  margin-top: 8px;
}

.success-modal {
  text-align: center;
  max-width: 420px;
}

.success-icon {
  font-size: 3.2rem;
  margin-bottom: 8px;
}

.success-modal h2 {
  font-size: 1.4rem;
  color: var(--green-900);
  margin-bottom: 8px;
}

.success-msg {
  color: var(--ink-500);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.order-no-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--green-050);
  border: 1px dashed var(--green-600);
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--ink-700);
}

.order-no-row strong {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--green-800);
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 230;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--green-900);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  animation: toast-in var(--ease);
  white-space: nowrap;
}

/* ---------- 动画 ---------- */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes pop-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-block: 60px;
  }

  .hero-art {
    min-height: 300px;
    max-width: 520px;
    width: 100%;
    margin-inline: auto;
  }

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

  .about-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-art {
    order: -1;
  }

  .about-art-card {
    max-width: 100%;
  }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, var(--maxw));
  }

  html {
    scroll-padding-top: 124px;
  }

  .announce-inner {
    justify-content: center;
    text-align: center;
    gap: 4px 12px;
    font-size: 0.78rem;
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: 0;
    padding-block: 10px;
    gap: 10px;
  }

  .brand-text strong { font-size: 1rem; }
  .brand-text small { font-size: 0.6rem; }
  .brand-mark { width: 38px; height: 38px; }

  .header-actions { margin-left: auto; }
  .lang-switch { padding: 2px; }
  .lang-btn { min-width: 32px; padding: 6px 7px; font-size: 0.74rem; }

  .menu-toggle { display: inline-flex; }

  .nav {
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 4px 0 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height var(--ease), opacity var(--ease);
  }

  .nav.is-open {
    max-height: 320px;
    opacity: 1;
    padding-bottom: 6px;
  }

  .nav-link {
    padding: 11px 14px;
    border-radius: 10px;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero h1 { font-size: 1.85rem; }
  .hero-desc { font-size: 0.96rem; }
  .hero-art { min-height: 260px; }
  .hero-card { width: 240px; }
  .hero-card-back { height: 180px; font-size: 4rem; }
  .hero-item { width: 52px; height: 52px; font-size: 1.6rem; }

  .products-section,
  .about-section,
  .contact-section { padding-block: 56px; }

  .products-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .product-search { flex: 1 1 auto; width: 100%; }

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

  .product-thumb { height: 118px; font-size: 2.9rem; }
  .product-info { padding: 12px; }
  .product-name { font-size: 0.88rem; min-height: 40px; }
  .product-price { font-size: 1.05rem; }
  .add-btn { padding: 8px 10px; font-size: 0.76rem; }

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

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

  .cart-fab {
    right: 16px;
    bottom: 16px;
    min-height: 52px;
    padding: 0 16px;
  }

  .order-modal,
  .success-modal {
    padding: 22px 20px 24px;
  }
}

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-thumb { height: 140px; }
}

/* ---------- 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
