:root {
  --primary: #df1f2d;
  --primary-hover: #c41622;
  --primary-active: #a90f19;
  --accent: #f36b73;
  --ink: #1f2328;
  --muted: #5b6572;
  --page: #f6f7f8;
  --surface: #fff;
  --border: #d9dee3;
  --success: #198754;
  --danger: #b42318;
  --blue: #2878c8;
  --shadow: 0 18px 48px rgba(31, 35, 40, .1);
  --shell-content-width: 1600px;
  --shell-gutter: clamp(.8rem, 2.2vw, 2rem);
}

* { box-sizing: border-box; }
html { min-width: 320px; font-size: 18px; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--page); font-family: "Segoe UI Variable", "Segoe UI", Tahoma, sans-serif; line-height: 1.5; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* Auth */
.auth-page { background: linear-gradient(90deg, rgba(53, 4, 8, .08) 0%, rgba(35, 3, 6, .18) 46%, rgba(28, 3, 6, .45) 100%), url("/images/b2b-login-bg.jpg") center center / cover no-repeat fixed; }
.auth-page .shell-main, .auth-page .shell-main > main { min-height: 100vh; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: clamp(2rem, 6vw, 5rem) 1.5rem; }
.auth-panel { width: min(1100px, 100%); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); align-items: center; gap: clamp(3rem, 7vw, 7.5rem); }
.auth-brand { padding: clamp(2rem, 4vw, 3rem); color: #fff; text-shadow: 0 2px 14px rgba(24, 3, 5, .34); }
.auth-brand-logo { width: 300px; height: 61px; max-width: none; margin-bottom: 2.25rem; object-fit: none; }
.auth-eyebrow { margin: 0 0 .65rem; color: #ff7c84; font-size: .75rem; font-weight: 800; letter-spacing: .22em; }
.auth-brand h1 { margin: 0; font-size: clamp(2.8rem, 5vw, 4.9rem); line-height: 1.05; letter-spacing: -.055em; }
.auth-brand > p:last-child { max-width: 32rem; margin: 1.25rem 0 0; color: rgba(255, 255, 255, .7); font-size: 1.03rem; line-height: 1.8; }
.auth-card { padding: clamp(2rem, 4vw, 3.25rem); border: 1px solid rgba(217, 222, 227, .82); border-radius: 1.35rem; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.auth-card-login { padding-block: clamp(1.6rem, 3vw, 2.35rem); }
.auth-card-login .auth-form { margin-top: 1.35rem; gap: .9rem; }
.auth-card-header h2 { margin: 0; font-size: 1.8rem; letter-spacing: -.03em; }
.auth-card-header p { margin: .45rem 0 0; color: var(--muted); font-size: .92rem; }
.auth-form { display: grid; gap: 1.15rem; margin-top: 2rem; }
.auth-field { display: grid; gap: .45rem; }
.auth-field label { font-size: .82rem; font-weight: 700; }
.auth-input { width: 100%; min-height: 3rem; padding: .65rem .9rem; border: 1px solid var(--border); border-radius: .72rem; color: var(--ink); background: #fff; outline: 0; transition: border-color .18s ease, box-shadow .18s ease; }
.auth-input:hover { border-color: #b9c0c8; }
.auth-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(223, 31, 45, .12); }
.auth-field-error { color: var(--danger); font-size: .75rem; }
.auth-field-error:empty, .auth-alert:empty { display: none; }
.auth-alert { padding: .8rem 1rem; border: 1px solid #f3b4ae; border-radius: .65rem; color: var(--danger); background: #fff1f0; font-size: .82rem; }
.auth-alert ul { margin: 0; padding-left: 1.1rem; }
.auth-success { padding: .8rem 1rem; border: 1px solid #9bd7b2; border-radius: .65rem; color: #176b37; background: #effbf3; font-size: .82rem; }
.auth-link { justify-self: end; color: var(--primary); font-size: .8rem; font-weight: 700; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-link-center { justify-self: center; }
.auth-shell-register { padding-block: 2rem; }
.auth-card-wide { width: min(620px, 100%); }
.auth-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.auth-field-wide { grid-column: 1 / -1; }
.auth-field textarea.auth-input { resize: vertical; min-height: 5.5rem; }
.auth-button { min-height: 3.1rem; margin-top: .2rem; border: 0; border-radius: .72rem; color: #fff; background: linear-gradient(135deg, #ef3945 0%, var(--primary) 55%, var(--primary-active) 100%); box-shadow: 0 9px 22px rgba(223, 31, 45, .22); font-weight: 750; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.auth-button:hover { transform: translateY(-1px); box-shadow: 0 12px 25px rgba(223, 31, 45, .28); }
.auth-button:active { transform: translateY(0); }
.auth-card-footer { margin-top: 1.6rem; padding-top: 1.25rem; border-top: 1px solid #edf0f2; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .75rem; }
.auth-card-footer p { margin: 0; }
.auth-card-footer > span { color: var(--primary); font-weight: 650; text-align: right; }

/* Application shell */
.shell-header { position: sticky; top: 0; z-index: 30; border-top: 3px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--primary-active), #d52335 58%, var(--accent)) border-box; box-shadow: 0 8px 30px rgba(26, 31, 36, .08); }
.shell-header-inner { position: relative; width: min(var(--shell-content-width), 100%); margin: 0 auto; padding: 0 var(--shell-gutter) .7rem; }
.shell-header-top { min-height: 88px; padding: .65rem .9rem; display: grid; grid-template-columns: 210px minmax(270px, 1fr) auto; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem); }
.shell-brand { width: 200px; display: grid; justify-items: center; text-decoration: none; }
.shell-brand-logo { width: 200px; height: 50px; max-width: none; object-fit: none; }
.shell-brand-logo-dark { display: none; object-fit: contain; }
.shell-brand-subtitle { margin-top: .14rem; color: #7a838d; font-size: .52rem; font-weight: 800; letter-spacing: .14em; text-align: center; }
.shell-menu-toggle { display: none; }
.shell-search-form { position: relative; display: flex; width: min(620px, 100%); margin: 0 auto; padding: 4px; border: 1px solid #dfe3e7; border-radius: 999px; background: #f5f6f7; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.shell-search-form:focus-within { border-color: rgba(223, 31, 45, .55); background: #fff; box-shadow: 0 0 0 4px rgba(223, 31, 45, .08); }
.shell-search-input { width: 100%; min-width: 0; height: 40px; padding: 0 .55rem 0 1rem; border: 0; color: var(--ink); background: transparent; outline: 0; }
.shell-search-input::placeholder { color: #8a929b; }
.shell-search-submit { min-width: 78px; padding: 0 1.15rem; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #ef3945, var(--primary-active)); box-shadow: 0 5px 14px rgba(223, 31, 45, .22); font-size: .8rem; font-weight: 800; cursor: pointer; }
.shell-search-submit:hover { background: var(--primary-active); }
.shell-search-results { position: absolute; z-index: 90; top: calc(100% + .55rem); right: 0; left: 0; max-height: min(430px, 65vh); padding: .4rem; overflow-y: auto; border: 1px solid #dfe3e7; border-radius: .85rem; background: #fff; box-shadow: 0 18px 42px rgba(31, 35, 40, .18); }
.shell-search-results[hidden] { display: none; }
.shell-search-result { min-height: 64px; padding: .45rem .55rem; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: .7rem; border-radius: .6rem; color: var(--ink); text-decoration: none; }
.shell-search-result:hover, .shell-search-result.is-active { background: #f7f8f9; }
.shell-search-result img { width: 54px; height: 54px; padding: .2rem; object-fit: contain; border: 1px solid #edf0f2; border-radius: .45rem; background: #fff; }
.shell-search-result-copy { min-width: 0; display: grid; }
.shell-search-result-copy strong { overflow: hidden; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.shell-search-result-copy span { overflow: hidden; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.shell-search-result-code { color: var(--primary); font-family: Consolas, monospace; font-size: .64rem; font-style: normal; font-weight: 700; }
.shell-search-empty { margin: 0; padding: .8rem; color: var(--muted); font-size: .72rem; text-align: center; }
.shell-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; }
.shell-tool-button { width: 43px; height: 43px; padding: 0; display: grid; place-items: center; border: 1px solid #e3e6e9; border-radius: 50%; color: #4e5862; background: #fff; font-size: 1.05rem; cursor: pointer; }
.shell-tool-button:hover { color: var(--primary); border-color: rgba(223, 31, 45, .42); }
.shell-tool-dark, .theme-dark .shell-tool-light { display: none; }
.theme-dark .shell-tool-dark { display: inline; }
.shell-exchange { height: 43px; padding: .24rem .72rem; display: grid; align-content: center; gap: .02rem; border: 1px solid #dde2e6; border-radius: .65rem; color: #4f5963; background: #f7f8f9; font-size: .69rem; font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.shell-exchange b { color: var(--success); font-size: .74rem; }
.shell-account-card { min-width: 155px; padding: .35rem .65rem .35rem .4rem; display: flex; align-items: center; gap: .55rem; border: 1px solid #e5e8eb; border-radius: 999px; background: #fff; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease; }
.shell-account-card:hover { border-color: rgba(223, 31, 45, .35); box-shadow: 0 5px 15px rgba(31, 35, 40, .06); }
.shell-account-avatar { width: 34px; height: 34px; display: grid !important; place-items: center; overflow: hidden; border-radius: 50%; background: #f4e9ed; }
.shell-account-card img { width: 30px; height: 30px; object-fit: cover; }
.shell-account-card > span:last-child { display: grid; max-width: 120px; }
.shell-account-card small { color: #7a838d; font-size: .64rem; }
.shell-account-card strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.shell-account-menu-wrap { position: relative; }
.shell-account-menu-wrap::after { position: absolute; top: 100%; right: 0; width: 310px; height: .55rem; content: ""; }
.shell-account-menu { position: absolute; z-index: 60; top: calc(100% + .45rem); right: 0; width: 310px; display: none; overflow: hidden; border: 1px solid #e1e4e8; border-radius: .85rem; background: #fff; box-shadow: 0 20px 48px rgba(31, 35, 40, .18); }
.shell-account-menu-wrap:hover .shell-account-menu, .shell-account-menu-wrap:focus-within .shell-account-menu, .shell-account-menu-wrap.is-open .shell-account-menu { display: block; }
.shell-account-menu > header { padding: .9rem 1rem; display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid #edf0f2; background: #f8f9fa; }
.shell-account-menu > header > span:last-child { min-width: 0; display: grid; }
.shell-account-menu > header strong { font-size: .78rem; }
.shell-account-menu > header small { overflow: hidden; color: #858d97; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.shell-account-menu nav { padding: .45rem 0; display: grid; }
.shell-account-menu nav a { padding: .56rem 1rem; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: .5rem; color: #454d56; font-size: .76rem; font-weight: 600; text-decoration: none; }
.shell-account-menu nav a:hover { color: var(--primary); background: #faf3f5; }
.shell-account-menu nav i { color: #8a939e; font-size: .8rem; font-style: normal; text-align: center; }
.shell-account-balance { padding: .7rem 1rem; display: flex; align-items: center; gap: .6rem; color: #fff; }
.shell-account-balance span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: inherit; background: rgba(255, 255, 255, .2); font-size: .72rem; font-weight: 800; }
.shell-account-balance strong { font-size: .82rem; }
.shell-account-balance.is-positive { background: #3fc28b; }
.shell-account-balance.is-negative { background: #f45f50; }
.shell-account-menu form { padding: .65rem 1rem; border-top: 1px solid #edf0f2; }
.shell-account-menu form button { width: 100%; padding: .55rem; border: 0; border-radius: .45rem; color: #555f69; background: #f1f3f5; font-size: .72rem; font-weight: 700; cursor: pointer; }
.shell-account-menu form button:hover { color: #fff; background: var(--primary); }
.shell-action-link { height: 43px; padding: 0 .78rem; display: flex; align-items: center; gap: .42rem; border: 1px solid #e3e6e9; border-radius: 999px; color: #3f474f; background: #fff; font-size: .74rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.shell-action-link img { width: 18px; height: 18px; object-fit: contain; }
.shell-action-link { position: relative; }
.shell-action-notification { width: 43px; padding: 0; justify-content: center; }
.shell-action-notification svg { width: 20px; height: 20px; fill: none; stroke: #6d7680; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.shell-action-badge { position: absolute; top: -5px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 99px; color: #fff; background: var(--primary); font-size: .56rem; font-weight: 800; line-height: 1; }
.shell-action-cart { color: #fff; border-color: var(--primary); background: var(--primary); }
.shell-action-cart .shell-action-badge { color: var(--primary); background: #fff; border-color: var(--primary); }
.shell-action-cart img { filter: brightness(0) invert(1); }
.shell-action-cart:hover { background: var(--primary-active); }
.shell-action-payment { color: #157346; background: #f0faf5; border-color: #ccebdc; }
.shell-action-payment img { filter: brightness(0) saturate(100%) invert(35%) sepia(35%) saturate(1039%) hue-rotate(104deg) brightness(91%) contrast(84%); }
.shell-payment-menu { position: relative; background: none; border: 0; }
.shell-payment-menu > summary { color: #157346; background: #f0faf5; border-color: #ccebdc; cursor: pointer; list-style: none; }
.shell-payment-menu > summary::-webkit-details-marker { display: none; }
.shell-payment-chevron { margin-left: .1rem; font-size: .9rem; transition: transform .18s ease; }
.shell-payment-menu[open] .shell-payment-chevron { transform: rotate(180deg); }
.shell-payment-options { position: absolute; top: calc(100% + .55rem); right: 0; z-index: 40; width: 225px; padding: .45rem; display: grid; gap: .3rem; border: 1px solid #e1e5e8; border-radius: 14px; background: #fff; box-shadow: 0 14px 35px rgba(25, 31, 36, .16); }
.shell-payment-options::before { content: ""; position: absolute; top: -6px; right: 25px; width: 11px; height: 11px; border-top: 1px solid #e1e5e8; border-left: 1px solid #e1e5e8; background: #fff; transform: rotate(45deg); }
.shell-payment-options > a, .shell-payment-options > span { position: relative; padding: .7rem .75rem; display: grid; gap: .14rem; border-radius: 10px; color: #273039; text-decoration: none; }
.shell-payment-options > a:hover { color: #157346; background: #f0faf5; }
.shell-payment-options strong { display: flex; align-items: center; justify-content: space-between; font-size: .79rem; }
.shell-payment-options small { color: #77818b; font-size: .66rem; }
.shell-payment-options .is-disabled { color: #737c84; background: #f3f4f5; cursor: not-allowed; }
.shell-payment-options em { padding: .16rem .36rem; border-radius: 99px; color: #9a6810; background: #fff0c9; font-size: .54rem; font-style: normal; letter-spacing: .03em; text-transform: uppercase; }
.shell-category-bar { min-height: 62px; display: flex; align-items: stretch; justify-content: space-between; gap: .55rem; background: transparent; }
.shell-category-link { min-width: 0; min-height: 50px; padding: .5rem .55rem; display: flex; flex: 1 1 0; align-items: center; justify-content: center; gap: .42rem; border: 1px solid #e3e6e9; border-radius: .72rem; color: #414951; background: #f8f9fa; font-size: .72rem; font-weight: 750; line-height: 1.18; text-align: center; text-decoration: none; white-space: normal; transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
.shell-category-bar > .shell-category-link { flex: 1 1 0; }
.shell-category-link img { width: 25px; height: 25px; flex: 0 0 auto; object-fit: contain; opacity: .85; }
.shell-category-link > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.shell-category-link:hover { color: var(--primary); border-color: rgba(223, 31, 45, .28); background: #fff; box-shadow: 0 7px 18px rgba(31, 35, 40, .08); transform: translateY(-1px); }
.shell-category-link.is-active { color: #fff; border-color: var(--primary); background: linear-gradient(135deg, #ef3945, var(--primary-active)); box-shadow: 0 8px 18px rgba(223, 31, 45, .2); }
.shell-category-link.is-active img { filter: brightness(0) invert(1); opacity: 1; }
.shell-category-bar > .shell-quick-order { flex: 0 0 160px; color: #fff; border-color: #198754; background: #198754; box-shadow: 0 7px 16px rgba(25, 135, 84, .2); }
.shell-quick-order-icon { font-size: 1.05rem; line-height: 1; }
.shell-category-bar > .shell-quick-order:hover, .shell-category-bar > .shell-quick-order.is-active { color: #fff; border-color: #146c43; background: #146c43; box-shadow: 0 9px 20px rgba(25, 135, 84, .28); }
@media (max-width: 1400px) {
  .shell-category-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; padding-bottom: .35rem; }
  .shell-category-bar > .shell-category-link, .shell-category-bar > .shell-quick-order { width: auto; min-height: 48px; flex: none; }
}
.shell-main > main { min-height: calc(100vh - 194px); }
.shell-footer { min-height: 52px; padding: 1rem clamp(1rem, 4vw, 4rem); display: flex; justify-content: space-between; gap: 1rem; color: #707983; background: #fff; border-top: 1px solid #e4e7ea; font-size: .7rem; }

/* Catalog */
.catalog-page { width: min(var(--shell-content-width), 100%); margin: 0 auto; padding: 1.35rem var(--shell-gutter) 4.5rem; }
.catalog-page-head { margin-bottom: 1.5rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.catalog-page-eyebrow { margin: 0 0 .3rem; color: var(--primary); font-size: .66rem; font-weight: 800; letter-spacing: .18em; }
.catalog-page-head h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.035em; }
.catalog-page-summary { margin: .4rem 0 0; color: var(--muted); font-size: .84rem; }
.catalog-result-count { padding: .48rem .78rem; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); background: #fff; font-size: .8rem; white-space: nowrap; }
.catalog-topbar { margin-bottom: 1.15rem; padding: .9rem 1rem; display: grid; grid-template-columns: minmax(310px, 1.35fr) minmax(160px, .55fr) minmax(160px, .55fr) auto auto; align-items: end; gap: .8rem; border: 1px solid var(--border); border-radius: .9rem; background: #fff; box-shadow: 0 5px 18px rgba(31, 35, 40, .04); }
.catalog-topbar-search { display: grid; grid-template-columns: minmax(0, 1fr) 74px; }
.catalog-topbar-search .catalog-toolbar-input { border-radius: .55rem 0 0 .55rem; }
.catalog-topbar-search .catalog-toolbar-button { border-radius: 0 .55rem .55rem 0; }
.catalog-topbar-meta { min-height: 42px; display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.catalog-topbar-meta > a { color: var(--primary); font-size: .76rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.catalog-filter-heading { margin-bottom: 1.2rem; display: flex; align-items: center; justify-content: space-between; }
.catalog-filter-heading strong { font-size: .95rem; }
.catalog-filter-heading a { color: var(--primary); font-size: .68rem; font-weight: 700; text-decoration: none; }
.catalog-filter-group { margin: 0; display: grid; gap: .32rem; }
.catalog-filter-group > span { color: #3e454d; font-size: .8rem; font-weight: 700; }
.catalog-filter-group input, .catalog-filter-group select, .catalog-toolbar-input { width: 100%; height: 42px; padding: 0 .72rem; border: 1px solid var(--border); border-radius: .55rem; color: var(--ink); background: #fff; outline: 0; }
.catalog-filter-group input:focus, .catalog-filter-group select:focus, .catalog-toolbar-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(223, 31, 45, .09); }
.catalog-toggle-list { min-height: 42px; display: flex; align-items: center; gap: .75rem; }
.catalog-toggle { display: flex; align-items: center; justify-content: space-between; gap: .65rem; color: var(--muted); font-size: .8rem; cursor: pointer; }
.catalog-toggle input { position: relative; width: 36px; height: 20px; margin: 0; appearance: none; border: 1px solid #cbd1d6; border-radius: 99px; background: #e6e9ec; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.catalog-toggle input::after { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(31, 35, 40, .2); content: ""; transition: transform .18s ease; }
.catalog-toggle input:checked { border-color: var(--primary); background: var(--primary); }
.catalog-toggle input:checked::after { transform: translateX(16px); }
.catalog-filter-button, .catalog-toolbar-button { height: 42px; border: 0; border-radius: .55rem; color: #fff; background: var(--primary); font-size: .82rem; font-weight: 750; cursor: pointer; }
.catalog-filter-button { width: 100%; }
.catalog-filter-button:hover, .catalog-toolbar-button:hover { background: var(--primary-hover); }
.catalog-search-status { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.catalog-state-card { padding: 3rem 1.5rem; border: 1px solid var(--border); border-radius: .9rem; background: #fff; text-align: center; }
.catalog-state-card h2 { margin: 0; font-size: 1.2rem; }
.catalog-state-card p { margin: .5rem 0 0; color: var(--muted); font-size: .82rem; }
.catalog-state-card-error { border-left: 4px solid var(--danger); color: var(--danger); text-align: left; }
.catalog-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.catalog-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #e1e4e8; border-radius: .8rem; background: #fff; box-shadow: 0 3px 12px rgba(31, 35, 40, .035); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.catalog-card:hover { border-color: #cbd0d6; box-shadow: 0 12px 28px rgba(31, 35, 40, .09); transform: translateY(-2px); }
.catalog-card-favorite { position: absolute; top: .65rem; right: .65rem; z-index: 2; width: 32px; height: 32px; padding: 0; border: 1px solid #e1e4e8; border-radius: 50%; color: var(--primary); background: rgba(255, 255, 255, .94); font-size: 1.15rem; cursor: pointer; }
.catalog-card-favorite.is-active { color: #fff; background: var(--primary); }
.catalog-card-media { position: relative; min-height: 168px; padding: 1rem; display: grid; place-items: center; color: inherit; background: #fff; text-decoration: none; }
.catalog-card-media > img { width: 175px; height: 142px; object-fit: contain; }
.catalog-card-sku { position: absolute; bottom: .55rem; left: .7rem; color: #77808a; font-family: Consolas, monospace; font-size: .66rem; }
.catalog-card-body { padding: .8rem; }
.catalog-card-brand { overflow: hidden; margin: 0; color: var(--primary); font-size: .73rem; font-weight: 750; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.catalog-card-title { height: 2.6rem; min-height: 2.6rem; margin: .3rem 0 .55rem; display: -webkit-box; overflow: hidden; font-size: .96rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.catalog-card-cart { padding: .5rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; border-top: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; }
.catalog-card-cart > label { min-width: 0; display: grid; gap: .28rem; color: var(--muted); font-size: .66rem; font-weight: 700; }
.catalog-card-cart select { width: 100%; height: 30px; padding: 0 .35rem; border: 1px solid var(--border); border-radius: .4rem; background: #fff; font-size: .73rem; }
.catalog-qty-stepper { width: 100%; height: 30px; display: grid; grid-template-columns: 28px minmax(30px, 1fr) 28px; border: 1px solid var(--border); border-radius: .4rem; overflow: hidden; }
.catalog-qty-stepper button { padding: 0; border: 0; color: var(--primary); background: #f5f6f7; font-weight: 800; cursor: pointer; }
.catalog-qty-stepper input { min-width: 0; width: 100%; padding: 0; border: 0; border-right: 1px solid var(--border); border-left: 1px solid var(--border); text-align: center; font-size: .76rem; outline: 0; }
.catalog-card-price-grid { min-height: 52px; padding: .5rem 0 .45rem; display: flex; align-items: end; justify-content: space-between; gap: .5rem; }
.catalog-card-price-block { display: grid; gap: .1rem; }
.catalog-card-price-block span { color: var(--muted); font-size: .69rem; }
.catalog-card-price-block del { color: #8b949e; font-size: .8rem; }
.catalog-card-price-block strong { color: var(--ink); font-size: 1.12rem; white-space: nowrap; }
.catalog-card-price-block.campaign strong { color: var(--primary); }
.catalog-card-discounted-value { display: grid; justify-items: end; gap: .05rem; }
.catalog-card-discounted-value small { color: var(--success); font-size: .58rem; font-weight: 750; white-space: nowrap; }
.catalog-card-actions { display: grid; grid-template-columns: minmax(0, 1fr) 52px; align-items: center; gap: .45rem; }
.catalog-card-actions button { height: 32px; border: 0; border-radius: .45rem; color: #fff; background: var(--primary); font-size: .74rem; font-weight: 750; cursor: pointer; }
.catalog-card-actions button:hover { background: var(--primary-hover); }
.catalog-card-actions button:disabled { color: #7b848d; background: #e6e8eb; cursor: not-allowed; }
.catalog-card-actions a { color: var(--primary); font-size: .72rem; font-weight: 700; text-align: center; text-decoration: none; }
.catalog-load-more { min-height: 44px; margin-top: 1.4rem; display: grid; place-items: center; color: var(--muted); font-size: .7rem; }
.catalog-load-more[data-has-more="false"] { display: none; }
.catalog-load-more.is-loading .catalog-load-more-spinner::before { width: .75rem; height: .75rem; margin-right: .45rem; display: inline-block; border: 2px solid rgba(223, 31, 45, .2); border-top-color: var(--primary); border-radius: 50%; content: ""; animation: catalog-spinner .7s linear infinite; vertical-align: -0.12rem; }
@keyframes catalog-spinner { to { transform: rotate(360deg); } }
.pagination { margin-top: 1.5rem; display: flex; justify-content: center; flex-wrap: wrap; gap: .35rem; }
.pagination a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: .4rem; color: var(--ink); background: #fff; font-size: .72rem; text-decoration: none; }
.pagination a.active { border-color: var(--primary); color: #fff; background: var(--primary); }

/* Product detail and feedback */
.page-feedback { margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid; border-radius: .65rem; font-size: .8rem; font-weight: 650; }
.page-feedback-success { border-color: #a9dcc0; color: #12613b; background: #edf9f2; }
.page-feedback-error { border-color: #f0b5af; color: var(--danger); background: #fff1f0; }
.validation-summary-valid { display: none; }
.app-toast-stack { position: fixed; z-index: 180; right: 1.1rem; bottom: 1.1rem; width: min(410px, calc(100vw - 2.2rem)); display: grid; gap: .65rem; pointer-events: none; }
.app-toast-stack .page-feedback { position: relative; margin: 0; padding: .9rem 2.7rem .9rem 1rem; overflow: hidden; box-shadow: 0 14px 38px rgba(31, 35, 40, .2); pointer-events: auto; animation: app-toast-in .24s ease-out both; }
.app-toast-stack .page-feedback::before { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: currentColor; content: ""; }
.app-toast-stack .page-feedback ul { margin-bottom: 0; }
.app-toast-close { position: absolute; top: .48rem; right: .5rem; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: currentColor; background: transparent; font-size: 1rem; line-height: 1; cursor: pointer; opacity: .72; }
.app-toast-close:hover { background: rgba(31, 35, 40, .08); opacity: 1; }
@keyframes app-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.stock-confirm-modal { width: min(500px, calc(100vw - 2rem)); padding: 1.4rem; grid-template-columns: 52px minmax(0, 1fr); gap: 1rem; border: 0; border-radius: 1rem; color: var(--ink); background: #fff; box-shadow: 0 26px 80px rgba(18, 22, 27, .28); }
.stock-confirm-modal[open] { display: grid; animation: stock-modal-in .2s ease-out both; }
.stock-confirm-modal::backdrop { background: rgba(22, 28, 34, .48); backdrop-filter: blur(3px); }
.stock-confirm-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #9a5a00; background: #fff2d6; font-size: 1.35rem; font-weight: 850; }
.stock-confirm-copy > span { color: #b46b00; font-size: .62rem; font-weight: 850; letter-spacing: .12em; }
.stock-confirm-copy h2 { margin: .2rem 0 .55rem; font-size: 1.12rem; line-height: 1.3; }
.stock-confirm-copy p { margin: .28rem 0 0; color: #5b6572; font-size: .78rem; line-height: 1.55; }
.stock-confirm-copy p b { color: var(--ink); }
.stock-confirm-actions { grid-column: 1 / -1; margin-top: .35rem; display: flex; justify-content: flex-end; gap: .55rem; }
.stock-confirm-actions button { min-height: 40px; padding: .55rem .9rem; border-radius: .5rem; font-size: .74rem; font-weight: 750; cursor: pointer; }
.stock-confirm-cancel { border: 1px solid var(--border); color: #56606a; background: #fff; }
.stock-confirm-accept { border: 1px solid var(--primary); color: #fff; background: var(--primary); }
.stock-confirm-accept:hover { background: var(--primary-active); }
@keyframes stock-modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.quick-order-panel { position: absolute; z-index: 100; right: var(--shell-gutter); top: calc(100% - .25rem); width: min(560px, calc(100vw - 2rem)); overflow: visible; border: 1px solid var(--border); border-radius: 1rem; color: var(--ink); background: #fff; box-shadow: 0 22px 60px rgba(18, 22, 27, .25); animation: stock-modal-in .18s ease-out both; }
.quick-order-panel[hidden] { display: none; }
.quick-order-panel > header { padding: 1rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #eceff1; }
.quick-order-panel > header span { color: var(--primary); font-size: .58rem; font-weight: 850; letter-spacing: .14em; }
.quick-order-panel > header h2 { margin: .12rem 0 0; font-size: 1.05rem; }
.quick-order-panel > header > button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: #fff; font-size: 1.2rem; cursor: pointer; }
.quick-order-panel > form { position: relative; padding: 1rem 1.1rem 1.15rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.quick-order-search-field { grid-column: 1 / -1; display: grid; gap: .3rem; }
.quick-order-search-field > span, .quick-order-unit > span, .quick-order-quantity > span { color: var(--muted); font-size: .68rem; font-weight: 750; }
.quick-order-search-field input, .quick-order-unit select, .quick-order-quantity input { width: 100%; height: 42px; padding: 0 .7rem; border: 1px solid var(--border); border-radius: .5rem; color: var(--ink); background: #fff; outline: 0; }
.quick-order-search-field input:focus, .quick-order-unit select:focus, .quick-order-quantity input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(223, 31, 45, .09); }
.quick-order-results { grid-column: 1 / -1; max-height: 240px; padding: .3rem; display: grid; gap: .2rem; overflow-y: auto; border: 1px solid var(--border); border-radius: .55rem; background: #fff; box-shadow: 0 10px 28px rgba(31, 35, 40, .12); }
.quick-order-results[hidden], .quick-order-selected[hidden] { display: none; }
.quick-order-results > button { width: 100%; padding: .4rem; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: .6rem; border: 0; border-radius: .4rem; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.quick-order-results > button:hover { background: #f5f6f7; }
.quick-order-results img { width: 48px; height: 44px; object-fit: contain; border: 1px solid #edf0f2; border-radius: .35rem; background: #fff; }
.quick-order-results button > span { min-width: 0; display: grid; }
.quick-order-results strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.quick-order-results small { color: var(--muted); font-size: .62rem; }
.quick-order-results > p { margin: 0; padding: .8rem; color: var(--muted); font-size: .7rem; text-align: center; }
.quick-order-selected { grid-column: 1 / -1; min-width: 0; padding: .55rem; display: grid; grid-template-columns: 54px minmax(0, 1fr) 32px; align-items: center; gap: .65rem; border: 1px solid #bfe4d1; border-radius: .55rem; background: #f0faf5; }
.quick-order-selected img { width: 54px; height: 50px; object-fit: contain; mix-blend-mode: multiply; }
.quick-order-selected > span { min-width: 0; display: grid; }
.quick-order-selected strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.quick-order-selected small { color: var(--success); font-size: .64rem; font-weight: 750; }
.quick-order-selected > button { width: 30px; height: 30px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 1rem; cursor: pointer; }
.quick-order-unit, .quick-order-quantity { display: grid; gap: .3rem; }
.quick-order-limit { grid-column: 1 / -1; min-height: 1rem; margin: -.15rem 0 0; color: var(--success); font-size: .66rem; font-weight: 700; }
.quick-order-limit.is-unavailable { color: var(--danger); }
.quick-order-submit { grid-column: 1 / -1; align-self: end; height: 42px; border: 0; border-radius: .5rem; color: #fff; background: var(--primary); font-size: .74rem; font-weight: 800; cursor: pointer; }
.quick-order-submit:hover { background: var(--primary-active); }
.quick-order-submit:disabled { color: #7b848d; background: #e6e8eb; cursor: not-allowed; }
.quick-order-status { grid-column: 1 / -1; min-height: 1.1rem; margin: 0; color: var(--muted); font-size: .68rem; }
.quick-order-status.is-success { color: var(--success); }
.quick-order-status.is-error { color: var(--danger); }
.product-detail-page { width: min(var(--shell-content-width), 100%); margin: 0 auto; padding: 2rem var(--shell-gutter) 5rem; }
.product-detail-back { display: inline-flex; margin-bottom: 1.25rem; color: var(--primary); font-size: .76rem; font-weight: 750; text-decoration: none; }
.product-detail-back:hover { text-decoration: underline; }
.product-detail-grid { display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(360px, .95fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.product-detail-media { position: relative; min-height: 520px; padding: 1.25rem 1.25rem 3.2rem; display: grid; grid-template-rows: minmax(360px, 1fr) auto; gap: 1rem; overflow: hidden; border: 1px solid var(--border); border-radius: 1rem; background: #fff; }
.product-detail-gallery-stage { min-width: 0; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: .75rem; background: #fff; }
.product-detail-gallery-item { position: absolute; inset: 0; display: none; place-items: center; }
.product-detail-gallery-item.is-active { display: grid; }
.product-detail-gallery-item > img { width: min(420px, 82%); max-height: 390px; object-fit: contain; transform: translateY(-14px); }
.product-detail-gallery-item iframe { width: 100%; height: 100%; border: 0; background: #111; }
.product-detail-gallery-nav { min-width: 0; margin-top: -.75rem; display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: .65rem; }
.product-detail-gallery-thumbs { min-width: 0; display: flex; align-items: center; gap: .75rem; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: none; }
.product-detail-gallery-thumbs::-webkit-scrollbar { display: none; }
.product-detail-gallery-thumbs button { position: relative; width: clamp(142px, 29%, 182px); height: 94px; padding: 0; flex: 0 0 auto; display: block; overflow: hidden; scroll-snap-align: start; border: 1px solid #d8dee4; border-radius: .8rem; color: #66707a; background: #fff; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.product-detail-gallery-thumbs button.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(223, 31, 45, .12); }
.product-detail-gallery-thumbs button img { position: absolute; inset: .4rem; width: calc(100% - .8rem); height: calc(100% - .8rem); display: block; object-fit: contain; object-position: center center; }
.product-detail-gallery-thumbs .product-detail-video-thumb { position: relative; padding: 0; color: #fff; background: #111; }
.product-detail-gallery-thumbs .product-detail-video-thumb img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; opacity: .82; }
.product-detail-video-thumb span { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 28px; height: 28px; padding-left: 2px; border-radius: 50%; color: #fff; background: rgba(223, 31, 45, .92); font-size: .82rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); transform: translate(-50%, -50%); }
.product-detail-gallery-arrow { width: 36px; height: 36px; padding: 0 0 3px; align-self: center; display: grid; place-items: center; border: 1px solid #d8dee4; border-radius: 50%; color: var(--primary); background: #fff; font-family: Arial, sans-serif; font-size: 1.35rem; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px rgba(31, 35, 40, .08); }
.product-detail-gallery-arrow:hover { border-color: var(--primary); background: #fff7f7; }
.product-detail-media-code { position: absolute; bottom: 1.15rem; left: 1.25rem; color: #77808a; font-family: Consolas, monospace; font-size: .68rem; }
.product-detail-panel { padding: clamp(1.5rem, 4vw, 2.75rem); border: 1px solid var(--border); border-radius: 1rem; background: #fff; box-shadow: 0 12px 34px rgba(31, 35, 40, .07); }
.product-detail-eyebrow { margin: 0 0 .55rem; color: var(--primary); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.product-detail-panel h1 { margin: 0; font-size: clamp(1.7rem, 2.5vw, 2.1875rem); line-height: 1.2; letter-spacing: -.04em; }
.product-detail-model { margin: .65rem 0 0; color: var(--muted); font-size: .82rem; }
.product-detail-facts { margin: 1.8rem 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #e7eaed; border-radius: .7rem; overflow: hidden; }
.product-detail-facts > div { min-width: 0; padding: .8rem; display: grid; gap: .2rem; border-right: 1px solid #e7eaed; }
.product-detail-facts > div:last-child { border-right: 0; }
.product-detail-facts span { color: var(--muted); font-size: .58rem; }
.product-detail-facts strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.product-detail-facts .is-stocked { color: var(--success); }
.product-detail-facts .is-unavailable { color: var(--danger); }
.product-detail-price { min-height: 112px; padding: 1.2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 1rem; border-radius: .8rem; background: #f6f7f8; }
.product-detail-price > div { display: grid; gap: .2rem; }
.product-detail-price > div:last-child { text-align: right; }
.product-detail-price small { color: var(--muted); font-size: .63rem; font-weight: 700; }
.product-detail-price del { color: #8b949e; font-size: .82rem; }
.product-detail-price strong { color: var(--primary); font-size: 1.35rem; }
.product-detail-purchase { margin-top: 1.25rem; display: grid; grid-template-columns: 135px 180px minmax(0, 1fr); align-items: end; gap: .75rem; }
.product-detail-purchase > label { display: grid; gap: .35rem; color: var(--muted); font-size: .62rem; font-weight: 700; }
.product-detail-purchase select { width: 100%; height: 44px; padding: 0 .7rem; border: 1px solid var(--border); border-radius: .55rem; color: var(--ink); background: #fff; }
.product-detail-add { height: 44px; border: 0; border-radius: .55rem; color: #fff; background: var(--primary); font-size: .78rem; font-weight: 750; cursor: pointer; }
.product-detail-add:hover { background: var(--primary-hover); }
.product-detail-add:disabled { color: #7b848d; background: #e6e8eb; cursor: not-allowed; }

/* Cart */
.cart-page { width: min(var(--shell-content-width), 100%); margin: 0 auto; padding: 1.35rem var(--shell-gutter) 4.5rem; }
.cart-page-head { margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.cart-page-head > div:first-child { display: flex; align-items: baseline; gap: .7rem; }
.cart-page-head p { display: none; }
.cart-page-head h1 { margin: 0; font-size: clamp(1.5rem, 2.2vw, 1.95rem); letter-spacing: -.035em; }
.cart-page-head span { color: var(--muted); font-size: .8rem; }
.cart-page-head > a { padding: .58rem .9rem; border: 1px solid var(--border); border-radius: .55rem; color: var(--primary); background: #fff; box-shadow: 0 3px 10px rgba(31, 35, 40, .03); font-size: .76rem; font-weight: 750; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.cart-page-head > a:hover { border-color: rgba(223, 31, 45, .45); box-shadow: 0 6px 16px rgba(31, 35, 40, .07); transform: translateY(-1px); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 1.1rem; }
.cart-main { min-width: 0; display: grid; gap: 1rem; }
.cart-items { overflow: hidden; border: 1px solid var(--border); border-radius: .82rem; background: #fff; box-shadow: 0 5px 18px rgba(31, 35, 40, .035); }
.cart-items-head { min-height: 44px; padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e9ecef; background: linear-gradient(180deg, #fff, #fafbfc); font-size: .76rem; }
.cart-items-head span { color: var(--muted); }
.cart-item { min-width: 0; padding: .78rem 1rem; display: grid; grid-template-columns: 72px minmax(220px, 1fr) 108px 118px 120px 70px; align-items: center; gap: .9rem; background: #fff; transition: background .18s ease; }
.cart-item:hover { background: #fffdfd; }
.cart-item + .cart-item { border-top: 1px solid #e9ecef; }
.cart-item.cart-item-stock-error { border-left: 4px solid var(--danger); background: #fff1f0; }
.cart-item.cart-item-stock-error:hover { background: #ffe9e7; }
.cart-item-media { width: 72px; height: 66px; display: grid; place-items: center; border: 1px solid #e9ecef; border-radius: .52rem; color: inherit; background: #fff; text-decoration: none; }
.cart-item-media img { width: 54px; height: 52px; object-fit: contain; }
.cart-item-info { min-width: 0; }
.cart-item-info p { margin: 0; color: var(--primary); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.cart-item-info h2 { margin: .1rem 0; overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-name { color: inherit; text-decoration: none; }
.cart-item-name:hover { color: var(--primary); }
.cart-item-info > span, .cart-item-quantity > span, .cart-item-price > span { color: var(--muted); font-size: .66rem; }
.cart-item-info small { margin-top: .28rem; display: flex; flex-wrap: wrap; gap: .28rem; }
.cart-item-info small span { padding: .11rem .34rem; border-radius: .3rem; color: #53616d; background: #f0f3f5; font-size: .61rem; font-weight: 650; }
.cart-item-info .cart-item-stock-message { margin-top: .35rem; display: block; color: var(--danger); font-size: .7rem; line-height: 1.35; }
.cart-item-quantity, .cart-item-price { display: grid; align-content: center; gap: .14rem; }
.cart-item-quantity strong, .cart-item-price strong { font-size: .82rem; white-space: nowrap; }
.cart-quantity-form { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: .34rem; }
.cart-quantity-form input { width: 100%; height: 34px; padding: 0 .42rem; border: 1px solid var(--border); border-radius: .42rem; font-size: .78rem; }
.cart-quantity-form button { height: 34px; padding: 0; border: 0; border-radius: .42rem; color: #fff; background: linear-gradient(135deg, #ef3945, var(--primary-active)); font-size: .95rem; font-weight: 800; cursor: pointer; }
.cart-item-price del { color: #929aa2; font-size: .68rem; line-height: 1.1; }
.cart-item-remove { justify-self: end; }
.cart-item-remove button { padding: .38rem .55rem; border: 1px solid #f0c8cc; border-radius: .4rem; color: var(--primary); background: #fff7f8; font-size: .65rem; font-weight: 750; cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.cart-item-remove button:hover { border-color: var(--primary); color: #fff; background: var(--primary); }
.cart-order-stock-warning { margin: .55rem 0 0; color: var(--danger); font-size: .68rem; font-weight: 700; line-height: 1.4; }
.cart-checkout-panel { overflow: hidden; border: 1px solid var(--border); border-radius: .82rem; background: #fff; box-shadow: 0 5px 18px rgba(31, 35, 40, .035); }
.cart-checkout-head { min-height: 54px; padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e9ecef; background: linear-gradient(180deg, #fff, #fafbfc); }
.cart-checkout-head p { margin: 0; color: var(--primary); font-size: .58rem; font-weight: 800; letter-spacing: .14em; }
.cart-checkout-head h2 { margin: .05rem 0 0; font-size: .9rem; }
.cart-checkout-head > span { padding: .2rem .5rem; border-radius: 999px; color: #59636e; background: #eceff2; font-size: .65rem; font-weight: 700; }
.cart-order-fields { padding: .85rem 1rem 1rem; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .6fr); gap: .75rem; }
.cart-order-fields label { display: grid; gap: .3rem; color: #4f5963; font-size: .71rem; font-weight: 750; }
.cart-order-fields label small { color: var(--muted); font-weight: 500; }
.cart-order-address { display: grid; gap: .3rem; color: #4f5963; font-size: .71rem; font-weight: 750; }
.cart-order-address-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.cart-order-address-head button { padding: .15rem .45rem; border: 0; color: var(--primary); background: transparent; font-size: .68rem; font-weight: 800; cursor: pointer; }
.cart-order-address-head button:hover { text-decoration: underline; }
.cart-order-fields select, .cart-order-fields textarea { width: 100%; min-width: 0; padding: .52rem .65rem; border: 1px solid var(--border); border-radius: .48rem; color: var(--ink); background: #fff; font: inherit; font-size: .76rem; outline: 0; }
.cart-order-fields select { height: 40px; padding-block: 0; }
.cart-order-fields textarea { min-height: 62px; resize: vertical; }
.cart-order-fields select:focus, .cart-order-fields textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(223, 31, 45, .08); }
.cart-order-note, .cart-order-extra { grid-column: 1 / -1; }
.cart-order-extra summary { color: var(--muted); font-size: .68rem; font-weight: 700; cursor: pointer; }
.cart-order-extra > div { margin-top: .45rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.cart-summary { position: sticky; top: 154px; padding: 1.05rem; border: 1px solid var(--border); border-radius: .82rem; background: #fff; box-shadow: 0 9px 28px rgba(31, 35, 40, .07); }
.cart-summary-head { padding: 0 0 .8rem !important; align-items: center; border-top: 0 !important; border-bottom: 1px solid #eceff1; }
.cart-summary h2 { margin: 0; font-size: 1rem; }
.cart-summary-head span { color: var(--muted); font-size: .7rem; }
.cart-summary > div { padding: .62rem .12rem; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid #f0f2f3; font-size: .78rem; }
.cart-summary > div:nth-child(2) { border-top: 0; }
.cart-summary-discount strong, .cart-summary-discount b { color: var(--success); }
.cart-summary-discount b { font-size: .68rem; }
.cart-page-head-actions { display: flex; align-items: center; gap: .55rem; }
.cart-page-head-actions > a, .cart-export-menu > button { min-height: 40px; padding: .55rem .85rem; display: flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid var(--primary); border-radius: .5rem; color: #fff; background: var(--primary); font-size: .7rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.cart-page-head-actions > a:hover { background: var(--primary-active); }
.cart-export-menu { position: relative; }
.cart-export-menu > button { color: var(--primary); background: #fff; }
.cart-export-menu.is-open > button { color: #fff; background: var(--primary); }
.cart-export-menu > div { position: absolute; z-index: 20; top: calc(100% + .4rem); right: 0; min-width: 175px; padding: .35rem; display: grid; gap: .2rem; border: 1px solid var(--border); border-radius: .55rem; background: #fff; box-shadow: 0 12px 30px rgba(31, 35, 40, .16); }
.cart-export-menu > div[hidden] { display: none; }
.cart-export-menu > div a { padding: .5rem .65rem; border-radius: .35rem; color: #4e5862; font-size: .68rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cart-export-menu > div a:hover { color: var(--primary); background: #f5f6f7; }
.cart-export-menu > div .cart-export-mail { color: #157346; }
.cart-summary-total { margin: .2rem 0 .8rem; padding: .78rem .7rem !important; align-items: center; border: 0 !important; border-left: 3px solid var(--primary) !important; border-radius: .48rem; background: #f4f5f6; }
.cart-summary-total strong { color: var(--primary); font-size: 1.05rem; }
.cart-summary button { width: 100%; height: 42px; border: 0; border-radius: .52rem; color: #7b848d; background: #e6e8eb; font-size: .76rem; font-weight: 750; cursor: not-allowed; }
.cart-clear-form { margin-top: .5rem; }
.cart-summary .cart-clear-button { border: 1px solid #e0e4e7; color: #56606a; background: #fff; cursor: pointer; }
.cart-summary .cart-clear-button:hover { border-color: var(--primary); color: var(--primary); }
.cart-order-form { display: grid; }
.cart-summary .cart-order-form button { color: #fff; background: var(--primary); cursor: pointer; }
.cart-summary .cart-order-form button:hover { background: var(--primary-active); }
.cart-summary .cart-order-form button:disabled { color: #7b848d; background: #e6e8eb; cursor: not-allowed; }
.cart-empty { padding: clamp(3rem, 8vw, 6rem) 1.5rem; display: grid; justify-items: center; border: 1px solid var(--border); border-radius: 1rem; background: #fff; text-align: center; }
.cart-empty img { width: 48px; height: 48px; opacity: .6; }
.cart-empty h2 { margin: 1rem 0 .4rem; font-size: 1.25rem; }
.cart-empty p { margin: 0; color: var(--muted); font-size: .8rem; }
.cart-empty a { margin-top: 1.25rem; padding: .65rem 1.1rem; border-radius: .55rem; color: #fff; background: var(--primary); font-size: .72rem; font-weight: 750; text-decoration: none; }
.cart-address-modal { width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; overflow: auto; border: 0; border-radius: 1rem; color: var(--ink); background: #fff; box-shadow: 0 26px 80px rgba(18, 22, 27, .3); }
.cart-address-modal[open] { animation: stock-modal-in .2s ease-out both; }
.cart-address-modal::backdrop { background: rgba(22, 28, 34, .52); backdrop-filter: blur(3px); }
.cart-address-modal form { padding: 1.25rem; }
.cart-address-modal header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.cart-address-modal header span { color: var(--primary); font-size: .6rem; font-weight: 850; letter-spacing: .14em; }
.cart-address-modal h2 { margin: .08rem 0 0; font-size: 1.15rem; }
.cart-address-modal header button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: #59636e; background: #fff; font-size: 1.25rem; cursor: pointer; }
.cart-address-modal-intro { margin: .65rem 0 1rem; color: var(--muted); font-size: .72rem; }
.cart-address-error { margin-bottom: .8rem; padding: .65rem .75rem; border: 1px solid #efc5c9; border-radius: .5rem; color: var(--danger); background: #fff5f6; font-size: .7rem; font-weight: 650; }
.cart-address-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.cart-address-grid-three { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cart-address-grid-three > * { grid-column: span 3; }
.cart-address-grid-three > :nth-child(-n+3) { grid-column: span 2; }
.cart-address-grid label { display: grid; gap: .28rem; color: #4f5963; font-size: .7rem; font-weight: 750; }
.cart-address-grid label small { color: var(--muted); font-weight: 500; }
.cart-address-grid input, .cart-address-grid select, .cart-address-grid textarea { width: 100%; min-width: 0; padding: .58rem .68rem; border: 1px solid var(--border); border-radius: .48rem; color: var(--ink); background: #fff; font-size: .76rem; outline: 0; }
.cart-address-grid input:focus, .cart-address-grid select:focus, .cart-address-grid textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(223, 31, 45, .08); }
.cart-address-grid select:disabled { color: #8b949e; background: #f4f5f6; cursor: wait; }
.cart-address-grid textarea { resize: vertical; }
.cart-address-grid .cart-address-wide { grid-column: 1 / -1; }
.cart-address-modal footer { margin-top: 1rem; display: flex; justify-content: flex-end; gap: .55rem; }
.cart-address-modal footer button { padding: .62rem .9rem; border-radius: .48rem; font-size: .72rem; font-weight: 750; cursor: pointer; }
.cart-address-cancel { border: 1px solid var(--border); color: #56606a; background: #fff; }
.cart-address-save { border: 1px solid var(--primary); color: #fff; background: var(--primary); }
.cart-address-save:disabled { opacity: .65; cursor: wait; }

/* Home */
.home-page { width: min(var(--shell-content-width), 100%); margin: 0 auto; padding: 1.5rem var(--shell-gutter) 5rem; }
.home-welcome { margin-bottom: 1rem; display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.home-eyebrow, .home-section-head p, .account-page-head p, .account-info-panel > p { margin: 0 0 .3rem; color: var(--primary); font-size: .62rem; font-weight: 800; letter-spacing: .17em; }
.home-welcome h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.035em; }
.home-welcome span { color: var(--muted); font-size: .8rem; }
.home-welcome > a, .home-section-head > a { color: var(--primary); font-size: .7rem; font-weight: 750; text-decoration: none; }
.home-banner { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: .8rem; background: #fff; box-shadow: 0 12px 32px rgba(31, 35, 40, .08); }
.home-banner img { width: 100%; height: auto; display: block; object-fit: cover; }
.home-banner-slide { display: none; }
.home-banner-slide.is-active { display: block; animation: home-banner-fade .35s ease; }
.home-banner-control { position: absolute; z-index: 2; top: 50%; width: 2.2rem; height: 2.2rem; padding: 0 0 .18rem; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(22, 27, 34, .42); font-size: 1.65rem; line-height: 1; cursor: pointer; transform: translateY(-50%); transition: background .2s ease; }
.home-banner-control:hover, .home-banner-control:focus-visible { background: rgba(22, 27, 34, .72); }
.home-banner-prev { left: .75rem; }
.home-banner-next { right: .75rem; }
.home-banner-dots { position: absolute; z-index: 2; right: 0; bottom: .7rem; left: 0; display: flex; justify-content: center; gap: .4rem; }
.home-banner-dots button { width: .55rem; height: .55rem; padding: 0; border: 1px solid rgba(255, 255, 255, .92); border-radius: 50%; background: rgba(22, 27, 34, .35); cursor: pointer; }
.home-banner-dots button.is-active { width: 1.5rem; border-radius: 1rem; background: #fff; }
@keyframes home-banner-fade { from { opacity: .45; } to { opacity: 1; } }
.home-statistics { padding: 0; }
.home-statistics .home-section-head { margin-bottom: 1rem; }
.home-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.home-metrics article, .account-stat-grid article { min-width: 0; padding: 1rem; display: grid; gap: .35rem; border: 1px solid var(--border); border-radius: .72rem; background: #fff; }
.home-metrics article { position: relative; overflow: hidden; padding-left: 1.25rem; box-shadow: 0 5px 16px rgba(31, 35, 40, .045); }
.home-metrics article::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); content: ""; }
.home-metrics span, .account-stat-grid span { overflow: hidden; color: var(--muted); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.home-metrics strong, .account-stat-grid strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.home-section { margin-top: 2.3rem; }
.home-section-head { margin-bottom: .85rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.home-section-head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.035em; }
.home-product-carousel-shell { position: relative; }
.home-product-carousel { display: grid; grid-auto-columns: calc((100% - 4rem) / 5); grid-auto-flow: column; align-items: stretch; gap: 1rem; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; cursor: grab; touch-action: pan-y; user-select: none; }
.home-product-carousel.is-dragging { cursor: grabbing; }
.home-product-carousel::-webkit-scrollbar { display: none; }
.home-product-carousel img, .home-product-carousel a { -webkit-user-drag: none; }
.home-product-carousel:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 1rem; }
.home-product-card { min-width: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e5e7ea; border-radius: 1rem; background: #fff; box-shadow: 0 4px 16px rgba(31, 35, 40, .045); text-decoration: none; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.home-product-card:hover { border-color: rgba(223, 31, 45, .36); transform: translateY(-4px); box-shadow: 0 16px 34px rgba(31, 35, 40, .11); }
.home-product-media { position: relative; min-height: 205px; padding: 2.3rem 1.2rem 1.15rem; display: grid; place-items: center; overflow: hidden; background: #fff; }
.home-product-media img { position: relative; z-index: 1; width: 170px; height: 155px; object-fit: contain; transition: transform .25s ease; }
.home-product-card:hover .home-product-media img { transform: scale(1.045); }
.home-product-badges { position: absolute; z-index: 2; top: .75rem; right: .75rem; left: .75rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.home-product-stock { padding: .36rem .56rem; border-radius: 999px; font-size: .62rem; font-weight: 800; line-height: 1; }
.home-product-stock { margin-left: auto; color: #157346; border: 1px solid #bfe4d1; background: rgba(240, 250, 245, .94); }
.home-product-stock.is-unavailable { color: #8a3232; border-color: #edc5c5; background: #fff4f4; }
.home-product-copy { min-height: 235px; padding: 1rem 1.05rem 1.05rem; display: grid; align-content: start; flex: 1; border-top: 1px solid #f0f1f2; }
.home-product-copy > small { overflow: hidden; color: var(--primary); font-size: .66rem; font-weight: 800; letter-spacing: .045em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.home-product-copy > strong { height: 4.25rem; margin-top: .35rem; display: -webkit-box; overflow: hidden; font-size: .98rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.home-product-copy em { margin-top: .28rem; color: var(--muted); font-family: Consolas, monospace; font-size: .64rem; font-style: normal; }
.home-product-prices { margin-top: auto; padding: .8rem 0 .65rem; display: grid; grid-template-columns: .8fr 1.2fr; align-items: end; gap: .6rem; border-top: 1px solid #edf0f2; }
.home-product-prices > span { min-width: 0; display: grid; gap: .12rem; }
.home-product-prices small { overflow: hidden; color: var(--muted); font-size: .63rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.home-product-prices del { color: #8b949e; font-size: .76rem; white-space: nowrap; }
.home-product-sale-price { text-align: right; }
.home-product-sale-value { display: grid; justify-items: end; gap: .05rem; }
.home-product-sale-value .home-product-discount-note { color: var(--success); font-size: .55rem; font-weight: 750; }
.home-product-prices b { color: var(--primary); font-size: 1.14rem; letter-spacing: -.025em; white-space: nowrap; }
.home-product-detail { min-height: 36px; display: flex; align-items: center; justify-content: center; gap: .4rem; border-radius: .48rem; color: #fff; background: var(--primary); font-size: .72rem; font-weight: 800; transition: background .18s ease; }
.home-product-card:hover .home-product-detail { background: var(--primary-active); }
.home-announcement-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.home-announcement-grid article { padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: #fff; }
.home-announcement-grid time { color: var(--primary); font-size: .58rem; font-weight: 750; }
.home-announcement-grid h3 { margin: .45rem 0; font-size: .82rem; line-height: 1.4; }
.home-announcement-grid p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.55; }

/* Account */
.account-page { width: min(var(--shell-content-width), 100%); margin: 0 auto; padding: 2rem var(--shell-gutter) 5rem; }
.account-page-head { margin-bottom: 1.5rem; display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.account-page-head h1 { margin: 0; font-size: clamp(1.7rem, 3.5vw, 2.5rem); letter-spacing: -.045em; }
.account-page-head span { color: var(--muted); font-size: .8rem; }
.account-page-head > a { color: var(--primary); font-size: .7rem; font-weight: 750; text-decoration: none; }
.account-stat-grid { margin-bottom: 1rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.account-stat-grid article:first-child { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-active)); border-color: var(--primary); }
.account-stat-grid article:first-child span { color: rgba(255, 255, 255, .72); }
.account-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.account-info-panel { padding: 1.35rem; border: 1px solid var(--border); border-radius: .85rem; background: #fff; }
.account-info-panel h2 { margin: 0; font-size: 1.05rem; }
.account-info-panel dl { margin: 1rem 0 0; }
.account-info-panel dl > div { padding: .68rem 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 1rem; border-top: 1px solid #edf0f2; }
.account-info-panel dt { color: var(--muted); font-size: .66rem; }
.account-info-panel dd { margin: 0; overflow-wrap: anywhere; font-size: .72rem; font-weight: 700; }
.account-shortcuts { margin-top: 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.account-shortcuts > * { padding: 1rem; display: grid; gap: .25rem; border: 1px solid var(--border); border-radius: .7rem; background: #fff; text-decoration: none; }
.account-shortcuts strong { color: var(--primary); font-size: .78rem; }
.account-shortcuts span { color: var(--muted); font-size: .65rem; }
.account-shortcuts .is-disabled { opacity: .62; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.settings-card { padding: clamp(1.2rem, 3vw, 1.7rem); display: grid; align-content: start; gap: .8rem; border: 1px solid var(--border); border-radius: .9rem; background: #fff; box-shadow: 0 8px 24px rgba(31, 35, 40, .05); }
.settings-card > p { margin: 0; color: var(--primary); font-size: .65rem; font-weight: 850; letter-spacing: .12em; }
.settings-card h2 { margin: -.5rem 0 0; font-size: 1.08rem; }
.settings-card > span { margin-top: -.45rem; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.settings-card > label:not(.settings-toggle) { display: grid; gap: .3rem; }
.settings-card label b { color: #4c5660; font-size: .68rem; }
.settings-card input[type="password"] { width: 100%; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: .5rem; font-size: .8rem; outline: 0; }
.settings-card input[type="password"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(223, 31, 45, .08); }
.settings-card > button { margin-top: .25rem; min-height: 42px; border: 0; border-radius: .5rem; color: #fff; background: var(--primary); font-size: .74rem; font-weight: 800; cursor: pointer; }
.settings-toggle { position: relative; padding: .7rem .75rem; display: flex; align-items: center; gap: .7rem; border: 1px solid #edf0f2; border-radius: .55rem; cursor: pointer; }
.settings-toggle input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.settings-toggle i { width: 36px; height: 20px; padding: 2px; border-radius: 99px; background: #c8cdd2; transition: background .18s ease; }
.settings-toggle i::after { content: ""; width: 16px; height: 16px; display: block; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.settings-toggle input:checked + i { background: var(--primary); }
.settings-toggle input:checked + i::after { transform: translateX(16px); }
.settings-toggle strong { font-size: .74rem; }

/* Account portal modules */
.portal-page { width: min(var(--shell-content-width), 100%); margin: 0 auto; padding: 2rem var(--shell-gutter) 5rem; }
.portal-page-head { margin-bottom: 1.5rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.portal-page-head p { margin: 0 0 .3rem; color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.portal-page-head h1 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.55rem); letter-spacing: -.04em; }
.portal-page-head span { color: var(--muted); font-size: .88rem; }
.portal-page-head > a { padding: .65rem 1rem; border: 1px solid var(--primary); border-radius: .55rem; color: var(--primary); background: #fff; font-size: .78rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.campaign-summary { margin-bottom: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); gap: .7rem; }
.campaign-summary article { padding: .9rem 1rem; display: grid; gap: .2rem; border: 1px solid var(--border); border-radius: .7rem; background: #fff; }
.campaign-summary span { color: var(--muted); font-size: .67rem; }
.campaign-summary strong { color: var(--primary); font-size: 1.05rem; }
.campaign-list { display: grid; gap: 1.25rem; }
.campaign-section { padding: 1.15rem; border: 1px solid var(--border); border-radius: 1rem; background: #fff; box-shadow: 0 10px 30px rgba(31, 35, 40, .05); }
.campaign-section > header { margin-bottom: 1rem; padding-bottom: 1rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #edf0f2; }
.campaign-section > header small { color: var(--primary); font-size: .62rem; font-weight: 850; letter-spacing: .12em; }
.campaign-section > header h2 { margin: .2rem 0; font-size: 1.2rem; }
.campaign-section > header span { color: var(--muted); font-size: .68rem; }
.campaign-section-stats { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.campaign-section-stats strong, .campaign-section-stats span { padding: .35rem .6rem; border-radius: 99px; font-size: .66rem; font-weight: 750; }
.campaign-section-stats strong { color: #0b7548; background: #e9f8f0; }
.campaign-section-stats span { color: #59636d; background: #f1f3f5; }
.campaign-section .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.order-detail-actions { display: flex; align-items: center; gap: .55rem; }
.order-detail-actions > * { min-height: 39px; padding: .65rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border-radius: .55rem; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.order-detail-actions button { border: 0; color: #fff; background: var(--primary); cursor: pointer; }
.order-detail-actions a { border: 1px solid var(--primary); color: var(--primary); background: #fff; text-decoration: none; }
.portal-empty { min-height: 360px; padding: 3rem 1.5rem; display: grid; place-items: center; align-content: center; border: 1px solid var(--border); border-radius: 1rem; background: #fff; text-align: center; }
.portal-empty > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: #fff0f2; font-size: 1.5rem; }
.portal-empty h2 { margin: 1rem 0 .35rem; font-size: 1.2rem; }
.portal-empty p { margin: 0; color: var(--muted); font-size: .82rem; }
.portal-empty a { margin-top: 1.15rem; padding: .62rem 1rem; border-radius: .5rem; color: #fff; background: var(--primary); font-size: .78rem; font-weight: 750; text-decoration: none; }
.portal-address-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.portal-address-grid article { position: relative; min-height: 260px; padding: 1.35rem; display: grid; align-content: start; gap: .9rem; border: 1px solid var(--border); border-radius: .9rem; background: #fff; box-shadow: 0 8px 24px rgba(31, 35, 40, .05); }
.portal-address-icon { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: #fff0f2; }
.portal-address-grid small { color: var(--primary); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.portal-address-grid h2 { max-width: calc(100% - 50px); margin: .2rem 0 0; font-size: 1.05rem; }
.portal-address-grid p { margin: 0; color: #3f474f; font-size: .86rem; line-height: 1.65; }
.portal-address-grid dl { margin: auto 0 0; padding-top: .8rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; border-top: 1px solid #edf0f2; }
.portal-address-grid dt { color: var(--muted); font-size: .67rem; }
.portal-address-grid dd { margin: .15rem 0 0; font-size: .78rem; font-weight: 700; }
.portal-address-grid .portal-address-note { margin-top: -.2rem; padding: .55rem .65rem; border-radius: .45rem; color: #59636d; background: #f4f6f7; font-size: .72rem; }
.portal-address-detail-link { margin-top: auto; padding-top: .65rem; border-top: 1px solid #edf0f2; color: var(--primary); font-size: .72rem; font-weight: 750; text-decoration: none; }
.portal-address-detail { padding: clamp(1.3rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: 1rem; background: #fff; box-shadow: 0 10px 30px rgba(31, 35, 40, .05); }
.portal-address-detail > header { display: flex; align-items: center; gap: .9rem; }
.portal-address-detail > header .portal-address-icon { position: static; flex: 0 0 auto; }
.portal-address-detail > header small { color: var(--primary); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.portal-address-detail h2 { margin: .2rem 0 0; font-size: 1.25rem; }
.portal-address-detail-text { margin: 1.25rem 0; padding: 1rem; border-radius: .6rem; color: #3f474f; background: #f6f7f8; font-size: .9rem; line-height: 1.7; }
.portal-address-detail dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #edf0f2; border-radius: .7rem; overflow: hidden; }
.portal-address-detail dl > div { padding: .85rem 1rem; border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; }
.portal-address-detail dt { color: var(--muted); font-size: .68rem; }
.portal-address-detail dd { margin: .2rem 0 0; font-size: .82rem; font-weight: 700; }
.portal-address-detail dd small { color: var(--muted); font-weight: 500; }
.portal-address-detail-actions { margin-top: 1rem; display: flex; justify-content: flex-end; }
.portal-address-detail-actions a { padding: .65rem 1rem; border-radius: .5rem; color: #fff; background: var(--primary); font-size: .75rem; font-weight: 750; text-decoration: none; }
.portal-address-form { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: 1rem; background: #fff; box-shadow: 0 10px 30px rgba(31, 35, 40, .05); }
.portal-form-intro { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: .65rem; background: #f5f7f8; }
.portal-form-intro strong { font-size: .8rem; }
.portal-form-intro p { margin: .15rem 0 0; color: var(--muted); font-size: .72rem; }
.portal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.portal-form-grid + .portal-form-grid { margin-top: 1rem; }
.portal-form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal-form-grid label { display: grid; gap: .32rem; color: #4b555f; font-size: .72rem; font-weight: 700; }
.portal-form-grid input, .portal-form-grid textarea, .portal-form-grid select { width: 100%; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: .5rem; color: var(--ink); background: #fff; font-size: .8rem; outline: 0; }
.portal-form-grid input:focus, .portal-form-grid textarea:focus, .portal-form-grid select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(223, 31, 45, .08); }
.portal-form-grid select:disabled { color: #8b949e; background: #f4f5f6; cursor: wait; }
.bulk-order-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(17rem, .75fr); gap: 1.25rem; align-items: start; }
.bulk-order-form { display: grid; gap: 1rem; }
.bulk-order-upload { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1.2rem; border: 1px dashed #b9c1c9; border-radius: .8rem; background: #fafbfc; }
.bulk-order-upload-icon { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: .7rem; color: #fff; background: #198754; font-size: .75rem; font-weight: 800; }
.bulk-order-upload label { display: block; color: var(--ink); font-size: .9rem; font-weight: 800; }
.bulk-order-upload p { margin: .25rem 0 0; color: #69727c; font-size: .72rem; line-height: 1.5; }
.bulk-order-upload input { grid-column: 1 / -1; width: 100%; padding: .7rem; border: 1px solid var(--border); border-radius: .55rem; background: #fff; font-size: .75rem; }
.bulk-order-guide { padding: 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: #fff; box-shadow: 0 10px 30px rgba(31, 35, 40, .05); }
.bulk-order-guide > small { color: var(--primary); font-size: .65rem; font-weight: 800; letter-spacing: .08em; }
.bulk-order-guide h2 { margin: .3rem 0 1rem; font-size: 1.05rem; }
.bulk-order-guide > p { margin: 1rem 0 0; color: #626c76; font-size: .72rem; line-height: 1.65; }
.bulk-order-guide > .bulk-order-sample-note { margin: -.45rem 0 .7rem; color: #7a838d; font-size: .68rem; }
.bulk-order-sample { overflow: hidden; border: 1px solid var(--border); border-radius: .6rem; font-size: .72rem; }
.bulk-order-sample > div { display: grid; grid-template-columns: 1.35fr repeat(3, .55fr); }
.bulk-order-sample strong, .bulk-order-sample span { padding: .55rem .65rem; border-bottom: 1px solid var(--border); }
.bulk-order-sample strong { color: #fff; background: #343a40; }
.bulk-order-sample > div:last-child span { border-bottom: 0; }
.bulk-order-errors ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.portal-form-grid textarea { resize: vertical; }
.portal-form-grid small { min-height: 1em; color: var(--primary); font-size: .62rem; font-weight: 600; }
.portal-form-wide { grid-column: 1 / -1; }
.portal-form-actions { margin-top: 1.25rem; display: flex; justify-content: flex-end; align-items: center; gap: .65rem; }
.portal-form-actions a, .portal-form-actions button { padding: .68rem 1.05rem; border-radius: .5rem; font-size: .76rem; font-weight: 750; text-decoration: none; }
.portal-form-actions a { border: 1px solid var(--border); color: #56606a; background: #fff; }
.portal-form-actions button { border: 0; color: #fff; background: var(--primary); cursor: pointer; }
.orders-filter { margin-bottom: 1rem; padding: 1rem; display: grid; grid-template-columns: 1.2fr 1fr 1fr auto auto; align-items: end; gap: .7rem; border: 1px solid var(--border); border-radius: .8rem; background: #fff; }
.orders-filter .page-feedback { grid-column: 1 / -1; }
.orders-filter label { display: grid; gap: .3rem; color: var(--muted); font-size: .68rem; font-weight: 700; }
.orders-filter input { min-width: 0; height: 39px; padding: 0 .65rem; border: 1px solid var(--border); border-radius: .45rem; color: var(--ink); background: #fff; }
.orders-filter button, .orders-filter > a { height: 39px; padding: 0 .85rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .45rem; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.orders-filter button { border: 0; color: #fff; background: var(--primary); cursor: pointer; }
.orders-filter > a { border: 1px solid var(--border); color: #56606a; background: #fff; text-decoration: none; }
.orders-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.order-card { padding: 1.15rem; border: 1px solid var(--border); border-radius: .85rem; background: #fff; box-shadow: 0 8px 24px rgba(31, 35, 40, .045); }
.order-card > header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.order-card > header small { color: var(--primary); font-size: .62rem; font-weight: 800; letter-spacing: .1em; }
.order-card h2 { margin: .18rem 0 0; font-size: 1rem; }
.order-card h2 a { color: inherit; text-decoration: none; }
.order-card h2 a:hover { color: var(--primary); }
.order-card time { color: var(--muted); font-size: .7rem; }
.order-card-status { margin: .8rem 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.order-card-status span { padding: .2rem .45rem; border-radius: 99px; color: #75520d; background: #fff4d5; font-size: .62rem; font-weight: 750; }
.order-card dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #edf0f2; border-radius: .6rem; overflow: hidden; }
.order-card dl > div { padding: .65rem; border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; }
.order-card dt { color: var(--muted); font-size: .61rem; }
.order-card dd { margin: .15rem 0 0; font-size: .72rem; font-weight: 750; }
.order-card-total dd { color: var(--primary); }
.order-card footer { margin-top: .75rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .64rem; }
.order-card footer a { color: var(--primary); font-weight: 800; text-decoration: none; }
.order-detail-card { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: 1rem; background: #fff; box-shadow: 0 10px 30px rgba(31, 35, 40, .06); }
.order-detail-card > header { padding-bottom: 1.25rem; display: flex; align-items: start; justify-content: space-between; gap: 1.5rem; border-bottom: 1px solid #edf0f2; }
.order-detail-card > header small { color: var(--primary); font-size: .68rem; font-weight: 850; letter-spacing: .12em; }
.order-detail-card > header h2 { margin: .2rem 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.order-detail-card > header span { color: var(--muted); font-size: .78rem; }
.order-detail-status { display: grid; justify-items: end; gap: .45rem; }
.order-detail-status strong { padding: .35rem .65rem; border-radius: 99px; color: #75520d; background: #fff4d5; font-size: .7rem; }
.order-detail-status time { color: var(--muted); font-size: .72rem; }
.order-detail-metrics { margin: 1rem 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #edf0f2; border-radius: .75rem; overflow: hidden; }
.order-detail-metrics > div { padding: 1rem; display: grid; gap: .25rem; border-right: 1px solid #edf0f2; }
.order-detail-metrics > div:last-child { border-right: 0; }
.order-detail-metrics span, .order-detail-grid dt { color: var(--muted); font-size: .67rem; }
.order-detail-metrics strong { font-size: 1.05rem; }
.order-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.order-detail-grid dl { margin: 0; border: 1px solid #edf0f2; border-radius: .75rem; overflow: hidden; }
.order-detail-grid dl > div { padding: .78rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #edf0f2; }
.order-detail-grid dl > div:last-child { border-bottom: 0; }
.order-detail-grid dd { margin: 0; font-size: .78rem; font-weight: 750; text-align: right; }
.order-detail-grid .order-detail-total { color: #fff; background: var(--primary); }
.order-detail-grid .order-detail-total dt { color: rgba(255, 255, 255, .78); }
.order-detail-products { margin-top: 1rem; border: 1px solid #edf0f2; border-radius: .75rem; overflow: hidden; }
.order-detail-products > header { padding: .8rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #edf0f2; background: #fafbfc; }
.order-detail-products > header small { color: var(--primary); font-size: .58rem; font-weight: 850; letter-spacing: .12em; }
.order-detail-products > header h3 { margin: .1rem 0 0; font-size: .92rem; }
.order-detail-products > header > span { color: var(--muted); font-size: .68rem; }
.order-detail-products-table { overflow-x: auto; }
.order-detail-products table { width: 100%; border-collapse: collapse; font-size: .72rem; white-space: nowrap; }
.order-detail-products th { padding: .62rem .75rem; color: var(--muted); background: #f6f7f8; font-size: .61rem; text-align: left; }
.order-detail-products td { padding: .7rem .75rem; border-top: 1px solid #edf0f2; }
.order-detail-products .order-detail-product-media { width: 58px; padding: .35rem .55rem; text-align: center; }
.order-detail-product-media img { width: 46px; height: 46px; display: block; object-fit: contain; border: 1px solid #edf0f2; border-radius: .45rem; background: #fff; }
.order-detail-products tbody tr:hover { background: #fffdfd; }
.order-detail-products td:nth-last-child(-n+2), .order-detail-products th:nth-last-child(-n+2) { text-align: right; }
.order-detail-products td:last-child strong { color: var(--primary); }
.order-detail-products-empty { padding: 1.4rem; color: var(--muted); font-size: .74rem; text-align: center; }
.order-detail-notes { margin-top: 1rem; padding: 1rem; border-radius: .75rem; background: #f6f7f8; }
.order-detail-notes h3 { margin: 0 0 .6rem; font-size: .88rem; }
.order-detail-notes p { margin: .3rem 0 0; color: #515b65; font-size: .76rem; line-height: 1.55; }
.transactions-filter { margin-bottom: 1rem; padding: 1rem; display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)) auto auto; align-items: end; gap: .7rem; border: 1px solid var(--border); border-radius: .8rem; background: #fff; }
.transactions-filter .page-feedback { grid-column: 1 / -1; }
.transactions-filter label { display: grid; gap: .3rem; color: var(--muted); font-size: .68rem; font-weight: 700; }
.transactions-filter input { height: 39px; padding: 0 .65rem; border: 1px solid var(--border); border-radius: .45rem; color: var(--ink); background: #fff; }
.transactions-filter button, .transactions-filter > a { height: 39px; padding: 0 .85rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .45rem; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.transactions-filter button { border: 0; color: #fff; background: var(--primary); cursor: pointer; }
.transactions-filter > a { border: 1px solid var(--border); color: #56606a; background: #fff; text-decoration: none; }
.transactions-summary { margin-bottom: 1rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.transactions-summary article { padding: 1rem; display: grid; gap: .25rem; border: 1px solid var(--border); border-radius: .7rem; background: #fff; }
.transactions-summary span { color: var(--muted); font-size: .66rem; }
.transactions-summary strong { font-size: .9rem; }
.transactions-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.transaction-card { padding: 1.1rem; border: 1px solid var(--border); border-left: 4px solid #e05656; border-radius: .8rem; background: #fff; box-shadow: 0 8px 24px rgba(31, 35, 40, .045); }
.transaction-card.is-credit { border-left-color: #2ca66f; }
.transaction-card > header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.transaction-card small { color: var(--primary); font-size: .62rem; font-weight: 800; letter-spacing: .08em; }
.transaction-card h2 { margin: .18rem 0 0; font-size: 1rem; }
.transaction-card h2 a { color: inherit; text-decoration: none; }
.transaction-card h2 a:hover { color: var(--primary); }
.transaction-card time { color: var(--muted); font-size: .7rem; }
.transaction-direction { margin: .65rem 0; color: #59636d; font-size: .68rem; font-weight: 700; }
.transaction-card dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #edf0f2; border-radius: .6rem; overflow: hidden; }
.transaction-card dl > div { padding: .65rem; border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; }
.transaction-card dt { color: var(--muted); font-size: .61rem; }
.transaction-card dd { margin: .15rem 0 0; font-size: .72rem; font-weight: 750; }
.transaction-card footer { margin-top: .7rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .65rem; }
.transaction-card footer strong { color: #3e4852; }
.transaction-card footer a { color: var(--primary); font-weight: 800; text-decoration: none; }
.transaction-detail-head { margin-bottom: 1rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: .8rem; overflow: hidden; background: #fff; }
.transaction-detail-head > div { padding: 1rem; display: grid; gap: .3rem; border-right: 1px solid #edf0f2; }
.transaction-detail-head > div:last-child { border-right: 0; }
.transaction-detail-head small { color: var(--muted); font-size: .62rem; font-weight: 750; letter-spacing: .08em; }
.transaction-detail-head strong { overflow-wrap: anywhere; font-size: .82rem; }
.transaction-detail-head > div:last-child strong { color: var(--primary); }
.transaction-line-list { display: grid; gap: .85rem; }
.transaction-line-card { min-height: 210px; display: grid; grid-template-columns: 210px minmax(0, 1fr); border: 1px solid var(--border); border-radius: .85rem; overflow: hidden; background: #fff; box-shadow: 0 8px 24px rgba(31, 35, 40, .045); }
.transaction-line-media { min-height: 210px; padding: 1rem; display: grid; place-items: center; border-right: 1px solid #edf0f2; background: #fafbfb; }
.transaction-line-media img { width: 170px; height: 170px; object-fit: contain; }
.transaction-line-media span { color: var(--muted); font-size: .68rem; }
.transaction-line-copy { padding: 1rem; display: grid; align-content: start; }
.transaction-line-copy header small { color: var(--primary); font-size: .63rem; font-weight: 800; letter-spacing: .08em; }
.transaction-line-copy h2 { margin: .25rem 0 .65rem; font-size: 1rem; line-height: 1.4; }
.transaction-line-quantities { margin-bottom: .7rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.transaction-line-quantities span { padding: .25rem .5rem; border-radius: 99px; color: #47515b; background: #f1f3f5; font-size: .65rem; font-weight: 700; }
.transaction-line-copy dl { margin: auto 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #edf0f2; border-radius: .55rem; overflow: hidden; }
.transaction-line-copy dl > div { padding: .65rem; border-right: 1px solid #edf0f2; }
.transaction-line-copy dl > div:last-child { border-right: 0; }
.transaction-line-copy dt { color: var(--muted); font-size: .6rem; }
.transaction-line-copy dd { margin: .15rem 0 0; font-size: .71rem; font-weight: 750; }
.transaction-line-copy .transaction-line-total { color: #fff; background: var(--primary); }
.transaction-line-copy .transaction-line-total dt { color: rgba(255,255,255,.75); }
.portal-feature-card { min-height: 280px; padding: clamp(1.5rem, 4vw, 3rem); display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 1.4rem; border: 1px solid var(--border); border-radius: 1rem; background: #fff; box-shadow: 0 10px 30px rgba(31, 35, 40, .06); }
.portal-feature-icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 1rem; color: #fff; background: linear-gradient(135deg, #ef3945, var(--primary-active)); font-size: 1.55rem; font-weight: 800; }
.portal-feature-card small { color: var(--primary); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.portal-feature-card h2 { margin: .35rem 0; font-size: 1.2rem; }
.portal-feature-card p { margin: 0; color: var(--muted); font-size: .84rem; }
.portal-feature-status { padding: .5rem .75rem; border-radius: 99px; color: #92640d; background: #fff5d8; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.notification-list { display: grid; gap: .75rem; }
.notification-list article { padding: 1rem 1.2rem; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: .9rem; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: .75rem; background: #fff; }
.notification-list article.is-read { border-left-color: #c9ced4; opacity: .72; }
.notification-list-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 850; }
.notification-list time { color: var(--muted); font-size: .68rem; }
.notification-list h2 { margin: .15rem 0; font-size: .95rem; }
.notification-list p { margin: 0; color: var(--muted); font-size: .8rem; }
.notification-read-form { margin-top: .6rem; }
.notification-read-form button { padding: .4rem .65rem; border: 1px solid var(--primary); border-radius: .4rem; color: var(--primary); background: #fff; font-size: .65rem; font-weight: 750; cursor: pointer; }

@media (max-width: 1180px) {
  .shell-exchange { display: none; }
  .shell-header-top { grid-template-columns: 190px minmax(250px, 1fr) auto; gap: 1.2rem; }
  .shell-account-card { min-width: 0; padding-right: .4rem; }
  .shell-account-card > span:last-child { display: none; }
  .shell-category-bar { overflow-x: auto; scrollbar-width: thin; }
  .shell-category-bar > .shell-category-link { flex: 0 0 auto; }
  .shell-category-link { flex: 0 0 auto; }
  .catalog-topbar { grid-template-columns: minmax(280px, 1fr) repeat(2, minmax(150px, .6fr)); }
  .catalog-toggle-list, .catalog-topbar-meta { justify-content: flex-start; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-product-carousel { grid-auto-columns: calc((100% - 4rem) / 5); }
  .portal-address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-section .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Dark theme */
body.theme-dark {
  --ink: #eef1f4;
  --muted: #aab2bc;
  --page: #101317;
  --surface: #181c21;
  --border: #343b43;
  --shadow: 0 18px 48px rgba(0, 0, 0, .32);
  color-scheme: dark;
}
.theme-dark .shell-header { background: linear-gradient(#171b20, #171b20) padding-box, linear-gradient(90deg, var(--primary-active), #d52335 58%, var(--accent)) border-box; box-shadow: 0 8px 30px rgba(0, 0, 0, .32); }
.theme-dark .shell-search-form, .theme-dark .catalog-topbar, .theme-dark .catalog-card, .theme-dark .home-banner,
.theme-dark .home-product-card, .theme-dark .home-metrics article, .theme-dark .home-announcement-grid article,
.theme-dark .cart-items, .theme-dark .cart-checkout-panel, .theme-dark .cart-summary, .theme-dark .cart-empty,
.theme-dark .portal-page-head, .theme-dark .portal-empty, .theme-dark .account-card, .theme-dark .account-stat-grid article,
.theme-dark .product-detail-panel, .theme-dark .product-detail-gallery, .theme-dark .page-feedback,
.theme-dark .shell-account-card, .theme-dark .shell-tool-button, .theme-dark .shell-action-link,
.theme-dark .shell-search-results, .theme-dark .catalog-state-card { color: var(--ink); border-color: var(--border); background: var(--surface); }
.theme-dark .campaign-summary article, .theme-dark .campaign-section { color: var(--ink); border-color: var(--border); background: var(--surface); }
.theme-dark .campaign-section > header { border-color: var(--border); }
.theme-dark .account-info-panel, .theme-dark .account-shortcuts > *, .theme-dark .settings-card,
.theme-dark .portal-address-grid article, .theme-dark .portal-address-detail, .theme-dark .portal-address-form,
.theme-dark .bulk-order-guide, .theme-dark .orders-filter, .theme-dark .order-card, .theme-dark .order-detail-card,
.theme-dark .transactions-filter, .theme-dark .transactions-summary article, .theme-dark .transaction-card,
.theme-dark .transaction-detail-head, .theme-dark .transaction-line-card, .theme-dark .portal-feature-card,
.theme-dark .notification-list article {
  color: var(--ink);
  border-color: var(--border);
  background: var(--surface);
}
.theme-dark .account-info-panel dl > div, .theme-dark .account-shortcuts > *, .theme-dark .settings-toggle,
.theme-dark .portal-address-grid dl, .theme-dark .portal-address-detail dl, .theme-dark .portal-address-detail dl > div,
.theme-dark .order-card dl, .theme-dark .order-card dl > div, .theme-dark .order-detail-card > header,
.theme-dark .order-detail-metrics, .theme-dark .order-detail-metrics > div, .theme-dark .order-detail-grid dl,
.theme-dark .order-detail-grid dl > div, .theme-dark .order-detail-products, .theme-dark .order-detail-products > header,
.theme-dark .order-detail-products td, .theme-dark .transaction-card dl, .theme-dark .transaction-card dl > div,
.theme-dark .transaction-detail-head > div, .theme-dark .transaction-line-media, .theme-dark .transaction-line-copy dl,
.theme-dark .transaction-line-copy dl > div, .theme-dark .cart-item + .cart-item, .theme-dark .cart-summary-head,
.theme-dark .cart-summary > div, .theme-dark .cart-items-head, .theme-dark .cart-checkout-head {
  border-color: var(--border);
}
.theme-dark .portal-form-intro, .theme-dark .portal-address-detail-text, .theme-dark .portal-address-grid .portal-address-note,
.theme-dark .bulk-order-upload, .theme-dark .order-detail-products > header, .theme-dark .order-detail-products th,
.theme-dark .order-detail-notes, .theme-dark .transaction-line-media, .theme-dark .transaction-line-quantities span,
.theme-dark .cart-item-info small span, .theme-dark .cart-checkout-head > span {
  color: var(--muted);
  background: #20262c;
}
.theme-dark .portal-address-grid p, .theme-dark .portal-address-detail-text, .theme-dark .portal-form-grid label,
.theme-dark .bulk-order-upload p, .theme-dark .bulk-order-guide > p, .theme-dark .order-detail-notes p,
.theme-dark .transaction-direction, .theme-dark .transaction-card footer strong, .theme-dark .settings-card label b,
.theme-dark .cart-order-fields label {
  color: #c5ccd4;
}
.theme-dark .portal-page-head > a, .theme-dark .order-detail-actions a, .theme-dark .portal-form-actions a,
.theme-dark .orders-filter > a, .theme-dark .transactions-filter > a, .theme-dark .notification-read-form button,
.theme-dark .cart-page-head > a, .theme-dark .cart-summary .cart-clear-button {
  color: var(--ink);
  border-color: var(--border);
  background: #20262c;
}
.theme-dark .portal-address-icon, .theme-dark .portal-empty > span { background: #341b20; }
.theme-dark .portal-form-grid input, .theme-dark .portal-form-grid textarea, .theme-dark .portal-form-grid select,
.theme-dark .orders-filter input, .theme-dark .transactions-filter input, .theme-dark .bulk-order-upload input {
  color: var(--ink);
  border-color: var(--border);
  background: #20262c;
}
.theme-dark .portal-form-grid select:disabled { color: #89939e; background: #1b2025; }
.theme-dark .cart-item { color: var(--ink); background: var(--surface); }
.theme-dark .cart-item:hover { background: #20262c; }
.theme-dark .cart-item.cart-item-stock-error { background: #321b1d; }
.theme-dark .cart-item.cart-item-stock-error:hover { background: #3b1e21; }
.theme-dark .cart-item-info .cart-item-stock-message, .theme-dark .cart-order-stock-warning { color: #ff8d86; }
.theme-dark .cart-address-modal { color: var(--ink); background: var(--surface); }
.theme-dark .cart-address-modal header button, .theme-dark .cart-address-cancel { color: var(--ink); border-color: var(--border); background: #20262c; }
.theme-dark .cart-address-grid label, .theme-dark .cart-order-address { color: #c5ccd4; }
.theme-dark .cart-address-grid input, .theme-dark .cart-address-grid select, .theme-dark .cart-address-grid textarea { color: var(--ink); border-color: var(--border); background: #20262c; }
.theme-dark .cart-address-error { color: #ffaaa4; border-color: #63323a; background: #321b20; }
.theme-dark .cart-item-remove button { color: #ff8d98; border-color: #63323a; background: #321b20; }
.theme-dark .cart-item-remove button:hover { color: #fff; border-color: var(--primary); background: var(--primary); }
.theme-dark .cart-summary .cart-order-form button:disabled { color: #929ba5; background: #2b3138; }
.theme-dark .order-detail-products tbody tr:hover { background: #20262c; }
.theme-dark .shell-search-form:focus-within { background: #1d2228; }
.theme-dark .shell-search-result:hover, .theme-dark .shell-search-result.is-active,
.theme-dark .cart-summary-total,
.theme-dark .cart-items-head, .theme-dark .cart-checkout-head { background: #1d2228; }
.theme-dark .shell-brand-logo-light { display: none; }
.theme-dark .shell-brand-logo-dark { display: block; opacity: 1; }
.theme-dark .catalog-card-media, .theme-dark .home-product-media, .theme-dark .cart-item-media,
.theme-dark .product-detail-media, .theme-dark .product-detail-gallery-stage,
.theme-dark .product-detail-gallery-thumbs > button, .theme-dark .shell-search-result img { background: #fff; }
.theme-dark .catalog-card-media img, .theme-dark .home-product-media img, .theme-dark .cart-item-media img,
.theme-dark .product-detail-media img, .theme-dark .shell-search-result img { opacity: 1; }
.theme-dark input, .theme-dark select, .theme-dark textarea,
.theme-dark .cart-order-fields select, .theme-dark .cart-order-fields textarea,
.theme-dark .cart-export-menu > button, .theme-dark .cart-export-menu > div { color: var(--ink); border-color: var(--border); background: #20262c; }
.theme-dark .cart-export-menu.is-open > button { color: #fff; border-color: var(--primary); background: var(--primary); }
.theme-dark .cart-export-menu > div a:hover { background: #292f36; }
.theme-dark .shell-action-cart { color: #fff; border-color: var(--primary); background: var(--primary); }
.theme-dark .shell-action-payment, .theme-dark .cart-export-menu > div .cart-export-mail { color: #78d6a4; border-color: #285c42; background: #173226; }
.theme-dark .shell-payment-menu { background: none; border: 0; }
.theme-dark .shell-payment-menu > summary { color: #78d6a4; border-color: #285c42; background: #173226; }
.theme-dark .shell-payment-options { border-color: #343b42; background: #20262c; box-shadow: 0 14px 35px rgba(0, 0, 0, .35); }
.theme-dark .shell-payment-options::before { border-color: #343b42; background: #20262c; }
.theme-dark .shell-payment-options > a { color: #e5e9ec; }
.theme-dark .shell-payment-options > a:hover { color: #78d6a4; background: #173226; }
.theme-dark .shell-payment-options .is-disabled { color: #929aa1; background: #292f35; }
.theme-dark .shell-exchange { color: #d5dae0; border-color: var(--border); background: #20262c; }
.theme-dark .shell-category-bar, .theme-dark .shell-footer { border-color: var(--border); }
.theme-dark .shell-category-link:not(.is-active):hover { background: #20262c; }
.theme-dark .shell-category-bar > .shell-quick-order:not(.is-active) { color: #fff; border-color: #2a9b66; background: #198754; }
.theme-dark .quick-order-panel, .theme-dark .quick-order-panel > header,
.theme-dark .quick-order-panel > header > button, .theme-dark .quick-order-results,
.theme-dark .quick-order-search-field input, .theme-dark .quick-order-unit select, .theme-dark .quick-order-quantity input { color: var(--ink); border-color: var(--border); background: var(--surface); }
.theme-dark .quick-order-results > button { color: var(--ink); }
.theme-dark .quick-order-results > button:hover { background: #292f36; }
.theme-dark .quick-order-selected { border-color: #285c42; background: #173226; }
.theme-dark .quick-order-selected img { mix-blend-mode: normal; }
.theme-dark img { opacity: .92; }

/* Authentication screens intentionally stay light, even when the saved app or
   browser color preference is dark. This keeps native form controls readable. */
body.auth-page,
body.auth-page.theme-dark {
  --ink: #1f2328;
  --muted: #68717b;
  --page: #f5f7f8;
  --surface: #fff;
  --border: #d9dee3;
  --shadow: 0 18px 48px rgba(31, 35, 40, .12);
  color-scheme: light;
}
body.auth-page .auth-card { color: var(--ink); background: rgba(255, 255, 255, .94); }
body.auth-page .auth-input { color: var(--ink); border-color: var(--border); background: #fff; }

@media (max-width: 820px) {
  .auth-panel { grid-template-columns: 1fr; gap: 1.5rem; }
  .auth-brand { padding: 2rem 1.5rem; text-align: center; }
  .auth-brand-logo { margin: 0 auto 1.4rem; }
  .auth-brand > p:last-child { margin-right: auto; margin-left: auto; }
  .shell-header { position: relative; }
  .shell-header-inner { padding-bottom: .55rem; }
  .shell-header-top { grid-template-columns: 1fr auto; padding: .65rem 0 .75rem; row-gap: .7rem; }
  .shell-menu-toggle { width: 44px; height: 44px; padding: 0 11px; display: grid; align-content: center; gap: 5px; border: 1px solid var(--border); border-radius: .65rem; color: var(--ink); background: var(--surface); cursor: pointer; }
  .shell-menu-toggle span { width: 100%; height: 2px; display: block; border-radius: 2px; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
  .shell-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .shell-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .shell-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .shell-header-search, .shell-header-actions, .shell-category-bar { display: none; }
  .shell-header-inner.is-mobile-open .shell-header-search { grid-column: 1 / -1; grid-row: 2; display: block; }
  .shell-header-inner.is-mobile-open .shell-header-actions { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .shell-header-inner.is-mobile-open .shell-category-bar { display: grid; }
  .shell-search-form { width: 100%; }
  .shell-action-payment { display: none; }
  .shell-category-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .shell-category-bar > .shell-category-link, .shell-category-bar > .shell-quick-order { width: 100%; }
  .catalog-topbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-topbar-search, .catalog-topbar-meta { grid-column: 1 / -1; }
  .catalog-filter-group { margin: 0; }
  .catalog-check { margin: 0; }
  .catalog-filter-button { align-self: end; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-detail-grid { grid-template-columns: 1fr; }
  .product-detail-media { min-height: 380px; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-item { grid-template-columns: 70px minmax(150px, 1fr) 90px 110px 70px; }
  .cart-item-total { grid-column: 4; }
  .cart-item-price:not(.cart-item-total) { display: none; }
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-product-carousel { grid-auto-columns: calc((100% - 1rem) / 2); }
  .home-announcement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-card-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .portal-feature-card { grid-template-columns: 68px minmax(0, 1fr); }
  .portal-feature-status { grid-column: 2; justify-self: start; }
  .orders-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orders-filter button, .orders-filter > a { width: 100%; }
  .orders-list { grid-template-columns: 1fr; }
  .transactions-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.transactions-list { grid-template-columns: 1fr; }
  .transaction-detail-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transaction-detail-head > div:nth-child(2) { border-right: 0; }
  .transaction-detail-head > div:nth-child(-n+2) { border-bottom: 1px solid #edf0f2; }
  .order-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-metrics > div:nth-child(2) { border-right: 0; }
  .order-detail-metrics > div:nth-child(-n+2) { border-bottom: 1px solid #edf0f2; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .bulk-order-layout { grid-template-columns: 1fr; }
  .campaign-section .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .app-toast-stack { right: .65rem; bottom: .65rem; width: calc(100vw - 1.3rem); }
  .stock-confirm-modal { padding: 1.1rem; grid-template-columns: 42px minmax(0, 1fr); gap: .8rem; }
  .stock-confirm-icon { width: 42px; height: 42px; }
  .stock-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .auth-shell { padding: 1.5rem 1rem; }
  .auth-form-grid { grid-template-columns: 1fr; }
  .auth-field-wide { grid-column: auto; }
  .auth-panel { gap: 1.25rem; }
  .auth-brand-logo { margin-bottom: 1rem; }
  .auth-brand h1 { font-size: 2.35rem; }
  .auth-brand > p:last-child { margin-top: .75rem; font-size: .86rem; line-height: 1.55; }
  .auth-card { padding: 1.5rem; border-radius: 1rem; }
  .auth-card-footer { display: grid; text-align: center; }
  .shell-header-inner { padding-right: .65rem; padding-left: .65rem; }
  .shell-header-top { min-height: 74px; }
  .shell-brand-subtitle { display: none; }
  .shell-action-link { width: 40px; padding: 0; justify-content: center; }
  .shell-action-link > span:not(.shell-action-badge) { display: none; }
  .shell-category-bar { gap: .4rem; }
  .shell-category-bar > .shell-category-link { flex: 0 0 auto; }
  .shell-category-link { min-height: 46px; padding: .45rem .75rem; }
  .shell-footer { display: grid; text-align: center; }
  .catalog-page { padding-top: 1.35rem; }
  .catalog-page-head { align-items: start; }
  .catalog-page-summary { display: none; }
  .catalog-topbar { grid-template-columns: 1fr; }
  .catalog-topbar-search, .catalog-topbar-meta { grid-column: auto; }
  .catalog-toggle-list { flex-wrap: wrap; }
  .catalog-grid { grid-template-columns: 1fr; }
  .product-detail-page { padding-top: 1.35rem; }
  .product-detail-media { min-height: 290px; padding: 2rem; }
  .product-detail-facts { grid-template-columns: 1fr; }
  .product-detail-facts > div { border-right: 0; border-bottom: 1px solid #e7eaed; }
  .product-detail-facts > div:last-child { border-bottom: 0; }
  .product-detail-purchase { grid-template-columns: 1fr; }
  .cart-page-head { grid-template-columns: 1fr; align-items: start; }
  .cart-page-head { display: grid; }
  .cart-page-head > div:first-child { display: grid; gap: 0; }
  .cart-page-head-actions { width: 100%; display: flex; justify-content: flex-end; }
  .cart-item { grid-template-columns: 64px minmax(0, 1fr); gap: .7rem; }
  .cart-item-media { width: 62px; height: 62px; }
  .cart-item-quantity { grid-column: 1 / -1; grid-template-columns: 62px minmax(120px, 150px); align-items: center; }
  .cart-item-total { grid-column: 1 / 2; display: grid; align-self: stretch; align-content: center; justify-items: start; border-top: 1px solid #edf0f2; padding-top: .65rem; }
  .cart-item-remove { grid-column: 2; align-self: stretch; display: grid; align-items: center; justify-items: end; border-top: 1px solid #edf0f2; padding-top: .65rem; }
  .cart-order-fields { grid-template-columns: 1fr; }
  .cart-order-note, .cart-order-extra { grid-column: auto; }
  .cart-order-extra > div { grid-template-columns: 1fr; }
  .cart-address-modal form { padding: 1rem; }
  .cart-address-grid-three { grid-template-columns: 1fr; }
  .cart-address-grid-three > *, .cart-address-grid-three > :nth-child(-n+3) { grid-column: auto; }
  .cart-address-modal footer { display: grid; grid-template-columns: 1fr 1fr; }
  .home-welcome { align-items: start; }
  .home-welcome > a { display: none; }
  .home-banner { border-radius: .55rem; }
  .home-metrics, .home-announcement-grid, .account-stat-grid, .account-shortcuts { grid-template-columns: 1fr; }
  .home-product-carousel { grid-auto-columns: 100%; }
  .home-product-card { display: grid !important; grid-template-columns: 124px minmax(0, 1fr); }
  .home-product-media { min-height: 100%; padding: 2.5rem .75rem 1rem; }
  .home-product-media img { width: 108px; height: 125px; }
  .home-product-badges { top: .55rem; right: .45rem; left: .45rem; align-items: flex-start; flex-direction: column; }
  .home-product-stock { margin-left: 0; }
  .home-product-copy { min-height: 225px; }
  .account-page-head { align-items: start; }
  .account-info-panel dl > div { grid-template-columns: 105px minmax(0, 1fr); }
  .shell-account-menu { position: fixed; top: 72px; right: .65rem; left: .65rem; width: auto; max-height: calc(100vh - 84px); overflow-y: auto; }
  .portal-page-head { align-items: start; }
  .portal-page-head > a { padding: .55rem .7rem; }
  .campaign-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-section { padding: .8rem; }
  .campaign-section > header { align-items: start; flex-direction: column; }
  .campaign-section-stats { justify-content: flex-start; }
  .campaign-section .catalog-grid { grid-template-columns: 1fr; }
  .portal-address-grid { grid-template-columns: 1fr; }
  .portal-form-grid, .portal-form-grid-three { grid-template-columns: 1fr; }
  .portal-form-wide { grid-column: auto; }
  .portal-address-detail dl { grid-template-columns: 1fr; }
  .portal-address-detail dl > div { border-right: 0; }
  .orders-filter { grid-template-columns: 1fr; }
  .transactions-filter { grid-template-columns: 1fr; }
  .transactions-summary { grid-template-columns: 1fr; }
  .transaction-detail-head { grid-template-columns: 1fr; }
  .transaction-detail-head > div { border-right: 0; border-bottom: 1px solid #edf0f2; }
  .transaction-detail-head > div:last-child { border-bottom: 0; }
  .transaction-line-card { grid-template-columns: 1fr; }
  .transaction-line-media { min-height: 180px; border-right: 0; border-bottom: 1px solid #edf0f2; }
  .transaction-line-media img { width: 150px; height: 150px; }
  .transaction-line-copy dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transaction-line-copy dl > div:nth-child(2) { border-right: 0; }
  .transaction-line-copy dl > div:nth-child(-n+2) { border-bottom: 1px solid #edf0f2; }
  .order-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-card > header { display: grid; }
  .order-detail-status { justify-items: start; }
  .portal-feature-card { grid-template-columns: 1fr; text-align: center; }
  .portal-feature-icon { margin: 0 auto; }
  .portal-feature-status { grid-column: auto; justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .home-product-carousel { scroll-behavior: auto; }
  .app-toast-stack .page-feedback, .stock-confirm-modal[open] { animation: none; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { color: #111 !important; background: #fff !important; }
  .shell-header, .shell-footer, .app-toast-stack, .order-detail-actions { display: none !important; }
  .shell-main, .portal-page { width: 100% !important; margin: 0 !important; padding: 0 !important; }
  .portal-page-head { margin-bottom: 10mm; }
  .portal-page-head p { color: #111 !important; }
  .order-detail-card { padding: 0 !important; border: 0 !important; box-shadow: none !important; }
  .order-detail-products-table { overflow: visible !important; }
  .order-detail-products table { white-space: normal !important; }
  .order-detail-products tr { break-inside: avoid; }
}
