/* Design system layered on the existing Expensi theme. */
:root {
  --primary: #1a56db;
  --primary-hover: #1344b5;
  --primary-active: #0f3a99;
  --accent: #c2410c;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f1729;
  --text-2: #334155;
  --text-muted: #64748b;
  --ok: #15803d;
  --warn: #b45309;
  --sale: #b91c1c;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --focus: 0 0 0 3px rgba(26, 86, 219, .28);
}
:focus-visible { outline: none; box-shadow: var(--focus); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { border-radius: 8px; }

.catbar { background: #fff; border-bottom: 1px solid var(--border); }
.catbar .container { display: flex; align-items: center; gap: 4px; min-height: 44px; overflow-x: auto; scrollbar-width: none; }
.catbar a, .catbar button.cat-link {
  font-size: 12.5px; font-weight: 700; color: var(--ink2); padding: 8px 10px; border-radius: 8px; white-space: nowrap;
}
.catbar a:hover, .catbar button.cat-link:hover { background: var(--blue-lt); color: var(--blue); }
.mega { width: min(720px, 92vw); padding: 14px; left: 0; display: none; }
.mega.open { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.mega a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 650; color: var(--ink2); }
.mega a:hover { background: var(--bg); color: var(--blue); }
.mega a small { display: block; font-weight: 600; color: var(--faint); font-size: 11px; }

.pc-brand { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.pc-seller { font-size: 11px; color: var(--ink2); }
.pc-seller b { font-weight: 700; }
.pc-meta { font-size: 11px; color: var(--green); font-weight: 700; }
.pc.list { display: grid; grid-template-columns: 148px 1fr auto; }
.pc.list .pc-img { aspect-ratio: 1; }
.shop-grid.list { display: flex; flex-direction: column; gap: 10px; }
.shop-grid.list .pc { display: grid; grid-template-columns: 140px 1fr; }
.shop-grid.list .pc-actions { grid-column: 2; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-lt); color: var(--blue); border-radius: 999px; padding: 5px 8px 5px 10px; font-size: 12px; font-weight: 700; }
.chip-x button { color: var(--blue); font-weight: 800; }
.preset { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.preset button, .filter-checks button {
  border: 1.5px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 11.5px; font-weight: 700; color: var(--ink2);
}
.preset button.on, .filter-checks button.on { border-color: var(--blue); background: var(--blue-lt); color: var(--blue); }
.filter-checks { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.mobile-only { display: none; }
.seller-box { display: grid; grid-template-columns: 1fr auto; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 14px; background: var(--surface-2); }
.seller-box a { font-weight: 800; color: var(--blue); }
.offer-list { margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.offer-list li { font-size: 13px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 7px 10px; }
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.trust-row article { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.trust-row strong { display: block; margin-bottom: 4px; }
.pdp-sticky { position: sticky; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--border); padding: 10px 0; display: none; z-index: 40; }
.ship-bar { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.ship-bar span { display: block; height: 100%; background: #16a34a; }
.skel { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 12px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.empty-state { text-align: center; padding: 36px 16px; background: #fff; border: 1px dashed var(--border); border-radius: 16px; }
.empty-state h2 { font-size: 1.25rem; margin: 6px 0; }
.zoom-open { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(15,23,42,.88); z-index: 800; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.on { display: flex; }
.lightbox img { max-width: min(920px, 92vw); max-height: 86vh; object-fit: contain; background: #fff; border-radius: 12px; }
.qv { max-width: 760px; }
.home-band { padding: 8px 0 28px; }
@media (max-width: 1100px) {
  .nav-wish { display: none; }
  .nav-search { flex: 1; min-width: 0; }
}
.mob-search { padding: 12px 14px 0; }
.mob-search input { width: 100%; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; }
.compare-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: #0f1729; color: #fff; border-radius: 14px; padding: 10px 12px; display: none; gap: 8px; align-items: center; z-index: 70; }
.compare-bar.on { display: flex; }
@media (max-width: 900px) {
  .trust-row { grid-template-columns: 1fr 1fr; }
  .mobile-only { display: inline-flex; }
  .shop-layout aside { display: none; }
  .shop-layout aside.open { display: block; }
  .pdp-sticky { display: block; }
  .mega.open { grid-template-columns: 1fr 1fr; }
}
.legal-ov { position: fixed; inset: 0; background: rgba(15,23,42,.72); z-index: 900; display: none; align-items: flex-end; justify-content: center; padding: 16px; }
.legal-ov.on { display: flex; }
.legal-box { background: #fff; width: min(760px, 100%); max-height: min(86vh, 820px); overflow: auto; border-radius: 16px 16px 12px 12px; padding: 22px 22px 18px; position: relative; }
.legal-box h1 { font-size: 1.45rem; margin: 0 0 8px; }
.legal-box h2 { font-size: 1.05rem; margin: 16px 0 6px; }
.legal-box p, .legal-box li { font-size: 14px; line-height: 1.65; color: var(--ink2); }
.legal-box ul { margin: 6px 0 0 18px; }
.legal-doc { max-width: 760px; }
.legal-doc h1 { font-size: 1.8rem; margin-bottom: 8px; }
.legal-doc h2 { font-size: 1.1rem; margin: 18px 0 6px; }
.legal-doc p, .legal-doc li { line-height: 1.7; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-pays a { color: #1a56db; font-weight: 700; margin-left: 14px; text-decoration: underline; }
