:root {
  --forest: #123c34;
  --forest-2: #1f5549;
  --lime: #dff06f;
  --sand: #f5f3ed;
  --paper: #fffefb;
  --ink: #17221f;
  --muted: #63706c;
  --line: #dce1dd;
  --orange: #e96a32;
  --shadow: 0 24px 70px rgba(20, 48, 41, .13);
  --soft-shadow: 0 12px 34px rgba(20, 48, 41, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--sand);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--sand); color: var(--ink); }
body.drawer-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: var(--lime); color: var(--forest); font-weight: 800; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 80; border-bottom: 1px solid rgba(220,225,221,.92); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
.nav-wrap { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--forest); color: #fff; font-size: 14px; font-weight: 900; letter-spacing: .06em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 9px; }
.erp-login-link { flex: none; white-space: nowrap; }
.primary-button, .secondary-button, .ghost-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 12px; padding: 0 18px; cursor: pointer; font-size: 14px; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-button { background: var(--forest); color: #fff; box-shadow: 0 8px 18px rgba(18,60,52,.16); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.secondary-button { border: 1px solid #bfd0ca; background: rgba(255,255,255,.88); color: var(--forest); }
.ghost-button { background: transparent; color: var(--forest); }
.large { min-height: 52px; padding: 0 24px; border-radius: 14px; }
.cart-count { display: inline-grid; min-width: 22px; height: 22px; margin-left: 7px; place-items: center; border-radius: 999px; background: var(--lime); color: var(--forest); font-size: 12px; }
.shop-main { min-height: calc(100dvh - 160px); }
.factory-video-section { padding: 24px 0 18px; }
.factory-video-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(24,55,47,.06); }
.factory-video-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; }
.factory-video-heading h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.factory-video-heading > span { color: var(--muted); font-size: 12px; }
.factory-video-media { position: relative; display: grid; min-height: 260px; overflow: hidden; place-items: center; background: #18372f; aspect-ratio: 16 / 6; }
.factory-video { width: 100%; height: 100%; background: #0f1815; object-fit: contain; }
.factory-video-placeholder { display: grid; max-width: 420px; place-items: center; padding: 34px; color: #fff; text-align: center; }
.factory-video-placeholder > span { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(255,255,255,.1); font-size: 20px; }
.factory-video-placeholder strong { margin-top: 16px; font-size: 19px; }
.factory-video-placeholder small { margin-top: 7px; color: #c8d6d1; line-height: 1.55; }
.factory-video[hidden], .factory-video-placeholder[hidden] { display: none; }

.category-section { position: sticky; top: 68px; z-index: 70; border-block: 1px solid var(--line); background: rgba(246,247,245,.96); backdrop-filter: blur(14px); }
.category-bar { display: flex; min-height: 64px; align-items: center; gap: 20px; }
.category-bar > strong { flex: none; font-size: 14px; }
.category-tabs { display: flex; min-width: 0; flex: 1; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button { min-height: 38px; flex: none; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 0 16px; cursor: pointer; color: #596762; font-size: 13px; font-weight: 700; }
.category-tabs button.active { border-color: var(--forest); background: var(--forest); color: #fff; }
.product-section { padding: 28px 0 72px; }
.product-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.product-list-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); }
.product-list-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.catalog-status { padding: 40px 0; color: var(--muted); text-align: center; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product-card { display: grid; grid-template-columns: minmax(150px, 36%) 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 5px 16px rgba(24,55,47,.045); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.product-card:hover { border-color: #aebfb9; box-shadow: var(--soft-shadow); transform: translateY(-2px); }
.product-media { position: relative; overflow: hidden; background: #edf0ec; }
.product-media img { width: 100%; height: 100%; min-height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-media img { transform: scale(1.025); }
.product-tag { position: absolute; top: 10px; left: 10px; padding: 6px 9px; border-radius: 999px; background: var(--lime); color: var(--forest); font-size: 10px; font-weight: 900; }
.product-source { position: absolute; right: 10px; bottom: 10px; padding: 6px 9px; border-radius: 999px; background: rgba(18,60,52,.86); color: #fff; font-size: 10px; font-weight: 700; }
.product-body { min-width: 0; padding: 18px; cursor: default; }
.product-category { color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.product-body h3 { margin: 6px 0 7px; font-size: 18px; line-height: 1.35; }
.product-body > p { display: -webkit-box; min-height: 42px; overflow: hidden; margin: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--muted); font-size: 12px; line-height: 1.7; }
.product-pricing { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 13px; border-top: 1px solid #e5e9e6; }
.product-price strong { color: var(--forest); font-size: 18px; }
.product-price small, .product-minimum { color: var(--muted); font-size: 11px; }
.product-controls { display: grid; grid-template-columns: 1fr 78px; gap: 8px; margin-top: 14px; cursor: default; }
.product-controls select, .product-controls input { width: 100%; min-height: 42px; border: 1px solid #cad3cf; border-radius: 10px; background: #fff; padding: 0 11px; color: var(--ink); }
.product-controls .primary-button { grid-column: 1 / -1; }
.product-stock { display: block; margin-top: 11px; color: #6b7773; font-size: 11px; line-height: 1.5; }
.site-footer { padding: 22px 0; background: #0d2d27; color: #fff; }
.footer-simple { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #aebfba; font-size: 12px; }
.footer-link { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; text-align: left; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(9,28,23,.48); backdrop-filter: blur(3px); }
.cart-drawer { position: fixed; top: 0; right: 0; z-index: 110; display: flex; width: min(460px, 100%); height: 100dvh; flex-direction: column; padding: 26px; background: var(--paper); box-shadow: -24px 0 70px rgba(9,35,28,.18); transform: translateX(105%); transition: transform .28s ease; }
.cart-drawer.open { transform: translateX(0); }
.drawer-head, .dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.drawer-head small, .dialog-head small { color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.drawer-head h2, .dialog-head h2 { margin: 5px 0 0; font-size: 28px; }
.dialog-head p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.icon-button { display: grid; width: 40px; height: 40px; flex: none; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--forest); font-size: 24px; }
.cart-items { flex: 1; overflow: auto; margin: 24px -4px 0; padding: 0 4px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.cart-line strong, .cart-line small { display: block; }
.cart-line small { margin-top: 5px; color: var(--muted); }
.cart-line-controls { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.cart-line-controls button { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.cart-quantity-input { width: 58px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-align: center; font: inherit; font-weight: 800; outline: none; }
.cart-quantity-input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(31,85,73,.1); }
.cart-line-remove { align-self: start; border: 0; background: none; color: #9b5a47; cursor: pointer; font-size: 12px; }
.cart-empty { display: none; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; }
.cart-empty strong { color: var(--ink); font-size: 18px; }
.cart-empty .secondary-button { margin-top: 14px; }
.cart-footer { padding-top: 18px; border-top: 1px solid var(--line); }
.cart-footer > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cart-footer small { color: var(--muted); text-align: right; }
.cart-footer .primary-button { width: 100%; }

.site-dialog { width: min(720px, calc(100% - 28px)); max-height: calc(100dvh - 32px); overflow: auto; border: 0; border-radius: 22px; padding: 0; background: transparent; box-shadow: var(--shadow); }
.site-dialog::backdrop { background: rgba(9,28,23,.55); backdrop-filter: blur(4px); }
.dialog-card { margin: 0; padding: 30px; background: var(--paper); }
.order-summary { display: grid; gap: 8px; margin: 22px 0; padding: 14px; border-radius: 12px; background: #eef3ef; }
.order-summary-line { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid label, .tracking-form > label { display: grid; gap: 7px; }
.form-grid label > span, .tracking-form label > span { color: #44534e; font-size: 12px; font-weight: 800; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid [hidden] { display: none !important; }
.form-grid input, .form-grid select, .form-grid textarea, .tracking-form input { width: 100%; border: 1px solid #c8d1cd; border-radius: 10px; background: #fff; padding: 12px 13px; outline: none; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .tracking-form input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(31,85,73,.1); }
.address-paste-card { padding: 14px; border: 1px solid #c9d8d2; border-radius: 14px; background: #f2f6f4; }
.address-paste-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.address-paste-actions .secondary-button { min-height: 38px; }
.address-paste-actions small, .location-message { color: var(--muted); font-size: 11px; line-height: 1.5; }
.field-label-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #44534e; font-size: 12px; font-weight: 800; }
.location-trigger { border: 0; background: transparent; padding: 0; color: var(--forest-2); cursor: pointer; font-size: 12px; font-weight: 800; }
.region-selects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.region-selects select:disabled { cursor: not-allowed; background: #f2f4f3; color: #87908d; }
.location-message { display: block; margin-top: 7px; }
.payment-panel { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.payment-panel legend { padding: 0 6px; color: #44534e; font-size: 12px; font-weight: 900; }
.payment-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.payment-choice { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #c8d1cd; border-radius: 11px; background: #fff; padding: 10px 12px; text-align: left; }
.payment-choice strong, .payment-choice small { display: block; }
.payment-choice small { color: var(--muted); font-size: 10px; }
.payment-choice:not(:disabled) { cursor: pointer; }
.payment-choice.selected { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(31,85,73,.1); }
.payment-choice:disabled { cursor: not-allowed; opacity: .6; }
.payment-message { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.payment-action-section { display: grid; gap: 11px; margin-top: 16px; padding: 15px; border: 1px solid #c9d8d2; border-radius: 12px; background: #fff; }
.payment-action-section > p, .payment-action-section > small { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.payment-action-list { display: flex; flex-wrap: wrap; gap: 9px; }
.payment-action-list button { flex: 1 1 180px; }
.payment-sync-button { justify-self: start; }
.payment-qr-card { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 20px; align-items: center; margin-top: 16px; padding: 18px; border: 1px solid #c9d8d2; border-radius: 14px; background: #fff; }
.payment-qr-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.payment-qr-card p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.payment-confirmed { color: var(--forest-2) !important; font-weight: 800; }
.payment-pending { color: #805f25 !important; }
.payment-warning { color: #a43c25 !important; }
.honeypot { position: absolute; left: -9999px; }
.consent { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.submit-order { width: 100%; }
.form-message { min-height: 22px; margin-top: 12px; color: #a43c25; font-size: 12px; line-height: 1.5; }
.form-message.success { color: var(--forest-2); }
.tracking-form > label { margin-top: 16px; }
.tracking-form > .primary-button { width: 100%; margin-top: 6px; }
.tracking-result { margin-top: 18px; }
.tracking-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f2f5f2; }
.tracking-card h3 { margin: 0 0 12px; }
.tracking-statuses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tracking-statuses div { padding: 10px; border-radius: 10px; background: #fff; }
.tracking-statuses small, .tracking-statuses strong { display: block; }
.tracking-statuses small { color: var(--muted); font-size: 10px; }
.tracking-statuses strong { margin-top: 4px; font-size: 13px; }
.order-party-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; padding: 12px; }
.order-party-card p { margin: 6px 0; }
.order-party-card small { color: var(--muted); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 160; max-width: min(380px, calc(100% - 44px)); padding: 13px 17px; border-radius: 12px; background: #142d27; color: #fff; box-shadow: var(--shadow); font-size: 13px; }

@media (max-width: 960px) {
  .factory-video-media { aspect-ratio: 16 / 7; }
}

@media (max-width: 800px) {
  .product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  .container { width: min(100% - 28px, 1180px); }
  .site-header .ghost-button { display: none; }
  .nav-wrap { min-height: 64px; gap: 10px; }
  .nav-actions { flex: none; gap: 4px; }
  .erp-login-link { min-height: 40px; padding: 0 9px; font-size: 12px; }
  .brand strong { font-size: 16px; }
  .brand small { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .nav-actions .primary-button { min-height: 40px; padding: 0 12px; font-size: 12px; }
  .factory-video-section { padding: 14px 0 12px; }
  .factory-video-card { border-radius: 15px; }
  .factory-video-heading { align-items: flex-start; padding: 15px 16px; }
  .factory-video-heading > span { max-width: 130px; text-align: right; }
  .factory-video-media { min-height: 190px; aspect-ratio: 16 / 10; }
  .factory-video-placeholder { padding: 24px 18px; }
  .category-section { top: 64px; }
  .category-bar { min-height: 58px; gap: 12px; }
  .category-bar > strong { font-size: 13px; }
  .category-tabs { padding: 9px 0; }
  .category-tabs button { min-height: 36px; padding: 0 14px; }
  .product-section { padding: 22px 0 54px; }
  .product-list-heading { align-items: center; margin-bottom: 16px; }
  .product-list-heading p { max-width: 230px; }
  .product-list-heading .ghost-button { padding-inline: 4px; font-size: 12px; }
  .product-card { grid-template-columns: 112px minmax(0, 1fr); border-radius: 14px; }
  .product-body { padding: 13px; }
  .product-body h3 { font-size: 16px; }
  .product-pricing { align-items: flex-start; flex-direction: column; gap: 3px; }
  .product-controls { grid-template-columns: minmax(0, 1fr) 66px; }
  .product-controls select, .product-controls input { min-height: 40px; padding-inline: 8px; }
  .footer-simple { align-items: flex-start; flex-direction: column; gap: 9px; }
  .cart-drawer { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .region-selects, .payment-options { grid-template-columns: 1fr; }
  .address-paste-actions { align-items: flex-start; flex-direction: column; }
  .payment-qr-card { grid-template-columns: 1fr; text-align: center; }
  .payment-qr-card img { width: min(220px, 100%); margin-inline: auto; }
  .dialog-card { padding: 22px; }
  .tracking-statuses { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .brand { gap: 7px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 10px; font-size: 12px; }
  .brand strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
