:root {
  --green: #217a3d;
  --green-dark: #16572d;
  --red: #c9242b;
  --ink: #171b21;
  --muted: #687078;
  --line: #dfe3e6;
  --soft: #f5f7f5;
  --white: #ffffff;
  --shadow: 0 14px 35px rgb(20 37 27 / 8%);
  --content: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.6; }
body, button, input { letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
.content-width { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 9px 14px; background: var(--ink); color: var(--white); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 40; background: rgb(255 255 255 / 96%); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { width: min(1380px, calc(100% - 48px)); min-height: 74px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.brand { display: inline-flex; flex-direction: column; flex: none; line-height: 1.15; }
.brand-name { color: var(--ink); font-size: 27px; font-weight: 760; white-space: nowrap; }
.brand-name b { color: var(--red); }
.brand-tagline { margin-top: 5px; color: var(--muted); font-size: 12px; }
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: 44px; }
.desktop-nav a { position: relative; padding: 25px 0 23px; font-size: 16px; font-weight: 580; }
.desktop-nav a::after { content: ""; position: absolute; right: 0; bottom: 17px; left: 0; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .2s ease; }
.desktop-nav a:hover::after, .desktop-nav a:focus-visible::after, .desktop-nav a.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.cart-link { position: relative; display: grid; width: 42px; height: 42px; place-items: center; }
.cart-link svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; color: white; background: var(--red); font-size: 11px; line-height: 18px; text-align: center; }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 10px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--ink); }
.mobile-nav { padding: 4px 24px 18px; border-top: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; }

