/* Attest — premium product-reviews widget. Namespaced .atr- to avoid collisions.
   Mirrors the functionality of the old custom Fera grid, refined for a premium feel. */

.atr {
  --atr-accent: #a67c00;
  --atr-star: #f1b400;
  --atr-ink: #14110b;
  --atr-muted: #6f6a60;
  --atr-line: #ececec;
  --atr-card: #ffffff;
  --atr-card-radius: 16px;
  --atr-card-border-width: 1px;
  --atr-bg-soft: #faf8f4;
  --atr-pill-bg: #ffffff;
  --atr-pill-border: #e2ddd2;
  --atr-pill-active-bg: var(--atr-accent);
  --atr-pill-radius: 999px;
  --atr-btn-bg: var(--atr-ink);
  --atr-btn-text: #ffffff;
  --atr-btn-radius: 10px;
  font-family: inherit;
  color: var(--atr-ink);
  -webkit-font-smoothing: antialiased;
  padding: var(--atr-pt, 0) var(--atr-pr, 0px) var(--atr-pb, 0) var(--atr-pl, 0px);
  scroll-margin-top: 80px; /* clears a sticky header when scrolled to (rating pill click) */
}
.atr * { box-sizing: border-box; }
.atr-inner { max-width: 1180px; margin: 0 auto; }
.atr-title { font-size: var(--atr-title-size, calc(clamp(22px, 3vw, 30px) * var(--atr-title-scale, 1))); font-weight: var(--atr-title-weight, 700); text-transform: var(--atr-title-transform, none); color: var(--atr-title-color, inherit); letter-spacing: -0.02em; margin: 0 0 22px; }

/* ── Summary header (premium): score block + histogram ── */
.atr-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) 1.3fr;
  gap: 28px 40px;
  align-items: center;
  padding: 26px 28px;
  background: linear-gradient(180deg, var(--atr-bg-soft), #fff);
  border: 1px solid var(--atr-line);
  border-radius: 18px;
  margin-bottom: 22px;
}
.atr-score-wrap { text-align: center; }
.atr-score { font-size: calc(54px * var(--atr-rating-scale, 1)); font-weight: var(--atr-rating-weight, 800); line-height: 1; letter-spacing: -0.03em; }
.atr-score-out { font-size: 16px; color: var(--atr-muted); font-weight: 600; }
.atr-score-stars { margin: 10px 0 6px; display: inline-flex; gap: 3px; }
.atr-score-count { font-size: 13px; color: var(--atr-muted); }
.atr-histo { display: flex; flex-direction: column; gap: 7px; }
.atr-histo-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.atr-histo-row:hover .atr-histo-bar-fill { filter: brightness(1.05); }
.atr-histo-label { font-size: 12px; color: var(--atr-muted); width: 34px; display: flex; align-items: center; gap: 3px; }
.atr-histo-bar { flex: 1; height: 9px; background: #eee7d6; border-radius: 99px; overflow: hidden; }
.atr-histo-bar-fill { display: block; height: 100%; background: var(--atr-star); border-radius: 99px; transition: width 0.7s cubic-bezier(.2,.8,.2,1); }
.atr-histo-count { font-size: 12px; color: var(--atr-muted); width: 30px; text-align: right; }

/* Attribute summary bars (fit/comfort/quality/style) — mirrors the histogram.
   Spans both summary columns so it sits as its own row under the grid. */
.atr-attrs { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 7px; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--atr-line); }
.atr-attr-row { display: flex; align-items: center; gap: 10px; }
.atr-attr-label { font-size: 12px; color: var(--atr-muted); width: 64px; }
.atr-attr-bar { flex: 1; height: 9px; background: #eee7d6; border-radius: 99px; overflow: hidden; }
.atr-attr-fill { display: block; height: 100%; width: 0%; background: var(--atr-star); border-radius: 99px; transition: width 0.7s cubic-bezier(.2,.8,.2,1); }
.atr-attr-val { font-size: 12px; color: var(--atr-muted); width: 30px; text-align: right; }

/* ── Toolbar: filters + sort + write ── */
.atr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.atr-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.atr-pill {
  border: 1px solid var(--atr-pill-border); background: var(--atr-pill-bg); color: #4a4639;
  border-radius: var(--atr-pill-radius); padding: 7px 15px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .18s ease; display: inline-flex; align-items: center; gap: 6px;
  line-height: 1;
}
.atr-pill:hover { border-color: var(--atr-accent); color: var(--atr-accent); transform: translateY(-1px); }
.atr-pill.is-active { background: var(--atr-pill-active-bg); border-color: var(--atr-pill-active-bg); color: #fff; font-weight: 600; }
.atr-pill-count { font-size: 11px; opacity: .7; }
.atr-controls { display: flex; align-items: stretch; gap: 10px; }
.atr-sort {
  border: var(--atr-control-border-width, 1px) solid var(--atr-control-border, #e2ddd2); border-radius: var(--atr-control-radius, 10px); padding: 0 34px 0 14px; height: 40px; font-size: 13px; line-height: 38px;
  color: var(--atr-ink); background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f6a60' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>")
    no-repeat right 12px center;
  -webkit-appearance: none; appearance: none; cursor: pointer; font-weight: 500; box-sizing: border-box;
}
.atr-write {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--atr-btn-bg); color: var(--atr-btn-text); border: 1px solid transparent; border-radius: var(--atr-btn-radius);
  height: 40px; padding: 0 22px; font-size: 13px; font-weight: 600; cursor: pointer; box-sizing: border-box;
  transition: transform .15s ease, box-shadow .15s ease; white-space: nowrap;
}
.atr-write:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.14); }

