/* SONIC storefront / catalog edition — inspired by the information hierarchy of
   a modern Persian gaming marketplace. Original implementation and branding. */
:root, html[data-theme="light"] {
 --bg:#f7f8fa;--bg2:#eff1f5;--panel:#ffffff;--panel2:#f7f8fb;
 --line:#e9ebf0;--text:#202733;--muted:#7d8595;
 --purple:#f04450;--purple2:#f04450;--purple3:#d72b3a;
 --red:#eb3948;--green:#14936c;
 --shadow:0 12px 35px rgba(25,37,56,.055);
 --pro-accent:#ef4050;--pro-accent-hover:#dd3141;--pro-ink:#202733;
 --pro-card:#fff;--pro-card-2:#f7f8fa;--pro-border:#e9edf2;--pro-muted:#7b8494;
 --ms-accent:#ee4051;--ms-accent-dark:#d82d40;--ms-surface:#fff;--ms-line:#e7ebf0;--ms-soft:#f7f8fb;
}
html[data-theme="dark"] {
 --bg:#111720;--bg2:#171f2a;--panel:#1d2734;--panel2:#263240;
 --line:#354251;--text:#f0f3f8;--muted:#abb5c5;
 --purple:#ff6473;--purple2:#ff7a86;--purple3:#e54859;
 --red:#ff6574;--green:#4ed1a3;
 --shadow:0 12px 35px rgba(0,0,0,.13);
 --pro-accent:#ff6473;--pro-accent-hover:#ed5261;--pro-ink:#f0f3f8;
 --pro-card:#1d2734;--pro-card-2:#253140;--pro-border:#354251;--pro-muted:#abb5c5;
 --ms-accent:#ff6675;--ms-accent-dark:#e7485a;--ms-surface:#1d2734;--ms-line:#354251;--ms-soft:#17202c;
}
html {scroll-padding-top:160px;}
body {background:var(--bg);color:var(--text);}
a {text-decoration:none;}
.container {width:min(1300px,calc(100% - 56px));}
:where(a,button,input,select,textarea,summary):focus-visible {outline:3px solid #f26d79 !important;outline-offset:3px;}
/* Compact information architecture of a classic retail website */
.topbar,html[data-theme="light"] .topbar {background:#1c2532;color:#eef2f8;border:0;}
.topbar-inner {height:36px;}
.topbar .topbar-links a,.topbar .topbar-promo {color:#e5e9f1;font-size:11px;}
.topbar .spark {color:#ffabb2;}
.site-header.sonic-header,html[data-theme="light"] .sonic-header.site-header {background:var(--panel);border-color:var(--line);box-shadow:none;}
.sonic-header .header-main {height:93px;gap:22px;}
.sonic-header .sonic-brand {min-width:173px;}
.sonic-header .brand-mark {width:55px;height:55px;border:1px solid var(--ms-line);border-radius:14px;}
.sonic-header .brand-copy strong,html[data-theme="light"] .sonic-header .sonic-brand .brand-copy strong {color:var(--text);font-size:24px;letter-spacing:1.3px;}
.sonic-header .brand-copy small,html[data-theme="light"] .sonic-header .sonic-brand .brand-copy small {color:var(--muted);font-size:10px;}
.sonic-header .header-search,html[data-theme="light"] .sonic-header .header-search {height:51px;max-width:615px;border-radius:12px;border:1px solid var(--line);background:var(--bg2);box-shadow:none;}
.sonic-header .header-search:focus-within {border-color:var(--ms-accent);box-shadow:0 0 0 4px rgba(238,64,81,.09);}
.sonic-header .header-search input,html[data-theme="light"] .sonic-header .header-search input {color:var(--text);font-size:13px;}
.sonic-header .header-search input::placeholder,html[data-theme="light"] .sonic-header .header-search input::placeholder {color:var(--muted);}
.sonic-header .header-search button,html[data-theme="light"] .sonic-header .header-search button {color:#fff;background:var(--ms-accent);width:53px;min-width:53px;border-radius:10px 0 0 10px;}
.sonic-header .header-search button:hover {background:var(--ms-accent-dark);color:#fff;}
.sonic-header .header-tools {gap:8px;}
.sonic-header .tool-link {padding:7px;gap:7px;border-radius:11px;}
.sonic-header .tool-icon,html[data-theme="light"] .sonic-header .tool-icon {color:var(--text);}
.sonic-header .tool-icon b {background:var(--ms-accent);}
.sonic-header .tool-text strong,html[data-theme="light"] .sonic-header .tool-text strong {color:var(--text);font-size:12px;}
.sonic-header .tool-text small,html[data-theme="light"] .sonic-header .tool-text small {color:var(--muted);}
.sonic-header .tool-link:hover,html[data-theme="light"] .sonic-header .tool-link:hover {background:var(--bg2);}
.sonic-header .theme-toggle,html[data-theme="light"] .sonic-header .theme-toggle {background:var(--bg2);border:1px solid var(--line);color:var(--text);border-radius:11px;}
.sonic-header .sonic-nav,html[data-theme="light"] .sonic-header .sonic-nav {background:var(--panel);border-color:var(--line);border-top:1px solid var(--line);}
.sonic-nav .nav-inner {height:56px;min-height:56px;gap:19px;}
.category-menu-trigger {height:43px;min-height:43px;background:var(--ms-accent);border-color:var(--ms-accent);border-radius:10px;padding:0 19px;box-shadow:none;}
.category-menu-trigger:hover {background:var(--ms-accent-dark);border-color:var(--ms-accent-dark);}
.sonic-nav .category-nav-shortcuts {gap:1px;}
.sonic-nav .category-nav-shortcut,html[data-theme="light"] .sonic-nav .category-nav-shortcut {font-size:12px;min-height:39px;padding:0 12px;color:var(--text);border-radius:8px;}
.sonic-nav .category-nav-shortcut:hover,.sonic-nav .category-nav-shortcut.active,html[data-theme="light"] .sonic-nav .category-nav-shortcut:hover,html[data-theme="light"] .sonic-nav .category-nav-shortcut.active {color:var(--ms-accent);background:rgba(239,64,81,.07);}
.sonic-nav .ms-offer-nav {color:var(--ms-accent) !important;font-weight:800;}
.ms-nav-track {margin-right:auto;color:var(--muted);font-weight:700;font-size:12px;white-space:nowrap;}
.ms-nav-track:hover {color:var(--ms-accent);}
.category-drawer,html[data-theme="light"] .category-drawer {background:var(--panel);border-color:var(--line);}
.category-drawer .category-drawer-header,html[data-theme="light"] .category-drawer .category-drawer-header {background:var(--bg2);border-color:var(--line);}
.category-drawer .category-drawer-all {background:var(--ms-accent);border-color:var(--ms-accent);}
.category-drawer .category-drawer-all:hover {background:var(--ms-accent-dark);}
.category-drawer-group,.category-drawer-services {border-color:var(--line);}
.category-drawer-group summary:hover,.category-drawer-subcategories a:hover,.category-drawer-services a:hover {background:var(--bg2);}
/* Public page essentials: buttons, forms, cards, checkout and account surfaces */
.btn-primary,.checkout-btn,.add-to-cart,.checkout-form button[type="submit"] {background:var(--ms-accent);border:1px solid var(--ms-accent);box-shadow:none;color:#fff;border-radius:11px;}
.btn-primary:hover,.checkout-btn:hover,.add-to-cart:hover,.checkout-form button[type="submit"]:hover {background:var(--ms-accent-dark);border-color:var(--ms-accent-dark);box-shadow:0 9px 20px rgba(236,58,74,.15);}
.btn-ghost {color:var(--text);border:1px solid var(--line);background:var(--panel);}
.btn-ghost:hover {background:var(--bg2);border-color:var(--ms-accent);}
.products-page,.product-detail-page,.cart-page,.checkout-page,.payment-page,.auth-page,.account-page,.invoice-page {color:var(--text);}
.products-header h1,.product-detail-info h1,.cart-header h1,.account-header h1 {color:var(--text);}
.products-sidebar,.cart-summary,.checkout-form,.checkout-summary,.auth-card,.account-card,.product-detail-info,.product-detail-image,.product-detail-section,.specification-group,.cart-item {background:var(--panel);border-color:var(--line);box-shadow:var(--shadow);}
.products-page .products-sidebar {border-radius:16px;}
.products-page .filter-section a.active {color:var(--ms-accent);}
.products-page .price-filter-form button {background:var(--ms-accent);border-color:var(--ms-accent);color:#fff;}
.products-page .products-header .sort-form select {background:var(--panel);border-color:var(--line);color:var(--text);}
.products-page .products-header p,.products-result-meta {color:var(--muted);}
.products-grid .product-card,html[data-theme="light"] .products-grid .product-card {border-radius:14px;border-color:var(--line);background:var(--panel);box-shadow:var(--shadow);}
.products-grid .product-image {background:#fff;border-bottom:1px solid var(--line);}
.products-grid .product-image img {padding:20px;}
.products-grid .discount-badge {background:var(--ms-accent);border-radius:7px;}
.products-grid .product-name {font-size:14px;line-height:1.8;}
.products-grid .product-price,html[data-theme="light"] .products-grid .product-price {color:var(--text);}
.products-grid .quick-add button,.sonic-product-card .quick-add button,html[data-theme="light"] .products-grid .quick-add button {background:var(--ms-accent);border-color:var(--ms-accent);color:#fff;}
.products-grid .quick-add button:hover {background:var(--ms-accent-dark);}
.wish-btn:hover,.product-favorite-button:hover {color:var(--ms-accent);border-color:var(--ms-accent);}
.product-detail-price,.discount-price,.cart-item-total {color:var(--text);}
.product-detail .add-to-cart {border-radius:10px;}
.product-detail-info .product-availability,.products-grid .product-stock {color:var(--green);}
.site-footer.sonic-footer,html[data-theme="light"] .site-footer.sonic-footer {background:#182230;border-color:#283443;color:#eaf0fa;margin-top:65px;padding:55px 0 18px;}
.site-footer .footer-brand .brand-copy strong {color:#fff !important;}
.site-footer .footer-brand .brand-copy small {color:#b4c2d4 !important;}
.sonic-footer .footer-brand .footer-tagline {color:#ff9ca5;}
.sonic-footer .footer-grid h3,html[data-theme="light"] .sonic-footer .footer-grid h3 {color:#fff;}
.sonic-footer .footer-grid>div:not(.footer-brand) a:hover {color:#ffadba;}
/* Homepage / retail merchandising */
.ms-home {overflow:hidden;background:var(--bg);padding-bottom:28px;}
.ms-quick-categories {background:var(--panel);border-bottom:1px solid var(--line);}
.ms-quick-inner {display:flex;align-items:center;gap:13px;min-height:49px;overflow-x:auto;scrollbar-width:none;}
.ms-quick-inner::-webkit-scrollbar {display:none;}
.ms-quick-inner a {display:inline-flex;flex:0 0 auto;align-items:center;white-space:nowrap;font-size:11px;font-weight:700;color:var(--muted);padding:6px 2px;}
.ms-quick-inner a:hover {color:var(--ms-accent);}
.ms-quick-inner .ms-quick-label {white-space:nowrap;font-size:11px;color:var(--text);font-weight:900;}
.ms-quick-inner .ms-quick-all {color:var(--ms-accent);margin-right:auto;}
.ms-hero-wrap {padding:23px 0 0;}
.ms-hero-layout {display:grid;grid-template-columns:minmax(0,2.07fr) minmax(0,1fr);gap:17px;min-height:400px;}
.ms-hero-main {min-width:0;min-height:405px;position:relative;display:flex;align-items:center;overflow:hidden;border-radius:22px;background:#111d31 url('../images/hero-gamer.png') left center/cover no-repeat;isolation:isolate;}
.ms-hero-shade {position:absolute;inset:0;background:linear-gradient(270deg,rgba(8,16,31,.98) 1%,rgba(10,18,34,.92) 38%,rgba(9,18,32,.24) 84%),linear-gradient(0deg,rgba(14,19,37,.35),transparent);z-index:0;}
.ms-hero-copy {position:relative;z-index:1;width:min(100%,525px);padding:38px 42px;}
.ms-hero-kicker {display:inline-flex;gap:7px;align-items:center;border:1px solid rgba(255,255,255,.18);color:#dde7f9;font-size:10px;font-weight:800;border-radius:50px;background:rgba(255,255,255,.08);padding:6px 11px;}
.ms-kicker-dot {height:7px;width:7px;border-radius:50%;background:#ff6c76;box-shadow:0 0 0 4px rgba(255,108,118,.16);}
.ms-hero-copy h1 {font-size:clamp(29px,3.1vw,45px);line-height:1.47;color:#fff;margin:17px 0 10px;font-weight:950;letter-spacing:-1px;}
.ms-hero-copy h1 em {font-style:normal;color:#ff7a89;}
.ms-hero-copy p {font-size:13px;color:#d0d8e7;line-height:2.15;margin:0 0 25px;max-width:400px;}
.ms-hero-buttons {display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.ms-hero-buttons a {display:inline-flex;justify-content:center;align-items:center;min-height:45px;padding:9px 18px;font-size:12px;font-weight:900;border-radius:10px;gap:12px;}
.ms-cta {background:var(--ms-accent);color:#fff;border:1px solid var(--ms-accent);}
.ms-cta:hover {background:#ff6978;color:#fff;}
.ms-cta-secondary {border:1px solid rgba(255,255,255,.45);color:#fff;background:rgba(255,255,255,.08);}
.ms-cta-secondary:hover {color:#fff;background:rgba(255,255,255,.17);}
.ms-hero-index {position:absolute;z-index:1;bottom:17px;left:20px;display:flex;gap:10px;color:rgba(255,255,255,.7);font-size:10px;letter-spacing:1px;}
.ms-hero-aside {display:grid;grid-template-rows:1fr 1fr;gap:17px;min-width:0;}
.ms-banner {display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:22px 26px;min-height:180px;border-radius:21px;position:relative;overflow:hidden;isolation:isolate;}
.ms-banner>*:not(.ms-banner-art) {position:relative;z-index:1;}
.ms-banner-offer {background:linear-gradient(110deg,#ec3447,#ff6b68);color:#fff;}
.ms-banner-service {background:linear-gradient(110deg,#e7f3ff,#d3e8f7);color:#193f5d;}
.ms-banner-overline {font-size:10px;font-weight:800;opacity:.83;}
.ms-banner strong {font-size:21px;font-weight:950;line-height:1.55;margin:8px 0 12px;}
.ms-banner-link {font-size:11px;font-weight:800;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.25);padding:5px 11px;border-radius:8px;}
.ms-banner-service .ms-banner-link {background:#fff;border-color:#c5ddec;}
.ms-banner-art {position:absolute;left:-10px;bottom:-47px;color:rgba(255,255,255,.2);font-size:190px;font-weight:950;line-height:1;transform:rotate(-18deg);pointer-events:none;}
.ms-banner-service .ms-banner-art {color:rgba(27,86,132,.13);font-size:210px;left:10px;}
.ms-banner:hover,.ms-ad-card:hover {transform:translateY(-2px);}
.ms-benefits {margin-top:22px;}
.ms-benefit-grid {background:var(--panel);border:1px solid var(--line);border-radius:16px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));box-shadow:var(--shadow);}
.ms-benefit-grid>div {padding:16px 15px;display:flex;gap:12px;align-items:center;min-width:0;}
.ms-benefit-grid>div:not(:last-child) {border-left:1px solid var(--line);}
.ms-benefit-grid>div>span:last-child {display:flex;flex-direction:column;gap:2px;min-width:0;}
.ms-benefit-grid strong {color:var(--text);font-size:12px;font-weight:900;white-space:nowrap;}
.ms-benefit-grid small {color:var(--muted);font-size:10px;line-height:1.6;}
.ms-benefit-icon {display:grid;place-items:center;flex:0 0 39px;height:39px;border-radius:10px;background:#fff1f2;color:#e83f50;font-size:23px;font-weight:bold;}
html[data-theme="dark"] .ms-benefit-icon {background:#442c36;color:#ff7784;}
.ms-section {padding:52px 0 8px;}
.ms-section-heading {display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin-bottom:20px;}
.ms-section-heading h2 {font-size:23px;color:var(--text);font-weight:950;margin:2px 0 4px;line-height:1.6;}
.ms-section-heading p {font-size:12px;color:var(--muted);margin:0;}
.ms-section-kicker {font-size:10px;letter-spacing:1.4px;color:var(--ms-accent);font-weight:950;direction:ltr;display:inline-block;}
.ms-heading-mark {color:var(--ms-accent);font-size:16px;}
.ms-section-more {flex-shrink:0;display:inline-flex;align-items:center;gap:10px;padding:7px 12px;border-radius:9px;border:1px solid var(--line);background:var(--panel);font-weight:800;color:var(--text);font-size:11px;}
.ms-section-more:hover {color:var(--ms-accent);border-color:var(--ms-accent);}
.ms-section-controls {display:flex;align-items:center;gap:7px;}
.ms-rail-arrow {width:34px;height:34px;border-radius:9px;border:1px solid var(--line);background:var(--panel);color:var(--text);font-size:20px;line-height:1;cursor:pointer;}
.ms-rail-arrow:hover {color:var(--ms-accent);border-color:var(--ms-accent);}
.ms-category-row {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;}
.ms-category-item {display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:15px 7px;background:var(--panel);border:1px solid var(--line);border-radius:16px;min-width:0;box-shadow:var(--shadow);}
.ms-category-item:hover {border-color:rgba(238,64,81,.6);transform:translateY(-3px);}
.ms-category-photo {display:grid;place-items:center;width:112px;height:112px;max-width:100%;border-radius:50%;background:#f4f6f9;overflow:hidden;border:1px solid #edf0f4;}
.ms-category-photo img {height:100%;width:100%;object-fit:contain;padding:10px;}
.ms-category-photo>span {font-size:52px;}
.ms-category-item strong {color:var(--text);font-size:12px;font-weight:900;line-height:1.55;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ms-category-item small {color:var(--muted);font-size:10px;}
.ms-product-rail {display:grid;grid-auto-columns:minmax(0,220px);grid-auto-flow:column;gap:15px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;scrollbar-width:thin;scrollbar-color:#ccd1d9 transparent;padding:2px 2px 12px;}
.ms-product-rail>.ms-card {scroll-snap-align:start;}
.ms-product-grid {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:15px;}
.ms-card {position:relative;min-width:0;overflow:hidden;display:flex;flex-direction:column;border-radius:15px;border:1px solid var(--line);background:var(--panel);box-shadow:var(--shadow);transition:border-color .18s,transform .18s,box-shadow .18s;}
.ms-card:hover {transform:translateY(-3px);border-color:rgba(238,64,81,.35);box-shadow:0 17px 31px rgba(25,37,56,.085);}
.ms-card-visual {height:215px;position:relative;background:#fff;display:grid;place-items:center;border-bottom:1px solid var(--line);}
.ms-card-image {height:100%;width:100%;display:grid;place-items:center;}
.ms-card-image img {height:100%;width:100%;object-fit:contain;padding:16px;transition:transform .2s;}
.ms-card:hover .ms-card-image img {transform:scale(1.045);}
.ms-image-placeholder {font-size:66px;}
.ms-card-badge {position:absolute;top:12px;right:12px;padding:3px 9px;font-size:11px;font-weight:900;background:var(--ms-accent);color:#fff;border-radius:7px;}
.ms-heart-form {position:absolute;left:10px;top:9px;z-index:2;}
.ms-heart-form button {height:31px;width:31px;background:rgba(255,255,255,.94);border:1px solid #eaecf0;border-radius:50%;font-size:22px;color:#8290a3;line-height:1;cursor:pointer;}
.ms-heart-form button:hover {color:#ef4050;border-color:#ef4050;}
.ms-card-content {display:flex;flex-direction:column;flex:1;padding:13px 13px 14px;min-height:163px;}
.ms-card-eyebrow {font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ms-card-content h3 {margin:5px 0 14px;font-size:12px;font-weight:900;line-height:1.85;min-height:3.7em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.ms-card-content h3 a {color:var(--text);}
.ms-card-content h3 a:hover {color:var(--ms-accent);}
.ms-card-bottom {display:flex;align-items:end;justify-content:space-between;gap:6px;margin-top:auto;min-height:38px;}
.ms-pricing {display:flex;flex-direction:column;gap:1px;min-width:0;}
.ms-pricing del {font-size:10px;color:var(--muted);text-decoration-color:#adbbc9;}
.ms-pricing strong {color:var(--text);font-size:15px;font-weight:950;white-space:nowrap;}
.ms-pricing strong small {color:var(--muted);font-size:10px;font-weight:700;}
.ms-card-buy button {width:33px;height:33px;min-width:33px;display:grid;place-items:center;color:#fff;background:var(--ms-accent);border:1px solid var(--ms-accent);border-radius:9px;cursor:pointer;font-size:23px;line-height:1;}
.ms-card-buy button:hover {background:var(--ms-accent-dark);}
.ms-out-of-stock {font-size:11px;font-weight:900;color:#dd5363;}
.ms-see-product {font-size:10px;color:var(--ms-accent);font-weight:800;}
.ms-ad-row {padding:37px 0 2px;}
.ms-ad-layout {display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.ms-ad-card {display:flex;flex-direction:column;justify-content:center;align-items:flex-start;min-width:0;min-height:180px;border-radius:18px;overflow:hidden;padding:23px 30px;position:relative;isolation:isolate;transition:transform .2s;}
.ms-ad-games {color:#fff;background:linear-gradient(115deg,#242b4a,#464e83);}
.ms-ad-shop {color:#522e26;background:linear-gradient(120deg,#ffe9d7,#ffc5ac);}
.ms-ad-eyebrow {font-size:10px;letter-spacing:1px;font-weight:900;opacity:.75;}
.ms-ad-card h2 {font-size:21px;margin:5px 0;line-height:1.6;font-weight:950;color:inherit;}
.ms-ad-card p {font-size:11px;line-height:1.8;margin:0 0 10px;opacity:.85;}
.ms-ad-more {font-size:11px;font-weight:900;}
.ms-ad-deco {position:absolute;left:18px;top:12px;font-size:90px;opacity:.35;transform:rotate(-15deg);z-index:-1;}
.ms-offers-section {padding:40px 0 38px;margin-top:42px;background:linear-gradient(125deg,#dd3041,#f95162);}
.ms-offers-layout {display:grid;grid-template-columns:230px minmax(0,1fr);gap:19px;align-items:center;}
.ms-offers-intro {display:flex;flex-direction:column;align-items:flex-start;color:#fff;padding:8px 3px;}
.ms-offers-star {font-size:57px;line-height:1;}
.ms-offers-eyebrow {font-size:10px;letter-spacing:2px;opacity:.9;}
.ms-offers-intro h2 {font-size:29px;line-height:1.5;color:#fff;margin:7px 0;}
.ms-offers-intro p {font-size:11px;color:#ffe1e4;}
.ms-offers-intro>a {font-size:11px;color:#fff;padding:9px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.45);font-weight:900;}
.ms-offer-rail {grid-auto-columns:210px;scrollbar-color:rgba(255,255,255,.5) transparent;}
.ms-offer-rail .ms-card {box-shadow:none;}
.ms-services-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.ms-services-grid>a {position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;padding:20px 17px;background:var(--panel);border:1px solid var(--line);border-radius:15px;}
.ms-services-grid>a:hover {border-color:var(--ms-accent);}
.ms-service-circle {display:grid;place-items:center;width:45px;height:45px;background:rgba(239,64,81,.09);color:var(--ms-accent);border-radius:14px;font-size:23px;font-weight:900;margin-bottom:5px;}
.ms-services-grid strong {color:var(--text);font-size:13px;font-weight:900;}
.ms-services-grid small {color:var(--muted);font-size:11px;}
.ms-services-grid b {position:absolute;top:24px;left:19px;color:var(--ms-accent);font-size:19px;}
/* dark catalog: light product photography against dark panel */
html[data-theme="dark"] .ms-banner-service {background:linear-gradient(110deg,#213e57,#27567c);color:#e5f4ff;}
html[data-theme="dark"] .ms-banner-service .ms-banner-link {background:#315d7c;border-color:#49738f;}
html[data-theme="dark"] .ms-banner-offer {background:linear-gradient(110deg,#b5233a,#d9505c);}
html[data-theme="dark"] .ms-ad-shop {background:linear-gradient(120deg,#734e3f,#ab7062);color:#fff3eb;}
html[data-theme="dark"] .ms-category-photo {background:#f4f6f9;}
/* shopping cart, checkout, product and other legacy pages still obey design tokens */
.cart-summary .checkout-btn,.checkout-layout .checkout-form button[type="submit"],.product-detail-info .add-to-cart {background:var(--ms-accent);border-color:var(--ms-accent);color:#fff;}
.cart-summary .checkout-btn:hover {background:var(--ms-accent-dark);}
.mobile-filter-toggle {color:var(--text);background:var(--panel);border-color:var(--line);}
html[data-theme="dark"] .sonic-header .header-search button {color:#fff;}
/* Tablet */
@media(max-width:1180px) {
  .ms-hero-layout {grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);}
  .ms-hero-main {min-height:370px;}
  .ms-hero-copy {padding:24px 27px;}
  .ms-hero-copy h1 {font-size:32px;}
  .ms-category-row {grid-template-columns:repeat(5,minmax(0,1fr));}
  .ms-category-photo {height:95px;width:95px;}
  .ms-benefit-grid strong {white-space:normal;}
  .sonic-nav .ms-home-shortcut {display:none;}
  .ms-nav-track {display:none;}
}
@media(max-width:900px) {
  .ms-hero-layout {grid-template-columns:1fr;gap:12px;}
  .ms-hero-main {min-height:335px;}
  .ms-hero-aside {grid-template-columns:1fr 1fr;grid-template-rows:auto;gap:12px;}
  .ms-banner {min-height:165px;padding:17px;}
  .ms-banner strong {font-size:17px;}
  .ms-banner-art {font-size:140px;}
  .ms-benefit-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .ms-benefit-grid>div:nth-child(2) {border-left:0;}
  .ms-benefit-grid>div:nth-child(-n+2) {border-bottom:1px solid var(--line);}
  .ms-category-row {grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;}
  .ms-category-photo {height:78px;width:78px;}
  .ms-category-photo>span {font-size:39px;}
  .ms-product-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
  .ms-services-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:800px) {
  html {scroll-padding-top:145px;}
  .container,.sonic-header .header-main,.sonic-nav .nav-inner {width:calc(100% - 28px);}
  .site-header.sonic-header {box-shadow:0 5px 16px rgba(20,35,52,.045);}
  .sonic-header .header-main {height:auto;grid-template-rows:49px 44px;padding:7px 0;gap:7px;}
  .sonic-header .brand-mark {width:40px;height:40px;}
  .sonic-header .sonic-brand {min-width:0;}
  .sonic-header .brand-copy strong {font-size:17px;}
  .sonic-header .brand-copy small {font-size:7px;}
  .sonic-header .header-search {height:44px;border-radius:10px;}
  .sonic-header .header-search button {min-width:45px;width:45px;border-radius:9px 0 0 9px;}
  .sonic-header .header-tools {gap:5px;}
  .sonic-header .header-tools .tool-link,.sonic-header .theme-toggle,html[data-theme="light"] .sonic-header .header-tools .tool-link,html[data-theme="light"] .sonic-header .theme-toggle {width:39px;min-width:39px;height:39px;min-height:39px;background:var(--bg2);border:1px solid var(--line);border-radius:10px;}
  .sonic-nav .nav-inner {height:48px;min-height:48px;gap:8px;}
  .sonic-nav .category-nav-shortcut,.sonic-nav .category-nav-shortcuts .ms-home-shortcut {display:none;}
  .sonic-nav .category-nav-shortcuts .ms-offer-nav {display:flex;}
  .sonic-nav .category-nav-shortcuts .category-nav-shortcut:nth-child(3) {display:flex;}
  .sonic-nav .category-nav-shortcut,html[data-theme="light"] .sonic-nav .category-nav-shortcut {padding:0 7px;min-height:37px;font-size:11px;}
  .category-menu-trigger {height:39px;min-height:39px;font-size:11px;padding:0 10px;gap:6px;}
  .category-trigger-chevron {display:none;}
  .mobile-dock,html[data-theme="light"] .mobile-dock {background:var(--panel);border-top:1px solid var(--line);box-shadow:0 -7px 25px rgba(12,30,47,.08);}
  .mobile-dock a,html[data-theme="light"] .mobile-dock a {color:var(--muted);}
  .mobile-dock a[aria-current="page"],html[data-theme="light"] .mobile-dock a[aria-current="page"] {color:var(--ms-accent);background:rgba(239,64,81,.08);}
  .mobile-dock .dock-count {background:var(--ms-accent);}
  .ms-quick-inner {min-height:43px;gap:15px;}
  .ms-quick-label {display:none;}
  .ms-quick-inner a {font-size:10px;}
  .ms-hero-wrap {padding-top:14px;}
  .ms-hero-main {min-height:320px;border-radius:17px;background-position:40% center;}
  .ms-hero-shade {background:linear-gradient(270deg,rgba(8,17,32,.97),rgba(8,17,32,.82) 46%,rgba(8,17,32,.14) 100%);}
  .ms-hero-copy {padding:22px 20px;max-width:325px;}
  .ms-hero-kicker {font-size:8px;}
  .ms-hero-copy h1 {font-size:28px;margin:14px 0 8px;}
  .ms-hero-copy p {font-size:11px;line-height:1.95;margin-bottom:18px;}
  .ms-hero-buttons a {min-height:40px;padding:7px 12px;font-size:10px;}
  .ms-hero-index {font-size:8px;bottom:10px;left:12px;}
  .ms-hero-aside {gap:10px;}
  .ms-banner {min-height:144px;border-radius:13px;padding:13px;}
  .ms-banner-overline {font-size:9px;}
  .ms-banner strong {font-size:14px;line-height:1.55;margin:5px 0 10px;}
  .ms-banner-link {font-size:9px;padding:5px 7px;}
  .ms-banner-art {font-size:100px;bottom:-19px;}
  .ms-benefits {margin-top:14px;}
  .ms-benefit-grid {border-radius:13px;}
  .ms-benefit-grid>div {padding:12px 9px;gap:8px;}
  .ms-benefit-icon {width:32px;flex-basis:32px;height:32px;font-size:18px;}
  .ms-benefit-grid strong {font-size:10px;line-height:1.5;}
  .ms-benefit-grid small {font-size:9px;}
  .ms-section {padding:36px 0 4px;}
  .ms-section-heading {margin-bottom:15px;align-items:center;}
  .ms-section-heading h2 {font-size:18px;}
  .ms-section-heading p {font-size:10px;}
  .ms-section-kicker {font-size:8px;}
  .ms-section-more {padding:6px 8px;font-size:10px;}
  .ms-rail-arrow {display:none;}
  .ms-category-row {grid-template-columns:repeat(5,110px);gap:9px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 0 7px;scrollbar-width:thin;}
  .ms-category-item {padding:11px 5px;border-radius:12px;scroll-snap-align:start;}
  .ms-category-photo {height:75px;width:75px;}
  .ms-category-item strong {font-size:10px;}
  .ms-category-item small {font-size:9px;}
  .ms-product-rail {grid-auto-columns:155px;gap:10px;}
  .ms-card {border-radius:12px;}
  .ms-card-visual {height:151px;}
  .ms-card-image img {padding:11px;}
  .ms-card-content {padding:9px 9px 10px;min-height:143px;}
  .ms-card-eyebrow {font-size:9px;}
  .ms-card-content h3 {font-size:11px;line-height:1.7;margin:4px 0 9px;}
  .ms-card-badge {font-size:9px;top:8px;right:7px;padding:2px 6px;}
  .ms-heart-form {left:6px;top:6px;}
  .ms-heart-form button {width:26px;height:26px;font-size:18px;}
  .ms-pricing strong {font-size:12px;}
  .ms-pricing strong small {font-size:9px;}
  .ms-card-buy button {width:28px;min-width:28px;height:28px;border-radius:7px;font-size:19px;}
  .ms-ad-row {padding-top:25px;}
  .ms-ad-layout {gap:9px;}
  .ms-ad-card {min-height:145px;padding:13px 14px;border-radius:13px;}
  .ms-ad-card h2 {font-size:14px;line-height:1.55;}
  .ms-ad-card p {font-size:9px;max-width:170px;}
  .ms-ad-eyebrow,.ms-ad-more {font-size:9px;}
  .ms-ad-deco {font-size:56px;left:2px;top:20px;opacity:.25;}
  .ms-offers-section {padding:22px 0;margin-top:30px;}
  .ms-offers-layout {grid-template-columns:minmax(0,1fr);gap:12px;}
  .ms-offers-intro {flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px;}
  .ms-offers-star {font-size:28px;}
  .ms-offers-intro h2 {font-size:19px;margin:0;}
  .ms-offers-intro p,.ms-offers-eyebrow {display:none;}
  .ms-offers-intro>a {font-size:10px;}
  .ms-offer-rail {grid-auto-columns:155px;}
  .ms-product-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .ms-services-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  .ms-services-grid>a {padding:13px 10px;border-radius:12px;}
  .ms-service-circle {height:37px;width:37px;font-size:20px;border-radius:10px;}
  .ms-services-grid strong {font-size:11px;}
  .ms-services-grid small {font-size:9px;line-height:1.7;}
  .ms-services-grid b {top:15px;left:10px;}
  .products-grid .product-name {font-size:12px;}
  .site-footer.sonic-footer,html[data-theme="light"] .site-footer.sonic-footer {margin-top:34px;padding:31px 0 20px;}
}
@media(max-width:380px) {
  .container,.sonic-header .header-main,.sonic-nav .nav-inner {width:calc(100% - 24px);}
  .sonic-header .header-tools {gap:4px;}
  .sonic-header .header-tools .tool-link,.sonic-header .theme-toggle,html[data-theme="light"] .sonic-header .header-tools .tool-link,html[data-theme="light"] .sonic-header .theme-toggle {width:35px;min-width:35px;height:37px;min-height:37px;}
  .category-menu-trigger {padding:0 9px;font-size:10px;}
  .sonic-nav .category-nav-shortcut,html[data-theme="light"] .sonic-nav .category-nav-shortcut {font-size:10px;padding:0 5px;}
  .ms-hero-main {min-height:295px;}
  .ms-hero-copy {padding:17px 15px;max-width:285px;}
  .ms-hero-copy h1 {font-size:24px;}
  .ms-hero-copy p {font-size:10px;max-width:245px;}
  .ms-hero-buttons {gap:7px;}
  .ms-hero-buttons a {font-size:9px;padding:7px;}
  .ms-banner strong {font-size:12px;}
  .ms-product-rail {grid-auto-columns:147px;}
  .ms-product-grid {gap:8px;}
  .ms-benefit-grid>div {padding:10px 7px;gap:6px;}
  .ms-benefit-grid strong {font-size:9px;}
}
@media(prefers-reduced-motion:reduce) { .ms-card,.ms-banner,.ms-ad-card,.ms-category-item {transition:none;} }
/* Consistent catalog controls in both themes (legacy generated theme rules are specific). */
html[data-theme="light"] .mobile-filter-toggle,
html[data-theme="dark"] .mobile-filter-toggle {background:var(--panel);border:1px solid var(--line);color:var(--text);box-shadow:none;}
html[data-theme="light"] .mobile-filter-toggle:hover,
html[data-theme="dark"] .mobile-filter-toggle:hover {border-color:var(--ms-accent);color:var(--ms-accent);}
html[data-theme="light"] .mobile-filter-toggle .mobile-filter-arrow,
html[data-theme="dark"] .mobile-filter-toggle .mobile-filter-arrow {color:var(--ms-accent);}
html[data-theme="light"] .products-sidebar .filter-section a.active,
html[data-theme="dark"] .products-sidebar .filter-section a.active {color:var(--ms-accent);background:rgba(239,64,81,.08);}
html[data-theme="light"] .products-sidebar .price-filter-form button,
html[data-theme="dark"] .products-sidebar .price-filter-form button {background:var(--ms-accent);color:#fff;border-color:var(--ms-accent);}
html[data-theme="light"] .products-page .discount-badge,
html[data-theme="dark"] .products-page .discount-badge {background:var(--ms-accent);color:#fff;}
html[data-theme="light"] .products-page .quick-add button,
html[data-theme="dark"] .products-page .quick-add button {background:var(--ms-accent);border-color:var(--ms-accent);color:#fff;}
html[data-theme="light"] .products-page .quick-add button span,
html[data-theme="dark"] .products-page .quick-add button span {color:#fff;}
html[data-theme="light"] .products-page .product-card:hover,
html[data-theme="dark"] .products-page .product-card:hover {border-color:rgba(239,64,81,.45);}
html[data-theme="light"] .sonic-header .theme-toggle:hover,
html[data-theme="dark"] .sonic-header .theme-toggle:hover {background:var(--panel2);border-color:var(--ms-accent);}

/* Category tree: same multi-level hierarchy in header drawer and store filters. */
.category-drawer-tree {display:grid;gap:9px;min-width:0;}
.category-drawer-tree .category-drawer-node {min-width:0;margin:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--panel);}
.category-drawer-tree .category-drawer-node[open] {border-color:color-mix(in srgb,var(--ms-accent) 42%,var(--line));}
.category-drawer-tree .category-drawer-node summary {display:flex;align-items:center;gap:8px;min-height:45px;padding:8px 12px;cursor:pointer;color:var(--text);font-size:13px;font-weight:800;list-style:none;}
.category-drawer-tree .category-drawer-node summary::-webkit-details-marker {display:none;}
.category-drawer-tree .category-drawer-node summary:hover {background:var(--bg2);}
.category-node-symbol {display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:7px;background:rgba(239,64,81,.1);color:var(--ms-accent);font-size:14px;}
.category-node-name {min-width:0;flex:1;line-height:1.7;}
.category-node-count {font-size:10px;font-weight:700;color:var(--muted);min-width:19px;text-align:center;}
.category-drawer-tree .category-drawer-group-arrow {font-size:17px;margin-right:0;color:var(--muted);}
.category-drawer-tree .category-drawer-node[open] > summary .category-drawer-group-arrow {transform:rotate(180deg);}
.category-drawer-tree .category-drawer-children {border-top:1px solid var(--line);margin:0;padding:7px 12px 10px 5px;background:var(--bg2);border-right:2px solid rgba(239,64,81,.15);}
.category-drawer-tree .category-drawer-children .category-drawer-node {margin:5px 0 5px 3px;background:var(--panel);}
.category-drawer-tree .category-drawer-children .category-drawer-children {background:var(--bg2);padding-right:10px;}
.category-drawer-tree .category-drawer-leaf,
.category-drawer-tree .category-drawer-parent-link {display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:39px;padding:9px 10px;font-size:12px;font-weight:700;color:var(--text);border-radius:9px;line-height:1.65;}
.category-drawer-tree > .category-drawer-leaf {border:1px solid var(--line);background:var(--panel);}
.category-drawer-tree .category-drawer-parent-link {color:var(--ms-accent);}
.category-drawer-tree .category-drawer-leaf:hover,.category-drawer-tree .category-drawer-parent-link:hover {background:rgba(239,64,81,.09);color:var(--ms-accent);}
.category-drawer-tree .is-current {background:rgba(239,64,81,.11)!important;color:var(--ms-accent)!important;font-weight:900;}
.category-drawer-tree .category-drawer-leaf small,.category-drawer-tree .category-drawer-parent-link small {flex-shrink:0;font-size:10px;font-weight:600;color:var(--muted);}
.category-tree-empty {color:var(--muted);padding:14px 4px;font-size:12px;}
.catalog-category-filter .catalog-category-all {font-size:12px;font-weight:850;color:var(--text);}
.catalog-category-branch {min-width:0;border-top:1px solid var(--line);padding:6px 0;}
.catalog-category-branch summary {display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:38px;padding:5px 8px;list-style:none;cursor:pointer;font-size:12px;line-height:1.7;font-weight:850;color:var(--text);border-radius:8px;}
.catalog-category-branch summary::-webkit-details-marker {display:none;}
.catalog-category-branch summary:hover {background:var(--bg2);}
.catalog-branch-chevron {font-size:16px;line-height:1;color:var(--muted);transition:transform .18s;}
.catalog-category-branch[open] > summary .catalog-branch-chevron {transform:rotate(180deg);}
.catalog-category-children {border-right:2px solid var(--line);padding:3px 9px 3px 0;margin-right:9px;}
.catalog-category-link {display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:35px;padding:7px 8px;border-radius:7px;font-size:11px;line-height:1.6;color:var(--muted);}
.catalog-category-link small {color:var(--muted);font-size:10px;}
.catalog-category-link:hover,.catalog-category-link.active {color:var(--ms-accent);background:rgba(239,64,81,.08);}
.catalog-category-parent {font-weight:800;}
@media(max-width:600px) {
 .category-drawer-tree .category-drawer-node summary {min-height:47px;font-size:13px;}
 .category-drawer-tree .category-drawer-leaf {min-height:43px;font-size:12px;}
 .catalog-category-branch summary {min-height:42px;font-size:12px;}
 .catalog-category-link {min-height:39px;font-size:12px;}
}

.catalog-breadcrumbs {display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:0 0 15px;color:var(--muted);font-size:11px;line-height:1.8;}
.catalog-breadcrumbs a {color:var(--muted);}
.catalog-breadcrumbs a:hover {color:var(--ms-accent);}
.catalog-breadcrumbs [aria-current="page"] {color:var(--text);font-weight:850;}
/* Override legacy purple drawer rules in both themes. */
html[data-theme="light"] .category-drawer .category-drawer-all,
html[data-theme="dark"] .category-drawer .category-drawer-all {background:var(--ms-accent);border-color:var(--ms-accent);color:#fff;}
html[data-theme="light"] .category-drawer .category-drawer-header,
html[data-theme="dark"] .category-drawer .category-drawer-header {background:var(--bg2);border-color:var(--line);}
html[data-theme="light"] .category-drawer-tree .category-drawer-node[open],
html[data-theme="dark"] .category-drawer-tree .category-drawer-node[open] {border-color:rgba(239,64,81,.35);}
html[data-theme="light"] .category-drawer-tree .category-drawer-parent-link,
html[data-theme="dark"] .category-drawer-tree .category-drawer-parent-link {color:var(--ms-accent);}
