/* QUVELIO STAGE 8 — visual/mobile polish only.
   Loaded after Stage 7. No third-party fonts or scripts, no payment/checkout rules. */
:root { --q8-accent:#273d5b; --q8-paper:#fbfcfe; --q8-border:#e1e7ed; --q8-ink:#172233; }
html { scroll-padding-top:90px; }
body { -webkit-font-smoothing:antialiased; }
img { height:auto; }
main, .wrap, .qv4-detail-grid, .qv4-demo-card, .qv5-gallery { min-width:0; }
button, a, input, select { -webkit-tap-highlight-color:transparent; }
:where(a,button,input,select,textarea,summary):focus-visible { outline:3px solid #4d81c4; outline-offset:3px; }
.qv8-skip-link { position:fixed; top:10px; left:12px; z-index:10002; background:#fff; color:#0d2136; padding:11px 16px; border:2px solid #4576b3; border-radius:8px; transform:translateY(-150%); }
.qv8-skip-link:focus { transform:translateY(0); }
/* Navigation refinement; retain existing menu behavior and layout. */
.site-header { box-shadow:0 4px 20px rgba(19,34,54,.035); }
.header-row { min-width:0; }
.wordmark { flex-shrink:0; }
.desktop-nav a { white-space:nowrap; border-radius:6px; transition:color .18s; }
.desktop-nav a:hover { color:#465d7d; text-decoration:none; }
.header-tools { white-space:nowrap; }
.top-offer { letter-spacing:.01em; }
/* Hero, intentionally neutral: not a representation of any real Apple device. */
.q-hero { background:radial-gradient(ellipse at 77% 42%, #3d4d64 0, #1b2536 40%, #0c111a 78%); }
.q-hero:before { content:""; pointer-events:none; position:absolute; width:clamp(320px,46vw,750px); height:clamp(320px,46vw,750px); right:-12%; top:-40%; border:1px solid rgba(218,229,245,.10); border-radius:50%; box-shadow:0 0 0 62px rgba(200,219,244,.025),0 0 0 140px rgba(200,219,244,.018); }
.q-hero-inner { min-height:550px; }
.q-hero-content { max-width:670px; }
.q-hero h1 { font-weight:760; line-height:1.02; text-wrap:balance; }
.q-hero-sub { max-width:540px; }
.q-button-white { min-height:51px; transition:transform .2s,box-shadow .2s; }
.q-button-white:hover { box-shadow:0 10px 25px rgba(0,0,0,.16); }
.qv8-benefit-bar { background:#fff; border-bottom:1px solid #edf0f4; }
.qv8-benefit-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; }
.qv8-benefit { min-width:0; display:flex; align-items:flex-start; gap:15px; padding:24px 22px; }
.qv8-benefit:not(:last-child) { border-right:1px solid #e7ebef; }
.qv8-benefit-mark { display:inline-grid; place-items:center; flex:0 0 36px; height:36px; border:1px solid #d9e1ea; border-radius:50%; font-size:11px; font-weight:800; color:#61738e; }
.qv8-benefit>div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.qv8-benefit-eyebrow { color:#778395; font-size:10px; text-transform:uppercase; letter-spacing:.12em; font-weight:780; }
.qv8-benefit strong { font-size:14px; font-weight:800; line-height:1.35; color:#1c2b3c; }
.qv8-benefit small { font-size:12px; line-height:1.5; color:#6a7686; }
/* Categories and content hierarchy */
.q-cat-section { padding-top:80px; padding-bottom:88px; }
.q-section-header h2 { text-wrap:balance; }
.q-category-grid { gap:17px; }
.qv3-category-card { border-radius:18px; min-height:258px; box-shadow:0 2px 9px rgba(20,35,50,.018); }
.qv3-category-card strong { z-index:2; }
.qv3-category-card .q-cat-index,.qv3-category-card .q-cat-link { z-index:2; }
.qv3-category-photo { z-index:1; }
.qv3-category-card:hover { box-shadow:0 20px 40px rgba(20,35,50,.10); }
.q-products-section { padding-top:80px; padding-bottom:85px; }
.q-story-section { padding-top:90px; padding-bottom:95px; }
.q-story-panel { box-shadow:0 16px 40px rgba(9,21,37,.085); }
/* Demo inventory and regular cards: consistent imagery, readable actions. */
.qv4-demo-grid { gap:16px; }
.qv4-demo-card { border-radius:18px; }
.qv5-card .qv4-demo-art { height:auto; aspect-ratio:1.20 / 1; min-height:0; }
.qv5-card .qv4-demo-art img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:18px; }
.qv4-demo-art .qv4-demo-pill { z-index:2; }
.qv5-card .qv4-demo-content { min-height:240px; }
.qv4-demo-content h3 { overflow-wrap:anywhere; }
.qv4-demo-button { margin-top:10px; min-height:42px; display:grid; place-items:center; }
.qv4-demo-button:focus-visible, .qv4-demo-art:focus-visible { outline:3px solid #4d81c4; outline-offset:3px; }
.qv4-demo-price strong { font-variant-numeric:tabular-nums; }
.catalog-grid { gap:17px; }
.catalog-product-card { border-radius:18px; }
.catalog-product-image { aspect-ratio:1.20 / 1; }
.catalog-product-body { padding:18px; }
/* Filter controls remain usable when the catalog is populated. */
.catalog-filter-panel { border-color:var(--q8-border); box-shadow:0 8px 26px rgba(16,33,55,.035); }
.catalog-filter-panel input[type="search"],.catalog-filter-panel input[type="number"],.catalog-filter-panel select { min-height:44px; }
.qv3-category-tabs { scrollbar-width:thin; }
.qv3-category-tabs a { min-height:43px; }
.catalog-result-bar { margin-top:22px; }
/* Product demo gallery */
.qv4-detail-shell { padding-top:28px; }
.qv4-detail-grid { gap:clamp(20px,4vw,70px); }
.qv5-gallery-main { background:linear-gradient(145deg,#f2f5f9,#e7edf4); }
.qv5-gallery-thumb { transition:border-color .18s,background .18s; }
.qv5-gallery-thumb:hover { background:#f6f9fc; }
.qv4-demo-variants a { min-height:44px; display:inline-flex; align-items:center; }
.qv5-specs { background:#f8fafc; }
/* Footer links on touch devices */
.mega-footer { background:#f8fafc; }
.footer-columns { gap:clamp(16px,2.5vw,40px); }
.footer-columns a,.footer-cookie-settings { text-underline-offset:3px; }
.footer-columns a:hover { text-decoration:underline; }
/* Tablet: smooth grids without horizontal clipping */
@media (max-width:1200px) {
  .desktop-nav { gap:9px; font-size:11px; }
  .header-row { gap:11px; }
  .header-tools { gap:9px; }
}
@media (max-width:1050px) {
  .q-hero-inner { min-height:490px; }
  .q-hero-content { padding:85px 0; }
  .q-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .qv8-benefit { padding:20px 12px; gap:9px; }
  .qv8-benefit strong { font-size:13px; }
  .qv8-benefit-mark { flex-basis:30px; height:30px; }
  .qv4-detail-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
}
@media (max-width:740px) {
  .wrap { width:calc(100% - 32px); }
  .q-hero-inner { min-height:470px; }
  .q-hero-content { padding:73px 0; }
  .q-hero h1 { font-size:clamp(43px,9.3vw,68px); letter-spacing:-2.5px; }
  .q-hero-sub { font-size:16px; }
  .q-hero-bottom { padding:14px 17px; letter-spacing:1.1px; }
  .qv8-benefit-grid { grid-template-columns:1fr; }
  .qv8-benefit { align-items:center; padding:14px 0; }
  .qv8-benefit:not(:last-child) { border-right:0; border-bottom:1px solid #edf1f5; }
  .qv8-benefit>div { gap:2px; }
  .qv8-benefit strong { font-size:14px; }
  .qv8-benefit small { font-size:12px; }
  .q-cat-section,.q-products-section,.q-story-section { padding-top:54px; padding-bottom:62px; }
  .q-category-grid { gap:12px; }
  .qv3-category-card { border-radius:13px; min-height:210px; padding:18px; }
  .qv3-category-card strong { font-size:20px; max-width:95%; }
  .qv4-demo-grid { gap:12px; }
  .qv5-card .qv4-demo-art { aspect-ratio:1 / 1; }
  .qv5-card .qv4-demo-content { min-height:220px; }
  .qv5-card .qv4-demo-content h3 { font-size:15px; }
  .catalog-filter-panel { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .catalog-search-field { grid-column:1/-1; }
  .catalog-filter-actions { grid-column:1/-1; display:flex; justify-content:space-between; }
  .catalog-checkboxes { grid-column:1/-1; }
  .catalog-filter-panel input[type="search"],.catalog-filter-panel input[type="number"],.catalog-filter-panel select { width:100%; }
  .qv4-detail-grid { grid-template-columns:1fr; }
  .qv5-gallery-thumbs { justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; padding:3px 0 8px; }
  .qv5-gallery-thumb { flex:0 0 auto; }
  .qv5-specs { margin-top:42px; }
  .footer-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .header-row { display:grid; grid-template-columns:minmax(0,1fr) 44px auto; gap:8px; min-height:62px; padding:8px 0; }
  .wordmark { grid-column:1; font-size:24px; overflow:hidden; text-overflow:ellipsis; }
  .mobile-menu-toggle { grid-column:2; min-width:44px; justify-self:center; }
  .header-tools { grid-column:3; width:auto; gap:7px; }
  .header-tools .account-link { display:none; } /* account remains accessible inside mobile menu */
  .cart-link { font-size:0; gap:5px; }
  .cart-link::before { content:""; display:none; }
  .cart-link::after { content:""; width:17px; height:16px; display:block; border:2px solid #1d293a; border-top:0; border-radius:2px 2px 4px 4px; transform:skew(-5deg); }
  .cart-link span { font-size:10px; width:21px; height:21px; }
  .mobile-menu-inner { width:min(380px,94vw); padding:17px 19px; }
  .mobile-nav { overflow-y:auto; min-height:0; padding:10px 0; }
  .mobile-nav a { min-height:46px; font-size:16px; }
  .mobile-menu-footer { padding-top:12px; }
  .q-hero-inner { min-height:445px; }
  .q-hero h1 { font-size:clamp(40px,11vw,58px); }
  .q-hero-sub { font-size:15px; line-height:1.6; }
  .q-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .qv3-category-card { padding:14px; min-height:176px; }
  .qv3-category-card strong { font-size:16px; padding:5px 8px; }
  .qv3-category-card .q-cat-index { font-size:10px; }
  .qv3-category-photo { width:94%; height:72%; }
  .qv3-category-card .q-cat-link { right:12px; bottom:11px; width:30px; height:30px; font-size:19px; }
  .q-section-header h2 { letter-spacing:-1.3px; }
  .qv4-demo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .qv5-card .qv4-demo-art { aspect-ratio:1.05 / 1; }
  .qv5-card .qv4-demo-art img { padding:10px; }
  .qv4-demo-art .qv4-demo-pill { top:8px; left:8px; font-size:9px; padding:4px 7px; }
  .qv5-card .qv4-demo-content { min-height:245px; padding:12px; gap:7px; }
  .qv5-card .qv4-demo-content h3 { font-size:14px; }
  .qv4-demo-content small { font-size:9px; }
  .qv4-demo-price strong { font-size:17px; }
  .qv5-card-variant-badge { font-size:10px; }
  .qv4-demo-button { font-size:11px; padding:11px 8px; }
  .qv4-detail-info h1 { font-size:clamp(30px,8vw,43px); }
  .qv5-gallery-main { aspect-ratio:1 / 1; }
  .qv5-specs-list>div { grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr); }
  .footer-columns { gap:28px 16px; }
  .footer-columns a,.footer-columns p { overflow-wrap:anywhere; }
}
@media (max-width:360px) {
  .wrap { width:calc(100% - 24px); }
  .qv4-demo-grid { grid-template-columns:1fr; }
  .qv5-card .qv4-demo-art { aspect-ratio:1.25 / 1; }
  .qv5-card .qv4-demo-content { min-height:auto; }
  .q-category-grid { grid-template-columns:1fr; }
  .qv3-category-card { min-height:185px; }
  .catalog-filter-panel { grid-template-columns:1fr; }
  .catalog-filter-panel>label { grid-column:1/-1; }
  .footer-columns { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .qv4-demo-card,.qv3-category-card,.q-button,.qv3-category-photo,.qv5-card .qv4-demo-art img { transition:none !important; }
  .qv4-demo-card:hover,.qv3-category-card:hover,.q-button:hover { transform:none !important; }
}
