/* =========================================================
   Ecommerce Blaze — inner pages (shop, product, cart, checkout, order)
   Builds on the tokens/components in styles.css
   ========================================================= */
.container-wide { width: min(1400px, calc(100% - 48px)); }
.page-pad { padding-top: 40px; padding-bottom: 96px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.h-count { color: var(--muted); font-weight: 500; font-size: .6em; vertical-align: middle; }

/* ---------- Page hero ---------- */
.page-hero { padding: 36px 0 40px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 260px at 85% 0%, #ebebf6 0%, rgba(235, 235, 246, 0) 70%), #f8f8fc; }
.page-hero .breadcrumb { margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; }
.page-hero p { max-width: 620px; margin-top: 10px; color: var(--muted); font-size: 17px; }
.page-hero.compact { padding: 28px 0 30px; }

/* =========================================================
   SHOP
   ========================================================= */
.shop-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); align-items: start; gap: 40px; padding-top: 36px; padding-bottom: 96px; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100dvh - var(--header-h) - 40px); display: flex; flex-direction: column; overflow: hidden; }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.filters-head h2 { font-size: 20px; }
.filters-close, .filters-foot, .filters-overlay { display: none; }
.filters-body { overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.f-group { margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); }
.f-group legend { float: left; width: 100%; margin-bottom: 10px; padding: 0; color: var(--ink); font-size: 14px; font-weight: 700; }
.f-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--muted); clear: both; }
.f-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.f-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 400 14px var(--font-body); color: var(--ink); }
.f-group .check, .f-group .radio { clear: both; }
.radio .stars svg.lucide { width: 14px; height: 14px; }

.range { position: relative; height: 28px; clear: both; }
.range::before, .range::after { content: ''; position: absolute; top: 12px; height: 4px; border-radius: 4px; }
.range::before { left: 0; right: 0; background: #e2e8f0; }
.range::after { left: var(--lo); right: calc(100% - var(--hi)); background: var(--primary); }
.range input { position: absolute; inset: 0; z-index: 1; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input::-webkit-slider-thumb { width: 20px; height: 20px; border: 3px solid var(--primary); border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; pointer-events: auto; -webkit-appearance: none; }
.range input::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid var(--primary); border-radius: 50%; background: #fff; cursor: pointer; pointer-events: auto; }
.range input::-moz-range-track { background: none; }
.range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--primary-ring); }
.price-inputs { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; color: var(--muted); }
.price-inputs label { flex: 1; display: grid; gap: 4px; font-size: 12px; font-weight: 600; }
.price-inputs input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; font: 500 14px var(--font-body); color: var(--ink); }
.price-inputs input:focus { border-color: var(--primary); }
.price-inputs > span { padding-bottom: 10px; }

