/* Shared production components. Legacy visual rules remain isolated in styles.css. */

[hidden]{display:none!important}body{font-size:1rem}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #0f9e9a;outline-offset:3px}.preserve-lines{white-space:pre-line;overflow-wrap:anywhere}.notification{position:fixed;z-index:1000;bottom:90px;left:50%;transform:translateX(-50%);max-width:min(92vw,620px);padding:14px 20px;background:#172a35;color:#fff;border-radius:8px;box-shadow:0 4px 20px #0003;font-size:1rem}.notification.is-error{background:#92302d}.loading-state{padding:32px;color:var(--muted);grid-column:1/-1}.catalog-search-row{display:flex;align-items:center;gap:24px;margin:0 0 18px}.catalog-search-row h1{font-size:1.5rem;white-space:nowrap}.catalog-search{flex:1;max-width:560px}.catalog-search input{width:100%;min-height:46px;border:1px solid var(--line);border-radius:6px;padding:10px 14px;background:#f5f7f8}.results-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:36px;margin-bottom:20px;color:var(--muted);font-size:.875rem}.active-filters{display:flex;gap:8px;flex-wrap:wrap}.active-filters button,.results-toolbar>button,.pagination button{border:1px solid var(--line);background:#fff;padding:8px 12px;border-radius:4px;color:var(--ink)}.pagination{display:flex;justify-content:center;align-items:center;gap:18px;margin:32px 0}.product-card img{aspect-ratio:4/3;object-fit:cover}.product-title strong small{font-size:.75rem;font-weight:400}.app-dialog{width:min(460px,calc(100vw - 32px));max-height:85dvh;overflow:auto;border:0;border-radius:12px;padding:30px;color:var(--ink);box-shadow:0 20px 80px #0004}.app-dialog::backdrop,.lightbox::backdrop{background:#071620b8}.app-dialog h2{font-size:1.25rem;margin:12px 24px 20px 0}.dialog-close{position:absolute;right:12px;top:12px;min-width:40px;min-height:40px;border:0;border-radius:50%;background:#eef2f4;font-size:24px;color:#172a35}.inquiry-content{display:flex;flex-direction:column;align-items:flex-start;gap:14px;overflow-wrap:anywhere}.inquiry-content p{margin:0;line-height:1.7}.inquiry-content button,.detail-inline-actions>button,.purchase-bar>button,.admin-top-actions button{padding:10px 16px;min-height:44px;border:1px solid var(--line);border-radius:5px;background:#fff}.inquiry-qr{width:210px;max-width:100%;height:auto}.primary-button{background:var(--navy)!important;color:#fff!important;border-color:var(--navy)!important}.detail-inline-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.price-note{font-size:.875rem;color:var(--muted);line-height:1.7}.zoom-trigger{position:relative;border:0;padding:0;width:100%;cursor:zoom-in}.zoom-trigger img{width:100%;height:auto;aspect-ratio:4/3;object-fit:contain}.zoom-trigger>span{position:absolute;bottom:12px;left:12px;padding:7px 10px;border-radius:4px;background:#fffE;font-size:.875rem}.detail-thumbnails{overflow-x:auto}.detail-thumbnails button{flex:0 0 72px;min-height:56px}.lightbox{width:min(1100px,96vw);height:min(850px,92dvh);max-width:96vw;max-height:92dvh;border:0;background:#101920;padding:52px 16px 64px;border-radius:8px}.lightbox>img{width:100%;height:100%;object-fit:contain}.lightbox-controls{position:absolute;bottom:14px;left:0;width:100%;display:flex;justify-content:center;align-items:center;gap:24px;color:#fff}.lightbox-controls button{width:44px;height:40px;font-size:24px}.purchase-bar{display:none}.spec-edit-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.backup-import{display:inline-flex;align-items:center;gap:8px;font-size:.875rem}.backup-import input{max-width:180px}.empty-state h2{font-size:1.25rem}.empty-state p{font-size:1rem}.empty-state button{padding:10px 16px;background:var(--navy);color:#fff;border:0;border-radius:5px}.login-page{min-height:100dvh;display:grid;place-items:center;padding:24px;background:#f2f5f7}.login-card{width:min(420px,100%);padding:36px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow)}.login-card h1{font-size:1.5rem;margin:18px 0 8px}.login-card p{color:var(--muted);line-height:1.6}.login-card label{display:grid;gap:8px;margin:18px 0;font-size:.875rem}.login-card input{padding:12px;width:100%;border:1px solid var(--line);border-radius:5px}.login-card button{width:100%;padding:12px}.login-card>a{display:inline-block;margin-top:20px}.login-error{color:#a3332d!important}.product-form input,.product-form textarea{font-size:1rem}.admin-top-actions{flex-wrap:wrap}.detail-section p{font-size:1rem;line-height:1.8}.product-media img{content-visibility:auto}.category-tabs button{min-height:36px}
@media(max-width:700px){.catalog-search-row{gap:12px;align-items:stretch;flex-direction:column;margin-top:6px}.catalog-search-row h1{display:none}.catalog-search{max-width:none}.catalog-search input{font-size:1rem}.results-toolbar{margin-bottom:14px;gap:8px}.product-title{flex-wrap:wrap;gap:6px}.product-title strong{font-size:.875rem}.purchase-bar{position:fixed;z-index:45;bottom:0;left:0;right:0;display:flex;align-items:center;gap:10px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line)}.purchase-bar>span{margin-right:auto;font-weight:700}.purchase-bar>button{font-size:.875rem}body[data-page="product-detail"]{padding-bottom:85px}.spec-edit-fields{grid-template-columns:1fr}.app-dialog{padding:24px}.admin-top-actions .sync-state{display:none}.catalog-sidebar .category-tabs button{font-size:.875rem!important;min-height:40px}.detail-topbar{gap:12px}.detail-topbar .brand small{display:none}.detail-back{font-size:.875rem}.backup-import{flex-wrap:wrap}.notification{bottom:100px}body[data-page="catalog"] .floating-contact{bottom:calc(16px + env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Unified visual system — restrained forest green, clear type, generous space. */
:root {
  --ink: #243d36;
  --muted: #63736d;
  --line: #dfe6e1;
  --surface: #fff;
  --canvas: #f5f7f5;
  --navy: #234c40;
  --navy-soft: #356052;
  --cyan: #346957;
  --cyan-soft: #eaf1ed;
  --shadow: 0 12px 36px rgba(26, 49, 40, .045);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: var(--canvas);
}
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { transition: background .16s ease, border-color .16s ease, color .16s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #346957;
  outline-offset: 4px;
}
button:disabled { cursor: not-allowed; }
.primary-button { border-radius: 9px; box-shadow: none; font-weight: 600; }
.primary-button:hover { background: #346452 !important; }
.brand-mark, .admin-brand-mark { box-shadow: none; }

/* Product library */
body[data-page="catalog"] { background: #f8faf8; padding-left: 264px; }
body[data-page="catalog"] .catalog-sidebar {
  width: 264px; padding: 32px 22px 88px;
  background: #fff; border-right: 1px solid var(--line); box-shadow: none;
}
body[data-page="catalog"] .sidebar-head { margin-bottom: 36px; }
body[data-page="catalog"] .catalog-sidebar .brand { gap: 12px; }
body[data-page="catalog"] .brand-mark,
body[data-page="catalog"] .mobile-titlebar > .brand-mark {
  width: 40px; height: 40px; border-radius: 11px; background: var(--navy); box-shadow: none;
}
body[data-page="catalog"] .brand strong { font-size: 17px; letter-spacing: .04em; }
body[data-page="catalog"] .brand small { color: var(--muted); font-size: 12px; margin-top: 4px; }
body[data-page="catalog"] .catalog-sidebar .classification-groups { gap: 25px; }
body[data-page="catalog"] .catalog-sidebar .classification-row { gap: 10px; }
body[data-page="catalog"] .catalog-sidebar .classification-row > strong {
  color: #52675c; font-size: 13px; font-weight: 600; letter-spacing: .06em;
}
body[data-page="catalog"] .catalog-sidebar .category-tabs { gap: 4px; }
body[data-page="catalog"] .catalog-sidebar .category-tabs button {
  min-height: 36px; padding: 7px 11px; border-radius: 7px;
  border-color: transparent; background: transparent; color: var(--muted); font-size: 14px;
}
body[data-page="catalog"] .catalog-sidebar .category-tabs button:hover { background: #f1f5f2; color: var(--navy); }
body[data-page="catalog"] .catalog-sidebar .category-tabs button.active {
  background: #e9f1ec; color: #234c40; border-color: transparent; font-weight: 600; box-shadow: none;
}
body[data-page="catalog"] .catalog-shell { width: min(1320px, calc(100% - 80px)); padding-top: 40px; padding-bottom: 40px; }
body[data-page="catalog"] .catalog-search-row { align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 24px; }
body[data-page="catalog"] .catalog-search-row h1 { font-size: 30px; font-weight: 600; letter-spacing: .08em; margin: 0; }
body[data-page="catalog"] .catalog-search { flex: 0 1 400px; }
body[data-page="catalog"] .catalog-search input {
  height: 48px; padding: 12px 18px; background: #fff; border: 1px solid #dde5df;
  border-radius: 10px; box-shadow: none; font-size: 14px;
}
body[data-page="catalog"] .catalog-search input::placeholder { color: #78867e; }
body[data-page="catalog"] .results-toolbar { margin-bottom: 24px; font-size: 14px; color: #63736d; }
.active-filters button, .results-toolbar > button, .pagination button { border-radius: 7px; border-color: var(--line); }
body[data-page="catalog"] .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
body[data-page="catalog"] .product-card { border: 0; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
body[data-page="catalog"] .product-card:hover { transform: none; opacity: 1; }
body[data-page="catalog"] .product-media { border-radius: 12px; aspect-ratio: 4 / 3; background: #eef2ed; box-shadow: none; }
body[data-page="catalog"] .product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
body[data-page="catalog"] .product-card:hover .product-media img { transform: scale(1.025); }
body[data-page="catalog"] .product-info { padding: 16px 0 0; }
body[data-page="catalog"] .product-title { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
body[data-page="catalog"] .product-title > div { flex: 1 1 120px; }
body[data-page="catalog"] .product-title h3 { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.5; }
body[data-page="catalog"] .product-title span { font-size: 12px; color: #6b7b72; margin-top: 5px; letter-spacing: .035em; }
body[data-page="catalog"] .product-title strong { color: var(--navy); font-size: 16px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
body[data-page="catalog"] .product-title strong small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; text-align: right; margin-bottom: 2px; }
body[data-page="catalog"] .product-supply { margin-top: 13px; padding-top: 11px; border-top: 1px solid #e2e8e3; gap: 5px; }
body[data-page="catalog"] .product-supply span { color: #607268; font-size: 12px; line-height: 1.7; }
body[data-page="catalog"] .floating-contact { left: 22px; bottom: 24px; width: 220px; height: 46px; border-radius: 9px; box-shadow: none; font-size: 14px; }
body[data-page="catalog"] .empty-state { grid-column: 1 / -1; padding: 96px 24px; border: 1px dashed #cfdbd2; border-radius: 14px; background: #fff; box-shadow: none; text-align: center; }
body[data-page="catalog"] .empty-state h2 { font-size: 22px; font-weight: 500; color: var(--ink); margin: 0 0 12px; }
body[data-page="catalog"] .empty-state p { color: var(--muted); margin: 0; line-height: 1.8; }

/* Product details and dialogs */
body[data-page="product-detail"] { background: #f8faf8; }
body[data-page="product-detail"] .detail-topbar { min-height: 78px; padding: 16px 32px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: none; }
body[data-page="product-detail"] .brand-mark { background: var(--navy); border-radius: 10px; }
body[data-page="product-detail"] .detail-back { border-radius: 8px; background: #eef3ef; color: var(--navy); border: 1px solid #dce5de; padding: 10px 16px; }
body[data-page="product-detail"] .detail-shell { max-width: 1280px; padding-top: 28px; }
.detail-hero { padding: 28px; gap: 32px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: none; }
.detail-main-media { border-radius: 12px; background: #f0f3ef; overflow: hidden; }
.detail-summary h1 { color: var(--ink); font-size: clamp(25px, 2.5vw, 34px); font-weight: 600; letter-spacing: .025em; line-height: 1.45; }
.detail-tags span { border: 0; border-radius: 5px; background: #edf3ee; color: #516b5b; font-size: 12px; padding: 5px 8px; }
.detail-price strong { color: var(--navy); font-weight: 600; }
.detail-key-specs { border-color: var(--line); background: transparent; }
.detail-key-specs strong { color: var(--ink); font-size: 15px; }
.detail-key-specs span { color: var(--muted); font-size: 13px; }
.detail-content { gap: 20px; }
.detail-section { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.detail-section h2, .related-section h2, .detail-video h2 { font-size: 20px; font-weight: 600; color: var(--ink); }
.detail-thumbnails button { border-radius: 8px; border-color: #dfe6df; }
.detail-thumbnails button.active { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.related-product { border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: none; }
.related-product img { border-radius: 9px 9px 0 0; }
.app-dialog { padding: 32px; border-radius: 16px; border: 1px solid #e1e7e2; box-shadow: 0 24px 80px #10231b26; }
.app-dialog::backdrop { background: #14281f70; backdrop-filter: blur(3px); }
.app-dialog h2 { font-size: 22px; font-weight: 600; }
.app-dialog p { line-height: 1.8; color: var(--muted); }
.dialog-close { background: #f0f4f1; color: var(--ink); border-radius: 10px; }
.inquiry-content button, .detail-inline-actions > button { border-radius: 8px; font-size: 14px; min-height: 46px; }
.notification { border-radius: 10px; background: #234c40; box-shadow: 0 8px 28px #183a2926; font-size: 14px; }

/* Quiet, consistent operations workspace */
body[data-page="admin"] {
  --admin-blue: #2b5948; --admin-blue-dark: #234c40; --admin-ink: #243d36;
  --admin-muted: #63736d; --admin-line: #e0e7e1;
  background: #f5f7f5; color: var(--ink);
}
body[data-page="admin"] .admin-sidebar { background: #fff; border-right: 1px solid var(--line); box-shadow: none; }
body[data-page="admin"] .admin-brand { color: var(--ink); }
body[data-page="admin"] .admin-brand strong { color: var(--ink); font-size: 17px; }
body[data-page="admin"] .admin-brand small { color: var(--muted); font-size: 11px; letter-spacing: .13em; }
body[data-page="admin"] .admin-brand-mark { color: #fff; background: var(--navy); border-radius: 10px; box-shadow: none; }
body[data-page="admin"] .admin-nav-label { color: #738277; font-size: 12px; }
body[data-page="admin"] .admin-nav button { color: #617369; font-size: 14px; border-radius: 8px; min-height: 46px; }
body[data-page="admin"] .admin-nav button.active { color: var(--navy); background: #eaf1ec; box-shadow: none; }
body[data-page="admin"] .admin-nav button:hover { background: #f0f5f1; color: var(--navy); }
body[data-page="admin"] .admin-nav small { background: #dce9df; color: #2e5740; }
body[data-page="admin"] .admin-sidebar-foot { border-top: 1px solid var(--line); }
body[data-page="admin"] .admin-sidebar-foot strong { color: var(--ink); }
body[data-page="admin"] .admin-sidebar-foot small, body[data-page="admin"] .admin-sidebar-foot a { color: var(--muted); }
body[data-page="admin"] .admin-avatar { background: #eaf1ec; color: var(--navy); }
body[data-page="admin"] .admin-topbar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; min-height: 84px; }
body[data-page="admin"] .admin-topbar h1 { font-size: 21px; font-weight: 600; }
body[data-page="admin"] .admin-topbar p { font-size: 12px; color: var(--muted); }
body[data-page="admin"] .admin-top-actions button, body[data-page="admin"] .admin-top-actions a { font-size: 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); min-height: 40px; padding: 9px 14px; }
body[data-page="admin"] .admin-content { padding-top: 36px; }
body[data-page="admin"] .overview-hero { padding: 0 0 28px; min-height: 110px; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); }
body[data-page="admin"] .overview-hero h2 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; letter-spacing: .025em; }
body[data-page="admin"] .overview-hero p { color: var(--muted); font-size: 14px; line-height: 1.8; }
body[data-page="admin"] .eyebrow { color: #60796a; font-size: 12px; font-weight: 500; letter-spacing: .08em; }
body[data-page="admin"] .overview-hero .primary-button { box-shadow: none; }
body[data-page="admin"] .primary-button, body[data-page="admin"] .ghost-button { min-height: 44px; font-size: 14px; font-weight: 500; border-radius: 8px; }
body[data-page="admin"] .admin-stats { gap: 20px; margin-bottom: 24px; }
body[data-page="admin"] .admin-stats article { padding: 24px 20px; box-shadow: none; border-radius: 12px; gap: 14px; }
body[data-page="admin"] .stat-icon { width: 38px; height: 38px; border-radius: 9px; background: #edf3ef; color: var(--navy); font-weight: 400; }
body[data-page="admin"] .admin-stats small { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
body[data-page="admin"] .admin-stats strong { font-size: 32px; font-weight: 600; }
body[data-page="admin"] .admin-stats p { font-size: 12px; color: var(--muted); margin-top: 9px; }
body[data-page="admin"] .overview-grid { gap: 24px; }
body[data-page="admin"] .overview-panel { padding: 24px; border-radius: 12px; }
body[data-page="admin"] .panel-title h3, body[data-page="admin"] .section-intro h2, body[data-page="admin"] .form-card-title h3 { font-size: 18px; font-weight: 600; }
body[data-page="admin"] .panel-title p, body[data-page="admin"] .section-intro p, body[data-page="admin"] .form-card-title p { font-size: 13px; line-height: 1.7; }
body[data-page="admin"] .panel-title button { font-size: 13px; }
body[data-page="admin"] .quick-action { background: #f7f9f7; border-color: var(--line); border-radius: 9px; padding: 17px; }
body[data-page="admin"] .quick-action strong { font-size: 14px; color: var(--ink); }
body[data-page="admin"] .quick-action span { color: var(--muted); } body[data-page="admin"] .backup-import { font-size: 13px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
body[data-page="admin"] .backup-import input { font-size: 12px; }
body[data-page="admin"] .admin-row { padding: 18px 12px; border-color: var(--line); }
body[data-page="admin"] .admin-row strong { font-size: 14px; font-weight: 600; }
body[data-page="admin"] .admin-row span { font-size: 12px; color: var(--muted); line-height: 1.8; white-space: normal; }
body[data-page="admin"] .admin-table-head, body[data-page="admin"] .status { font-size: 12px; }
body[data-page="admin"] .row-actions button { font-size: 12px; min-height: 36px; border-radius: 6px; }
body[data-page="admin"] .row-actions button[data-action="edit"] { background: #edf4ef; border-color: #d6e3da; color: var(--navy); }
body[data-page="admin"] .form-section { padding: 24px; gap: 16px; }
body[data-page="admin"] .form-section h3 { font-size: 16px; font-weight: 600; }
body[data-page="admin"] label > span, body[data-page="admin"] .product-classification-head > span { font-size: 14px; color: #53665b; }
body[data-page="admin"] .product-category-picker legend, body[data-page="admin"] .product-classification-head > button { font-size: 12px; }
body[data-page="admin"] input, body[data-page="admin"] textarea, body[data-page="admin"] select { border-color: var(--line); border-radius: 8px; color: var(--ink); }
body[data-page="admin"] .admin-category-options button { min-height: 36px; font-size: 13px; border-radius: 7px; }
body[data-page="admin"] .upload-field { background: #f8faf8; border-color: #d6e1d9; border-radius: 10px; }
body[data-page="admin"] .form-card-title > span { color: var(--navy); background: #edf4ef; }
body[data-page="admin"] .contact-preview { background: #f7faf7; border-color: var(--line); box-shadow: none; }
body[data-page="admin"] #removeQr { border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; background: #fff; color: var(--muted); font-size: 13px; }

/* Login is part of the same brand, without decorative clutter. */
.login-page { background: #eef3ef; }
.login-card { padding: 44px; width: min(440px,100%); border-color: #dee7df; border-radius: 18px; box-shadow: 0 20px 60px #183b2710; }
.login-card .brand-mark:not(.image-brand) { width: 46px; height: 46px; background: var(--navy); border-radius: 12px; }
.login-card .brand-mark.image-brand { width: 80px; height: 32px; flex-basis: 80px; background: transparent; border-radius: 0; }
.login-card h1 { margin: 26px 0 12px; font-size: 25px; font-weight: 600; line-height: 1.4; }
.login-card p { font-size: 14px; }
.login-card label { margin: 24px 0; gap: 10px; }
.login-card input { border-radius: 8px; min-height: 48px; background: #fcfdfc; }
.login-card button { border-radius: 8px; min-height: 48px; }
.login-card > a { font-size: 13px; color: var(--muted); }

@media (min-width: 701px) and (max-width: 1100px) {
  body[data-page="catalog"] .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-page="catalog"] .catalog-shell { width: calc(100% - 48px); }
  body[data-page="catalog"] .catalog-search-row { gap: 20px; }
}
@media (max-width: 700px) {
  body[data-page="catalog"] { padding-left: 0; }
  body[data-page="catalog"] .mobile-titlebar { height: 68px; padding: 0 18px; background: #fff; border-color: var(--line); }
  body[data-page="catalog"] .mobile-titlebar strong { font-size: 16px; letter-spacing: .04em; }
  body[data-page="catalog"] .mobile-titlebar > div > span { color: var(--muted); font-size: 12px; }
  body[data-page="catalog"] .mobile-category-bar { top: 68px; background: #fff; padding: 12px 16px 10px; border-color: var(--line); box-shadow: none; }
  body[data-page="catalog"] .mobile-menu-toggle { border: 0; color: #536e5c; background: transparent; min-height: 32px; font-size: 13px; }
  body[data-page="catalog"] .catalog-shell { width: calc(100% - 36px); padding-top: calc(var(--mobile-category-bottom, 230px) + 20px); padding-bottom: 72px; }
  body[data-page="catalog"] .catalog-search-row { margin: 0 0 16px; gap: 0; }
  body[data-page="catalog"] .catalog-search { flex: auto; width: 100%; }
  body[data-page="catalog"] .catalog-search input { height: 48px; font-size: 16px; border-radius: 10px; }
  body[data-page="catalog"] .results-toolbar { margin-bottom: 8px; font-size: 13px; gap: 8px; }
  body[data-page="catalog"] .product-grid { grid-template-columns: 1fr; gap: 0; }
  body[data-page="catalog"] .product-card { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 15px; padding: 20px 0; border-bottom: 1px solid var(--line); }
  body[data-page="catalog"] .product-media { width: 108px; height: 108px; aspect-ratio: 1; border-radius: 10px; }
  body[data-page="catalog"] .product-info { padding: 0; }
  body[data-page="catalog"] .product-title { gap: 5px; }
  body[data-page="catalog"] .product-title > div { flex-basis: 100%; }
  body[data-page="catalog"] .product-title h3 { font-size: 15px; line-height: 1.4; }
  body[data-page="catalog"] .product-title span { display: none; }
  body[data-page="catalog"] .product-title strong { font-size: 15px; }
  body[data-page="catalog"] .product-title strong small { display: inline; font-size: 12px; margin-right: 4px; }
  body[data-page="catalog"] .product-supply { border: 0; margin-top: 7px; padding-top: 0; gap: 2px; }
  body[data-page="catalog"] .product-supply span { font-size: 12px; line-height: 1.5; }
  body[data-page="catalog"] .floating-contact { left: auto; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: auto; min-width: 108px; padding: 0 20px; height: 44px; border-radius: 24px; box-shadow: 0 6px 22px #183c2826; }
  body[data-page="catalog"] .catalog-sidebar { width: auto; left: 10px; right: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px #193b2426; }
  body[data-page="catalog"] .sidebar-head { margin-bottom: 16px; padding-bottom: 12px; }
  body[data-page="catalog"] .catalog-sidebar .classification-groups { gap: 22px; }
  body[data-page="catalog"] .empty-state { padding: 60px 20px; margin-top: 18px; }
  body[data-page="product-detail"] .detail-topbar { min-height: 68px; padding: 12px 18px; }
  body[data-page="product-detail"] .detail-shell { padding-top: 18px; width: calc(100% - 32px); }
  .detail-hero { gap: 24px; border: 0; padding: 0; background: transparent; border-radius: 0; }
  .detail-summary { padding: 0 2px; }
  .detail-summary h1 { font-size: 26px; }
  .detail-section { padding: 22px 18px; }
  .detail-content { gap: 14px; }
  .detail-inline-actions { display: none; }
  .purchase-bar { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-color: var(--line); box-shadow: 0 -5px 25px #1b382108; }
  .purchase-bar > button { border-radius: 8px; min-height: 44px; }
  .purchase-bar > span { color: var(--navy); }
  .app-dialog { padding: 28px 24px; }
  .app-dialog h2 { font-size: 20px; }
  body[data-page="admin"] .admin-content { padding: 24px 16px 40px; }
  body[data-page="admin"] .admin-topbar { padding: 12px 16px; }
  body[data-page="admin"] .overview-hero { align-items: flex-start; flex-direction: column; gap: 16px; padding-bottom: 24px; }
  body[data-page="admin"] .overview-hero h2 { font-size: 24px; }
  body[data-page="admin"] .admin-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body[data-page="admin"] .admin-stats article { padding: 18px 14px; grid-template-columns: 1fr; gap: 10px; }
  body[data-page="admin"] .admin-stats strong { font-size: 28px; }
  body[data-page="admin"] .admin-stats p { font-size: 12px; }
  body[data-page="admin"] .overview-grid { grid-template-columns: 1fr; gap: 16px; }
  body[data-page="admin"] .overview-panel { padding: 20px; }
  body[data-page="admin"] .section-intro { gap: 16px; flex-wrap: wrap; }
  body[data-page="admin"] .admin-row { padding: 16px 0; }
  body[data-page="admin"] .product-form { width: 100%; }
  body[data-page="admin"] .form-section { padding: 22px 18px; }
  body[data-page="admin"] .four-cols { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .login-card { padding: 32px 26px; border-radius: 16px; }
  .login-card h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="catalog"] .product-media img { transition: none; }
}

/* Browse modes and compact mobile tools. */
.view-switch { display:flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:8px; margin-left:auto; order:3; background:#fff; }
.view-switch button { border:0; background:transparent; color:var(--muted); border-radius:5px; padding:8px 10px; font-size:13px; min-height:36px; }
.view-switch button[aria-pressed="true"] { background:#eaf1ec; color:var(--ink); font-weight:600; }
body[data-page="catalog"][data-view="waterfall"] .product-grid { display:block; columns:3; column-gap:24px; }
body[data-page="catalog"][data-view="waterfall"] .product-card { display:block; break-inside:avoid; margin:0 0 28px; }
body[data-page="catalog"][data-view="waterfall"] .product-media { width:100%; height:auto; aspect-ratio:auto; }
body[data-page="catalog"][data-view="waterfall"] .product-media img { display:block; width:100%; height:auto; aspect-ratio:auto; content-visibility:visible; }
body[data-page="catalog"][data-view="waterfall"] .empty-state { column-span:all; }
@media(min-width:701px) and (max-width:1100px){body[data-page="catalog"][data-view="waterfall"] .product-grid { columns:2; }}
@media(max-width:700px){
 body[data-page="catalog"] .mobile-titlebar { height:60px; }
 body[data-page="catalog"] .catalog-search-row { position:fixed; z-index:35; top:60px; left:0; right:0; margin:0; padding:4px 16px 8px; height:60px; background:#fff; }
 body[data-page="catalog"] .catalog-search { width:100%; max-width:none; }
 body[data-page="catalog"] .catalog-search input { min-height:44px; height:44px; font-size:14px; }
 body[data-page="catalog"] .mobile-category-bar { top:120px; display:flex; align-items:center; gap:8px; padding:6px 16px 10px; height:56px; }
 body[data-page="catalog"] .mobile-category-row:nth-child(2),body[data-page="catalog"] .mobile-category-label { display:none; }
 body[data-page="catalog"] .mobile-more-row { flex:none; margin:0; padding:0; border:0; }
 body[data-page="catalog"] .mobile-menu-toggle { min-height:40px; padding:0 8px; }
 body[data-page="catalog"] .mobile-more-row::before,body[data-page="catalog"] .mobile-more-row::after { display:none; }
 body[data-page="catalog"] .catalog-shell { padding-top:calc(var(--mobile-category-bottom,176px) + 12px); }
 body[data-page="catalog"] .results-toolbar { margin-bottom:16px; gap:8px; }
 body[data-page="catalog"] .active-filters { order:4; }
 body[data-page="catalog"][data-view="waterfall"] .product-grid { columns:2; column-gap:14px; }
 body[data-page="catalog"][data-view="waterfall"] .product-card { padding:0; margin-bottom:22px; border:0; }
 body[data-page="catalog"][data-view="waterfall"] .product-info { padding:10px 0 0; }
 body[data-page="catalog"][data-view="waterfall"] .product-title { display:flex; flex-direction:column; align-items:flex-start; gap:7px; }
 body[data-page="catalog"][data-view="waterfall"] .product-title h3 { font-size:14px; line-height:1.6; }
 body[data-page="catalog"][data-view="waterfall"] .product-title strong small { display:none; }
 body[data-page="catalog"][data-view="waterfall"] .product-supply-secondary { display:none; }
}
@media(max-width:700px){
 body[data-page="catalog"][data-view="waterfall"] .product-info { display:block; }
 body[data-page="catalog"][data-view="waterfall"] .product-title { flex-wrap:nowrap; justify-content:flex-start; }
 body[data-page="catalog"][data-view="waterfall"] .product-title > div { flex:0 0 auto; width:100%; }
}
@media(max-width:700px){
 body[data-page="catalog"] .catalog-sidebar { background:#fff; }
 body[data-page="catalog"] .catalog-sidebar [data-category-group="style"],body[data-page="catalog"] .catalog-sidebar [data-category-group="product-type"] { display:grid; }
 body[data-page="catalog"].catalog-nav-open { overflow:hidden; }
}

/* Compact proportions and a continuous image/text card surface. */
body[data-page="catalog"] .catalog-search { max-width:320px; }
body[data-page="catalog"] .catalog-search input { min-height:40px; height:40px; border-radius:8px; font-size:14px; }
body[data-page="catalog"][data-view="waterfall"] .product-card { background:#fff; border:1px solid #e6ebe7; border-radius:12px; overflow:hidden; margin-bottom:20px; box-shadow:0 2px 6px #243d3604; }
body[data-page="catalog"][data-view="waterfall"] .product-media,body[data-page="catalog"][data-view="waterfall"] .product-media img { border-radius:0; }
body[data-page="catalog"][data-view="waterfall"] .product-info { padding:14px 16px 16px; gap:8px; }
body[data-page="catalog"][data-view="waterfall"] .product-supply { margin-top:6px; padding-top:0; border:0; }
@media(max-width:700px){
 body[data-page="catalog"] .mobile-titlebar { height:48px; padding:0 16px; gap:9px; border-bottom:0; }
 body[data-page="catalog"] .mobile-titlebar .brand-mark { width:28px; height:28px; flex:0 0 28px; border-radius:8px; font-size:13px; }
 body[data-page="catalog"] .mobile-titlebar strong { font-size:14px; letter-spacing:.02em; }
 body[data-page="catalog"] .mobile-titlebar > div > span { display:none; }
 body[data-page="catalog"] .catalog-search-row { top:48px; height:48px; padding:2px 16px 6px; }
 body[data-page="catalog"] .catalog-search { max-width:none; }
 body[data-page="catalog"] .catalog-search input { height:38px; min-height:38px; padding:8px 12px; background:#f5f7f5; border-color:#edf0ed; font-size:16px; }
 body[data-page="catalog"] .mobile-category-bar { top:96px; height:50px; padding:4px 16px 6px; }
 body[data-page="catalog"] .catalog-shell { padding-top:calc(var(--mobile-category-bottom,146px) + 8px); }
 body[data-page="catalog"] .results-toolbar { margin-bottom:12px; }
 body[data-page="catalog"][data-view="waterfall"] .product-grid { column-gap:12px; }
 body[data-page="catalog"][data-view="waterfall"] .product-card { margin-bottom:12px; }
 body[data-page="catalog"][data-view="waterfall"] .product-info { padding:10px 11px 12px; }
 body[data-page="catalog"][data-view="waterfall"] .product-title { gap:4px; }
 body[data-page="catalog"][data-view="waterfall"] .product-title h3 { margin:0; font-size:14px; line-height:1.5; }
 body[data-page="catalog"][data-view="waterfall"] .product-supply { margin-top:4px; }
}

/* One desktop heading row; mobile style shortcuts and an unfolding filter panel. */
.catalog-heading { display:contents; }
@media(min-width:701px){
 body[data-page="catalog"] .catalog-heading { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; margin-bottom:24px; }
 body[data-page="catalog"] .catalog-heading .catalog-search-row,body[data-page="catalog"] .catalog-heading .results-toolbar { display:contents; }
 body[data-page="catalog"] .catalog-heading h1 { order:0; margin:0; font-size:26px; white-space:nowrap; }
 body[data-page="catalog"] #resultCount { order:1; margin-right:auto; color:var(--muted); font-size:13px; white-space:nowrap; }
 body[data-page="catalog"] .catalog-heading .catalog-search { order:2; flex:0 1 280px; min-width:100px; }
 body[data-page="catalog"] .catalog-heading .view-switch { order:3; margin-left:0; flex:none; }
 body[data-page="catalog"] .catalog-heading .active-filters { order:4; flex-basis:100%; }
 body[data-page="catalog"] .catalog-heading .active-filters:empty { display:none; }
 body[data-page="catalog"] .catalog-heading #resetFilters { order:5; }
}
@media(min-width:701px) and (max-width:1050px){
 body[data-page="catalog"] .catalog-heading { gap:10px; }
 body[data-page="catalog"] .catalog-heading h1 { font-size:21px; }
 body[data-page="catalog"] .catalog-heading .catalog-search { flex:1 1 100px; }
 body[data-page="catalog"] .catalog-heading .view-switch button { padding:6px; font-size:12px; }
}
@media(max-width:700px){
 body[data-page="catalog"] .mobile-category-row:nth-child(2) { display:block; }
 body[data-page="catalog"] .catalog-sidebar { top:var(--mobile-category-bottom,146px); left:0; right:0; border-radius:0 0 14px 14px; max-height:calc(100dvh - var(--mobile-category-bottom,146px) - 12px); transform:none; opacity:1; clip-path:inset(0 0 100% 0); visibility:hidden; pointer-events:none; transition:clip-path 280ms cubic-bezier(.22,.61,.36,1),visibility 0s linear 280ms; }
 body[data-page="catalog"].catalog-nav-open .catalog-sidebar { transform:none; clip-path:inset(0 0 0 0); visibility:visible; pointer-events:auto; transition:clip-path 280ms cubic-bezier(.22,.61,.36,1),visibility 0s; }
 body[data-page="catalog"] .mobile-menu-toggle i { transition:transform 280ms ease; }
 body[data-page="catalog"] .mobile-menu-toggle[aria-expanded="true"] i { transform:rotate(180deg); }
}
@media(prefers-reduced-motion:reduce){body[data-page="catalog"] .catalog-sidebar,body[data-page="catalog"].catalog-nav-open .catalog-sidebar { transition:none; }}

/* Operations controls: readable forms and clear destructive actions. */
body[data-page="admin"] .category-manager-row { padding:24px; margin-top:16px; border:1px solid var(--line); border-radius:12px; background:#fff; }
body[data-page="admin"] .managed-major { gap:14px; align-items:center; }
body[data-page="admin"] .managed-major input { font-size:17px; font-weight:600; padding:10px; border:1px solid var(--line); border-radius:7px; }
body[data-page="admin"] .managed-subcategory { padding:8px; gap:10px; border:1px solid var(--line); border-radius:8px; background:#f8faf8; }
body[data-page="admin"] .managed-subcategory input { font-size:14px; min-width:0; padding:8px; }
body[data-page="admin"] .managed-subcategory span,body[data-page="admin"] .managed-major span { font-size:12px; color:var(--muted); }
body[data-page="admin"] .managed-subcategory button,body[data-page="admin"] .managed-major button { min-height:36px; min-width:36px; color:#9a4540; border:1px solid #eddad8; border-radius:6px; background:#fff; cursor:pointer; }
body[data-page="admin"] #productStatusFilter { padding:10px; border:1px solid var(--line); border-radius:7px; background:#fff; font-size:14px; }
.admin-results-count { color:var(--muted); font-size:13px; margin:16px 0; }
.category-delete-dialog p { font-size:14px; line-height:1.7; }
.category-delete-dialog label { display:grid; gap:8px; font-size:14px; }
.category-delete-dialog select { width:100%; min-height:44px; padding:8px; border:1px solid var(--line); border-radius:7px; background:#fff; }
.category-delete-error { color:#a3332d; }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; }
.dialog-actions button { padding:10px 16px; min-height:44px; border:1px solid var(--line); border-radius:8px; background:#fff; }
@media(max-width:700px){body[data-page="admin"] .category-manager-row { padding:16px; }body[data-page="admin"] .managed-major { flex-wrap:wrap; }body[data-page="admin"] .managed-major input { width:100%; }}
body[data-page="admin"] .admin-tools { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
body[data-page="admin"] .admin-tools > button,body[data-page="admin"] .admin-tools > select { flex:0 0 auto; white-space:nowrap; min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:7px; background:#fff; font-size:13px; }
body[data-page="admin"] .admin-tools .admin-search-field { flex:1 1 230px; min-width:160px; }
body[data-page="admin"] .admin-tools .backup-import { flex:0 1 auto; min-width:160px; flex-wrap:wrap; padding:8px; border:1px solid var(--line); border-radius:7px; }
body[data-page="admin"] .admin-tools .backup-import input { max-width:190px; }
@media(max-width:700px){body[data-page="admin"] .admin-tools .admin-search-field { flex-basis:100%; }body[data-page="admin"] .admin-tools .backup-import { flex-basis:100%; }body[data-page="admin"] .admin-tools > #resetProducts { color:#98423c; }}

/* Pointer-triggered dialog autofocus should not look like keyboard selection. */
html[data-input-method="pointer"] button:focus,
html[data-input-method="pointer"] a:focus,
html[data-input-method="pointer"] [role="button"]:focus { outline:none; }
html[data-input-method="keyboard"] button:focus,
html[data-input-method="keyboard"] a:focus,
html[data-input-method="keyboard"] [role="button"]:focus { outline:2px solid #346957; outline-offset:4px; }

/* Integrated catalog filter surface. This replaces the former mobile popover. */
.mobile-tools { display:contents; }
.mobile-filter-expansion { display:none; }
body[data-page="catalog"][data-view="waterfall"] .product-info { display:block; padding:14px 16px; }
body[data-page="catalog"][data-view="waterfall"] .product-title { display:flex; flex-direction:column; flex-wrap:nowrap; gap:7px; }
body[data-page="catalog"][data-view="waterfall"] .product-title > div { flex:none; width:100%; }
body[data-page="catalog"][data-view="waterfall"] .product-title h3 { margin:0; line-height:1.5; }
body[data-page="catalog"][data-view="waterfall"] .product-title strong small { display:inline; margin-right:5px; }
body[data-page="catalog"][data-view="waterfall"] .product-supply { margin-top:8px; }
body[data-page="catalog"] .product-title h3 { overflow-wrap:anywhere; }
@media(max-width:700px){
 body[data-page="catalog"] .mobile-tools { display:block; position:sticky; top:0; z-index:40; background:#fff; border-bottom:1px solid var(--line); overflow-anchor:none; }
 body[data-page="catalog"].catalog-nav-open { overflow:visible; }
 body[data-page="catalog"] .mobile-titlebar,body[data-page="catalog"] .catalog-search-row,body[data-page="catalog"] .mobile-category-bar { position:static; width:100%; }
 body[data-page="catalog"] .mobile-titlebar { display:flex; height:46px; }
 body[data-page="catalog"] .catalog-search-row { height:48px; margin:0; }
 body[data-page="catalog"] .mobile-category-bar { display:block; height:auto; padding:8px 16px 0; border:0; }
 body[data-page="catalog"] .mobile-category-row:nth-child(2) { display:grid; grid-template-columns:32px minmax(0,1fr); gap:8px; align-items:start; }
 body[data-page="catalog"] .mobile-category-row:nth-child(2) .mobile-category-label { display:block; font-size:12px; line-height:34px; }
 body[data-page="catalog"] #mobileStyles { width:100%; display:flex; flex-wrap:wrap; overflow:visible; gap:6px; }
 body[data-page="catalog"] #mobileStyles button { padding:6px 10px; min-height:34px; }
 body[data-page="catalog"] .mobile-more-row { display:flex; justify-content:flex-end; padding:4px 0; }
 body[data-page="catalog"] .mobile-menu-toggle { min-height:36px; }
 body[data-page="catalog"] .mobile-filter-expansion { display:block; position:absolute; top:100%; left:0; right:0; height:min(38svh,320px); padding:0 16px; opacity:0; overflow:hidden; visibility:hidden; pointer-events:none; transform:translateY(-8px); transition:opacity .18s ease,transform .18s ease,visibility 0s linear .18s; }
 body[data-page="catalog"].catalog-nav-open .mobile-filter-expansion { opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0); transition:opacity .18s ease,transform .18s ease,visibility 0s; }
 body[data-page="catalog"] .mobile-filter-inner { height:100%; min-height:0; overflow-y:auto; overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
 body[data-page="catalog"] #catalogSidebar { display:block; position:static; width:100%; max-height:none; height:auto; margin:0; padding:0; border:0; border-radius:0; box-shadow:none; background:#fff; opacity:1; clip-path:none; transform:none; visibility:inherit; pointer-events:auto; transition:none; overflow:visible; }
 body[data-page="catalog"] #catalogSidebar .sidebar-head,body[data-page="catalog"] #sidebarBackdrop { display:none!important; }
 body[data-page="catalog"] #catalogSidebar .sidebar-content { display:block; overflow:visible; padding:0; }
 body[data-page="catalog"] #catalogSidebar .classification-groups { display:grid; gap:16px; padding:16px 0 20px; border-top:1px solid var(--line); }
 body[data-page="catalog"] #catalogSidebar .classification-row { display:grid; grid-template-columns:64px minmax(0,1fr); gap:10px; align-items:start; }
 body[data-page="catalog"] #catalogSidebar .classification-row > strong { font-size:12px; line-height:36px; }
 body[data-page="catalog"] #catalogSidebar .category-tabs { display:flex; flex-wrap:wrap; gap:6px; }
 body[data-page="catalog"] #catalogSidebar .category-tabs button { min-height:34px!important; padding:6px 9px; font-size:13px!important; }
 body[data-page="catalog"] .catalog-shell { padding-top:14px; }
 body[data-page="catalog"][data-view="waterfall"] .product-info { padding:10px 11px 12px; }
 body[data-page="catalog"][data-view="waterfall"] .product-title { gap:5px; }
 body[data-page="catalog"][data-view="waterfall"] .product-title > div > span,body[data-page="catalog"][data-view="waterfall"] .product-title strong small { display:none; }
 body[data-page="catalog"][data-view="waterfall"] .product-supply { margin-top:5px; }
}
@media(prefers-reduced-motion:reduce){body[data-page="catalog"] .mobile-filter-expansion { transition:none; }}
@media(max-width:700px){body.catalog-route-switching .mobile-filter-expansion { transition:none!important; }}

@media(max-width:700px){
}
.series-choices { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.series-choices button { padding:9px 14px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); }
.series-choices button[aria-pressed="true"] { border-color:#346957; background:#edf4ef; }
.series-choices small { color:var(--muted); margin-left:6px; }
.series-section-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin-bottom:18px; }
.series-section-heading h2 { margin:0; }
.series-section-heading a { color:var(--navy); font-size:14px; }
.series-related .related-grid { grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); }
.series-admin-card { display:flex; gap:16px; align-items:center; flex-wrap:wrap; padding:24px; border:1px solid var(--line); border-radius:12px; background:#fff; margin-bottom:16px; }
.series-admin-card > div { flex:1 1 240px; }
.series-admin-card h3 { margin:0 0 10px; font-size:18px; }
.series-admin-card p { font-size:14px; color:var(--muted); line-height:1.6; }
.series-admin-card button { padding:10px 14px; background:#fff; border:1px solid var(--line); border-radius:7px; }
.series-editor { width:min(600px,calc(100vw - 24px)); }
.series-editor > label { display:grid; gap:8px; margin:16px 0; font-size:14px; }
.series-editor > label input { padding:10px 12px; border:1px solid var(--line); border-radius:7px; width:100%; }
.series-member-picker { max-height:34dvh; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:8px; }
.series-member-picker label { display:flex; gap:12px; align-items:center; padding:10px; font-size:14px; }
.series-member-picker input { width:18px; height:18px; }
.series-member-picker small { display:block; color:var(--muted); margin-top:4px; }
.series-selected-count { color:var(--muted); font-size:13px; }
@media(max-width:700px){
 body[data-page="catalog"] .mobile-category-bar { display:flex; flex-wrap:wrap; gap:0; padding:4px 16px 0; }
 body[data-page="catalog"] .mobile-more-row { padding:0; }
 body[data-page="catalog"] .mobile-filter-expansion { flex-basis:100%; width:100%; }
 .series-related .related-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Catalog rhythm and consistent supporting surfaces. */
body[data-page="catalog"] .catalog-shell { max-width:1680px; }
.filter-summary { display:flex; align-items:flex-start; gap:12px; margin:0 0 16px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.filter-summary .active-filters { flex:1; min-width:0; }
.filter-summary button { font-size:12px; line-height:1.5; border:0; border-radius:6px; padding:7px 9px; color:var(--ink); background:var(--cyan-soft); overflow-wrap:anywhere; text-align:left; }
.filter-summary > button { flex-shrink:0; background:transparent; color:var(--muted); }
body[data-page="catalog"] .series-choices { padding:12px; background:#fff; border:1px solid var(--line); border-radius:10px; }
body[data-page="catalog"] .product-card { overflow:hidden; box-shadow:0 2px 8px #243d3604; }
body[data-page="catalog"] .product-title h3 { letter-spacing:0; }
body[data-page="catalog"] .product-title strong { font-variant-numeric:tabular-nums; }
.empty-state { padding:56px 24px; text-align:center; border:1px dashed var(--line); border-radius:14px; background:#fff; }
.empty-state p { max-width:380px; margin:12px auto 22px; color:var(--muted); line-height:1.8; }
.detail-tags { gap:6px; flex-wrap:wrap; }
.detail-tags span { font-size:12px; padding:5px 9px; }
.detail-summary h1 { line-height:1.4; overflow-wrap:anywhere; }
.detail-sku { font-variant-numeric:tabular-nums; }
.detail-spec-list dd { overflow-wrap:anywhere; }
.related-product { overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; }
.related-product > div { padding:12px 14px; }
.related-product img { width:100%; aspect-ratio:4/3; object-fit:cover; }
.admin-row { align-items:center; }
.series-admin-card h3 { overflow-wrap:anywhere; }
.series-editor [data-save-series] { min-height:44px; }
@media(hover:hover){
 body[data-page="catalog"] .product-card:hover { border-color:#b8c9be; box-shadow:0 6px 20px #243d360a; }
 .browse-tabs button:not([aria-pressed="true"]):hover { background:#eff3ef; }
}
@media(max-width:700px){
 body[data-page="catalog"] .catalog-heading { margin-bottom:10px; }
 body[data-page="catalog"] .results-toolbar { width:100%; justify-content:space-between; }
 body[data-page="catalog"] .view-switch { margin-left:auto; }
 body[data-page="catalog"] #resultCount { order:-1; }
 body[data-page="catalog"] .filter-summary { gap:6px; padding:8px; margin-bottom:12px; }
 body[data-page="catalog"] .filter-summary > button { max-width:62px; }
 .detail-key-specs { gap:12px; }
 .related-product > div { padding:10px; }
 .related-product strong { font-size:14px; line-height:1.5; }
}
body[data-page="catalog"] .filter-summary .active-filters { order:0; }
body[data-page="catalog"] .filter-summary > #resetFilters { order:1; max-width:none; white-space:nowrap; align-self:center; }

/* Use row-based grids so filtering never offsets the top of a column. */
body[data-page="catalog"][data-view="waterfall"] .product-grid { display:grid; columns:auto; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; align-items:start; }
body[data-page="catalog"][data-view="waterfall"] .product-card { margin:0; min-width:0; transform:none; }
body[data-page="catalog"][data-view="waterfall"] .product-media img { aspect-ratio:4/3; object-fit:cover; }
body[data-page="catalog"] .empty-state { grid-column:1/-1; }
@media(min-width:701px) and (max-width:1100px){
 body[data-page="catalog"][data-view="waterfall"] .product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px){
 body[data-page="catalog"][data-view="waterfall"] .product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
}

/* Display the transparent mountain symbol without cropping the square logo. */
body .image-brand,body[data-page="catalog"] .brand-mark.image-brand,body[data-page="catalog"] .mobile-titlebar > .brand-mark.image-brand { display:block; position:relative; overflow:hidden; width:60px; height:24px; flex:0 0 60px; background:transparent; border-radius:0; box-shadow:none; padding:0; }
body .image-brand img { position:absolute; width:100%; max-width:100%; height:auto; left:0; top:50%; transform:translateY(-50%); }
body[data-page="admin"] .admin-brand-mark.image-brand { background:transparent; border-radius:0; box-shadow:none; }
@media(max-width:700px){
 body[data-page="catalog"] .mobile-titlebar > .brand-mark.image-brand,.detail-topbar .image-brand { width:50px; height:20px; flex-basis:50px; }
}
/* Balance the mountain with the two-line brand lockup. */
body[data-page="catalog"] .brand-mark.image-brand { width:54px; height:21.6px; flex-basis:54px; }
@media(max-width:700px){
 body[data-page="catalog"] .mobile-titlebar { height:60px; align-items:center; gap:10px; padding:8px 16px; }
 body[data-page="catalog"] .mobile-titlebar > .brand-mark.image-brand { width:48px; height:19.2px; flex-basis:48px; }
 body[data-page="catalog"] .mobile-titlebar > div { display:flex; flex-direction:column; gap:3px; min-width:0; }
 body[data-page="catalog"] .mobile-titlebar strong { font-size:15px; line-height:20px; letter-spacing:.02em; }
 body[data-page="catalog"] .mobile-titlebar > div > span { display:block; font-size:10px; line-height:14px; color:var(--muted); letter-spacing:.04em; }
}
@media(max-width:700px){
 body[data-page="catalog"] .mobile-titlebar { height:48px; gap:8px; padding:8px 12px; }
 body[data-page="catalog"] .mobile-titlebar > .brand-mark.image-brand { width:42px; height:16.8px; flex-basis:42px; }
 body[data-page="catalog"] .mobile-titlebar > div { flex-direction:row; align-items:center; gap:8px; white-space:nowrap; }
 body[data-page="catalog"] .mobile-titlebar strong { font-size:14px; line-height:20px; }
 body[data-page="catalog"] .mobile-titlebar > div > span { font-size:10px; line-height:20px; letter-spacing:0; }
}
/* Use the available desktop width for denser product browsing. */
@media(min-width:1101px){
 body[data-page="catalog"] .catalog-shell { width:calc(100% - 56px); max-width:none; }
 body[data-page="catalog"][data-view="waterfall"] .product-grid { gap:18px; }
}
@media(min-width:1280px) and (max-width:1439px){
 body[data-page="catalog"][data-view="waterfall"] .product-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(min-width:1440px){
 body[data-page="catalog"][data-view="waterfall"] .product-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
 body[data-page="catalog"][data-view="waterfall"] .product-info { padding:12px; }
 body[data-page="catalog"][data-view="waterfall"] .product-title h3 { font-size:16px; }
}
body[data-page="catalog"].series-index .product-grid { display:grid; columns:auto; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:20px; }

.series-entry { display:block; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); text-decoration:none; }
.series-entry img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; }
.series-entry > div { padding:16px; }
.series-entry h2 { font-size:18px; margin:0 0 8px; }
.series-entry span { font-size:13px; color:var(--muted); }
#seriesChoices h2 { font-size:18px; margin:0; }
#seriesChoices a { font-size:13px; color:var(--muted); margin-right:12px; align-self:center; }
@media(max-width:700px){body[data-page="catalog"].series-index .product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.series-entry > div { padding:12px; }.series-entry h2 { font-size:15px; }}
/* Desktop columns follow the available width while cards retain their size. */
.inquiry-content a[href^="tel:"] { display:block; padding:12px 14px; border:1px solid var(--line); border-radius:8px; background:var(--cyan-soft); color:var(--ink); text-align:center; text-decoration:none; }
@media(max-width:700px){
 body[data-page="catalog"] .results-toolbar { flex-wrap:wrap; gap:8px; }
 body[data-page="catalog"] .view-switch { margin-left:auto; }
}
@media(min-width:701px){
 body[data-page="catalog"][data-view="waterfall"] .product-grid { grid-template-columns:repeat(var(--catalog-columns,1),minmax(0,var(--catalog-card-width,240px))); gap:20px; justify-content:start; }
 body[data-page="catalog"].series-index .product-grid { grid-template-columns:repeat(var(--catalog-columns,1),minmax(0,var(--catalog-card-width,240px))); gap:20px; justify-content:start; }
 body[data-page="catalog"][data-view="waterfall"] .product-info { padding:14px 16px; }
 body[data-page="catalog"][data-view="waterfall"] .product-title h3 { font-size:16px; }
}
.local-file-mode { display:grid!important; min-height:100dvh; margin:0!important; padding:24px!important; place-items:center; background:#f5f7f4; }
.local-file-mode > :not(.local-entry) { display:none!important; }
.local-entry { width:min(560px,100%); padding:36px; background:#fff; border:1px solid #dfe7e1; border-radius:18px; color:#243d36; box-shadow:0 10px 40px #243d3608; }
.local-entry-brand { color:#527565; font-size:14px; }
.local-entry h1 { font-size:26px; margin:18px 0; line-height:1.5; }
.local-entry p,.local-entry li { font-size:15px; line-height:1.8; overflow-wrap:anywhere; }
.local-entry ol { padding-left:22px; margin:22px 0; }
.local-entry li { margin-bottom:12px; }
.local-entry a { display:inline-block; padding:13px 20px; border-radius:8px; text-decoration:none; }
.local-entry .local-entry-note { color:#758177; font-size:12px; margin-bottom:0; }
@media(max-width:700px){.local-entry { padding:24px; }.local-entry h1 { font-size:23px; }}
