:root {
  --orange: #ff5a1f;
  --orange-dark: #e9460b;
  --orange-soft: #fff0e8;
  --ink: #222;
  --muted: #707070;
  --line: #e7e7e7;
  --surface: #fff;
  --canvas: #f5f5f5;
  --green: #18864b;
  --red: #d9342b;
  --page: 1440px;
  font-family: "Microsoft JhengHei", "PingFang HK", "PingFang TC", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.5; }
body.drawer-open { overflow: hidden; }
.customer-login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf1ee; }
.customer-login-shell { width: min(440px,100%); padding: 38px; border: 1px solid #d8dfda; border-radius: 6px; background: white; box-shadow: 0 18px 60px rgba(36,54,43,.12); }
.customer-login-brand { display: flex; align-items: center; gap: 12px; }
.customer-login-brand > div { display: grid; }
.customer-login-brand strong { font-size: 22px; }
.customer-login-brand small { margin-top: 2px; color: var(--muted); font: 700 9px Arial,sans-serif; }
.customer-login-copy { margin: 44px 0 24px; }
.customer-login-copy > span { color: var(--green); font-size: 11px; font-weight: 800; }
.customer-login-copy h1 { margin: 7px 0 4px; font-size: 28px; }
.customer-login-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.customer-login-shell form { display: grid; gap: 8px; }
.customer-login-shell form > label { margin-top: 8px; font-size: 12px; font-weight: 700; }
.customer-login-field { height: 48px; display: flex; align-items: center; border: 1px solid #ccd5cf; border-radius: 4px; background: white; }
.customer-login-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(24,134,75,.1); }
.customer-login-field svg { width: 18px; margin-left: 14px; color: #6f7b73; }
.customer-login-field input { flex: 1; min-width: 0; height: 100%; padding: 0 13px; border: 0; outline: 0; }
.customer-login-shell form > button { height: 48px; display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 0 17px; border: 0; border-radius: 4px; color: white; background: var(--green); font-weight: 800; cursor: pointer; }
.customer-login-shell form > button:hover { background: #106d3c; }
.customer-login-shell form > button svg { width: 18px; }
.customer-login-error { margin: 5px 0 0; color: var(--red); font-size: 12px; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(255,90,31,.25); outline-offset: 2px; }
.page-width { width: min(calc(100% - 40px), var(--page)); 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; }

.topbar { height: 34px; color: #595959; background: #f4f4f4; border-bottom: 1px solid #ededed; font-size: 12px; }
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.topbar nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.topbar a:hover, .text-button:hover { color: var(--orange); }
.sync-note { display: flex; align-items: center; gap: 6px; color: var(--green); }
.sync-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.text-button { padding: 0; border: 0; background: transparent; cursor: pointer; }

.site-header { position: relative; z-index: 20; background: white; border-bottom: 1px solid var(--line); }
.header-main { min-height: 104px; display: grid; grid-template-columns: 250px minmax(320px,720px) 250px; align-items: center; justify-content: space-between; gap: 32px; }
.brand, .footer-brand { display: flex; align-items: center; min-width: 0; gap: 12px; }
.brand-mark { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 6px; color: white; background: var(--orange); font: 900 19px Arial,sans-serif; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; }
.brand-copy strong { white-space: nowrap; font-size: 25px; line-height: 1.2; font-weight: 800; }
.brand-copy small { margin-top: 4px; color: #777; white-space: nowrap; font: 700 9px Arial,sans-serif; }
.search-form { height: 48px; display: flex; align-items: center; border: 2px solid var(--orange); border-radius: 6px; overflow: hidden; background: white; }
.search-form > svg { flex: 0 0 auto; width: 20px; margin-left: 16px; color: #888; }
.search-form input { width: 100%; min-width: 0; height: 100%; padding: 0 14px 0 10px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-form input::placeholder { color: #999; }
.search-form button { align-self: stretch; min-width: 92px; border: 0; color: white; background: var(--orange); font-weight: 700; cursor: pointer; }
.search-form button:hover { background: var(--orange-dark); }
.header-actions { display: flex; justify-content: flex-end; gap: 10px; }
.header-icon-button { position: relative; width: 92px; height: 56px; display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; color: #444; background: white; cursor: pointer; }
.header-icon-button svg { width: 22px; color: var(--orange); }
.header-icon-button:hover { color: var(--orange); border-color: var(--orange); }
.action-label { overflow: hidden; white-space: nowrap; font-size: 12px; }
.count-badge { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; border: 2px solid white; border-radius: 11px; color: white; background: var(--red); font-size: 10px; font-weight: 700; }

.primary-nav { border-top: 1px solid #f0f0f0; }
.primary-nav-inner { height: 46px; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.primary-nav-inner::-webkit-scrollbar { display: none; }
.primary-nav button { flex: 0 0 auto; padding: 0 25px; border: 0; background: transparent; font-weight: 700; cursor: pointer; }
.primary-nav button:hover { color: var(--orange); }
.primary-nav .all-category-link { width: 220px; display: flex; align-items: center; gap: 10px; padding: 0 18px; color: white; background: var(--orange); }
.all-category-link svg { width: 19px; }

.hero { height: 382px; display: grid; grid-template-columns: 220px minmax(0,1fr) 248px; gap: 12px; margin-top: 14px; }
.category-rail { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.category-rail-title { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); font-weight: 800; }
.category-rail-title svg { width: 18px; color: var(--orange); }
.category-rail-list { display: flex; flex-direction: column; }
.category-rail-list button { min-height: 39px; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 0 14px; border: 0; color: #4a4a4a; background: white; text-align: left; cursor: pointer; }
.category-rail-list button:hover { color: var(--orange); background: var(--orange-soft); }
.category-rail-list button svg { width: 17px; }
.category-rail-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-rail-list button small { color: #aaa; font-size: 10px; }

.hero-stage { position: relative; min-width: 0; overflow: hidden; border-radius: 6px; color: white; background: var(--orange); isolation: isolate; }
.hero-stage::after { content: ""; position: absolute; right: 0; bottom: 0; width: 44%; height: 100%; background: #ffce45; clip-path: polygon(42% 0,100% 0,100% 100%,0 100%); z-index: -1; }
.hero-copy { position: absolute; z-index: 3; top: 54px; left: 52px; width: min(44%,420px); }
.hero-kicker { display: inline-block; margin-bottom: 8px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.8); border-radius: 3px; font-size: 12px; font-weight: 700; }
.hero-copy h1 { margin: 0; font-size: 48px; line-height: 1.16; font-weight: 900; }
.hero-copy p { max-width: 400px; margin: 13px 0 22px; font-size: 16px; line-height: 1.75; }
.hero-cta { height: 43px; display: inline-flex; align-items: center; gap: 9px; padding: 0 19px; border: 2px solid white; border-radius: 4px; color: var(--ink); background: white; font-weight: 800; cursor: pointer; }
.hero-cta:hover { color: var(--orange); }
.hero-cta svg { width: 18px; }
.hero-products { position: absolute; right: 2%; bottom: 0; width: 53%; height: 100%; }
.hero-product { position: absolute; object-fit: contain; filter: drop-shadow(0 16px 12px rgba(74,36,10,.2)); }
.hero-product-main { right: 13%; bottom: 14px; width: 54%; height: 78%; z-index: 2; }
.hero-product-top { top: 23px; right: 2%; width: 34%; height: 43%; transform: rotate(7deg); }
.hero-product-bottom { right: 50%; bottom: -5px; width: 35%; height: 46%; transform: rotate(-9deg); z-index: 1; }
.hero-stamp { position: absolute; right: 28px; bottom: 23px; z-index: 4; width: 94px; height: 94px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid white; border-radius: 50%; color: white; background: #242424; text-align: center; }
.hero-stamp strong { font-size: 26px; line-height: 1; }
.hero-stamp span { width: 60px; margin-top: 5px; font-size: 9px; line-height: 1.25; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.member-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; border-bottom: 1px solid var(--line); text-align: center; }
.member-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 9px; border-radius: 50%; color: var(--orange); background: var(--orange-soft); }
.member-icon svg { width: 22px; }
.member-welcome strong { font-size: 15px; }
.member-welcome span { margin: 3px 0 12px; color: var(--muted); font-size: 11px; }
.member-welcome button { width: 100%; height: 34px; border: 1px solid var(--orange); border-radius: 4px; color: var(--orange); background: white; font-weight: 700; cursor: pointer; }
.member-welcome button:hover { color: white; background: var(--orange); }
.bulletin { padding: 15px 18px; }
.bulletin-title { display: flex; justify-content: space-between; margin-bottom: 7px; }
.bulletin-title span { color: var(--orange); font-size: 11px; }
.bulletin p { position: relative; margin: 7px 0; padding-left: 11px; overflow: hidden; color: #555; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.bulletin p::before { content: ""; position: absolute; top: 7px; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }

.service-strip { margin-top: 14px; border-block: 1px solid var(--line); background: white; }
.service-strip-inner { min-height: 84px; display: grid; grid-template-columns: repeat(4,1fr); align-items: center; }
.service-strip-inner > div { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 13px; border-right: 1px solid var(--line); }
.service-strip-inner > div:last-child { border-right: 0; }
.service-strip svg { width: 30px; height: 30px; color: var(--orange); }
.service-strip span { display: flex; flex-direction: column; }
.service-strip strong { font-size: 14px; }
.service-strip small { color: var(--muted); font-size: 11px; }

.department-section { padding-block: 44px 48px; }
.section-heading, .catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-kicker { color: var(--orange); font: 800 11px Arial,sans-serif; }
.section-heading h2, .catalog-heading h2 { margin: 3px 0 0; font-size: 26px; line-height: 1.25; }
.view-all-button { display: flex; align-items: center; gap: 4px; padding: 5px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.view-all-button:hover { color: var(--orange); }
.view-all-button svg { width: 17px; }
.department-grid { display: grid; grid-template-columns: repeat(8,1fr); gap: 10px; }
.department-card { position: relative; min-width: 0; min-height: 146px; overflow: hidden; padding: 18px 14px; border: 1px solid var(--line); border-radius: 6px; background: white; text-align: left; cursor: pointer; }
.department-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.department-card svg { width: 28px; height: 28px; margin-bottom: 22px; color: var(--orange); }
.department-card strong, .department-card span { position: relative; z-index: 2; display: block; }
.department-card strong { overflow-wrap: anywhere; font-size: 14px; }
.department-card span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.department-card b { position: absolute; right: -6px; bottom: -29px; color: #f4f4f4; font: 76px/1 Arial,sans-serif; z-index: 0; }

.catalog-section { padding-block: 45px 64px; background: #eee; }
.catalog-heading { align-items: center; }
.catalog-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.catalog-toolbar { display: flex; align-items: center; gap: 12px; }
.mode-switch { height: 38px; display: flex; padding: 3px; border: 1px solid #dedede; border-radius: 5px; background: white; }
.mode-switch button { min-width: 60px; padding: 0 12px; border: 0; border-radius: 3px; background: transparent; cursor: pointer; }
.mode-switch button.active { color: white; background: var(--orange); font-weight: 700; }
.sort-control { height: 38px; display: flex; align-items: center; gap: 8px; padding-left: 12px; border: 1px solid #dedede; border-radius: 5px; background: white; }
.sort-control span { color: var(--muted); font-size: 11px; }
.sort-control select { height: 100%; padding: 0 28px 0 0; border: 0; outline: 0; background: white; font-size: 12px; cursor: pointer; }
.active-filter-bar { min-height: 40px; display: flex; align-items: center; gap: 8px; margin: -5px 0 18px; color: var(--orange); font-size: 12px; }
.active-filter-bar button { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 1px solid #d8d8d8; border-radius: 50%; background: white; cursor: pointer; }
.active-filter-bar svg { width: 13px; }

.product-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.product-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid transparent; border-radius: 6px; background: white; transition: border-color .16s, box-shadow .16s, transform .16s; }
.product-card:hover { border-color: var(--orange); box-shadow: 0 8px 24px rgba(40,40,40,.09); transform: translateY(-2px); }
.product-image-button { position: relative; width: 100%; aspect-ratio: 1/1; display: block; overflow: hidden; padding: 0; border: 0; background: #fafafa; cursor: pointer; }
.product-image-button img { width: 100%; height: 100%; object-fit: contain; padding: 10px; mix-blend-mode: multiply; }
.product-card.out-of-stock .product-image-button::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(78,78,78,.16); pointer-events: none; }
.product-card.out-of-stock .product-image-button img { filter: grayscale(.25); opacity: .88; }
.product-card.wholesale-suspended .product-image-button img { filter: grayscale(.55); opacity: .68; }
.product-gallery-count { position: absolute; right: 8px; bottom: 8px; z-index: 2; height: 24px; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 3px; color: white; background: rgba(20,20,20,.72); font: 10px Arial,sans-serif; }
.product-gallery-count svg { width: 13px; height: 13px; }
.product-stock-badge { position: absolute; left: 8px; bottom: 8px; z-index: 2; min-width: 40px; height: 24px; display: grid; place-items: center; padding: 0 7px; border-radius: 3px; color: white; background: #c83c2f; font-size: 10px; font-weight: 800; }
.image-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #b6b6b6; background: #f5f5f5; }
.image-placeholder svg { width: 34px; height: 34px; }
.image-placeholder span { font-size: 10px; }
.product-tag { position: absolute; top: 9px; left: 9px; z-index: 2; max-width: calc(100% - 55px); padding: 4px 7px; overflow: hidden; border-radius: 3px; color: white; background: rgba(34,34,34,.86); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 700; }
.product-tag.frozen { background: #176d9d; }
.favorite-toggle { position: absolute; top: 8px; right: 8px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid #ececec; border-radius: 50%; color: #555; background: rgba(255,255,255,.94); cursor: pointer; }
.favorite-toggle svg { width: 17px; }
.favorite-toggle:hover, .favorite-toggle.active { color: var(--red); border-color: #f2b8b5; }
.favorite-toggle.active svg { fill: currentColor; }
.product-info { padding: 12px 13px 14px; }
.product-name { height: 42px; display: -webkit-box; margin: 0; overflow: hidden; color: #333; font-size: 13px; font-weight: 600; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-name button { padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.product-name button:hover { color: var(--orange); }
.product-code { display: block; margin-top: 5px; overflow: hidden; color: #999; text-overflow: ellipsis; white-space: nowrap; font: 10px Arial,sans-serif; }
.product-price-row { min-height: 49px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 8px; }
.price-block { min-width: 0; color: var(--orange); }
.price-block span { font-size: 11px; font-weight: 700; }
.price-block strong { overflow-wrap: anywhere; font: 22px/1 Arial,sans-serif; }
.price-block small { display: block; margin-top: 4px; color: #999; font-size: 9px; font-weight: 400; }
.price-block.unavailable { color: var(--red); }
.price-block.unavailable strong { font-size: 17px; font-weight: 800; }
.add-cart-button:disabled, .detail-add:disabled { cursor: not-allowed; opacity: .4; }
.add-cart-button { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: white; background: var(--orange); cursor: pointer; }
.add-cart-button:hover { background: var(--orange-dark); }
.add-cart-button svg { width: 18px; }
.product-status { min-height: 14px; display: flex; align-items: flex-start; gap: 5px; margin-top: 9px; color: var(--green); font-size: 9px; line-height: 1.45; }
.product-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.product-status strong { flex: 0 0 auto; }
.product-status span { color: #777; }
.product-status.out-of-stock { color: #c23b2e; }
.product-status.delayed span { color: #a52f25; }
.load-more-button { min-width: 200px; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 28px auto 0; padding: 0 24px; border: 1px solid #d4d4d4; border-radius: 5px; color: #444; background: white; cursor: pointer; }
.load-more-button:hover { color: var(--orange); border-color: var(--orange); }
.load-more-button svg { width: 17px; }
.empty-state { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state svg { width: 48px; height: 48px; color: #b0b0b0; }
.empty-state h3 { margin: 16px 0 4px; font-size: 18px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }
.empty-state button { height: 38px; padding: 0 17px; border: 1px solid var(--orange); border-radius: 4px; color: var(--orange); background: white; cursor: pointer; }

.site-footer { border-top: 4px solid var(--orange); color: #d0d0d0; background: #252525; }
.footer-inner { min-height: 132px; display: flex; align-items: center; gap: 40px; }
.footer-brand .brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-color: white; font-size: 14px; }
.footer-brand > div { display: flex; flex-direction: column; }
.footer-brand strong { color: white; font-size: 16px; }
.footer-brand span { font-size: 9px; }
.footer-inner p { margin: 0; }
.footer-inner > span { margin-left: auto; color: #8c8c8c; font-size: 11px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(440px,100%); display: grid; grid-template-rows: auto 1fr auto; background: white; box-shadow: -12px 0 30px rgba(0,0,0,.16); transform: translateX(105%); transition: transform .25s; }
.cart-drawer.open { transform: translateX(0); }
.drawer-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-header span { color: var(--orange); font: 800 9px Arial,sans-serif; }
.drawer-header h2 { margin: 2px 0 0; font-size: 21px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; }
.icon-button:hover { color: var(--orange); border-color: var(--orange); }
.icon-button svg { width: 18px; }
.cart-items { min-height: 0; overflow-y: auto; padding: 0 20px; }
.cart-item { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item-image { width: 74px; height: 74px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #f7f7f7; }
.cart-item-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cart-item-info { min-width: 0; }
.cart-item-info strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cart-item-info > span { display: block; margin-top: 3px; color: #999; font-size: 9px; }
.cart-item-price { margin-top: 8px; color: var(--orange); font: 800 13px Arial,sans-serif; }
.quantity-control { height: 30px; display: flex; align-items: center; align-self: end; border: 1px solid #dcdcdc; border-radius: 4px; }
.quantity-control button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; background: white; cursor: pointer; }
.quantity-control svg { width: 13px; }
.quantity-control span { min-width: 26px; text-align: center; font-size: 11px; font-weight: 700; }
.cart-empty { grid-row: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.cart-empty svg { width: 46px; height: 46px; margin-bottom: 13px; color: #bcbcbc; }
.cart-empty strong { color: var(--ink); }
.cart-empty span { margin-top: 4px; font-size: 11px; }
.cart-footer { padding: 18px 20px 20px; border-top: 1px solid var(--line); background: white; }
.cart-footer > div { display: grid; grid-template-columns: 1fr auto; align-items: end; margin-bottom: 14px; }
.cart-footer > div > span:first-child { grid-row: 1/3; align-self: center; color: var(--muted); font-size: 11px; }
.cart-footer > div > span:nth-child(2) { color: var(--muted); text-align: right; font-size: 10px; }
.cart-footer > div > strong { color: var(--orange); text-align: right; font: 22px Arial,sans-serif; }
.cart-footer > button { width: 100%; height: 48px; border: 0; border-radius: 5px; color: white; background: var(--orange); font-weight: 800; cursor: pointer; }
.cart-footer > button:hover { background: var(--orange-dark); }
.cart-footer > button:disabled { color: #999; background: #e7e7e7; cursor: not-allowed; }

dialog { padding: 0; border: 0; border-radius: 7px; color: var(--ink); background: white; box-shadow: 0 22px 70px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(0,0,0,.55); }
.product-dialog { width: min(920px,calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.dialog-close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.product-detail { display: grid; grid-template-columns: 46% 54%; min-height: 520px; }
.product-detail-media { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 24px; background: #f7f7f7; }
.product-detail-media > .image-placeholder { min-height: 430px; }
.detail-gallery-stage { position: relative; width: 100%; aspect-ratio: 1; max-height: 390px; overflow: hidden; background: white; touch-action: pan-y; }
.detail-gallery-image { width: 100%; height: 100%; display: grid; place-items: center; }
.detail-gallery-image > img { width: 100%; height: 100%; object-fit: contain; padding: 12px; mix-blend-mode: multiply; }
.detail-gallery-image > .image-placeholder { width: 100%; height: 100%; }
.detail-gallery-nav { position: absolute; top: 50%; width: 36px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(0,0,0,.08); border-radius: 4px; color: #444; background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(0,0,0,.08); transform: translateY(-50%); cursor: pointer; }
.detail-gallery-nav:hover { color: white; background: var(--orange); }
.detail-gallery-nav.previous { left: 8px; }
.detail-gallery-nav.next { right: 8px; }
.detail-gallery-nav svg { width: 19px; height: 19px; }
.detail-gallery-count { position: absolute; right: 10px; bottom: 10px; min-width: 42px; height: 24px; display: grid; place-items: center; padding: 0 7px; border-radius: 3px; color: white; background: rgba(0,0,0,.65); font: 10px Arial,sans-serif; }
.detail-gallery-thumbnails { width: 100%; display: flex; gap: 8px; margin-top: 12px; padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }
.detail-gallery-thumb { width: 58px; height: 58px; flex: 0 0 58px; overflow: hidden; padding: 3px; border: 1px solid #d8d8d8; border-radius: 3px; background: white; cursor: pointer; }
.detail-gallery-thumb:hover, .detail-gallery-thumb.active { border: 2px solid var(--orange); padding: 2px; }
.detail-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-detail-info { min-width: 0; padding: 48px 45px 38px; }
.detail-category { display: inline-block; margin-bottom: 12px; padding: 4px 8px; border-radius: 3px; color: var(--orange); background: var(--orange-soft); font-size: 10px; font-weight: 700; }
.product-detail-info h2 { margin: 0 0 8px; overflow-wrap: anywhere; font-size: 23px; line-height: 1.5; }
.detail-code { color: var(--muted); font: 11px Arial,sans-serif; }
.detail-price { margin: 24px 0; padding: 18px; border-left: 4px solid var(--orange); color: var(--orange); background: #f7f7f7; }
.detail-price span { font-size: 13px; font-weight: 700; }
.detail-price strong { font: 34px Arial,sans-serif; }
.detail-price small { margin-left: 8px; color: var(--muted); }
.detail-stock-notice { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; margin-top: 18px; padding: 11px 13px; border-left: 4px solid #d04a37; color: #9b3026; background: #fff0ed; }
.detail-stock-notice.scheduled { border-color: #d06b16; color: #9b530f; background: #fff3e7; }
.detail-stock-notice svg { width: 20px; height: 20px; justify-self: center; }
.detail-stock-notice strong, .detail-stock-notice span { display: block; }
.detail-stock-notice strong { font-size: 12px; }
.detail-stock-notice span { margin-top: 3px; color: #6e625d; font-size: 10px; }
.detail-shortage { color: #c23b2e; }
.detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; border-top: 1px solid var(--line); }
.detail-list div { min-width: 0; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.detail-actions { display: grid; grid-template-columns: 50px 1fr; gap: 10px; margin-top: 24px; }
.detail-actions .favorite-toggle { position: static; width: 50px; height: 46px; border-radius: 5px; }
.detail-add { height: 46px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 5px; color: white; background: var(--orange); font-weight: 800; cursor: pointer; }
.detail-add svg { width: 19px; }

.order-dialog { width: min(860px,calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.order-dialog-content { padding: 42px; }
.order-dialog h2 { margin: 4px 0 3px; font-size: 25px; }
.order-dialog-content > p { margin: 0 0 22px; color: var(--muted); font-size: 11px; }
.order-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.order-table-wrap table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; font-size: 11px; }
.order-table-wrap th, .order-table-wrap td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.order-table-wrap th { color: #555; background: #f4f4f4; }
.order-table-wrap tbody tr:last-child td { border-bottom: 0; }
.order-table-wrap td:nth-last-child(-n+3), .order-table-wrap th:nth-last-child(-n+3) { text-align: right; }
.order-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 16px; margin-top: 20px; }
.order-total span { color: var(--muted); }
.order-total strong { color: var(--orange); font: 28px Arial,sans-serif; }
.order-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.primary-button, .secondary-button { height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-radius: 4px; font-weight: 700; cursor: pointer; }
.primary-button { border: 1px solid var(--orange); color: white; background: var(--orange); }
.secondary-button { border: 1px solid #d3d3d3; background: white; }
.primary-button svg, .secondary-button svg { width: 17px; }
.checkout-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.checkout-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.checkout-heading span { font-size: 14px; font-weight: 800; }
.checkout-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.checkout-fields { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 12px; }
.checkout-fields label { display: grid; gap: 6px; }
.checkout-fields label > span { font-size: 10px; font-weight: 700; }
.checkout-fields input, .checkout-fields textarea { width: 100%; border: 1px solid #d2d2d2; border-radius: 3px; background: white; padding: 9px 10px; outline: 0; resize: vertical; }
.checkout-fields input { height: 39px; }
.checkout-fields input:focus, .checkout-fields textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,80,0,.08); }
.checkout-remarks { grid-column: 1 / -1; }
.order-success { margin-top: 22px; padding: 18px; display: flex; align-items: center; gap: 14px; color: #145f3b; background: #eaf7ef; border: 1px solid #bee2cd; }
.order-success > svg { width: 32px; flex: 0 0 32px; }
.order-success span, .order-success strong, .order-success p { display: block; }
.order-success span { font-size: 11px; }
.order-success strong { margin-top: 4px; font-size: 18px; }
.order-success p { margin: 4px 0 0; color: #46705a; font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 34px; z-index: 110; max-width: min(90vw,420px); padding: 11px 17px; border-radius: 4px; color: white; background: #252525; box-shadow: 0 9px 25px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transform: translate(-50%,12px); transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.mobile-nav { display: none; }
.skeleton-card { min-height: 330px; overflow: hidden; border-radius: 6px; background: white; }
.skeleton-image { aspect-ratio: 1/1; background: #e6e6e6; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton-line { height: 11px; margin: 14px 14px 0; border-radius: 3px; background: #ebebeb; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton-line.short { width: 45%; }
@keyframes skeleton-pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

@media (max-width: 1240px) {
  .header-main { grid-template-columns: 225px minmax(320px,1fr) 205px; gap: 18px; }
  .header-icon-button { width: 78px; }
  .hero { grid-template-columns: 210px minmax(0,1fr); }
  .hero-side { display: none; }
  .product-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .department-grid { grid-template-columns: repeat(4,1fr); }
}

@media (max-width: 900px) {
  .page-width { width: min(calc(100% - 24px),var(--page)); }
  .topbar { display: none; }
  .header-main { min-height: 126px; grid-template-columns: 1fr auto; grid-template-rows: 64px 48px; gap: 0 12px; }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; font-size: 15px; }
  .brand-copy strong { font-size: 20px; }
  .brand-copy small { display: none; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .header-icon-button { width: 42px; height: 42px; display: grid; grid-template-columns: 1fr; padding: 0; }
  .header-icon-button:first-child, .action-label { display: none; }
  .search-form { grid-column: 1/-1; grid-row: 2; height: 42px; margin-bottom: 8px; }
  .search-form button { min-width: 68px; }
  .primary-nav-inner { width: 100%; }
  .primary-nav .all-category-link { width: auto; }
  .primary-nav button { padding: 0 18px; }
  .hero { height: 330px; grid-template-columns: 1fr; }
  .category-rail { display: none; }
  .hero-copy { top: 42px; left: 36px; width: 50%; }
  .hero-copy h1 { font-size: 40px; }
  .hero-copy p { font-size: 14px; }
  .hero-stamp { right: 18px; bottom: 16px; width: 78px; height: 78px; }
  .service-strip-inner { grid-template-columns: repeat(2,1fr); padding: 8px 0; }
  .service-strip-inner > div { min-height: 62px; }
  .service-strip-inner > div:nth-child(2) { border-right: 0; }
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .footer-inner { flex-wrap: wrap; gap: 16px 30px; padding-block: 28px; }
  .footer-inner > span { width: 100%; margin-left: 0; }
}

@media (max-width: 640px) {
  body { padding-bottom: 64px; }
  .page-width { width: calc(100% - 20px); }
  .site-header { position: sticky; top: 0; }
  .primary-nav { display: none; }
  .hero { width: 100%; height: 286px; margin-top: 0; }
  .hero-stage { border-radius: 0; }
  .hero-stage::after { width: 55%; }
  .hero-copy { top: 34px; left: 20px; width: 54%; }
  .hero-kicker { margin-bottom: 6px; padding: 3px 6px; font-size: 9px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-copy p { margin: 8px 0 15px; font-size: 12px; line-height: 1.6; }
  .hero-cta { height: 37px; padding: 0 13px; font-size: 12px; }
  .hero-products { right: -6%; width: 57%; }
  .hero-product-main { right: 5%; width: 64%; }
  .hero-product-top { right: 0; width: 38%; }
  .hero-product-bottom { right: 50%; width: 42%; }
  .hero-stamp { display: none; }
  .service-strip { margin-top: 0; }
  .service-strip-inner { width: 100%; grid-template-columns: repeat(4,1fr); padding: 0 4px; }
  .service-strip-inner > div { min-height: 70px; flex-direction: column; gap: 4px; text-align: center; }
  .service-strip svg { width: 22px; height: 22px; }
  .service-strip strong { font-size: 10px; }
  .service-strip small { display: none; }
  .department-section { padding-block: 30px 34px; }
  .section-heading { margin-bottom: 15px; }
  .section-heading h2, .catalog-heading h2 { font-size: 22px; }
  .department-grid { grid-template-columns: repeat(4,1fr); gap: 7px; }
  .department-card { min-height: 92px; padding: 12px 7px; text-align: center; }
  .department-card svg { width: 23px; height: 23px; margin: 0 auto 8px; }
  .department-card strong { font-size: 10px; }
  .department-card span, .department-card b { display: none; }
  .catalog-section { padding-block: 32px 40px; }
  .catalog-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 16px; }
  .catalog-toolbar { width: 100%; align-items: stretch; }
  .mode-switch { flex: 1 1 auto; }
  .mode-switch button { min-width: 0; flex: 1; padding: 0 8px; }
  .sort-control { flex: 0 0 auto; padding-left: 8px; }
  .sort-control span { display: none; }
  .sort-control select { max-width: 110px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .product-info { padding: 10px 10px 12px; }
  .product-name { height: 38px; font-size: 11px; line-height: 1.65; }
  .price-block strong { font-size: 19px; }
  .add-cart-button { width: 33px; height: 33px; flex-basis: 33px; }
  .product-status { margin-top: 6px; }
  .site-footer { display: none; }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail-media { padding: 18px; }
  .product-detail-media > .image-placeholder { min-height: 280px; }
  .detail-gallery-stage { max-height: 300px; }
  .detail-gallery-thumb { width: 52px; height: 52px; flex-basis: 52px; }
  .product-detail-info { padding: 28px 22px; }
  .product-detail-info h2 { padding-right: 22px; font-size: 18px; }
  .detail-price { margin: 18px 0; }
  .detail-price strong { font-size: 28px; }
  .order-dialog-content { padding: 32px 18px 22px; }
  .checkout-heading { display: grid; gap: 4px; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-remarks { grid-column: auto; }
  .order-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .order-actions .primary-button { grid-column: 1 / -1; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 60; height: 62px; display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--line); background: white; box-shadow: 0 -4px 16px rgba(0,0,0,.07); }
  .mobile-nav a, .mobile-nav button { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 0; color: #666; background: white; font-size: 9px; }
  .mobile-nav .active { color: var(--orange); }
  .mobile-nav svg { width: 20px; height: 20px; }
  .mobile-nav b { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; color: white; background: var(--red); font-size: 8px; }
  .toast { bottom: 76px; }
}

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