.shop-toolbar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; scroll-margin-top: calc(var(--header-h) + 16px); }
.filter-toggle { display: none; }
.filter-toggle b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 20px; background: var(--primary); color: #fff; font-size: 11px; }
.filter-toggle b:empty { display: none; }
.result-count { display: flex; align-items: baseline; gap: 8px; margin-right: auto; font-size: 15px; }
.result-count strong { font: 600 18px var(--font-head); }
.result-count span { color: var(--muted); font-size: 13.5px; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.sort-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.sort-select select { height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--ink); font: 600 14px var(--font-body); cursor: pointer; -webkit-appearance: none; appearance: none; }
.sort-select select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.view-toggle { display: flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 10px; }
.view-toggle .icon-btn { width: 34px; height: 32px; border-radius: 7px; }
.view-toggle .icon-btn svg.lucide { width: 17px; height: 17px; }
.view-toggle [aria-pressed='true'] { background: var(--primary-soft); color: var(--primary); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.active-filters:empty { display: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border: 1px solid #d4d5ea; border-radius: 30px; background: var(--primary-soft); color: #3a3c74; font-size: 13px; font-weight: 600; cursor: pointer; }
.filter-chip svg.lucide { width: 14px; height: 14px; }
.filter-chip:hover { border-color: var(--primary); }

.shop-main .p-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1440px) { .shop-main .p-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.p-grid.is-list { grid-template-columns: 1fr !important; }
.p-grid.is-list .p-card { flex-direction: row; }
.p-grid.is-list .p-media { flex: 0 0 300px; aspect-ratio: auto; min-height: 220px; border-right: 1px solid var(--line); border-bottom: 0; }
.p-grid.is-list .p-body { padding: 22px 24px; gap: 8px; }
.p-grid.is-list .p-title { font-size: 21px; }
.p-grid.is-list .p-summary { display: block; max-width: 620px; }
.p-grid.is-list .p-foot .btn-icon { width: auto; padding: 0 16px; }
.p-grid.is-list .p-foot .btn-icon span { display: inline; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 48px; }
.pagination:empty { display: none; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; transition: all .15s; }
a.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.is-current { border-color: var(--primary); background: var(--primary); color: #fff; }
.page-btn.is-disabled { opacity: .45; }
.page-btn svg.lucide { width: 16px; height: 16px; }
.page-gap { padding: 0 4px; color: var(--muted); }

/* =========================================================
   PRODUCT DETAILS
   ========================================================= */
.pd-crumbs { padding-top: 24px; }
.pd-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; padding-top: 24px; padding-bottom: 56px; }
.gallery-stage { position: relative; aspect-ratio: 4 / 3.2; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.gallery-track { display: flex; height: 100%; transition: transform .45s cubic-bezier(.22, .61, .36, 1); will-change: transform; }
.gallery-stage.is-dragging .gallery-track { transition: none; }
.gallery-slide { flex: 0 0 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; scale: 1.03; }
.gallery-stage > .badge { z-index: 2; top: 16px; left: 16px; }
.gallery-zoom-hint { position: absolute; z-index: 2; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 30px; background: rgba(15, 29, 49, .78); color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .2s; }
.gallery-zoom-hint:hover, .gallery-zoom-hint:focus-visible { background: rgba(15, 29, 49, .95); }

/* Full-size image viewer (lightbox) */
.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 16, 28, .96); color: #fff; overflow: hidden; }
.lightbox[open] { display: flex; flex-direction: column; animation: lb-in .2s ease-out; }
.lightbox::backdrop { background: rgba(10, 16, 28, .6); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.lb-title { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.lb-counter { font-size: 14px; font-variant-numeric: tabular-nums; opacity: .8; }
.lb-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; transition: background .2s; }
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255, 255, 255, .22); color: #fff; }
.lb-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.lb-track { display: flex; height: 100%; transition: transform .4s cubic-bezier(.22, .61, .36, 1); }
.lb-stage.is-dragging .lb-track { transition: none; }
.lb-slide { display: flex; flex: 0 0 100%; align-items: center; justify-content: center; height: 100%; margin: 0; padding: 8px 72px; }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transform: translateY(-50%); transition: background .2s; }
.lb-nav:hover, .lb-nav:focus-visible { background: rgba(255, 255, 255, .25); }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }
.lb-thumbs { display: flex; justify-content: safe center; gap: 10px; padding: 14px 18px 18px; overflow-x: auto; scrollbar-width: thin; }
.lb-thumb { flex: 0 0 auto; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: rgba(255, 255, 255, .06); opacity: .55; cursor: pointer; overflow: hidden; transition: opacity .2s, border-color .2s; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.is-active { border-color: #fff; opacity: 1; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .lb-slide { padding: 4px 8px; }
  .lb-nav { width: 40px; height: 40px; background: rgba(0, 0, 0, .45); }
  .lb-nav.prev { left: 8px; }
  .lb-nav.next { right: 8px; }
  .lb-thumb { width: 56px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-track, .lightbox[open] { transition: none; animation: none; }
}
.gallery-zoom-hint svg.lucide { width: 15px; height: 15px; }
.gallery-nav { position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: var(--shadow-md); cursor: pointer; transform: translateY(-50%); transition: color .2s, transform .2s; }
.gallery-nav:hover { color: var(--primary); }
.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }
.gallery-counter { position: absolute; z-index: 2; left: 16px; bottom: 16px; padding: 5px 11px; border-radius: 30px; background: rgba(15, 29, 49, .78); color: #fff; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.gallery-thumbs-wrap { position: relative; margin-top: 14px; }
.gallery-thumbs { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.thumbs-nav { position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); box-shadow: var(--shadow-md); cursor: pointer; transform: translateY(-50%); transition: color .2s; }
.thumbs-nav:hover { color: var(--primary); }
.thumbs-nav[hidden] { display: none; }
.thumbs-nav.prev { left: -12px; }
.thumbs-nav.next { right: -12px; }
.thumbs-nav svg.lucide { width: 16px; height: 16px; }
.gallery-thumb { flex: 0 0 calc((100% - 48px) / 5); scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; }
.gallery-thumb img { width: 100%; aspect-ratio: 4 / 3; border: 2px solid var(--line); border-radius: 12px; object-fit: cover; transition: border-color .2s; }
.gallery-thumb:hover img { border-color: #c4c5e2; }
.gallery-thumb.is-active { color: var(--ink); }
.gallery-thumb.is-active img { border-color: var(--primary); }

.pd-info { display: flex; flex-direction: column; gap: 16px; }
.pd-tags { display: flex; gap: 8px; }
.pd-tags a.tag { text-decoration: none; }
.pd-info h1 { font-size: clamp(32px, 3.6vw, 46px); letter-spacing: -.03em; }
.pd-rating { display: inline-flex; align-items: center; gap: 8px; width: max-content; color: var(--ink); font-size: 15px; text-decoration: none; }
.pd-rating span:last-child { color: var(--muted); }
.pd-rating:hover span:last-child { color: var(--primary); text-decoration: underline; }
.pd-summary { color: var(--muted); font-size: 17px; line-height: 1.65; }
.pd-price { padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pd-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pd-price-row strong { font: 600 40px/1 var(--font-head); letter-spacing: -.02em; }
.pd-price-row s { color: var(--muted); font-size: 20px; }
.pd-price small { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.qty-label { display: flex; align-items: center; gap: 14px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.pd-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-demo { grid-column: 1 / -1; }
.pd-demo-access { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pd-demo-access h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.pd-demo-access h3 svg.lucide { width: 18px; height: 18px; color: var(--primary); }
.pd-demo-logins { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pd-demo-login { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.pd-demo-login-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.pd-demo-login-head a { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pd-demo-login-head a svg.lucide { width: 14px; height: 14px; }
.pd-demo-login dl { display: grid; gap: 6px; margin: 0; }
.pd-demo-login dl div { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 13.5px; }
.pd-demo-login dt { color: var(--muted); }
.pd-demo-login dd { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.pd-demo-login code { overflow: hidden; padding: 3px 8px; border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pd-copy { display: inline-grid; flex: none; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink-2); cursor: pointer; }
.pd-copy:hover { border-color: var(--primary); color: var(--primary); }
.pd-copy svg.lucide { width: 14px; height: 14px; }
.pd-secondary { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.pd-link { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; border: 0; background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.pd-link:hover { color: var(--primary); }
.pd-link.is-active { color: var(--danger); }
.pd-link.is-active svg.lucide { fill: currentColor; }
.pd-guarantees { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 16px 18px; border-radius: 14px; background: var(--surface); }
.pd-guarantees li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.pd-guarantees svg.lucide { color: var(--success); width: 17px; height: 17px; }
.pd-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 0; font-size: 14px; }
.pd-meta div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.pd-meta dt { color: var(--muted); }
.pd-meta dd { margin: 0; font-weight: 600; text-align: right; }
.pd-meta a { color: var(--primary); text-decoration: none; }

.pd-tabs { position: sticky; top: var(--header-h); z-index: 20; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .97); }
.pd-tabs ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.pd-tabs ul::-webkit-scrollbar { display: none; }
.pd-tabs a { display: block; padding: 16px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: color .2s, border-color .2s; }
.pd-tabs a:hover { color: var(--ink); }
.pd-tabs a.is-active { border-color: var(--primary); color: var(--primary); }

.pd-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 56px; padding-top: 16px; padding-bottom: 80px; }
/* html already adds scroll-padding for the header; this only covers the sticky tab bar (no-JS fallback). */
.pd-section { padding: 40px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 48px; }
.pd-section:last-child { border-bottom: 0; }
.pd-section > h2 { margin-bottom: 20px; font-size: 26px; }
.pd-section > p { max-width: 720px; margin-bottom: 18px; color: var(--ink-2); }

.prose { max-width: 760px; color: var(--ink-2); font-size: 16.5px; line-height: 1.75; }
.prose > * + * { margin-top: 16px; }
.prose h3 { margin-top: 28px; font-size: 20px; }
.prose ul, .prose ol { padding-left: 22px; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--primary); }
.prose a { color: var(--primary); }
.prose img { border-radius: 12px; border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; }
.prose th, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { width: 34%; background: var(--surface); color: var(--ink); font-weight: 600; }
.prose tr:last-child th, .prose tr:last-child td { border-bottom: 0; }

.pd-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pd-feature { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.pd-feature .feature-icon { width: 42px; height: 42px; margin: 0; flex: none; border-radius: 12px; }
.pd-feature .feature-icon svg.lucide { width: 20px; height: 20px; }
.pd-feature strong { display: block; font-size: 15.5px; }
.pd-feature small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); }
.check-list svg.lucide { width: 18px; height: 18px; margin-top: 3px; padding: 2px; border-radius: 50%; background: #e8f7ee; color: var(--success); stroke-width: 3; }
.check-list.muted svg.lucide { background: var(--surface); color: var(--muted); }
.changelog { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.changelog li { position: relative; padding: 0 0 22px 24px; }
.changelog li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--line); }
.cl-version { margin-right: 10px; padding: 2px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 700; }
.changelog time { color: var(--muted); font-size: 13.5px; }
.changelog p { margin-top: 6px; color: var(--ink-2); }

.pd-aside { position: sticky; top: calc(var(--header-h) + 76px); padding-top: 40px; }
.purchase-box { display: grid; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-md); }
.pb-head { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 12px; }
.pb-head img { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 12px; object-fit: cover; object-position: top; }
.pb-head strong { display: block; font: 600 17px var(--font-head); }
.pb-price { display: grid; gap: 4px; }
.pb-price .price strong { font-size: 28px; }
.pb-price small { color: var(--muted); font-size: 13px; }
.purchase-box .qty-label { justify-content: space-between; }
.pb-total { display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.pb-total strong { font: 600 20px var(--font-head); }
.pb-secure, .secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; text-align: center; }
.pb-secure svg.lucide, .secure-note svg.lucide { width: 15px; height: 15px; color: var(--success); }

.review-summary { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; align-items: center; gap: 32px; padding: 28px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.rs-score { display: grid; justify-items: center; gap: 4px; text-align: center; }
.rs-score strong { font: 600 52px/1 var(--font-head); }
.rs-score > span { color: var(--muted); font-size: 14px; }
.rs-score small { color: var(--muted); font-size: 13px; }
.rs-bars { display: grid; gap: 8px; }
.rs-bars li { display: grid; grid-template-columns: 38px 1fr 34px; align-items: center; gap: 10px; font-size: 14px; }
.rs-bars li > span:first-child { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.rs-bars svg.lucide { width: 13px; height: 13px; color: var(--amber); fill: var(--amber); }
.rs-bars .bar { height: 8px; overflow: hidden; border-radius: 8px; background: #e2e8f0; }
.rs-bars .bar span { display: block; height: 100%; border-radius: 8px; background: var(--amber); }
.rs-bars em { color: var(--muted); font-style: normal; text-align: right; }
.rs-action { max-width: 220px; }
.review-note { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 14px; }
.review-note svg.lucide { width: 16px; height: 16px; margin-top: 3px; }
.review-form { display: grid; gap: 12px; padding: 24px; margin-bottom: 24px; border: 1px solid #d4d5ea; border-radius: 18px; background: #fbfdff; }
.review-form h3 { font-size: 19px; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 0; padding: 0; border: 0; }
.star-input legend { float: left; width: 100%; margin-bottom: 6px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.star-input input { position: absolute; opacity: 0; width: 1px; }
.star-input label { color: #d5dde8; cursor: pointer; }
.star-input label svg.lucide { width: 30px; height: 30px; fill: currentColor; stroke-width: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--amber); }
.star-input input:focus-visible + label { outline: 2px solid var(--primary-ring); border-radius: 6px; }
.field { display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.field textarea, .field input, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; background: #fff; color: var(--ink); font: 400 15px var(--font-body); resize: vertical; transition: border-color .2s, box-shadow .2s; }
.field textarea:focus, .field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.review-list { display: grid; gap: 16px; }
.review-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; }
.review-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-card header > span:nth-child(2) { flex: 1; line-height: 1.3; }
.review-card header strong { display: block; font-size: 15px; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-size: 12.5px; font-weight: 600; }
.verified svg.lucide { width: 14px; height: 14px; }
.rc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--muted); font-size: 13px; }
.review-card p { color: var(--ink-2); line-height: 1.7; }

.related .p-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mobile-buy-bar { display: none; }

.zoom-modal { width: min(980px, calc(100% - 32px)); }
.zoom-card { display: flex; flex-direction: column; height: min(860px, calc(100dvh - 32px)); overflow: hidden; }
.zoom-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.zoom-body { flex: 1; overflow-y: auto; background: var(--surface); overscroll-behavior: contain; }
.zoom-body img { width: 100%; height: auto; }

/* =========================================================
   CART
   ========================================================= */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 40px; }
.cart-items { min-width: 0; }
.is-loading .cart-layout { opacity: .6; transition: opacity .2s; }
.cart-head { display: grid; grid-template-columns: 1fr 140px 120px; gap: 20px; padding: 0 0 12px 116px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cart-head span:last-child { text-align: right; }
.cart-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 140px 120px; align-items: center; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cr-thumb img { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 14px; object-fit: cover; object-position: top; }
.cr-info { display: grid; gap: 4px; min-width: 0; }
.cr-info h3 { font-size: 18px; }
.cr-info h3 a { color: inherit; text-decoration: none; }
.cr-info h3 a:hover { color: var(--primary); }
.cr-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.text-action { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; border: 0; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.text-action svg.lucide { width: 15px; height: 15px; }
.text-action:hover { color: var(--primary); }
.text-action.danger:hover { color: var(--danger); }
.cr-total { display: grid; justify-items: end; gap: 2px; }
.cr-total small { display: none; color: var(--muted); font-size: 12px; }
.cr-total strong { font: 600 19px var(--font-head); }
.cart-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; }
.cart-foot small { color: var(--muted); font-size: 13.5px; }
.link-arrow.back:hover svg.lucide { transform: translateX(-3px); }
.order-summary { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-md); }
.order-summary h2 { font-size: 22px; }
.summary-coupon { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-label { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.summary-label svg.lucide { width: 16px; height: 16px; color: var(--primary); }
.pay-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pay-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.pay-badge svg.lucide { width: 15px; height: 15px; }
.saved-later { margin-top: 40px; }
.saved-later h2 { margin-bottom: 16px; font-size: 20px; }
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.saved-item { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.saved-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; object-position: top; }
.si-info { display: grid; gap: 2px; min-width: 0; }
.si-info a { color: var(--ink); text-decoration: none; }
.si-info .price strong { font-size: 16px; }
.si-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cart-suggest { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.cart-suggest .section-head h2 { font-size: 28px; }

/* =========================================================
   CHECKOUT
   ========================================================= */
.checkout-page { background: var(--surface); }
.checkout-header { border-bottom: 1px solid var(--line); }
.checkout-header .header-inner { justify-content: space-between; }
.secure-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #cdebd7; border-radius: 30px; background: #f0faf3; color: var(--success); font-size: 13.5px; font-weight: 700; }
.secure-pill svg.lucide { width: 15px; height: 15px; }
.link-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.link-back:hover { color: var(--primary); }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: start; gap: 40px; }
.co-main h1 { margin: 6px 0 22px; font-size: clamp(28px, 3.4vw, 38px); }
.co-steps { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.co-steps li { display: flex; align-items: center; gap: 8px; }
.co-steps li + li::before { content: ''; width: 28px; height: 2px; margin-right: 2px; border-radius: 2px; background: var(--line-strong); }
.co-steps b, .co-steps li > svg.lucide { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; color: var(--muted); font-size: 12px; }
.co-steps .done svg.lucide { padding: 5px; background: var(--success); color: #fff; stroke-width: 3; }
.co-steps .current { color: var(--ink); }
.co-steps .current b { background: var(--primary); color: #fff; }
.co-form { display: grid; gap: 20px; }
.co-section { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.co-section h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 20px; }
.co-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font: 700 14px var(--font-body); }
.customer-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.customer-card > span:nth-child(2) { flex: 1; line-height: 1.4; min-width: 0; }
.customer-card strong { display: block; font-size: 15px; }
.customer-card small { color: var(--muted); font-size: 13.5px; }
.icon-wrap { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: #fff; color: var(--primary); border: 1px solid var(--line); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field-grid .field { grid-column: 1 / -1; }
.field-grid .field.half { grid-column: auto; }
.field label { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.field .req { color: var(--danger); }
.field select { height: 48px; padding-top: 0; padding-bottom: 0; -webkit-appearance: none; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field input { height: 48px; }
.field.has-error input, .field.has-error select { border-color: var(--danger); background: #fffafb; }
.field.has-error input:focus, .field.has-error select:focus { box-shadow: 0 0 0 3px #ffe4e9; }
.field-hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.field-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 13.5px; }
.field-note svg.lucide { width: 16px; height: 16px; color: var(--primary); }
.gateways { display: grid; gap: 12px; }
.gateway { position: relative; display: grid; grid-template-columns: 22px 46px 1fr auto; align-items: center; gap: 14px; min-height: 76px; padding: 16px 18px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.gateway input { position: absolute; opacity: 0; }
.gateway:hover { border-color: #a9abd6; }
.gateway:has(input:checked) { border-color: var(--primary); background: #f7f7fc; box-shadow: 0 0 0 3px var(--primary-soft); }
.gateway:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-ring); }
.gw-radio { width: 22px; height: 22px; border: 2px solid #b9c6d6; border-radius: 50%; background: #fff; transition: border .15s; }
.gateway input:checked ~ .gw-radio { border: 7px solid var(--primary); }
.gw-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.gw-icon svg.lucide { width: 22px; height: 22px; }
.gw-text { line-height: 1.4; }
.gw-text strong { display: block; font-size: 15.5px; }
.gw-text small { color: var(--muted); font-size: 13.5px; }
.gw-brands { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 150px; }
.gw-brands span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.demo-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 12px 14px; border: 1px dashed #f0c46c; border-radius: 12px; background: #fffbf0; color: #7a520c; font-size: 13.5px; }
.demo-box label { display: inline-flex; align-items: center; gap: 6px; }
.demo-box svg.lucide { width: 16px; height: 16px; }
.demo-box select { max-width: 100%; height: 36px; padding: 0 10px; border: 1px solid #ecd39b; border-radius: 8px; background: #fff; font: 500 13.5px var(--font-body); }
.co-summary { position: sticky; top: calc(var(--header-h) + 20px); }
.co-summary-inner { display: grid; gap: 18px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-md); }
.co-summary h2 { font-size: 20px; }
.co-summary .summary-lines { max-height: 300px; overflow-y: auto; padding: 8px 4px 4px 0; }
.terms { position: relative; display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.5; cursor: pointer; }
.terms .check-box { margin-top: 1px; }
.terms a { color: var(--primary); }
.terms.has-error .check-box { border-color: var(--danger); }
[data-error="terms"] { margin-top: -10px; }
.pay-btn { height: 56px; font-size: 16px; }
.co-mobile-bar { display: none; }
.processing-modal { width: min(420px, calc(100% - 32px)); }
.processing-card { display: grid; justify-items: center; gap: 12px; padding: 40px 32px; text-align: center; }
.processing-card h2 { margin-top: 8px; font-size: 24px; }
.processing-card p { color: var(--muted); }
.processing-card small { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 13px; font-weight: 600; }
.processing-card small svg.lucide { width: 14px; height: 14px; }
.site-footer.minimal { padding-top: 0; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

/* =========================================================
   ORDER STATUS
   ========================================================= */
.order-page { background: var(--surface); }
.order-wrap { display: grid; gap: 24px; max-width: 860px; padding-top: 48px; padding-bottom: 96px; }
.order-hero { display: grid; justify-items: center; gap: 12px; padding: 48px 40px 40px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-md); text-align: center; }
.status-icon { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 8px; border-radius: 50%; }
.status-icon svg.lucide { width: 40px; height: 40px; stroke-width: 2.6; }
.status-glyph { font: 700 42px/1 var(--font-head); }
.tone-success .status-icon { background: #e8f7ee; color: var(--success); box-shadow: 0 0 0 12px #f3fbf6; }
.tone-error .status-icon { background: #ffe9ee; color: var(--danger); box-shadow: 0 0 0 12px #fff5f7; }
.tone-warning .status-icon { background: #fff4e0; color: #b7791f; box-shadow: 0 0 0 12px #fffaf0; }
.tone-pending .status-icon { background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 12px #f6f6fb; }
.order-hero h1 { font-size: clamp(28px, 4vw, 38px); }
.order-hero > p { max-width: 520px; color: var(--muted); font-size: 16.5px; }
.order-hero .reason { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; background: #fff4f6; color: #b4153a; font-size: 14px; }
.order-hero .reason svg.lucide { width: 16px; height: 16px; }
.live-note { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-size: 14px; font-weight: 600; }
.order-details { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; margin: 18px 0 8px; border: 1px solid var(--line); border-radius: 16px; text-align: left; }
.order-details div { display: grid; gap: 4px; padding: 16px 18px; min-width: 0; }
.order-details div + div { border-left: 1px solid var(--line); }
.order-details dt { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.order-details dd { margin: 0; overflow-wrap: anywhere; font-size: 15px; }
.status-pill { display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.status-pill.success { background: #e8f7ee; color: var(--success); }
.status-pill.error { background: #ffe9ee; color: var(--danger); }
.status-pill.warning { background: #fff4e0; color: #9a6510; }
.status-pill.pending { background: var(--primary-soft); color: var(--primary); }
.order-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.access, .order-breakdown { padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: #fff; scroll-margin-top: calc(var(--header-h) + 20px); }
.access h2, .order-breakdown h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 22px; }
.access h2 svg.lucide { color: var(--success); width: 24px; height: 24px; }
.access > .muted { margin-bottom: 20px; font-size: 14.5px; }
.access-list { display: grid; gap: 12px; }
.access-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.access-item img { width: 72px; height: 72px; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; object-position: top; }
.ai-info strong { display: block; font: 600 17px var(--font-head); }
.ai-info small { color: var(--muted); font-size: 13.5px; }
.ai-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.licenses h2 svg.lucide { color: var(--primary); }
.license-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.license-item .li-info { flex: 1 1 200px; min-width: 0; }
.li-info strong { display: block; font: 600 16px var(--font-head); }
.li-info small { color: var(--muted); font-size: 13px; }
.license-key { padding: 8px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--primary-soft); color: var(--ink); font: 600 15px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; word-break: break-all; user-select: all; }
.license-item.is-revoked .license-key { text-decoration: line-through; opacity: .6; }
.order-breakdown .summary-lines { margin: 18px 0; }
.order-breakdown .totals { padding-top: 16px; border-top: 1px solid var(--line); }
.order-breakdown > p { margin-top: 16px; }
.demo-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: #9a6510; font-size: 13px; }
.demo-note svg.lucide { width: 15px; height: 15px; }
.center-note { text-align: center; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1200px) {
  .pd-body { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .related .p-grid, .p-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related .p-grid .p-card:nth-child(4), .p-grid.cols-4 .p-card:nth-child(4) { display: none; }
  .order-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-details div:nth-child(4) { border-left: 0; }
  .order-details div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}

@media (max-width: 1024px) {
  .container-wide { width: calc(100% - 48px); }
  .shop-layout { grid-template-columns: 1fr; padding-top: 24px; }
  .filter-toggle { display: inline-flex; }
  .filters { position: fixed; inset: 0 auto 0 0; z-index: 65; width: min(360px, 90%); max-height: none; padding: 18px 20px 0; background: #fff; box-shadow: var(--shadow-lg); transform: translateX(-105%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s; }
  .filters.is-open { transform: none; visibility: visible; }
  .filters-head .link-btn { margin-left: auto; margin-right: 8px; }
  .filters-close { display: inline-grid; }
  .filters-body { flex: 1; padding-right: 0; }
  .filters-foot { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; padding: 14px 0 18px; border-top: 1px solid var(--line); }
  .filters-overlay { position: fixed; inset: 0; z-index: 64; display: block; background: rgba(15, 29, 49, .42); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .filters-overlay.is-visible { opacity: 1; visibility: visible; }
  .shop-main .p-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pd-top { grid-template-columns: 1fr; gap: 32px; }
  .pd-body { grid-template-columns: 1fr; }
  .pd-aside { display: none; }
  .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  .order-summary, .co-summary { position: static; }
  .review-summary { grid-template-columns: 160px 1fr; }
  .rs-action { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 900px) {
  .shop-main .p-grid, .related .p-grid, .p-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .related .p-grid .p-card:nth-child(4), .p-grid.cols-4 .p-card:nth-child(4) { display: flex; }
  .sort-select span { display: none; }
  .mobile-buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -10px 30px -18px rgba(15, 35, 60, .35); transform: translateY(110%); transition: transform .25s var(--ease); }
  .mobile-buy-bar.is-visible { transform: none; }
  .mobile-buy-bar .price strong { font-size: 22px; }
  .co-mobile-bar { position: sticky; bottom: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px -20px -96px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -10px 30px -18px rgba(15, 35, 60, .35); }
  .co-mobile-bar small { display: block; color: var(--muted); font-size: 12px; }
  .co-mobile-bar strong { font: 600 20px var(--font-head); }
  .checkout-page .page-pad { padding-bottom: 96px; }
  .order-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-details div:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .order-details div:nth-child(-n + 2) { border-top: 0; }
  .order-details div:nth-child(even) { border-left: 1px solid var(--line); }
  .order-details div:last-child { grid-column: 1 / -1; border-left: 0; }
}

@media (max-width: 640px) {
  .container-wide { width: calc(100% - 32px); }
  .page-pad { padding-top: 24px; padding-bottom: 64px; }
  .page-hero { padding: 24px 0 26px; }
  .page-hero p { font-size: 15.5px; }
  .shop-toolbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .result-count { order: 3; width: 100%; margin: 0; flex-wrap: wrap; gap: 2px 8px; }
  .toolbar-right { margin-left: auto; gap: 8px; }
  .sort-select select { max-width: 150px; }
  .view-toggle { display: none; }
  .shop-main .p-grid, .related .p-grid, .p-grid.cols-4 { gap: 12px; }
  .p-body { gap: 4px; padding: 12px; }
  .p-title { font-size: 15.5px; }
  .p-cat { font-size: 11.5px; }
  .p-card .rating { font-size: 12px; }
  .p-card .rating small { display: none; }
  .p-foot { gap: 6px; padding-top: 6px; }
  .p-foot .price strong { font-size: 16px; }
  .p-foot .price s, .p-foot .price .off { font-size: 11.5px; }
  .p-foot .btn-icon { width: 36px; height: 36px; border-radius: 9px; }
  .p-badges { top: 8px; left: 8px; }
  .badge-type { padding: 3px 8px; font-size: 10.5px; }
  .p-card .wish-btn { top: 8px; right: 8px; width: 32px; height: 32px; }
  .p-hover .btn { width: 34px; height: 34px; }
  .p-grid.is-list .p-card { flex-direction: column; }
  .p-grid.is-list .p-media { flex: none; aspect-ratio: 4 / 3; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .pagination { gap: 4px; }
  .page-btn { min-width: 38px; height: 38px; padding: 0 10px; }
  .page-nav span { display: none; }

  .pd-crumbs { padding-top: 16px; }
  .pd-top { padding-top: 16px; padding-bottom: 32px; gap: 24px; }
  .gallery-stage { border-radius: 16px; }
  .gallery-nav { width: 36px; height: 36px; }
  .gallery-zoom-hint span, .gallery-zoom-hint { font-size: 11.5px; }
  .gallery-thumbs { gap: 8px; }
  .gallery-thumb { flex-basis: calc((100% - 24px) / 4); }
  .thumbs-nav { display: none; }
  .gallery-thumb span { display: none; }
  .pd-price-row strong { font-size: 34px; }
  .pd-cta { grid-template-columns: 1fr; }
  .pd-guarantees, .pd-meta { grid-template-columns: 1fr; }
  .pd-tabs a { padding: 14px 10px; font-size: 14px; }
  .pd-section { padding: 32px 0; }
  .pd-section > h2 { font-size: 22px; }
  .pd-features, .check-list { grid-template-columns: 1fr; }
  .prose { font-size: 15.5px; }
  .prose th, .prose td { padding: 10px 12px; }
  .review-summary { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
  .rs-score { grid-template-columns: auto auto 1fr; justify-items: start; align-items: center; column-gap: 10px; text-align: left; }
  .rs-score strong { font-size: 44px; grid-row: span 2; }
  .rs-score .stars { grid-column: 3; }
  .rs-score small { grid-column: 2 / -1; }
  .review-card { padding: 18px; }
  .rc-meta { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .related .section-head { margin-bottom: 20px; }

  .cart-head { display: none; }
  .cart-row { grid-template-columns: 80px minmax(0, 1fr); grid-template-areas: 'thumb info' 'qty total'; gap: 14px 14px; padding: 18px 0; }
  .cr-thumb { grid-area: thumb; align-self: start; }
  .cr-thumb img { width: 80px; height: 80px; }
  .cr-info { grid-area: info; }
  .cr-info h3 { font-size: 16.5px; }
  .cr-qty { grid-area: qty; }
  .cr-total { grid-area: total; align-self: center; }
  .cr-total small { display: block; }
  .order-summary { padding: 22px; }
  .cart-foot { flex-direction: column-reverse; align-items: flex-start; }

  .checkout-header .link-back span { display: none; }
  .secure-pill { padding: 6px 10px; font-size: 12.5px; }
  .co-steps span { display: none; }
  .co-steps .current span { display: inline; }
  .co-section { padding: 20px 18px; border-radius: 16px; }
  .co-section h2 { font-size: 18px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-grid .field.half { grid-column: 1 / -1; }
  .customer-card { flex-wrap: wrap; }
  .customer-card .btn, .customer-card .link-btn { margin-left: 56px; }
  .gateway { grid-template-columns: 22px 40px 1fr; padding: 14px; gap: 12px; }
  .gw-icon { width: 40px; height: 40px; }
  .gw-brands { grid-column: 3; justify-content: flex-start; max-width: none; }
  .co-summary-inner { padding: 22px 18px; border-radius: 16px; }
  .co-mobile-bar { margin: 24px -16px -64px; padding-left: 16px; padding-right: 16px; }
  .checkout-page .page-pad { padding-bottom: 64px; }
  .footer-links { justify-content: center; }

  .order-wrap { padding-top: 24px; padding-bottom: 64px; gap: 16px; }
  .order-hero { padding: 36px 20px 28px; border-radius: 20px; }
  .status-icon { width: 72px; height: 72px; }
  .order-actions { flex-direction: column; width: 100%; }
  .order-actions .btn { width: 100%; }
  .access, .order-breakdown { padding: 22px 18px; }
  .ai-actions .btn { flex: 1 1 calc(50% - 8px); }
}

/* =========================================================
   COMPANY & LEGAL PAGES (page.html)
   ========================================================= */
.cp-updated { font-size: 14px !important; }
.cp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 48px; }
.cp-main { display: grid; gap: 44px; min-width: 0; }
.cp-h2 { margin-bottom: 14px; font-size: clamp(22px, 2.4vw, 28px); }
.cp-text p { color: var(--ink-2); font-size: 16px; line-height: 1.75; }
.cp-text p + p { margin-top: 12px; }
.cp-text ul { display: grid; gap: 6px; margin-top: 12px; padding-left: 20px; list-style: disc; color: var(--ink-2); line-height: 1.6; }
.cp-stats { grid-template-columns: repeat(2, 1fr); box-shadow: none; }
.cp-stats li:nth-child(3) { border-left: 0; }
.cp-stats li:nth-child(n + 3) { border-top: 1px solid var(--line); }
.cp-cards { grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cp-cards .feature-card { padding: 24px; }
.cp-steps { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.cp-faq { display: grid; gap: 10px; }
.cp-faq .cp-h2 { margin-bottom: 4px; }
.cp-faq details { border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.cp-faq details[open] { border-color: #d4d5ea; box-shadow: var(--shadow-sm); }
.cp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; color: var(--ink); font-weight: 600; cursor: pointer; list-style: none; }
.cp-faq summary::-webkit-details-marker { display: none; }
.cp-faq summary svg.lucide { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.cp-faq details[open] summary svg.lucide { transform: rotate(180deg); color: var(--primary); }
.cp-faq summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 14px; }
.cp-faq details p { padding: 0 20px 18px; color: var(--ink-2); line-height: 1.7; }

.cp-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cp-contact li { display: flex; align-items: flex-start; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.cp-contact li > svg.lucide { flex: none; width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.cp-contact strong { display: block; margin-bottom: 2px; font-size: 15px; }
.cp-contact a { color: var(--primary); font-size: 14px; word-break: break-word; }

.cp-form-card h2 { margin-bottom: 20px; font-size: 22px; }
.cp-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; }
.cp-done { padding: 32px 12px; }
.cp-done .empty-icon { background: #e8f7ee; color: var(--success); }

.cp-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 32px; border-radius: 20px; background: linear-gradient(135deg, var(--primary) 0%, #0560c4 100%); color: #fff; }
.cp-cta h2 { color: #fff; font-size: 24px; }
.cp-cta p { margin-top: 4px; color: rgba(255, 255, 255, .85); }
.cp-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.cp-side { position: sticky; top: calc(var(--header-h) + 20px); padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.cp-side-title { margin-bottom: 12px; font-size: 18px; }
.cp-nav { display: grid; gap: 2px; }
.cp-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: background-color .15s, color .15s; }
.cp-nav a svg.lucide { width: 17px; height: 17px; color: var(--muted); }
.cp-nav a:hover { background: var(--surface); color: var(--primary); }
.cp-nav a[aria-current] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.cp-nav a[aria-current] svg.lucide, .cp-nav a:hover svg.lucide { color: var(--primary); }

@media (max-width: 1024px) {
  .cp-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cp-side { position: static; }
  .cp-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cp-main { gap: 36px; }
  .cp-cards, .cp-contact { grid-template-columns: 1fr; }
  .cp-cta { padding: 24px 20px; }
  .cp-cta-actions, .cp-cta-actions .btn { width: 100%; }
  .cp-form-foot .btn { width: 100%; }
  .cp-nav { grid-template-columns: 1fr; }
}
