:root {
    --ink: #17191b;
    --muted: #6d7378;
    --line: #e2e5e7;
    --soft: #f3f4f5;
    --red: #d92d20;
    --red-dark: #a62018;
    --nav: #202326;
    --white: #fff;
}

* { box-sizing: border-box; }
html, body { min-width: 0; min-height: 100%; margin: 0; background: #fff; color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; letter-spacing: 0; }
body { overflow-x: hidden; }
button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.store-app { min-height: 100vh; background: var(--white); }
.store-header { width: min(1180px, 100%); min-height: 82px; margin: 0 auto; padding: 14px 20px; display: grid; grid-template-columns: 190px minmax(280px, 1fr) 180px; align-items: center; gap: 24px; }
.store-logo { min-width: 0; }
.store-logo img { display: block; width: 174px; max-width: 100%; max-height: 50px; object-fit: contain; object-position: left center; }
.store-search { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 76px; border: 2px solid var(--nav); }
.store-search input { min-width: 0; height: 42px; padding: 0 14px; border: 0; background: #fff; color: var(--ink); outline: none; font-size: 14px; }
.store-search input:focus { box-shadow: inset 0 0 0 2px #c9cdd0; }
.store-search button { min-height: 42px; border: 0; background: var(--nav); color: #fff; font-size: 14px; font-weight: 700; }
.store-account { justify-self: end; display: flex; align-items: center; gap: 20px; }
.store-account a { min-height: 40px; padding: 0; display: inline-flex; align-items: center; color: #3c4145; font-size: 13px; text-decoration: none; white-space: nowrap; }
.store-account a:hover { color: var(--red); }
.store-nav { min-height: 46px; display: flex; justify-content: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.store-nav a { min-width: 132px; min-height: 46px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border-bottom: 3px solid transparent; color: #4a5055; font-size: 14px; font-weight: 700; text-decoration: none; }
.store-nav a.active { border-bottom-color: var(--red); color: var(--red-dark); }
.store-content { width: min(1180px, 100%); min-height: 650px; margin: 0 auto; padding: 24px 20px 70px; }

.featured-product { min-height: 270px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr); background: #f1f2f3; }
.featured-copy { padding: 34px 44px; align-self: center; }
.featured-copy > span { color: var(--red-dark); font-size: 13px; font-weight: 700; }
.featured-copy h1 { margin: 8px 0 7px; font-size: 32px; line-height: 1.25; }
.featured-copy > p:not(.product-price) { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.featured-copy > a { width: max-content; min-width: 112px; min-height: 42px; margin-top: 16px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--nav); background: var(--nav); color: #fff; font-weight: 700; text-decoration: none; }
.featured-copy > a:hover { background: #000; }
.featured-media { min-height: 270px; }

.store-section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.store-section > header, .category-products > header { min-height: 40px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.store-section h2, .category-products h2 { margin: 0; font-size: 21px; }
.store-section > header > a { min-height: 40px; padding: 0 4px; display: inline-flex; align-items: center; color: var(--red-dark); font-size: 13px; font-weight: 700; text-decoration: none; }

.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.category-grid a { min-width: 0; min-height: 82px; padding: 13px; position: relative; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; text-decoration: none; }
.category-grid a:hover { background: var(--soft); }
.category-grid strong, .category-grid span, .category-grid small { display: block; }
.category-grid strong { padding-right: 40px; font-size: 14px; }
.category-grid span { margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.category-grid small { position: absolute; right: 12px; top: 15px; color: #92979b; font-size: 10px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
.product-card { min-width: 0; }
.product-card-link { width: 100%; padding: 0; display: block; border: 0; background: #fff; color: var(--ink); text-align: left; text-decoration: none; }
.product-media { min-width: 0; height: 220px; padding: 20px; display: grid; place-items: center; align-content: center; gap: 8px; overflow: hidden; background: #f1f2f3; color: #5e6469; text-align: center; }
.product-media span { font-size: 12px; }
.product-media strong { max-width: 210px; font-size: 18px; line-height: 1.45; }
.product-card-link:hover .product-media { background: #e9ebec; }
.product-card-body { display: block; padding: 12px 2px 4px; }
.product-price { min-height: 32px; margin: 0; display: flex; align-items: baseline; gap: 7px; color: var(--red); }
.product-price span { font-size: 12px; font-weight: 700; }
.product-price strong { font-size: 23px; line-height: 1; }
.product-name { min-height: 43px; margin-top: 7px; display: block; font-size: 15px; line-height: 1.45; }
.product-spec { min-height: 33px; margin-top: 4px; display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-link { min-height: 38px; margin-top: 7px; display: inline-flex; align-items: center; color: #34393d; font-size: 12px; font-weight: 700; }
.product-card-link:hover .detail-link { color: var(--red-dark); }

.page-heading { margin-bottom: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.page-heading h1 { margin: 0; font-size: 28px; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.category-directory { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.category-heading { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.category-heading h1 { margin: 0; font-size: 30px; }
.category-heading > div > p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.category-count { margin: 0; display: flex; align-items: baseline; gap: 8px; color: var(--muted); }
.category-count strong { color: var(--ink); font-size: 32px; }
.category-count span { font-size: 12px; white-space: nowrap; }
.category-filter-board { display: grid; gap: 8px; }
.category-filter-row { min-width: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; }
.category-filter-group { min-height: 40px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 7px; border: 1px solid #d6dadd; background: #f4f5f6; color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.category-filter-group small { color: #858b8f; font-size: 10px; }
.category-filter-group.active { border-color: var(--nav); background: var(--nav); color: #fff; }
.category-filter-group.active small { color: #d9dcde; }
.category-filter-scroll { min-width: 0; min-height: 40px; display: flex; align-items: center; gap: 2px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #c2c7ca transparent; -webkit-overflow-scrolling: touch; }
.category-filter-scroll a { height: 40px; padding: 0 12px; flex: 0 0 auto; display: inline-flex; align-items: center; background: transparent; color: #62686d; font-size: 13px; text-decoration: none; white-space: nowrap; }
.category-filter-scroll a:hover, .category-filter-scroll a:focus, .category-filter-scroll a.active { background: #f0f1f2; color: var(--red-dark); }
.category-products { padding-top: 28px; }
.category-products > header span { color: var(--muted); font-size: 12px; }
.category-load-error { min-height: 160px; padding: 30px; display: grid; place-items: center; align-content: center; background: var(--soft); text-align: center; }
.category-load-error p { margin: 7px 0 0; color: var(--muted); }

.back-button { min-height: 42px; margin-bottom: 12px; padding: 0; display: inline-flex; align-items: center; color: #52585d; font-size: 13px; font-weight: 700; text-decoration: none; }
.detail-panel { display: grid; grid-template-columns: minmax(340px, 1fr) minmax(380px, 1fr); gap: 42px; }
.detail-media { height: auto; min-height: 500px; }
.detail-media strong { max-width: 360px; font-size: 30px; }
.detail-copy { align-self: center; padding: 16px 10px 16px 0; }
.detail-category { margin: 0 0 9px; color: var(--red-dark); font-size: 13px; font-weight: 700; }
.detail-copy h1 { margin: 0; font-size: 32px; line-height: 1.3; }
.detail-spec { margin: 10px 0 20px; color: var(--muted); font-size: 15px; }
.product-price.large { min-height: 52px; margin: 16px 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product-price.large span { font-size: 14px; }
.product-price.large strong { font-size: 30px; }
.detail-copy dl { margin: 0; }
.detail-copy dl div { min-height: 48px; display: grid; grid-template-columns: 90px 1fr; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-copy dt { color: var(--muted); }
.detail-copy dd { margin: 0; font-weight: 700; }

.empty-panel { min-height: 340px; padding: 30px; display: grid; place-items: center; align-content: center; gap: 9px; background: var(--soft); text-align: center; }
.empty-panel.tall { min-height: 520px; }
.empty-panel strong { font-size: 20px; }
.empty-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.empty-panel > a { min-height: 42px; margin-top: 8px; padding: 0 17px; display: inline-flex; align-items: center; background: var(--nav); color: #fff; font-weight: 700; text-decoration: none; }
.account-panel { border: 1px solid var(--line); }
.account-panel > header { min-height: 150px; padding: 28px; display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.account-avatar { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--nav); color: #fff; font-size: 21px; font-weight: 800; }
.account-panel header p { margin: 0; color: var(--red-dark); font-size: 12px; font-weight: 700; }
.account-panel h1 { margin: 6px 0 0; font-size: 23px; }
.account-links { display: grid; grid-template-columns: repeat(3, 1fr); }
.account-links button { min-height: 110px; padding: 18px; border: 0; border-right: 1px solid var(--line); background: #fff; text-align: left; }
.account-links button:last-child { border-right: 0; }
.account-links strong, .account-links small { display: block; }
.account-links strong { font-size: 14px; }
.account-links small { margin-top: 8px; color: var(--muted); font-size: 12px; }
.mobile-bottom-nav { display: none; }

@media (max-width: 760px) {
    .store-app { padding-bottom: 62px; }
    .store-header { min-height: 68px; padding: 9px 10px; grid-template-columns: 88px minmax(0, 1fr); gap: 9px; }
    .store-logo img { width: 86px; }
    .store-search { grid-template-columns: minmax(0, 1fr) 44px; border-width: 1px; }
    .store-search input { height: 40px; padding: 0 8px; font-size: 11px; }
    .store-search button { min-height: 40px; font-size: 11px; }
    .store-account, .store-nav { display: none; }
    .store-content { padding: 8px 10px 78px; }
    .featured-product { min-height: 0; display: block; background: #f5f6f6; }
    .featured-copy { min-height: 148px; padding: 15px 14px; }
    .featured-copy > span { font-size: 10px; }
    .featured-copy h1 { margin-top: 6px; font-size: 19px; }
    .featured-copy > p:not(.product-price) { margin-bottom: 7px; font-size: 11px; line-height: 1.5; }
    .featured-copy .product-price.large { min-height: 32px; margin: 6px 0; padding: 5px 0; border: 0; }
    .featured-copy .product-price.large span { font-size: 10px; }
    .featured-copy .product-price.large strong { font-size: 20px; }
    .featured-copy > a { min-width: 96px; min-height: 38px; margin-top: 7px; padding: 0 10px; font-size: 12px; }
    .featured-media { display: none; }
    .store-section { padding: 20px 0; }
    .store-section > header { min-height: 38px; margin-bottom: 10px; }
    .store-section h2, .category-products h2 { font-size: 18px; }
    .category-section { padding-bottom: 18px; }
    .category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; overflow: visible; border: 0; }
    .category-grid a { min-height: 48px; padding: 8px 4px; display: grid; place-items: center; border: 0; background: #f1f2f3; text-align: center; }
    .category-grid a:first-child { border: 0; }
    .category-grid strong { padding: 0; font-size: 11px; line-height: 1.35; }
    .category-grid span, .category-grid small { display: none; }
    .product-grid { grid-template-columns: 1fr; gap: 0; }
    .product-media { display: none; }
    .product-card-body { min-height: 76px; padding: 12px 2px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 5px 12px; border-bottom: 1px solid var(--line); }
    .product-price { min-height: 0; grid-column: 2; grid-row: 1; justify-self: end; }
    .product-price span { font-size: 10px; }
    .product-price strong { font-size: 19px; }
    .product-name { min-height: 0; margin: 0; grid-column: 1; grid-row: 1; font-size: 13px; }
    .product-spec { min-height: 0; margin: 0; grid-column: 1; grid-row: 2; font-size: 10px; }
    .detail-link { min-height: 28px; margin: 0; grid-column: 2; grid-row: 2; justify-self: end; font-size: 10px; }
    .page-heading { padding: 13px 0; }
    .page-heading h1 { font-size: 22px; }
    .category-heading { margin-bottom: 17px; align-items: center; gap: 9px; }
    .category-heading h1 { font-size: 22px; }
    .category-heading > div > p { font-size: 10px; }
    .category-count { display: block; text-align: right; }
    .category-count strong { display: block; font-size: 24px; }
    .category-count span { display: block; margin-top: 2px; font-size: 9px; }
    .category-filter-board { gap: 11px; }
    .category-filter-row { display: block; }
    .category-filter-group { width: max-content; min-width: 108px; min-height: 40px; margin-bottom: 2px; }
    .category-filter-scroll { min-height: 40px; }
    .category-filter-scroll a { height: 40px; padding: 0 10px; font-size: 11px; }
    .detail-panel { display: block; }
    .detail-media { display: none; }
    .detail-copy { padding: 0 2px; }
    .detail-copy h1 { font-size: 24px; }
    .product-price.large strong { font-size: 26px; }
    .account-panel > header { padding: 18px; }
    .account-links { grid-template-columns: 1fr; }
    .account-links button { min-height: 76px; border-right: 0; border-bottom: 1px solid var(--line); }
    .mobile-bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: 62px; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid #d9dcde; box-shadow: 0 -3px 12px rgba(0, 0, 0, .07); }
    .mobile-bottom-nav a { min-width: 0; min-height: 62px; display: flex; align-items: center; justify-content: center; border-top: 3px solid transparent; background: transparent; color: #73797e; font-size: 12px; text-decoration: none; touch-action: manipulation; }
    .mobile-bottom-nav a.active { border-top-color: var(--red); color: var(--red-dark); font-weight: 700; }
}