/* ── Stars ── */
.atr-stars { display: inline-flex; gap: 2px; line-height: 0; }
.atr-stars svg { display: block; }

/* ── Reviews area ── */
.atr-stage { position: relative; }
.atr-viewport { overflow: hidden; }
.atr-track { display: flex; gap: 18px; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.atr[data-layout="grid"] .atr-track { display: grid; grid-template-columns: repeat(3, 1fr); transform: none !important; }
.atr[data-layout="list"] .atr-track { display: flex; flex-direction: column; transform: none !important; }

/* ── Card ── */
.atr-card {
  flex: 0 0 calc((100% - 36px) / 3);
  background: var(--atr-card);
  border: var(--atr-card-border-width) solid var(--atr-line);
  border-radius: var(--atr-card-radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 1px 2px rgba(20,17,11,.04);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  animation: atr-in .45s ease both;
}
.atr[data-layout="list"] .atr-card { flex: none; }
.atr-card:hover { box-shadow: 0 10px 30px rgba(20,17,11,.09); transform: translateY(-2px); border-color: #e4dccb; }
@keyframes atr-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.atr-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.atr-verified { font-size: 11px; font-weight: 600; color: #0f7b3f; background: #e9f8ef; border: 1px solid #c5edd5; border-radius: 999px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 4px; }
.atr-card-heading { font-size: calc(15px * var(--atr-title-scale, 1)); font-weight: var(--atr-title-weight, 700); margin: 2px 0 0; letter-spacing: -0.01em; }
.atr-card-body { font-size: 14px; line-height: 1.62; color: #46423a; }
.atr-card-body.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.atr-readmore { align-self: flex-start; font-size: 12.5px; font-weight: 600; color: var(--atr-accent); background: none; border: none; padding: 0; cursor: pointer; }
.atr-readmore:hover { text-decoration: underline; }

.atr-card-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.atr-avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #2c2716; flex: 0 0 auto; }
.atr-meta { min-width: 0; }
.atr-name { font-size: 13px; font-weight: 700; }
.atr-sub { font-size: 11.5px; color: var(--atr-muted); }
.atr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.atr-variant { font-size: 11px; color: #6a6453; background: #f4f1ea; border-radius: 6px; padding: 2px 8px; }
.atr-tag { font-size: 11px; color: var(--atr-accent); border: 1px solid #ead9b0; border-radius: 999px; padding: 1px 9px; }
/* Store reply — collapsible per-review reply from the merchant. */
.atr-reply { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--atr-line); }
.atr-reply-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--atr-accent); font-family: inherit; }
.atr-reply-ic { opacity: .7; }
.atr-reply-caret { font-size: 10px; transition: transform .2s ease; }
.atr-reply-toggle.is-open .atr-reply-caret { transform: rotate(180deg); }
.atr-reply-body { margin-top: 8px; padding: 11px 13px; background: var(--atr-bg-soft); border: 1px solid var(--atr-line); border-radius: 10px; }
.atr-reply-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: #46423a; }
.atr-reply-date { display: block; margin-top: 6px; font-size: 11px; color: var(--atr-muted); }

/* ── Carousel arrows + dots ── */
.atr-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.16);
  display: flex; align-items: center; justify-content: center; color: var(--atr-ink);
  transition: transform .15s ease, opacity .15s ease;
}
.atr-arrow:hover { transform: translateY(-50%) scale(1.07); }
.atr-arrow[disabled] { opacity: 0; pointer-events: none; }
.atr-prev { left: -14px; }
.atr-next { right: -14px; }
.atr[data-layout="grid"] .atr-arrow, .atr[data-layout="list"] .atr-arrow { display: none; }
.atr-dots { display: flex; justify-content: center; gap: 7px; margin-top: 18px; }
/* Mobile swipe affordance — hidden by default; shown only on carousel ≤640px. */
.atr-swipe-hint { display: none; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--atr-muted); }
.atr-swipe-arrow { display: inline-block; animation: atr-swipe 1.3s ease-in-out infinite; }
@keyframes atr-swipe { 0%,100% { transform: translateX(0); opacity: .55; } 50% { transform: translateX(6px); opacity: 1; } }
.atr-dot { width: 7px; height: 7px; border-radius: 50%; background: #ddd6c8; border: none; padding: 0; cursor: pointer; transition: all .2s; }
.atr-dot.is-active { background: var(--atr-accent); width: 22px; border-radius: 99px; }

.atr-more-wrap { text-align: center; margin-top: 26px; }
.atr-more { background: #fff; border: var(--atr-control-border-width, 1px) solid var(--atr-control-border, #ddd6c8); color: var(--atr-ink); border-radius: var(--atr-control-radius, 10px); padding: 11px 26px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.atr-more:hover { border-color: var(--atr-accent); color: var(--atr-accent); }

.atr-empty { text-align: center; padding: 48px 20px; }
.atr-empty-h { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.atr-empty-p { color: var(--atr-muted); margin: 0 0 18px; }
.atr-loading { text-align: center; color: var(--atr-muted); padding: 40px; font-size: 14px; }

/* ── Write-review modal ── */
/* The modal is portaled to <body> (outside .atr), so re-apply the box-sizing
   reset here or inputs (width:100% + padding) overflow the rounded card. */
.atr-modal-overlay, .atr-modal-overlay * { box-sizing: border-box; }
.atr-modal-overlay {
  position: fixed; inset: 0; background: rgba(20,17,11,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 99999;
  animation: atr-fade .2s ease;
  font-family: inherit;
}
@keyframes atr-fade { from { opacity: 0; } to { opacity: 1; } }
.atr-modal { background: #fff; border-radius: 18px; width: 100%; max-width: 460px; padding: 28px; position: relative; max-height: 92vh; overflow: auto; animation: atr-in .25s ease; }
.atr-modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: none; background: #f3f1ec; cursor: pointer; font-size: 18px; line-height: 1; }
.atr-modal-h { font-size: 19px; font-weight: 700; margin: 0 0 18px; }
.atr-rate { display: inline-flex; gap: 4px; margin-bottom: 16px; cursor: pointer; }
.atr-rate svg { cursor: pointer; }
.atr-label { display: block; font-size: 12.5px; font-weight: 600; margin: 0 0 6px; }
.atr-field { margin-bottom: 14px; }
.atr-input, .atr-textarea { width: 100%; border: 1px solid #e2ddd2; border-radius: 10px; padding: 11px 13px; font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s; }
.atr-input:focus, .atr-textarea:focus { border-color: var(--atr-accent); }
.atr-textarea { min-height: 100px; resize: vertical; }
.atr-submit { width: 100%; background: var(--atr-btn-bg); color: var(--atr-btn-text); border: none; border-radius: var(--atr-btn-radius); padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; }
.atr-submit:disabled { opacity: .5; cursor: default; }
.atr-form-msg { font-size: 13px; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; }
.atr-form-ok { background: #e9f8ef; color: #0f7b3f; }
.atr-form-err { background: #fdecea; color: #b42318; }

/* ── Compact widgets: Product Rating, Overall, Badge (share .atr tokens) ── */
.atr-plp { display: inline-flex; align-items: center; gap: 5px; }
.atr-plp-count { font-size: 12px; color: var(--atr-muted); }
.atr-rating-compact { display: inline-flex; align-items: center; gap: 8px; }
.atr-rc-score { font-weight: var(--atr-rating-weight, 700); font-size: calc(15px * var(--atr-rating-scale, 1)); color: var(--atr-ink); }
.atr-rc-count { font-size: 13px; color: var(--atr-muted); text-decoration: none; }
.atr-rc-count:hover { color: var(--atr-accent); text-decoration: underline; }
/* Compact rating pill. Star inherits the configured Stars colour (--atr-star,
   set by applyStyle from the Attest config), like every other widget. */
.atr-rating-pill { display: inline-flex; align-items: center; gap: 6px; background: #ebebeb; border-radius: 3px; padding: 3px 10px; text-decoration: none; line-height: 1; }
.atr-rating-pill svg { fill: var(--atr-star, #f1b400); }
.atr-rating-pill .atr-rp-v { font-weight: 700; font-size: 12px; color: #111; }
.atr-rating-pill .atr-rp-c { font-size: 12px; color: #111; }

.atr-overall { display: inline-flex; align-items: center; gap: 18px; padding: 18px 22px; background: var(--atr-bg-soft); border: var(--atr-card-border-width) solid var(--atr-line); border-radius: var(--atr-card-radius); }
.atr-overall-num { font-size: calc(40px * var(--atr-rating-scale, 1)); font-weight: var(--atr-rating-weight, 800); line-height: 1; letter-spacing: -0.02em; }
.atr-overall-out { font-size: 15px; color: var(--atr-muted); font-weight: 600; }
.atr-overall-mid { display: flex; flex-direction: column; gap: 6px; }
.atr-overall-count { font-size: 13px; color: var(--atr-muted); }
/* Store-wide overall rating banner (Overall Average Rating | 4.7 ★ | NK Customer Reviews) */
/* The overall widget root is a query container so the banner responds to its own
   width (works in the narrow dashboard preview AND any narrow storefront column),
   not just the viewport. */
.atr[data-widget="overall"] { container-type: inline-size; }
.atr-ovb { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap; text-align: center; }
.atr-ovb-label { font-size: clamp(16px, 2vw, 22px); color: var(--atr-muted); }
.atr-ovb-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.atr-ovb-num { font-size: calc(clamp(44px, 7vw, 68px) * var(--atr-rating-scale, 1)); font-weight: var(--atr-rating-weight, 700); line-height: 1; letter-spacing: -0.02em; color: var(--atr-ink); }
.atr-ovb-center .atr-stars svg { width: 26px; height: 26px; }
.atr-ovb-count { font-size: clamp(16px, 2vw, 22px); color: var(--atr-muted); display: inline-flex; align-items: center; gap: 9px; }
.atr-ovb-check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--atr-ink); color: #fff; font-size: 12px; line-height: 1; }
/* Stack centered when the banner's own box is narrow: number + stars first, then label, then count. */
@container (max-width: 820px) {
  .atr-ovb { flex-direction: column; gap: 6px; flex-wrap: nowrap; }
  .atr-ovb-center { order: -1; gap: 4px; }
  .atr-ovb-num { font-size: calc(46px * var(--atr-rating-scale, 1)); }
  .atr-ovb-label { font-size: 15px; }
  .atr-ovb-count { font-size: 15px; gap: 7px; }
  .atr-ovb-check { width: 17px; height: 17px; font-size: 11px; }
}
/* Fallback for browsers without container queries: stack on small viewports. */
@media (max-width: 640px) {
  .atr-ovb { flex-direction: column; gap: 6px; }
  .atr-ovb-center { order: -1; }
}

.atr-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; background: var(--atr-card); border: var(--atr-card-border-width) solid var(--atr-line); border-radius: 999px; text-decoration: none; color: var(--atr-ink); box-shadow: 0 1px 2px rgba(20,17,11,.05); transition: box-shadow .15s ease, transform .15s ease; }
.atr-badge:hover { box-shadow: 0 6px 18px rgba(20,17,11,.12); transform: translateY(-1px); }
.atr-badge-score { font-weight: var(--atr-rating-weight, 700); font-size: calc(14px * var(--atr-rating-scale, 1)); }
.atr-badge-count { font-size: 12px; color: var(--atr-muted); }
.atr-badge-float { position: fixed; bottom: 20px; right: 20px; z-index: 9998; padding: 10px 16px; box-shadow: 0 8px 24px rgba(0,0,0,.16); }

/* ── Photo / UGC wall ── */
.atr-pw { columns: 4; column-gap: 12px; }
.atr-pw-item { position: relative; display: block; width: 100%; margin: 0 0 12px; padding: 0; border: none; background: none; cursor: pointer; border-radius: 12px; overflow: hidden; break-inside: avoid; line-height: 0; }
.atr-pw-item img { width: 100%; display: block; border-radius: 12px; transition: transform .3s ease; }
.atr-pw-item:hover img { transform: scale(1.04); }
.atr-pw-ov { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.55); border-radius: 999px; padding: 3px 8px; opacity: 0; transition: opacity .2s; }
.atr-pw-item:hover .atr-pw-ov { opacity: 1; }
@media (max-width: 1023px) { .atr-pw { columns: 3; } }
@media (max-width: 640px) { .atr-pw { columns: 2; } }

/* ── Lightbox ── */
.atr-lb { background: #fff; border-radius: 16px; width: 100%; max-width: 860px; display: flex; overflow: hidden; position: relative; max-height: 90vh; }
.atr-lb-img { flex: 1.3; background: #0c0a07; position: relative; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.atr-lb-img img { max-width: 100%; max-height: 90vh; object-fit: contain; display: block; }
.atr-lb-side { flex: 1; padding: 28px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.atr-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.atr-lb-prev { left: 12px; } .atr-lb-next { right: 12px; }
@media (max-width: 680px) { .atr-lb { flex-direction: column; } .atr-lb-img { min-height: 240px; } }

/* ── Featured carousel (homepage testimonials) ── */
.atr-center { text-align: center; }
.atr-feat { display: flex; align-items: stretch; gap: 10px; }
.atr-feat-vp { overflow: hidden; flex: 1; }
.atr-feat-track { display: flex; align-items: stretch; transition: transform .35s ease; will-change: transform; }
.atr-feat-card { box-sizing: border-box; margin: 0; text-align: center; background: var(--atr-bg-soft); border: var(--atr-card-border-width) solid var(--atr-line); border-radius: var(--atr-card-radius); padding: 28px 26px; display: flex; flex-direction: column; }
.atr-feat-card .atr-stars { justify-content: center; }
.atr-feat-quote { flex: 1; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.55; font-weight: 500; color: var(--atr-ink); margin: 14px 0 16px; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.atr-feat-by { font-size: 13px; color: var(--atr-muted); font-weight: 600; margin-top: auto; }
.atr-feat .atr-arrow { position: static; transform: none; }
.atr-feat .atr-arrow:hover { transform: scale(1.07); }

/* ── Q&A ── */
.atr-qa-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.atr-qa-list { display: flex; flex-direction: column; gap: 18px; }
.atr-qa-item { border: var(--atr-card-border-width) solid var(--atr-line); border-radius: var(--atr-card-radius); padding: 18px 20px; background: var(--atr-card); }
.atr-qa-row { display: flex; gap: 12px; align-items: flex-start; }
.atr-qa-answer { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--atr-line); }
.atr-qa-badge { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.atr-qa-q { background: #eef0ff; color: #3b3fb0; }
.atr-qa-a { background: var(--atr-bg-soft); color: var(--atr-accent); }
.atr-qa-main { min-width: 0; }
.atr-qa-text { font-size: 14.5px; line-height: 1.6; color: #2f2b24; margin: 0 0 4px; }
.atr-qa-merchant { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--atr-accent); border-radius: 4px; padding: 1px 6px; }
.atr-qa-answer-btn { margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--atr-accent); background: none; border: none; padding: 0; cursor: pointer; }
.atr-qa-answer-btn:hover { text-decoration: underline; }

/* ── AI summary card ── */
.atr-ai { background: linear-gradient(180deg, var(--atr-bg-soft), #fff); border: var(--atr-card-border-width) solid var(--atr-line); border-radius: var(--atr-card-radius); padding: 24px 26px; }
.atr-ai-clickable { cursor: pointer; transition: box-shadow .2s, transform .2s; }
.atr-ai-clickable:hover { box-shadow: 0 10px 30px rgba(20,17,11,.08); transform: translateY(-1px); }
.atr-ai-kicker { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--atr-accent); margin-bottom: 12px; }
.atr-ai-spark { font-size: 13px; }
.atr-ai-text { font-size: 15.5px; line-height: 1.65; color: #3c382f; margin: 0; }
.atr-ai-cta { display: inline-flex; align-items: center; gap: 5px; margin-top: 16px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--atr-ink); background: none; border: none; padding: 0; cursor: pointer; opacity: .7; transition: opacity .2s; }
.atr-ai-cta:hover { opacity: 1; }
.atr-ai-cta svg { width: 14px; height: 14px; }

/* ── Summary drawer (portaled to body) ── */
.atr-drawer-overlay, .atr-drawer-overlay * { box-sizing: border-box; }
.atr-drawer-overlay { position: fixed; inset: 0; background: rgba(20,17,11,0); z-index: 99999; visibility: hidden; transition: background .3s ease, visibility 0s linear .3s; font-family: inherit; }
.atr-drawer-overlay.is-open { background: rgba(20,17,11,.45); visibility: visible; transition: background .3s ease; }
.atr-drawer { position: absolute; top: 0; right: 0; width: 440px; max-width: 100vw; height: 100%; background: #fff; transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); overflow-y: auto; display: flex; flex-direction: column; }
.atr-drawer-overlay.is-open .atr-drawer { transform: translateX(0); }
.atr-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid #ececec; position: sticky; top: 0; background: #fff; }
.atr-drawer-title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--atr-accent, #a67c00); }
.atr-drawer-close { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: #888; }
.atr-drawer-body { padding: 26px; }
.atr-drawer-intro { font-size: 15px; line-height: 1.65; color: #3c382f; margin: 0 0 24px; padding-bottom: 22px; border-bottom: 1px solid #ececec; }
.atr-cats { display: flex; flex-direction: column; gap: 22px; }
.atr-cat-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.atr-cat-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.atr-cat-list li { font-size: 14px; line-height: 1.5; color: #4a463d; }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .atr[data-layout="grid"] .atr-track { grid-template-columns: repeat(2, 1fr); }
  .atr[data-layout="carousel"] .atr-card { flex: 0 0 calc((100% - 18px) / 2); }
  .atr-summary { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 749px) {
  /* Mobile padding overrides (set via --atr-pl-m / --atr-pr-m on each block). */
  .atr {
    padding-left: var(--atr-pl-m, var(--atr-pl, 0px));
    padding-right: var(--atr-pr-m, var(--atr-pr, 0px));
  }
}
@media (max-width: 640px) {
  .atr[data-layout="grid"] .atr-track { grid-template-columns: 1fr; }
  .atr[data-layout="carousel"] .atr-card { flex: 0 0 100%; }
  .atr-toolbar { flex-direction: column; align-items: stretch; }
  .atr-controls { justify-content: space-between; }
  /* On phones the full-width card leaves no room for side arrows — they
     overlapped the review text. Hide them; swipe + dots handle navigation.
     (Featured uses in-flow arrows, not these, so it's unaffected.) */
  .atr[data-layout="carousel"] .atr-arrow { display: none; }
  .atr[data-layout="carousel"] .atr-viewport { margin: 0; }
  .atr[data-layout="carousel"] .atr-swipe-hint { display: flex; }
}
