/* Shared Pham Kha palette and layout. Keep media dimensions stable at first paint. */
html[data-theme] {
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --bg: #080f1e; --panel: #101c30; --panel2: #15233b; --line: #263851;
  --text: #edf4ff; --muted: #a4b5cd; --cyan: #6bbcff; --cyan2: #65d9ef;
  --green: #79d7af; --red: #ffa0ab; --primary: #75baff; --on-primary: #071a33;
  --price: #91c9ff; --soft: #172f50; --header-height: 109px; --max: 1280px;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f4f7fc; --panel: #fff; --panel2: #f0f5fc; --line: #dde5f1;
  --text: #162943; --muted: #5c6f87; --cyan: #145fc4; --cyan2: #087da9;
  --green: #20734e; --red: #b53d50; --primary: #185ed4; --on-primary: #fff;
  --price: #174ca0; --soft: #eaf2ff; color-scheme: light;
}
html[data-theme] body {
  background: var(--bg); color: var(--text); padding-top: var(--header-height);
  font-family: var(--font-sans);
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
html[data-theme] button, html[data-theme] input,
html[data-theme] select, html[data-theme] textarea { font-family: inherit; line-height: 1.5; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font-size: inherit; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
[hidden] { display: none !important; }
button svg, a svg { flex-shrink: 0; pointer-events: none; }
.mobile-menu-backdrop { display: none; }
.compare-header b.is-empty { display: none; }
h1, h2, h3, p { overflow-wrap: break-word; }
html[data-theme] .eyebrow, html[data-theme] .sale-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .035em; text-transform: none;
}
html[data-theme] .site-header { background: var(--panel); box-shadow: 0 2px 8px #172a3810; backdrop-filter: none; }
html[data-theme] .site-header > .container,
html[data-theme] .main-nav > .container { max-width: 1240px; }
html[data-theme] .head-main { min-height: 64px; grid-template-columns: 204px minmax(220px,1fr) auto; gap: 20px; }
html[data-theme] .brand { color: var(--text); font-weight: 700; letter-spacing: 0; }
html[data-theme] .brand-copy strong { color: var(--text); font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: .1px; text-transform: uppercase; }
html[data-theme] .brand-copy small { color: var(--muted); letter-spacing: .9px; font-size: 9px; }
html[data-theme] .brand-mark { position: relative; display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; flex: 0 0 44px; overflow: hidden; background: var(--primary); color: var(--on-primary); box-shadow: none; border-radius: 10px; }
html[data-theme] .brand-mark.has-image { box-shadow: none; background: transparent; width: 44px; height: 44px; flex-basis: 44px; border-radius: 10px; }
html[data-theme] .brand-mark.has-image img { display: block; width: 44px; height: 44px; object-fit: contain; transform: none; }
html[data-theme] .search, html[data-theme] .mobile-search { position: relative; background: var(--panel2); border-color: var(--line); border-radius: 9px; box-shadow: none; height: 44px; }
html[data-theme] .search input, html[data-theme] .mobile-search input { color: var(--text); font-size: 14px; }
html[data-theme] .search button, html[data-theme] .mobile-search button { font-size: 14px; line-height: 1.5; }
html[data-theme] .search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--soft); }
html[data-theme] .search button { border-radius: 6px; height: 34px; }
html[data-theme] .head-main > .search { height: 40px; border-radius: 20px; }
html[data-theme] .head-main > .search button { height: 32px; border-radius: 16px; }
html[data-theme] .round-btn { border-color: transparent; background: transparent; color: var(--text); border-radius: 8px; }
html[data-theme] .round-btn:hover { border-color: var(--line); background: var(--panel2); }
html[data-theme] .round-btn b { font-size: 10px; background: var(--primary); color: var(--on-primary); }
html[data-theme] .main-nav { border-color: var(--line); }
html[data-theme] .main-nav .nav-row { height: 44px; justify-content: flex-start; gap: 8px; }
html[data-theme] .nav-item { flex: 0 0 auto; }
html[data-theme] .nav-trigger { width: auto; color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.5; padding-inline: 10px; gap: 7px; white-space: nowrap; }
html[data-theme] .nav-trigger > svg:first-child { width: 16px; flex-basis: 16px; }
html[data-theme] .nav-trigger .chevron { width: 12px; margin-left: 0; }
html[data-theme] .main-nav a { color: var(--text) !important; font-weight: 500; }
html[data-theme] .nav-direct { font-size: 13px !important; line-height: 1.5; white-space: nowrap !important; padding-inline: 10px; }
html[data-theme] .nav-item + .nav-direct { margin-left: auto; }
html[data-theme] .nav-trigger:hover, html[data-theme] .nav-direct:hover,
html[data-theme] .nav-item.is-open .nav-trigger { background: var(--soft); color: var(--cyan); }
html[data-theme] .mega-menu { width: max-content; min-width: 224px; max-width: 300px; padding: 10px 16px 12px; background: var(--panel); border-color: var(--line); border-radius: 0 0 10px 10px; box-shadow: 0 12px 30px #15263420; pointer-events: none; transition: opacity .12s ease, transform .12s ease; }
html[data-theme] .nav-item.is-open .mega-menu { pointer-events: auto; }
html[data-theme] .mega-links { grid-template-columns: minmax(0,1fr); }
html[data-theme] .mega-links a { padding: 8px 0; border-color: var(--line); font-size: 13px; font-weight: 400; }
html[data-theme] .mega-all { margin-top: 10px; letter-spacing: 0; text-transform: none; white-space: normal; }
html[data-theme] .hero { background: radial-gradient(ellipse at 88% 12%, #176be119, transparent 58%), var(--panel); padding: 44px 0 48px; border-bottom: 1px solid var(--line); }
html[data-theme] .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 55px; }
html[data-theme] .hero h1 { font-size: clamp(34px,3.7vw,50px); line-height: 1.25; font-weight: 700; letter-spacing: -1.2px; margin: 15px 0 20px; }
html[data-theme] .hero h1 em { color: var(--cyan); }
html[data-theme] .hero-copy > p { color: var(--muted); font-size: 16px; line-height: 1.8; max-width: 505px; }
html[data-theme] .hero-actions { margin-top: 26px; gap: 12px; }
html[data-theme] .hero-media { min-height: 340px; height: 340px; border: 1px solid #3576c933; border-radius: 20px; background: #102341; box-shadow: 0 18px 45px #16386b18; }
html[data-theme] .hero-media > img { height: 100%; width: 100%; object-fit: cover; }
html[data-theme] .hero-overlay { color: #fff; left: 24px; right: 24px; bottom: 24px; gap: 16px; }
html[data-theme] .hero-overlay h2 { font-size: 23px; font-weight: 600; line-height: 1.35; }
html[data-theme] .hero-overlay small { color: #dbe8ef !important; font-size: 12px; letter-spacing: .3px; }
html[data-theme] .hero-overlay span { color: #d6e0e6; font-size: 13px; }
html[data-theme] .stats { gap: 20px; margin-top: 26px; }
html[data-theme] .stats > div { padding: 0; min-width: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; text-align: left; }
html[data-theme] .stats b { color: var(--text); font-size: 13px; font-weight: 600; }
html[data-theme] .stats span { color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; }
html[data-theme] .btn-primary, html[data-theme] .search button, html[data-theme] .mobile-search button,
html[data-theme] .cart-btn, html[data-theme] .detail-add-cart, html[data-theme] .order-summary > button,
html[data-theme] .catalog-empty button { background: var(--primary); color: var(--on-primary); font-weight: 600; border-radius: 8px; box-shadow: none; }
html[data-theme] .btn-primary:hover, html[data-theme] .cart-btn:hover, html[data-theme] .detail-add-cart:hover { filter: brightness(.94); }
html[data-theme] .btn-primary, html[data-theme] .btn-secondary { min-height: 44px; font-size: 14px; line-height: 1.5; padding: 11px 18px; }
html[data-theme] .btn-secondary, html[data-theme] .view-all { color: var(--text); background: var(--panel); border-color: var(--line); border-radius: 8px; font-weight: 500; }
html[data-theme] .view-all { padding: 6px 0; background: transparent; border: 0; color: var(--cyan); white-space: nowrap; }
html[data-theme] .section { padding: 35px 0; }
html[data-theme] .section-title { font-size: clamp(23px,2.5vw,28px); font-weight: 600; line-height: 1.35; letter-spacing: -.45px; margin: 5px 0 18px; }
html[data-theme] .section-heading { margin-bottom: 18px; gap: 18px; }
html[data-theme] .section-heading .section-title { margin-bottom: 0; }
/* Keep the icon and first title line aligned when descriptions wrap. */
html[data-theme] .category-card { min-width: 0; min-height: 150px; justify-content: flex-start; background: var(--panel); color: var(--text); border-color: var(--line); border-radius: 15px; box-shadow: 0 4px 14px #183e7605; padding: 20px 12px; }
html[data-theme] .category-card:hover { transform: translateY(-2px); border-color: var(--cyan); }
html[data-theme] .category-card > span { flex-shrink: 0; background: var(--soft); color: var(--cyan); border: 0; border-radius: 10px; width: 45px; height: 45px; }
html[data-theme] .category-card b { font-size: 14px; font-weight: 600; line-height: 1.5; }
html[data-theme] .category-card small { min-height: 36px; font-size: 12px; line-height: 1.5; color: var(--muted); }
html[data-theme] .product-card { display: flex; flex-direction: column; background: var(--panel); border-color: var(--line); border-radius: 15px; overflow: hidden; }
html[data-theme] .product-card:hover { transform: translateY(-2px); border-color: #9aafbc; box-shadow: 0 6px 18px #132b3c0b; }
html[data-theme] .product-pic { display: block; flex: 0 0 auto; background: var(--panel); height: 180px; border-bottom: 1px solid var(--line); }
html[data-theme] .product-pic img { object-fit: contain; padding: 16px; }
html[data-theme] .product-pic.is-placeholder img { padding: 0; }
html[data-theme] .product-pic.is-illustration img { padding: 6px; }
html[data-theme] .illustration-label { position: absolute; left: 10px; bottom: 10px; padding: 4px 7px; border-radius: 5px; color: #4d6071; background: #f2f6fbea; border: 1px solid #dce5ee; font-size: 10px; line-height: 1.3; }
html[data-theme] .illustration-notice { padding: 8px 12px; border-radius: 8px; background: var(--soft); line-height: 1.6; }
html[data-theme] .product-card:hover .product-pic img { transform: none; }
html[data-theme] .product-info { min-width: 0; padding: 14px; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: 18px 42px 42px 44px 44px; gap: 6px; }
html[data-theme] .product-meta { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; line-height: 18px; }
html[data-theme] .product-meta .product-brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .product-stock { flex: 0 0 auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
html[data-theme] .product-stock.available { color: var(--green); }
html[data-theme] .product-stock.sold-out { color: var(--red); }
html[data-theme] .product-brand { font-size: 11px; color: var(--muted); letter-spacing: .3px; font-weight: 500; }
html[data-theme] .product-card h3 { font-size: 15px; font-weight: 600; line-height: 21px; height: 42px; min-height: 0; margin: 0; overflow: hidden; }
html[data-theme] .product-card .product-name-link { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
html[data-theme] .product-name-link { color: var(--text); text-decoration: none; }
html[data-theme] .product-name-link:hover { color: var(--cyan); }
html[data-theme] .stock-label { color: var(--muted); font-size: 12px; margin: 8px 0 3px; }
html[data-theme] .stock-label.available { color: var(--green); }
html[data-theme] .product-price { align-items: baseline; flex-wrap: wrap; gap: 5px 9px; margin: auto 0 13px; padding-top: 7px; }
html[data-theme] .product-price b { color: var(--price); font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
html[data-theme] .product-price del { font-size: 12px; color: var(--muted); }
html[data-theme] .product-card .product-price { min-width: 0; display: grid; grid-template-rows: 24px 16px; gap: 2px; height: 42px; margin: 0; padding: 0; }
html[data-theme] .product-card .product-price b { line-height: 24px; white-space: nowrap; }
html[data-theme] .product-card .product-price del { line-height: 16px; white-space: nowrap; }
html[data-theme] .cart-btn { height: 41px; font-size: 13px; font-weight: 600; line-height: 1.5; }
html[data-theme] a.cart-btn { color: var(--cyan); background: var(--soft); border: 1px solid var(--line); }
html[data-theme] .cart-btn:disabled { background: var(--panel2); color: var(--muted); opacity: 1; }
html[data-theme] .product-tools { gap: 10px; margin-top: 12px; }
html[data-theme] .product-tools button { display: flex; align-items: center; justify-content: center; gap: 5px; background: transparent; border-color: var(--line); color: var(--muted); padding: 4px; font-size: 12px; min-height: 44px; border-radius: 8px; transition: color .15s, background .15s, border-color .15s; }
html[data-theme] .product-tools button svg { width: 17px; height: 17px; }
html[data-theme] .product-tools button:hover { color: var(--cyan); background: var(--soft); border-color: var(--cyan); }
html[data-theme] .product-tools button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
html[data-theme] .product-tools button.selected { color: var(--cyan); background: var(--soft); border-radius: 6px; }
html[data-theme] .product-card .cart-btn { height: 44px; }
html[data-theme] .product-card .product-tools { margin: 0; min-width: 0; }
html[data-theme] .product-card .product-tools button { min-width: 0; white-space: nowrap; }
html[data-theme] .tag { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 7px; }
html[data-theme] .tag.new { background: var(--soft); border-color: var(--line); color: var(--cyan); }
html[data-theme] .sale-panel { background: linear-gradient(135deg, var(--soft), var(--panel) 65%); border-color: #5388ce66; border-radius: 18px; }
html[data-theme] .sale-icon { background: var(--soft); color: var(--cyan); border: 0; }
html[data-theme] .sale-kicker { color: var(--muted); }
html[data-theme] .sale-heading h2 { font-weight: 600; font-size: 23px; }
html[data-theme] .brands { padding: 30px 0; background: var(--panel); overflow: hidden; }
html[data-theme] .brand-track { display: flex; gap: 0; width: max-content; margin: 20px 0 0; animation: pk-brand-scroll 48s linear infinite; }
html[data-theme] .brand-list { display: flex; flex: 0 0 auto; flex-wrap: nowrap; justify-content: space-around; align-items: center; gap: 16px; padding: 0 8px; width: max-content; min-width: 100vw; }
html[data-theme] .brand-list a { display: grid; place-items: center; flex: 0 0 152px; width: 152px; height: 66px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); color: var(--text); text-decoration: none; font-size: 18px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
html[data-theme] .brand-chip span { max-width: 138px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; font: inherit; }
html[data-theme] .brand-list a:hover { color: var(--cyan); border-color: var(--cyan); }
html[data-theme] #brand-list-copy { display: flex; }
html[data-theme] .brands:focus-within .brand-track { animation-play-state: paused; }
@keyframes pk-brand-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  html[data-theme] .brand-track { animation: none; width: 100%; }
  html[data-theme] .brand-list { min-width: 0; width: 100%; flex-wrap: wrap; justify-content: center; }
  html[data-theme] #brand-list-copy { display: none; }
}

/* Loading and failure states never change a media box's dimensions. */
img[data-pk-image] { opacity: 0; transition: opacity .16s ease; }
img[data-pk-image][data-media-state="ready"] { opacity: 1; }
img[data-pk-image][data-media-state="failed"] { visibility: hidden; }
.product-pic, .product-main-image, .product-thumbnails button, .cart-line > a { background: var(--panel2); }
.product-pic img, .product-main-image img, .product-thumbnails img, .cart-line img { display: block; }
html[data-theme] .product-pic img[data-media-fallback], html[data-theme] .product-pic.is-placeholder img { padding: 0; }
.product-skeleton { min-height: 412px; pointer-events: none; }
html[data-theme] .product-skeleton .product-pic { background: var(--panel2); }
.skeleton-lines { padding: 20px 16px; display: grid; gap: 15px; }
.skeleton-lines i { display: block; height: 14px; width: 90%; border-radius: 5px; background: var(--panel2); }
.skeleton-lines i:nth-child(2) { width: 65%; }
.skeleton-lines i:last-child { height: 38px; margin-top: 15px; width: 100%; }
html[data-theme] .news-card { color: var(--text); border-color: var(--line); background: var(--panel); border-radius: 11px; }
html[data-theme] .news-card img { height: 180px; }
html[data-theme] .news-card div { padding: 20px; }
html[data-theme] .news-card small { font-size: 12px; letter-spacing: 0; }
html[data-theme] .news-card h3 { font-size: 18px; font-weight: 600; line-height: 1.5; }
html[data-theme] .news-card p { font-size: 14px; color: var(--muted); line-height: 1.7; }
html[data-theme] .service-grid > div { background: transparent; border: 0; padding: 8px; }
html[data-theme] .service-grid > div > span { border: 0; background: var(--soft); color: var(--cyan); }
html[data-theme] .service-grid b { font-size: 14px; font-weight: 600; }
html[data-theme] .service-grid small { font-size: 12px; color: var(--muted); }
html[data-theme] footer { background: var(--panel); padding-top: 32px; }
html[data-theme] .footer-grid h3 { color: var(--text); font-size: 14px; letter-spacing: 0; font-weight: 600; }
html[data-theme] .footer-grid > div > a:not(.brand), html[data-theme] .footer-brand p, html[data-theme] .footer-bottom { color: var(--muted); font-size: 13px; line-height: 1.8; }
html[data-theme] .footer-grid > div > a.btn-secondary { line-height: 1.5; }
html[data-theme] .store-announcement { background: var(--soft); font-size: 12px; color: var(--muted); padding: 6px 16px; }
html[data-theme] .commerce-main { padding-top: 28px; }
html[data-theme] .catalog-heading h1, html[data-theme] .cart-heading h1, html[data-theme] .page-heading h1 { font-size: clamp(25px,3vw,34px); font-weight: 600; letter-spacing: -.6px; line-height: 1.35; }
html[data-theme] .catalog-heading p, html[data-theme] .cart-heading p, html[data-theme] .breadcrumbs { color: var(--muted); font-size: 14px; }
html[data-theme] .catalog-layout { grid-template-columns: 238px minmax(0,1fr); gap: 28px; }
html[data-theme] .filter-panel { top: calc(var(--header-height) + 18px); max-height: calc(100dvh - var(--header-height) - 36px); background: var(--panel); border-color: var(--line); border-radius: 10px; }
html[data-theme] .filter-group h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; }
html[data-theme] .brand-filters label { font-size: 13px; color: var(--text); font-weight: 400; }
html[data-theme] .price-range label span { font-size: 12px; color: var(--muted); }
html[data-theme] .filter-group select, html[data-theme] .price-range input,
html[data-theme] .catalog-toolbar select, html[data-theme] .brand-search { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 7px; font-size: 13px; min-height: 40px; }
.brand-search { width: 100%; padding: 8px 10px; margin-bottom: 10px; }
html[data-theme] .reset-filters { color: var(--muted); border-color: var(--line); background: transparent; font-weight: 500; }
html[data-theme] .filter-toggle { color: var(--text); border-color: var(--line); background: var(--panel); font-weight: 500; }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.active-filters button { display: inline-flex; align-items: center; gap: 9px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); font-size: 12px; cursor: pointer; }
.filter-error { font-size: 12px; color: var(--red); margin: 8px 0 0; }
.filter-backdrop { display: none; }
.filter-apply { display: none !important; }
html[data-theme] .catalog-toolbar { color: var(--muted); }
html[data-theme] .catalog-grid .product-pic { height: 192px; }
html[data-theme] .catalog-pagination button { border-radius: 7px; min-height: 42px; }
html[data-theme] .catalog-pagination [aria-current="page"] { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
html[data-theme] .product-detail-info h1 { font-size: clamp(25px,3vw,32px); line-height: 1.35; font-weight: 600; letter-spacing: -.5px; }
html[data-theme] .product-gallery, html[data-theme] .order-summary { top: calc(var(--header-height) + 20px); }
html[data-theme] .product-main-image { display: block; width: 100%; padding: 0; border-color: var(--line); background: var(--panel); border-radius: 12px; cursor: zoom-in; }
html[data-theme] .product-main-image img { object-fit: contain; }
.gallery-hint { color: var(--muted); font-size: 12px; margin: 9px 0; text-align: center; }
html[data-theme] .product-thumbnails { overflow-x: auto; padding: 2px; }
html[data-theme] .product-thumbnails button { flex-shrink: 0; border-color: var(--line); background: var(--panel); border-radius: 7px; }
html[data-theme] .buy-panel, html[data-theme] .order-summary, html[data-theme] .cart-line, html[data-theme] .checkout-form { border-color: var(--line); background: var(--panel); border-radius: 12px; }
html[data-theme] .detail-price b { color: var(--price); font-size: 31px; font-weight: 600; }
html[data-theme] .detail-summary, html[data-theme] .buy-panel > p, html[data-theme] .prose-panel { color: var(--muted); line-height: 1.8; }
html[data-theme] .buy-actions { grid-template-columns: 118px minmax(0,1fr); }
html[data-theme] .buy-actions > .btn-primary:only-child { grid-column: 1 / -1; }
html[data-theme] .detail-add-cart { background: var(--soft); color: var(--cyan); border: 1px solid var(--cyan); }
.buy-now { width: 100%; margin-top: 10px; }
.share-product { color: var(--muted); background: transparent; border: 0; padding: 10px 0; font-size: 13px; cursor: pointer; }
html[data-theme] .quantity-stepper { background: var(--panel); border-color: var(--line); border-radius: 8px; }
html[data-theme] .quantity-stepper button, html[data-theme] .quantity-stepper output { color: var(--text); font-weight: 500; }
.quantity-stepper button:disabled { opacity: .35; }
html[data-theme] .product-tabs button { color: var(--muted); font-size: 14px; font-weight: 500; }
html[data-theme] .product-tabs button.active { color: var(--cyan); }
html[data-theme] .tab-panel > div { border-color: var(--line); font-size: 14px; }
html[data-theme] .tab-panel > div span { text-transform: none; color: var(--muted); font-size: 13px; }
html[data-theme] .tab-panel > div strong { font-weight: 500; }
.image-viewer { width: min(1000px,calc(100% - 32px)); max-height: 94dvh; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); }
.image-viewer::backdrop { background: #0a1729bf; }
.image-viewer-open { overflow: hidden; }
html[data-theme] .stock-status { color: var(--green); }
html[data-theme] .stock-status.sold-out { color: var(--muted); }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.viewer-head p { margin: 0; font-size: 14px; }
.viewer-image-notice { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.viewer-head button, .viewer-controls button { padding: 8px 14px; min-height: 42px; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.image-viewer img { display: block; width: 100%; height: min(65dvh,650px); object-fit: contain; margin: 12px 0; }
.viewer-controls { display: flex; justify-content: center; align-items: center; gap: 18px; }
.mobile-purchase { display: none; }
.recent-products .section-heading { align-items: center; }
.recent-products .clear-recent { border: 0; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; padding: 8px; }
.compare-dock { position: fixed; z-index: 90; bottom: 18px; left: 50%; transform: translateX(-50%); width: min(670px,calc(100% - 32px)); display: flex; align-items: center; gap: 18px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 30px #11263624; }
.compare-dock strong { font-size: 14px; font-weight: 600; }
.compare-dock > div { flex: 1; min-width: 0; }
.compare-dock p { margin: 1px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.compare-dock > button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 8px; }
.has-compare-dock { padding-bottom: 95px; }
/* Status messages must never intercept taps, including while fading out. */
.toast { pointer-events: none; }
html[data-theme] .toast { z-index: 150; background: var(--text); color: var(--panel); border: 0; box-shadow: 0 5px 25px #162f3d18; font-size: 14px; bottom: 20px; }
html[data-theme] .has-compare-dock .toast { bottom: 108px; }
html[data-theme] .cart-line-info > a { color: var(--text); font-weight: 600; }
html[data-theme] .cart-line-actions > strong { color: var(--text); font-weight: 600; }
html[data-theme] .order-summary > div, html[data-theme] .order-summary > p, html[data-theme] .cart-line-info small { color: var(--muted); }
html[data-theme] .order-summary .order-total { color: var(--text); border-color: var(--line); }
html[data-theme] .checkout-form label { color: var(--text); font-size: 14px; font-weight: 500; }
html[data-theme] .checkout-form input, html[data-theme] .checkout-form textarea { color: var(--text); background: var(--panel); border-color: var(--line); font-size: 15px; }
html[data-theme] .checkout-form fieldset { border-color: var(--line); }
html[data-theme] .form-error { color: var(--red); }
.checkout-steps { display: flex; gap: 12px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 28px; font-size: 13px; color: var(--muted); }
.checkout-steps li { display: flex; align-items: center; gap: 8px; }
.checkout-steps a { color: var(--cyan); text-decoration: none; }
.checkout-steps [aria-current] { color: var(--text); font-weight: 600; }
.checkout-steps li + li::before { content: '›'; color: var(--muted); margin-right: 4px; }
.search-suggestions { position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px #162b4028; z-index: 135; max-height: min(470px,65dvh); overflow: auto; }
.search-suggestions a { display: flex; align-items: center; gap: 12px; padding: 10px; color: var(--text); text-decoration: none; border-radius: 6px; font-size: 13px; }
.search-suggestions a:hover, .search-suggestions a:focus { background: var(--soft); }
.search-suggestions a.suggestion-active { background: var(--soft); }
.search-suggestions img { flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; border-radius: 5px; }
.search-suggestions span { min-width: 0; line-height: 1.5; }
.search-suggestions small { display: block; color: var(--muted); }
.search-suggestions > p { padding: 8px 10px; margin: 0; color: var(--muted); font-size: 13px; }
.search-suggestions .search-all { justify-content: center; color: var(--cyan); border-top: 1px solid var(--line); }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 200; background: var(--panel); color: var(--text); padding: 12px; border: 1px solid var(--cyan); border-radius: 6px; }
.skip-link:focus { top: 10px; }
html[data-theme] .help-list summary { font-weight: 600; }
.guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.guide-card { display: block; padding: 24px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 11px; text-decoration: none; }
.guide-card small { color: var(--cyan); font-size: 12px; }
.guide-card h3 { margin: 8px 0; font-size: 19px; line-height: 1.45; font-weight: 600; }
.guide-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.guide-card > span { color: var(--cyan); font-size: 13px; }
.guide-card:hover { border-color: var(--cyan); }
@media (min-width:1600px) { html[data-theme] { --max: 1420px; } html[data-theme] .hero-media { height: 390px; } }
@media (max-width:1150px) and (min-width:981px) {
  html[data-theme] .head-main { grid-template-columns: 190px minmax(190px,1fr) auto; gap: 14px; }
  html[data-theme] .account-btn span { display: none; }
  html[data-theme] .main-nav .nav-row { gap: 2px; }
  html[data-theme] .nav-trigger { font-size: 12px; padding-inline: 6px; gap: 5px; }
  html[data-theme] .nav-direct { font-size: 12px !important; padding-inline: 6px; }
}
@media (max-width:980px) {
  html[data-theme] { --header-height: 124px; }
  html[data-theme] .site-header { height: var(--header-height); }
  html[data-theme] .head-main { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; grid-template-rows: 64px 44px; height: 124px; min-height: 124px; gap: 0 6px; padding: 0 0 12px; }
  html[data-theme] .mobile-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); }
  html[data-theme] .header-actions { gap: 4px; }
  html[data-theme] .header-actions .round-btn { min-width: 44px; height: 44px; padding: 0; }
  html[data-theme] body.mobile-nav-open { overflow: hidden; touch-action: auto; }
  .mobile-nav-open .mobile-menu-backdrop { display: block; position: fixed; inset: var(--header-height) 0 0; z-index: 109; border: 0; background: #07142480; }
  html[data-theme] .mobile-toggle:hover, html[data-theme] .mobile-toggle:focus-visible,
  html[data-theme] .mobile-nav-open .mobile-toggle { background: var(--soft); color: var(--cyan); }
  html[data-theme] .mobile-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
  .mobile-toggle .close-icon { display: none; }
  .mobile-nav-open .mobile-toggle .open-icon { display: none; }
  .mobile-nav-open .mobile-toggle .close-icon { display: block; }
  html[data-theme] .head-main > .search { display: flex; grid-column: 1 / -1; grid-row: 2; width: 100%; }
  html[data-theme] .main-nav { display: none; }
  html[data-theme] .account-btn { display: none; }
  html[data-theme] .mobile-drawer { position: fixed; display: block; top: var(--header-height); bottom: 0; left: 0; width: min(440px,100%); z-index: 110; padding: 0; background: var(--panel); color: var(--text); overflow-y: auto; overflow-x: hidden; touch-action: pan-y; transform: translateX(-102%); visibility: hidden; pointer-events: none; border-top: 1px solid var(--line); }
  html[data-theme] .mobile-nav-open .mobile-drawer { transform: translateX(0); visibility: visible; pointer-events: auto; }
  html[data-theme] .mobile-drawer-shell { min-width: 0; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
  html[data-theme] .mobile-drawer-title { gap: 5px; margin-bottom: 14px; }
  html[data-theme] .mobile-drawer-title strong { font-size: 23px; line-height: 1.3; }
  html[data-theme] .mobile-drawer-title span { line-height: 1.5; }
  html[data-theme] .mobile-search { position: relative; top: auto; padding-left: 12px; }
  html[data-theme] .mobile-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--soft); }
  html[data-theme] .mobile-search button { height: 36px; width: 40px; margin-right: 3px; border-radius: 7px; background: var(--primary); color: var(--on-primary); }
  html[data-theme] .mobile-links { grid-template-columns: minmax(0,1fr); gap: 8px; margin-top: 14px; }
  html[data-theme] .mobile-links a { min-width: 0; min-height: 62px; grid-template-columns: 36px minmax(0,1fr) 16px; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border-color: var(--line); color: var(--text); font-size: 14px; line-height: 1.4; font-weight: 500; }
  html[data-theme] .mobile-links a:hover, html[data-theme] .mobile-links a:focus-visible { transform: none; background: var(--soft); border-color: var(--cyan); }
  html[data-theme] .mobile-links a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
  html[data-theme] .mobile-links a > svg:first-child { width: 36px; height: 36px; padding: 8px; border-radius: 9px; background: var(--soft); border-color: var(--line); color: var(--cyan); }
  html[data-theme] .mobile-links a > span { min-width: 0; overflow-wrap: break-word; }
  html[data-theme] .mobile-links .mobile-link-arrow { width: 16px; height: 16px; padding: 0; color: var(--muted); }
  html[data-theme] .mobile-links .mobile-secondary { grid-template-columns: 36px minmax(0,1fr); background: var(--panel2); border-color: var(--line); }
  html[data-theme] .mobile-shopping-links { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; grid-column: 1 / -1; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
  html[data-theme] .mobile-links a small, html[data-theme] .mobile-drawer-title span { color: var(--muted); }
  html[data-theme] .hero-grid { gap: 28px; grid-template-columns: 1fr 1fr; }
  html[data-theme] .hero h1 { font-size: 35px; }
  html[data-theme] .hero-media { min-height: 310px; height: 310px; }
  html[data-theme] .hero-overlay { align-items: flex-start; flex-direction: column; }
  html[data-theme] .stats { gap: 15px; }
  html[data-theme] .catalog-layout { grid-template-columns: 1fr; }
  html[data-theme] .filter-panel { inset: 0 auto 0 0; top: 0; max-height: 100dvh; width: min(370px,90%); border-radius: 0; z-index: 140; visibility: hidden; }
  html[data-theme] .filters-open .filter-panel { visibility: visible; }
  .filters-open .filter-backdrop { display: block; position: fixed; inset: 0; z-index: 130; background: #10233188; border: 0; }
  .filter-apply { display: flex !important; width: 100%; position: sticky; bottom: 0; margin-top: 14px; }
  html[data-theme] .product-gallery, html[data-theme] .order-summary { position: static; }
  html[data-theme] .brand-copy strong { font-size: 16px; }
}
@media (max-width:680px) {
  html[data-theme] .container { width: calc(100% - 28px); }
  html[data-theme] .hero { padding: 27px 0 30px; }
  html[data-theme] .hero-grid { grid-template-columns: 1fr; }
  html[data-theme] .hero h1 { font-size: 36px; letter-spacing: -.8px; }
  html[data-theme] .hero-copy > p { font-size: 15px; }
  html[data-theme] .hero-media { height: 250px; min-height: 250px; }
  html[data-theme] .hero-overlay h2 { font-size: 21px; }
  html[data-theme] .stats { display: flex; flex-wrap: wrap; gap: 12px 22px; }
  html[data-theme] .section { padding: 28px 0; }
  html[data-theme] .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
  html[data-theme] .category-card { min-height: 114px; padding: 13px 7px; }
  html[data-theme] .category-card b { min-height: 36px; font-size: 13px; line-height: 18px; }
  html[data-theme] .category-card > span { margin-bottom: 9px; width: 36px; height: 36px; border-radius: 8px; }
  html[data-theme] .category-card small { display: none; }
  html[data-theme] .product-grid.four, html[data-theme] .product-grid.two, html[data-theme] .catalog-grid, html[data-theme] .related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  html[data-theme] .product-pic, html[data-theme] .catalog-grid .product-pic { height: 155px; }
  html[data-theme] .product-info { padding: 11px; grid-template-rows: 16px 38px 40px 44px 44px; }
  .product-skeleton { min-height: 373px; }
  html[data-theme] .product-meta { gap: 5px; line-height: 16px; }
  html[data-theme] .product-meta .product-brand, html[data-theme] .product-stock { font-size: 10px; letter-spacing: 0; }
  html[data-theme] .product-card h3 { font-size: 13px; line-height: 19px; height: 38px; }
  html[data-theme] .product-card .product-price { grid-template-rows: 22px 16px; height: 40px; }
  html[data-theme] .product-card .product-price b { line-height: 22px; }
  html[data-theme] .product-price b { font-size: 16px; }
  html[data-theme] .cart-btn { font-size: 12px; height: 40px; gap: 4px; }
  html[data-theme] .cart-btn svg { display: none; }
  html[data-theme] .product-tools { gap: 5px; }
  html[data-theme] .product-tools button { font-size: 11px; gap: 3px; padding: 3px 0; }
  html[data-theme] .product-tools button svg { width: 14px; height: 14px; }
  html[data-theme] .brand-list { gap: 12px 22px; }
  html[data-theme] .brand-list a { font-size: 15px; }
  html[data-theme] .catalog-toolbar { align-items: center; gap: 10px; font-size: 12px; }
  html[data-theme] .catalog-toolbar label { gap: 3px; }
  html[data-theme] .catalog-toolbar select { min-width: 145px; max-width: 170px; font-size: 12px; }
  html[data-theme] .catalog-pagination { gap: 7px; }
  html[data-theme] .catalog-pagination button { padding: 8px 11px; font-size: 12px; }
  html[data-theme] .catalog-pagination .page-number { display: none; }
  html[data-theme] .buy-actions { grid-template-columns: 108px minmax(0,1fr); }
  html[data-theme] .detail-add-cart { font-size: 13px; }
  html[data-theme] .product-main-image { height: 78vw; }
  .mobile-purchase { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; z-index: 100; bottom: 0; left: 0; right: 0; padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
  .mobile-purchase small { display: block; font-size: 11px; color: var(--muted); }
  .mobile-purchase strong { font-size: 17px; color: var(--price); font-weight: 600; }
  .has-mobile-purchase { padding-bottom: 86px; }
  html[data-theme] .has-mobile-purchase .toast { bottom: 100px; }
  .compare-dock { gap: 10px; bottom: 12px; padding: 10px 12px; }
  .has-mobile-purchase .compare-dock { bottom: 88px; }
  .compare-dock p { display: none; }
  .compare-dock .btn-primary { padding: 9px 12px; font-size: 13px; }
  .compare-dock strong { font-size: 13px; }
  html[data-theme] .has-mobile-purchase.has-compare-dock .toast { bottom: 170px; }
  .has-mobile-purchase.has-compare-dock { padding-bottom: 160px; }
  .guide-grid { grid-template-columns: 1fr; gap: 12px; }
  .guide-card { padding: 20px; }
  html[data-theme] .footer-grid { gap: 22px; }
}
@media (max-width:380px) { html[data-theme] .brand-copy small { display: none; } html[data-theme] .brand-copy strong { font-size: 14px; } html[data-theme] .product-info { padding: 9px; } .product-skeleton { min-height: 369px; } }
@media (max-width:520px) {
  html[data-theme] .head-main .brand { gap: 6px; }
  html[data-theme] .head-main .brand-copy strong { font-size: 14px; }
  html[data-theme] .head-main .brand-copy small { display: none; }
}
@media (max-width:380px) {
  html[data-theme] .product-tools button { flex-direction: column; gap: 2px; line-height: 1.2; }
}
@media (max-width:340px) {
  html[data-theme] .head-main .brand-copy strong { white-space: normal; font-size: 12px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
