/* =========================================================
   Blaze storefront — glue on top of the design files
   (styles.css + pages.css are copied verbatim from desing/store).
   Self-hosted fonts (strict CSP: same-origin only) and the
   few pieces the server-rendered pages need.
   ========================================================= */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/outfit-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/outfit-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/outfit-latin-700-normal.woff2') format('woff2'); }

[hidden] { display: none !important; }

/* Icons are <i data-lucide> placeholders until lucide.min.js runs: reserve their box. */
i[data-lucide] { display: inline-block; width: 18px; height: 18px; flex: none; }

/* Product photos are square studio shots, not tall page screenshots: centre them. */
.p-img img, .card-media img, .gallery-slide img, .cart-item img, .cr-thumb img, .sl-thumb img, .pb-head img, .result img { object-position: center; }
.theme-card:hover .card-media img { object-position: center; }

/* Product photos are square (480×480 and up): give them square frames and show the whole
   image (contain, no base zoom) so nothing is cropped; off-ratio uploads get soft bars. */
.theme-card .card-media, .p-media, .gallery-stage { aspect-ratio: 1 / 1; }
.p-img img, .theme-card .card-media img, .gallery-slide img { object-fit: contain; object-position: center; scale: 1; }
.gallery-stage { max-width: 600px; }
.gallery-thumbs-wrap { max-width: 600px; }
.gallery-thumb img { aspect-ratio: 1 / 1; object-fit: contain; background: var(--surface); }
.gallery-slide { display: block; cursor: zoom-in; }

/* ---------- Flash messages ---------- */
.flash-stack { padding-top: 20px; }
.flash-stack .alert { align-items: center; margin-bottom: 0; }
.flash-stack .alert + .alert { margin-top: 10px; }
.alert > span { flex: 1; }
.alert a { color: inherit; font-weight: 700; }
.alert-close { display: grid; place-items: center; width: 28px; height: 28px; margin: -4px -4px -4px 0; padding: 0; border: 0; border-radius: 8px; background: none; color: inherit; opacity: .7; cursor: pointer; }
.alert-close:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
.alert-close svg.lucide { width: 16px; height: 16px; margin: 0; }

/* ---------- Header bits rendered as forms/links ---------- */
#menu-collections { min-width: 290px; }
.account-links form { margin: 0; }
.account-btns .btn { width: 100%; }
a.account-help { text-decoration: none; }
.cart-item form { margin: 0; }
.ci-info a { color: inherit; text-decoration: none; }
.ci-info a:hover strong { color: var(--primary); }