.hero { position: relative; min-height: 610px; overflow: hidden; background: var(--white); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-inner { position: relative; z-index: 1; width: min(1380px, calc(100% - 48px)); min-height: 610px; margin-inline: auto; display: flex; align-items: center; }
.hero-copy { width: min(500px, 43%); padding: 38px 0 72px; }
.hero h1 { margin: 0; font-size: clamp(52px, 6vw, 84px); line-height: .98; font-weight: 800; }
.hero-slogan { margin: 24px 0 0; font-size: 34px; line-height: 1.25; font-weight: 560; }
.hero-description { max-width: 460px; margin: 18px 0 0; color: #464d54; font-size: 19px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 34px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid transparent; border-radius: 7px; font-weight: 680; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: var(--white); background: var(--red); }
.button-primary:hover { background: #aa1b22; }
.button-secondary { color: var(--ink); border-color: #aeb5ba; background: var(--white); }
.text-link { font-weight: 680; }
.text-link span { margin-left: 6px; }

.category-rail { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.category-grid a { min-height: 94px; padding: 22px 26px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; font-weight: 680; }
.category-grid a:first-child { border-left: 1px solid var(--line); }
.category-grid span { color: var(--green); font-size: 12px; font-weight: 750; }

.products-section { padding: 92px 0 100px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.section-heading h2, .merchant-section h2 { margin: 0; font-size: 38px; line-height: 1.2; }
.section-heading p { margin: 10px 0 0; color: var(--muted); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.filter-button { min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px; color: #4d565e; background: transparent; cursor: pointer; }
.filter-button:hover, .filter-button:focus-visible { border-color: var(--line); }
.filter-button.active { color: var(--white); background: var(--green); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px 26px; }
.product-card { border-bottom: 1px solid var(--line); padding-bottom: 25px; }
.product-card[hidden] { display: none; }
.product-image-link { display: block; aspect-ratio: 1 / .88; overflow: hidden; border: 1px solid #edf0ee; border-radius: 7px; background: var(--white); }
.product-image-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-image-link:hover img { transform: scale(1.025); }
.product-card-body { padding-top: 18px; }
.product-category { margin: 0 0 5px; color: var(--green); font-size: 13px; font-weight: 720; }
.product-card h3 { margin: 0; font-size: 21px; line-height: 1.35; }
.card-description { min-height: 50px; margin: 9px 0 16px; color: var(--muted); font-size: 14px; }
.card-purchase { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card-purchase strong, .product-price { color: var(--red); font-size: 23px; }
.button-small { min-height: 39px; padding: 0 16px; border-color: #aeb5ba; background: var(--white); font-size: 14px; }

.service-strip { padding: 34px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.service-grid div { padding: 6px 30px; border-right: 1px solid var(--line); }
.service-grid div:first-child { padding-left: 0; }
.service-grid div:last-child { border-right: 0; }
.service-grid strong, .service-grid span { display: block; }
.service-grid strong { font-size: 17px; }
.service-grid span { margin-top: 4px; color: var(--muted); font-size: 13px; }

.merchant-section { padding: 96px 0; }
.merchant-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; align-items: start; }
.merchant-intro { max-width: 470px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }
.merchant-details { margin: 0; border-top: 1px solid var(--ink); }
.merchant-details div { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.merchant-details dt { color: var(--muted); }
.merchant-details dd { margin: 0; font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); background: #fafbfa; }
.footer-top { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-top nav, .footer-bottom nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-top nav a, .footer-bottom nav a { color: #4d565e; font-size: 14px; }
.footer-bottom { min-height: 62px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; }
.footer-brand .brand-name { font-size: 23px; }
.simple-footer { margin-top: 80px; }

.compact-header .header-inner { min-height: 68px; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; padding: 28px 0; color: var(--muted); font-size: 14px; }
.breadcrumbs a:hover { color: var(--green); }
.product-page { padding-bottom: 24px; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(360px, .97fr); gap: 70px; padding: 12px 0 76px; }
.product-detail-media { aspect-ratio: 1 / .9; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--white); }
.product-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-copy { padding: 26px 0; }
.product-detail-copy h1 { margin: 6px 0 12px; font-size: 40px; line-height: 1.2; }
.product-description { color: var(--muted); font-size: 17px; }
.product-price { margin: 26px 0; font-weight: 760; }
.product-specs { margin: 0; border-top: 1px solid var(--line); }
.product-specs div { display: grid; grid-template-columns: 110px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.product-specs dt { color: var(--muted); }
.product-specs dd { margin: 0; }
.quantity-row { display: flex; align-items: center; gap: 28px; margin-top: 25px; }
.stepper { display: grid; grid-template-columns: 40px 52px 40px; border: 1px solid #aeb5ba; border-radius: 6px; overflow: hidden; }
.stepper button, .stepper input { height: 40px; border: 0; background: var(--white); text-align: center; }
.stepper button { cursor: pointer; }
.stepper input { border-inline: 1px solid var(--line); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
.product-actions { display: flex; gap: 12px; margin-top: 26px; }
.status-note { margin-top: 18px; padding-left: 13px; border-left: 3px solid var(--green); color: var(--muted); font-size: 13px; }
.detail-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 42px 0; border-top: 1px solid var(--line); }
.detail-notes h2 { margin: 0 0 8px; font-size: 20px; }
.detail-notes p { margin: 0; color: var(--muted); }

.checkout-page > h1 { margin: 4px 0 26px; font-size: 38px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .72fr); gap: 30px; align-items: start; }
.checkout-main { display: grid; gap: 22px; }
.checkout-section, .order-summary { border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.checkout-section { padding: 24px; }
.checkout-section h2, .order-summary h2 { margin: 0 0 18px; font-size: 20px; }
.checkout-section-heading { display: flex; justify-content: space-between; gap: 20px; }
.checkout-section-heading span { color: var(--muted); font-size: 14px; }
.checkout-item { display: grid; grid-template-columns: 104px 1fr auto; gap: 20px; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); }
.checkout-item img { width: 104px; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.checkout-item div { display: flex; flex-direction: column; }
.checkout-item span { color: var(--muted); font-size: 13px; }
.checkout-item-price { align-items: flex-end; }
.checkout-item-price strong { color: var(--red); }
.form-note { margin: -8px 0 18px; color: var(--muted); font-size: 13px; }
.address-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.address-form label { display: grid; gap: 7px; color: #424950; font-size: 14px; }
.address-form input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #bbc2c7; border-radius: 6px; background: var(--white); }
.address-form input:focus { border-color: var(--green); outline: 2px solid rgb(33 122 61 / 15%); }
.full-field { grid-column: 1 / -1; }
.delivery-choice > div { display: flex; gap: 14px; align-items: flex-start; }
.selection-dot { width: 20px; height: 20px; margin-top: 4px; border: 6px solid var(--green); border-radius: 50%; }
.delivery-choice p { display: flex; flex-direction: column; margin: 0; }
.delivery-choice span { color: var(--muted); font-size: 13px; }
.order-summary { position: sticky; top: 92px; padding: 26px; }
.order-summary dl { margin: 0; }
.order-summary dl div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; }
.order-summary dd { margin: 0; }
.order-summary .summary-total { margin-top: 18px; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 750; }
.summary-total dd { color: var(--red); font-size: 25px; }
.payment-button { width: 100%; min-height: 52px; margin-top: 24px; border: 0; border-radius: 7px; color: #fff; background: #adb2b5; font-weight: 700; cursor: not-allowed; }
.order-summary > p { color: var(--muted); font-size: 13px; }
.back-shopping { display: block; margin-top: 20px; color: var(--green); text-align: center; font-weight: 650; }
.checkout-merchant { display: grid; grid-template-columns: .6fr 1.4fr; gap: 70px; margin-top: 48px; padding: 40px 0; border-top: 1px solid var(--line); }
.checkout-merchant h2 { margin: 0; }
.checkout-merchant p { display: grid; grid-template-columns: 120px 1fr; margin: 0 0 9px; }
.checkout-merchant p span { color: var(--muted); }

.policies-page { padding-bottom: 30px; }
.policies-layout { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 70px; align-items: start; }
.policy-nav { position: sticky; top: 104px; display: grid; border-top: 1px solid var(--ink); }
.policy-nav a { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.policy-content header { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.policy-content h1 { margin: 0; font-size: 40px; }
.policy-content header p { margin: 8px 0 0; color: var(--muted); }
.policy-content section { scroll-margin-top: 100px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.policy-content h2 { margin: 0 0 12px; font-size: 24px; }
.policy-content p { color: #4b535a; }

@media (max-width: 900px) {
  .header-inner { width: calc(100% - 32px); min-height: 66px; }
  .brand-name { font-size: 23px; }
  .brand-tagline { display: none; }
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .hero { min-height: auto; padding-top: 58%; }
  .hero-image { height: auto; aspect-ratio: 16 / 9; object-position: 64% center; }
  .hero-inner { width: calc(100% - 40px); min-height: 360px; align-items: flex-start; }
  .hero-copy { width: 100%; padding: 38px 0 54px; }
  .hero h1 { font-size: 52px; }
  .hero-slogan { font-size: 27px; }
  .hero-description { font-size: 17px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid a, .category-grid a:first-child { border: 0; border-bottom: 1px solid var(--line); }
  .category-grid a:nth-child(odd) { border-right: 1px solid var(--line); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filters { justify-content: flex-start; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .service-grid div:nth-child(2) { border-right: 0; }
  .merchant-layout { grid-template-columns: 1fr; gap: 42px; }
  .product-detail { grid-template-columns: 1fr; gap: 20px; }
  .product-detail-copy { padding-top: 0; }
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .checkout-merchant { grid-template-columns: 1fr; gap: 18px; }
  .policies-layout { grid-template-columns: 1fr; gap: 30px; }
  .policy-nav { position: static; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .content-width { width: calc(100% - 32px); }
  .hero { padding-top: 71%; }
  .hero-image { aspect-ratio: 1.4 / 1; object-position: 70% center; }
  .hero-inner { min-height: 350px; }
  .hero h1 { font-size: 46px; }
  .hero-slogan { margin-top: 18px; font-size: 25px; }
  .hero-description { margin-top: 13px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; margin-top: 26px; }
  .button-primary { min-width: 160px; }
  .category-grid a { min-height: 80px; padding: 17px 20px; }
  .products-section { padding: 66px 0 72px; }
  .section-heading h2, .merchant-section h2 { font-size: 32px; }
  .filters { display: grid; width: 100%; grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .card-description { min-height: auto; }
  .service-grid { grid-template-columns: 1fr; }
  .service-grid div { padding: 9px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .service-grid div:last-child { border-bottom: 0; }
  .merchant-section { padding: 70px 0; }
  .merchant-details div { grid-template-columns: 1fr; gap: 4px; }
  .footer-top, .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 24px; }
  .footer-top nav, .footer-bottom nav { gap: 12px 20px; }
  .product-detail-copy h1 { font-size: 34px; }
  .product-actions { flex-direction: column; }
  .product-actions .button { width: 100%; }
  .detail-notes { grid-template-columns: 1fr; gap: 28px; }
  .checkout-page > h1 { font-size: 32px; }
  .checkout-section { padding: 18px; }
  .checkout-item { grid-template-columns: 78px 1fr; }
  .checkout-item img { width: 78px; }
  .checkout-item-price { grid-column: 2; align-items: flex-start; }
  .address-form { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .checkout-merchant p { grid-template-columns: 1fr; gap: 2px; }
  .policy-nav { grid-template-columns: 1fr; }
  .policy-content h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

.not-found { min-height: 100vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.not-found .error-code { margin: 52px 0 0; color: var(--green); font-size: 18px; font-weight: 800; }
.not-found h1 { margin: 6px 0 10px; font-size: 42px; }
.not-found > p:not(.error-code) { max-width: 520px; margin: 0 0 26px; color: var(--muted); }