/* ---------- Product cards ---------- */
.stock-note { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.stock-note svg.lucide { width: 14px; height: 14px; }
.stock-note.is-in { color: var(--success); }
.stock-note.is-low { color: #b7791f; }
.stock-note.is-out { color: var(--danger); }
.p-foot form, .card-actions form { margin: 0; }
.card-actions { align-items: center; margin-top: 6px; }
.card-actions > .btn, .card-actions > form { flex: 1; }
.card-actions > form .btn { width: 100%; }
.p-badges .badge-type:only-child { display: inline-block; }
.p-hover .btn { flex: 0 1 auto; }

/* Category grid sized to the real number of categories. */
.category-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.category-grid[data-count='1'], .category-grid[data-count='2'], .category-grid[data-count='3'], .category-grid[data-count='4'] { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.theme-card[hidden] { display: none; }

/* ---------- Shop ---------- */
.range { --lo: 0%; --hi: 100%; }
.sort-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.filters-apply { margin-top: 18px; }
.filters-head .link-btn { text-decoration: none; }
a.filter-chip { color: var(--primary); text-decoration: none; }
.result-count { flex-wrap: wrap; }

/* ---------- Product details ---------- */
.pd-buy { display: grid; gap: 16px; }
.pd-buy-row { display: flex; align-items: center; gap: 14px; }
.pd-buy-row .qty-label { margin: 0; }
.stock-tag.is-in { background: #e8f7ee; color: var(--success); }
.stock-tag.is-low { background: #fff4e0; color: #9a6510; }
.stock-tag.is-out { background: #ffe9ee; color: var(--danger); }
.pb-form { display: grid; gap: 16px; }
.pb-head small { display: block; font-size: 13px; }
.purchase-box .qty-label { display: flex; align-items: center; justify-content: space-between; }
.mobile-buy-bar form { margin: 0; }

/* ---------- Cart ---------- */
.cr-actions form { margin: 0; }
.text-action.is-static { cursor: default; color: #b7791f; }
.text-action.is-static:hover { color: #b7791f; }
.cr-qty form { margin: 0; }
.ship-hint { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); color: #3a3c74; font-size: 13.5px; }
.ship-hint svg.lucide { width: 16px; height: 16px; }

/* ---------- Checkout ---------- */
.field { display: grid; gap: 7px; }
.field textarea { min-height: 96px; }
.co-section .field-grid .field textarea { height: auto; }
.customer-card .link-btn { text-decoration: none; }

/* ---------- Orders ---------- */
.order-wrap > .breadcrumb { margin-bottom: -8px; }
.order-breakdown .summary-lines a { color: inherit; text-decoration: none; }
.order-breakdown .summary-lines a:hover strong { color: var(--primary); }
.ship-card h2 svg.lucide { color: var(--primary); }
.ship-card address { margin: 12px 0; font-style: normal; color: var(--ink-2); line-height: 1.7; }
.ship-card .muted { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ship-card .muted svg.lucide { width: 14px; height: 14px; }
.order-notes { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--ink-2); font-size: 14.5px; }
.order-actions .btn svg.lucide { width: 17px; height: 17px; }

.order-list { display: grid; gap: 12px; }
.order-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto auto; align-items: center; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.order-card:hover { border-color: #d8d9ec; box-shadow: var(--shadow-md); }
.oc-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); }
.oc-main { display: grid; min-width: 0; line-height: 1.4; }
.oc-main a { color: var(--ink); text-decoration: none; }
.oc-main a:hover { color: var(--primary); }
.oc-main strong { font: 600 17px var(--font-head); }
.oc-main small { color: var(--muted); font-size: 13.5px; }
.oc-total { font: 600 19px var(--font-head); }

/* ---------- Register ---------- */
.auth-panel { max-width: 480px; margin: 0 auto; padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-md); }
.auth-panel h1 { margin-bottom: 8px; font-size: 30px; }
.auth-fields { display: grid; gap: 16px; }
.auth-panel .auth-switch { margin-top: 20px; }
.auth-panel .auth-switch a { color: var(--primary); font-weight: 600; }

/* ---------- Search (live results) ---------- */
.search-results .result { color: var(--ink); text-decoration: none; }

@media (max-width: 900px) {
  .order-card { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .oc-status { grid-column: 2; }
  .oc-total { grid-column: 3; grid-row: 1; }
  .order-card > .btn { grid-column: 3; grid-row: 2; }
}

@media (max-width: 640px) {
  .auth-panel { padding: 24px 20px; border-radius: 18px; }
  .order-card { grid-template-columns: 1fr auto; gap: 10px 14px; }
  .oc-icon { display: none; }
  .oc-main { grid-column: 1 / -1; }
  .oc-status { grid-column: 1; }
  .oc-total { grid-column: 2; grid-row: auto; }
  .order-card > .btn { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Support tickets (desing/store account.html#ticket / #tickets) ---------- */
.ticket-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.ticket-toolbar p { margin: 0; max-width: 560px; }
.ticket-wrap { display: grid; gap: 20px; max-width: 860px; }
.ticket-card .oc-main small { line-height: 1.5; }
.ticket-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px 24px; margin: 0; }
.ticket-meta dt { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ticket-meta dd { margin: 4px 0 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.ticket-meta a { color: var(--primary); }
.ticket-thread { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ticket-thread li { max-width: 88%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.ticket-thread li.is-customer { justify-self: end; border-color: var(--primary-soft); background: var(--primary-soft); border-bottom-right-radius: 4px; }
.ticket-thread li.is-staff { justify-self: start; border-bottom-left-radius: 4px; }
.ticket-thread header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-bottom: 6px; }
.ticket-thread strong { color: var(--ink); font-size: 14px; }
.ticket-thread time { color: var(--muted); font-size: 12.5px; }
.ticket-thread p { margin: 0; color: var(--ink-2); line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.ticket-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 20px; }
.ticket-close { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font-size: 14px; }
.ticket-close .link-btn { padding: 0; border: 0; background: none; color: var(--danger); font: inherit; font-weight: 600; cursor: pointer; }

@media (max-width: 640px) {
  .ticket-thread li { max-width: 100%; }
  .ticket-actions .btn { flex: 1; justify-content: center; }
}

/* ---------- Auth popup ---------- */
.auth-card { position: relative; }
.auth-logo { display: block; }
.auth-logo img { width: 150px; height: auto; }
.auth-error { padding: 10px 12px; border: 1px solid #f6c6cf; border-radius: 10px; background: #fff4f6; color: #b4153a; font-size: 13.5px; }
.auth-form .field-error { margin-top: -8px; }
.auth-form input[aria-invalid='true'] { border-color: var(--danger); }
.auth-form label.check { display: flex; grid-template-columns: none; gap: 10px; font-weight: 500; }
.auth-form [data-auth-success] { margin: 0; }

/* ---------- Ticket image attachments ---------- */
.co-section > .field + .img-field { margin-top: 16px; }
.img-field-label { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.img-field-label .muted { font-weight: 400; }
.img-field .img-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 18px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: #f8fafc;
  color: var(--ink-2); font-size: 14px; font-weight: 400; text-align: center; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.img-drop svg.lucide { width: 26px; height: 26px; color: var(--primary); }
.img-drop strong { color: var(--primary); font-weight: 600; }
.img-drop small { color: var(--muted); font-size: 12.5px; }
.img-drop:hover, .img-drop.is-over { border-color: var(--primary); background: var(--primary-soft); }
.img-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.img-input:focus-visible ~ .img-drop, .img-drop:has(+ .img-input:focus-visible) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.img-field.has-error .img-drop { border-color: var(--danger); }
.img-previews { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.img-previews li { position: relative; display: grid; gap: 4px; width: 84px; font-weight: 400; }
.img-previews img { width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 10px; background: #f1f5f9; object-fit: cover; }
.img-name { overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.img-remove {
  position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--ink-2); cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 35, 60, .15);
}
.img-remove:hover { border-color: var(--danger); color: var(--danger); }
.img-remove svg.lucide { width: 13px; height: 13px; }

.ticket-images { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.ticket-images a { display: block; border-radius: 10px; }
.ticket-images img { display: block; width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 10px; background: #f1f5f9; object-fit: cover; transition: opacity .2s; }
.ticket-images a:hover img { opacity: .85; }

/* ---------- Invoices ---------- */
.oc-main small .oc-invoice { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 600; text-decoration: none; }
.oc-main small .oc-invoice:hover { text-decoration: underline; }
.oc-invoice svg.lucide { width: 14px; height: 14px; }
.order-wrap > .invoice-note { margin: 0; }

/* ---------- Order contact details (digital products) ---------- */
.order-contact { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 24px; margin: 14px 0 0; }
.order-contact dt { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.order-contact dd { margin: 4px 0 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.order-contact a { color: var(--primary); text-decoration: none; }
.order-contact a:hover { text-decoration: underline; }
.ship-card .order-notes { margin: 16px 0 0; }

/* ---------- Digital product extras ---------- */
.pd-link svg.lucide:last-child { width: 14px; height: 14px; opacity: .6; }
.pd-secondary .pd-link { text-decoration: none; }
.ai-actions .btn .dl-meta { font-size: 11.5px; font-weight: 500; opacity: .8; }

/* ---------- Custom logo (Admin > Settings > General) & footer contact ---------- */
.brand img.brand-custom, .footer-brand img.brand-custom, .mobile-nav-head img.brand-custom, .auth-logo img.brand-custom { width: auto; max-width: 180px; height: auto; max-height: 44px; object-fit: contain; }
.footer-contact { display: grid; gap: 6px; margin-top: 14px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.footer-contact a:hover { color: var(--primary); }
.footer-contact svg.lucide { width: 16px; height: 16px; }

/* ---------- Product page: Google Play / App Store badges ---------- */
.app-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.app-badge {
  display: inline-flex; align-items: center; gap: 10px; min-width: 168px; height: 52px; padding: 0 18px 0 14px;
  border: 1px solid #1f2937; border-radius: 12px; background: #0b0f17; color: #fff; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.app-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(11, 15, 23, .7); }
.app-badge:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; }
.app-badge-icon { flex: none; width: 26px; height: 26px; }
.app-badge span { display: grid; line-height: 1.1; text-align: left; }
.app-badge small { font-size: 10.5px; font-weight: 500; letter-spacing: .02em; opacity: .85; }
.app-badge strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
@media (max-width: 480px) { .app-badge { flex: 1 1 100%; justify-content: center; } }

/* ---------- Footer legal links & legal pages ---------- */
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.footer-legal a { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-legal a:hover, .footer-legal a[aria-current] { color: var(--primary); }
.site-footer.minimal .footer-links { flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.cp-help { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 24px; border: 1px solid #cfe3fa; border-radius: 18px; background: var(--primary-soft); }
.cp-help > div:not(.cp-help-actions) { flex: 1 1 220px; }
.cp-help h2 { margin: 0 0 4px; font-size: 19px; }
.cp-help p { margin: 0; color: var(--ink-2); }
.cp-help-icon { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; color: var(--primary); }
.cp-help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) { .cp-help-actions, .cp-help-actions .btn { width: 100%; justify-content: center; } }

/* =========================================================
   Product reviews: stars, product-page section, My Reviews
   ========================================================= */
.rv-stars { display: inline-flex; align-items: center; gap: 1px; color: #f5a524; line-height: 1; vertical-align: middle; }
.rv-stars .star { position: relative; display: inline-flex; }
.rv-stars svg.lucide { width: 16px; height: 16px; fill: none; color: #d5dee9; }
.rv-stars .star.is-on svg.lucide { color: #f5a524; fill: #f5a524; }
.rv-stars .star-half { position: absolute; inset: 0 auto 0 0; width: 50%; overflow: hidden; display: inline-flex; }
.rv-stars .star-half svg.lucide { color: #f5a524; fill: #f5a524; flex: none; }
.rv-stars-sm svg.lucide { width: 14px; height: 14px; }
.rv-stars-lg svg.lucide { width: 22px; height: 22px; }
.pd-rating { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 10px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.pd-rating:hover span { text-decoration: underline; }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rv-head .btn svg.lucide { width: 15px; height: 15px; }
.rv-summary { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; margin: 16px 0 20px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rv-score { display: grid; justify-items: center; gap: 6px; text-align: center; }
.rv-score > strong { color: var(--ink); font: 700 40px/1 var(--font-head); }
.rv-bars { display: grid; gap: 6px; }
.rv-bars li { display: grid; grid-template-columns: 38px minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: 13px; }
.rv-bars li > span:first-child { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); font-weight: 600; }
.rv-bars li > span:first-child svg.lucide { width: 12px; height: 12px; color: #f5a524; fill: #f5a524; }
.rv-bar { height: 8px; overflow: hidden; border-radius: 4px; background: #e6ebf2; }
.rv-bar span { display: block; width: 0; height: 100%; border-radius: 4px; background: #f5a524; }
.rv-reviews { display: grid; gap: 14px; }
.rv-review { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rv-review header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rv-review header strong { color: var(--ink); }
.rv-body { margin: 8px 0 10px; color: var(--ink-2); line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.rv-review footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.rv-verified { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-weight: 600; }
.rv-verified svg.lucide { width: 14px; height: 14px; }
.rv-reply { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0; background: var(--primary-soft); font-size: 14px; }
.rv-reply strong { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); }
.rv-reply svg.lucide { width: 15px; height: 15px; }
.rv-reply p { margin: 4px 0 0; color: var(--ink-2); white-space: pre-line; }
.rv-note { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }
.rv-note svg.lucide { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.rv-note.is-error { color: var(--danger); }
.rv-note.is-reply { color: var(--ink-2); }
#reviews .pagination { margin-top: 16px; }
/* My Reviews (account) */
.rv-count { font-size: 14px; }
.rv-list { display: grid; gap: 12px; }
.rv-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rv-thumb img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--surface); }
.rv-main { display: grid; gap: 2px; min-width: 0; }
.rv-product { color: var(--ink); font-weight: 600; text-decoration: none; }
.rv-product:hover { color: var(--primary); }
.rv-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.rv-mine strong { color: var(--ink); font-size: 14px; }
.rv-excerpt { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.rv-actions { display: grid; gap: 8px; justify-items: end; }
.rv-actions form { margin: 0; }
.rv-actions .btn svg.lucide { width: 15px; height: 15px; }
/* Star picker (write / edit) */
.rv-form-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rv-form-head img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.rv-form-head h2 { font-size: 19px; }
.rv-stars-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rv-stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-stars-input label { cursor: pointer; padding: 2px; border-radius: 8px; color: #d5dee9; }
.rv-stars-input label svg.lucide { width: 34px; height: 34px; fill: currentColor; transition: color .12s, transform .12s; }
.rv-stars-input label:hover, .rv-stars-input label:hover ~ label,
.rv-stars-input input:checked ~ label { color: #f5a524; }
.rv-stars-input label:hover svg.lucide { transform: scale(1.08); }
.rv-stars-input input:focus-visible + label { outline: 3px solid var(--primary-ring); }
.rv-form .field + .field-grid { margin-top: 16px; }
@media (max-width: 767.98px) {
  .rv-summary { grid-template-columns: minmax(0, 1fr); }
  .rv-item { grid-template-columns: 56px minmax(0, 1fr); }
  .rv-thumb img { width: 56px; height: 56px; }
  .rv-actions { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; }
}

/* Reviews across the store: product cards, home testimonials */
.p-rating { display: inline-flex; align-items: center; gap: 6px; margin: -2px 0 6px; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.p-rating strong { color: var(--ink); }
.p-rating span { color: var(--muted); }
.p-rating:hover span { text-decoration: underline; }
.rv-home-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.rv-quote-title { display: block; margin-bottom: 6px; color: var(--ink); font-size: 16px; }
.testimonial figcaption small a { color: var(--primary); font-weight: 600; text-decoration: none; }
.testimonial figcaption small a:hover { text-decoration: underline; }
.rv-verified-dot { display: inline-flex; vertical-align: -2px; color: var(--success); }
.rv-verified-dot svg.lucide { width: 15px; height: 15px; }
.hero-trust .trust-copy > a { display: flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.hero-trust .trust-copy > a:hover strong { text-decoration: underline; }

/* ---------- Floating Gemini AI chat (store/ai-chat.php, js/ai-chat.js) ---------- */
.ai-chat { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px; font-size: 14.5px; }
.ai-chat.is-raised { bottom: 20px; }
.ai-chat-launcher { display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 20px 0 16px; border: 0; border-radius: 28px; background: linear-gradient(135deg, var(--primary) 0%, #6d4fc4 100%); color: #fff; font: 600 15px var(--font-head); box-shadow: 0 14px 30px -10px rgba(71, 73, 137, .6); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.ai-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(71, 73, 137, .7); }
.ai-chat-launcher:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 3px; }
.ai-chat-launcher svg.lucide { width: 22px; height: 22px; animation: ai-chat-glow 2.6s ease-in-out infinite; }
.ai-chat.is-open .ai-chat-launcher { padding: 0 16px; }
.ai-chat.is-open .ai-chat-launcher-text { display: none; }
@keyframes ai-chat-glow { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .ai-chat-launcher svg.lucide { animation: none; } }

.ai-chat-panel { display: flex; flex-direction: column; width: min(380px, calc(100vw - 24px)); height: min(580px, calc(100dvh - 120px)); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-lg); animation: ai-chat-in .2s var(--ease); }
.ai-chat-panel[hidden] { display: none; }
@keyframes ai-chat-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.ai-chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; background: linear-gradient(135deg, var(--primary) 0%, #6d4fc4 100%); color: #fff; }
.ai-chat-head > div { flex: 1; min-width: 0; }
.ai-chat-head h2 { margin: 0; color: #fff; font: 600 16px/1.2 var(--font-head); }
.ai-chat-head p { margin: 2px 0 0; color: rgba(255, 255, 255, .82); font-size: 12.5px; line-height: 1.35; }
.ai-chat-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .18); }
.ai-chat-avatar svg.lucide { width: 19px; height: 19px; }
.ai-chat-icon-btn { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #fff; cursor: pointer; }
.ai-chat-icon-btn:hover { background: rgba(255, 255, 255, .16); }
.ai-chat-icon-btn svg.lucide { width: 17px; height: 17px; }

.ai-chat-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; background: var(--surface); }
.ai-chat-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #fff; color: var(--ink-2); line-height: 1.5; box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.ai-chat-msg p { margin: 0; white-space: pre-line; }
.ai-chat-msg ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink); }
.ai-chat-msg.is-customer { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--primary); color: #fff; }
.ai-chat-msg.is-error { background: #fff4f6; color: #b4153a; box-shadow: inset 0 0 0 1px #f6c6cf; }
.ai-chat-link { display: inline-block; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.ai-chat-muted { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.ai-chat-typing { display: inline-flex; gap: 4px; align-self: flex-start; padding: 12px 14px; }
.ai-chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ai-chat-dot 1.1s infinite ease-in-out; }
.ai-chat-typing span:nth-child(2) { animation-delay: .15s; }
.ai-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.ai-chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.ai-chat-suggest[hidden] { display: none; }
.ai-chat-suggest button { padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 16px; background: #fff; color: var(--ink-2); font: 500 12.5px var(--font-body); cursor: pointer; }
.ai-chat-suggest button:hover { border-color: var(--primary); color: var(--primary); }
.ai-chat-handoff { display: grid; gap: 4px; padding: 10px 14px 0; }
.ai-chat-handoff[hidden] { display: none; }
.ai-chat-handoff .btn { justify-content: center; }
.ai-chat-handoff .btn svg.lucide { width: 16px; height: 16px; }
.ai-chat-handoff small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.ai-chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ai-chat-form textarea { flex: 1; min-height: 40px; max-height: 140px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 12px; font: inherit; line-height: 1.4; resize: none; }
.ai-chat-form textarea:focus { border-color: var(--primary); outline: 3px solid var(--primary-ring); outline-offset: 0; }
.ai-chat-send { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: var(--primary); color: #fff; cursor: pointer; }
.ai-chat-send:disabled { opacity: .5; cursor: default; }
.ai-chat-send svg.lucide { width: 18px; height: 18px; }
.ai-chat-note { display: flex; gap: 5px; align-items: flex-start; margin: 0; padding: 0 12px 10px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.ai-chat-note svg.lucide { flex: none; width: 13px; height: 13px; margin-top: 1px; }
.ai-chat-guest { display: grid; gap: 8px; padding: 14px; border-top: 1px solid var(--line); }
.ai-chat-guest p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.ai-chat-guest .btn { justify-content: center; }

@media (max-width: 600px) {
  .ai-chat { right: 12px; bottom: 12px; }
  .ai-chat.is-raised { bottom: 84px; }
  .ai-chat-launcher { height: 50px; padding: 0 14px; }
  .ai-chat-launcher-text { display: none; }
  .ai-chat.is-open .ai-chat-launcher { display: none; }
  .ai-chat.is-open { z-index: 75; }
  .ai-chat-panel { width: calc(100vw - 24px); height: calc(100dvh - 24px); }
}
