/* Every --ntaa-* custom property below, plus the .ntaa-roundup/.ntaa-button/
   .ntaa-product-card class names and [ntaa_card]'s "asin" attribute, are read
   directly by the companion ntaa-theme (see its README's "Plugin contract"
   section) with no compatibility layer in between. Renaming or removing any
   of them here is a breaking change for that theme even though nothing in
   this codebase enforces it — note it in the changelog so the theme side can
   be checked before the update ships. (Already happened once: --ntaa-accent
   was dropped in 1.2.6 with no changelog note, and the theme's override went
   silently unused until someone noticed the button was the wrong color.) */
.ntaa-roundup {
  --ntaa-blue:#2563eb;
  --ntaa-navy:#172554;
  --ntaa-orange:#f59e0b;
  --ntaa-orange-2:#ea580c;
  --ntaa-border:#dfe3e8;
  --ntaa-ink:#1f2937;
  --ntaa-ink-strong:#111827;
  --ntaa-muted:#64748b;
  --ntaa-subtle:#94a3b8;
  --ntaa-surface:#fff;
  --ntaa-surface-soft:#f8fafc;
  --ntaa-border-soft:#e5e7eb;
  --ntaa-border-softer:#e2e8f0;
  --ntaa-danger:#b91c1c;
  --ntaa-danger-strong:#dc2626;
  --ntaa-success:#16a34a;
  --ntaa-success-strong:#16803c;
  --ntaa-score-border:#fde68a;
  --ntaa-score-bg:#fffbeb;
  --ntaa-score-ink:#92400e;
  --ntaa-cta-1:#ffd86b;
  --ntaa-cta-2:#f7b733;
  --ntaa-cta-border:#d99a18;
  --ntaa-cta-ink:#111827;
  max-width:920px;
  margin:30px auto;
  font-family:inherit;
  color:var(--ntaa-ink)
}

.ntaa-disclosure {
  margin:0 4px 12px;
  color:var(--ntaa-subtle);
  font-size:10px;
  line-height:1.45;
  text-align:right
}

/* A single [ntaa_card] still needs the palette that lives on .ntaa-roundup,
   but not the centred column a full roundup gets — the template placing it
   owns the width there. */
.ntaa-roundup-single {
  max-width:none;
  margin:0
}

.ntaa-roundup-list {
  display:grid;
  gap:22px
}

.ntaa-product-card {
  position:relative;
  overflow:visible;
  border:1px solid var(--ntaa-border);
  border-radius:10px;
  background:var(--ntaa-surface);
  box-shadow:0 4px 16px rgba(15,23,42,.07)
}

.ntaa-card-labels {
  position:absolute;
  z-index:2;
  top:-15px;
  left:16px;
  display:flex;
  align-items:center;
  gap:7px
}

.ntaa-rank {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:3px solid var(--ntaa-surface);
  border-radius:50%;
  color:#fff;
  background:var(--ntaa-blue);
  font-size:16px;
  font-weight:800;
  box-shadow:0 3px 9px rgba(0,0,0,.25)
}

.ntaa-badge {
  padding:6px 12px;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg,var(--ntaa-orange),var(--ntaa-orange-2));
  font-size:11px;
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
  box-shadow:0 3px 8px rgba(0,0,0,.18)
}

.ntaa-product-main {
  display:grid;
  grid-template-columns:190px minmax(0,1fr) 180px;
  gap:20px;
  align-items:center;
  min-height:225px;
  padding:30px 22px 22px
}

.ntaa-product-image {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:180px
}

.ntaa-product-image img {
  display:block;
  width:100%;
  max-width:180px;
  height:180px;
  object-fit:contain
}

.ntaa-discount {
  position:absolute;
  z-index:1;
  top:-5px;
  right:-4px;
  padding:5px 8px;
  border-radius:6px;
  color:#fff;
  background:var(--ntaa-danger-strong);
  font-size:12px;
  font-weight:800
}

.ntaa-product-content h3 {
  display:-webkit-box;
  max-height:4.05em;
  margin:0 0 9px;
  overflow:hidden;
  font-size:20px;
  line-height:1.35;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3
}

.ntaa-product-content h3 a {
  color:var(--ntaa-ink-strong);
  text-decoration:none
}

.ntaa-product-content h3 a:hover {
  color:var(--ntaa-blue)
}

.ntaa-score {
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin:2px 0 12px;
  padding:7px 10px;
  border:1px solid var(--ntaa-score-border);
  border-radius:7px;
  background:var(--ntaa-score-bg)
}

.ntaa-score-stars {
  color:var(--ntaa-orange);
  font-size:14px;
  letter-spacing:1px
}

.ntaa-score strong {
  color:var(--ntaa-score-ink);
  font-size:15px
}

.ntaa-has-tooltip {
  position:relative;
  cursor:help
}

.ntaa-has-tooltip::after {
  position:absolute;
  z-index:20;
  left:50%;
  bottom:calc(100% + 9px);
  width:max-content;
  max-width:280px;
  padding:8px 10px;
  border:1px solid var(--ntaa-border-softer);
  border-radius:6px;
  color:var(--ntaa-muted);
  background:var(--ntaa-surface-soft);
  box-shadow:0 6px 18px rgba(15,23,42,.1);
  content:attr(data-tooltip);
  font-size:11px;
  font-weight:400;
  line-height:1.4;
  text-align:center;
  white-space:normal;
  opacity:0;
  pointer-events:none;
  transform:translate(-50%,5px);
  transition:opacity .15s,transform .15s
}

.ntaa-has-tooltip::before {
  position:absolute;
  z-index:21;
  left:50%;
  bottom:calc(100% + 3px);
  border:6px solid transparent;
  border-top-color:var(--ntaa-border-softer);
  content:"";
  opacity:0;
  pointer-events:none;
  transform:translateX(-50%);
  transition:opacity .15s
}

.ntaa-has-tooltip:hover::after,
.ntaa-has-tooltip:hover::before,
.ntaa-has-tooltip:focus::after,
.ntaa-has-tooltip:focus::before {
  opacity:1;
  transform:translate(-50%,0)
}

.ntaa-has-tooltip:hover::before,
.ntaa-has-tooltip:focus::before {
  transform:translateX(-50%)
}

.ntaa-meta {
  display:flex;
  flex-wrap:wrap;
  gap:7px 13px;
  color:var(--ntaa-muted);
  font-size:12px;
  line-height:1.4
}

.ntaa-brand {
  display:inline-flex;
  align-items:center;
  gap:5px
}

.ntaa-brand svg {
  width:14px;
  height:14px;
  fill:var(--ntaa-muted)
}

.ntaa-meta .is-stock {
  color:var(--ntaa-success-strong)
}

.ntaa-meta .is-out {
  color:var(--ntaa-danger)
}

.ntaa-highlights {
  display:grid;
  gap:5px;
  margin-top:13px;
  color:var(--ntaa-ink);
  font-size:13px
}

.ntaa-highlights span::first-letter {
  color:var(--ntaa-success)
}

.ntaa-buy-box {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  text-align:center
}

.ntaa-old-price {
  display:flex;
  justify-content:center;
  gap:7px;
  margin-bottom:3px;
  color:var(--ntaa-muted);
  font-size:11px
}

.ntaa-old-price span {
  color:var(--ntaa-danger);
  font-weight:700
}

.ntaa-price {
  display:block;
  margin:3px 0 12px;
  color:var(--ntaa-ink-strong);
  font-size:25px;
  line-height:1.2
}

.ntaa-button {
  display:block;
  padding:12px 13px;
  border-radius:7px;
  color:var(--ntaa-cta-ink)!important;
  background:linear-gradient(var(--ntaa-cta-1),var(--ntaa-cta-2));
  box-shadow:inset 0 0 0 1px var(--ntaa-cta-border);
  font-size:13px;
  font-weight:800;
  text-align:center;
  text-decoration:none!important;
  transition:filter .15s,transform .15s
}

.ntaa-button:hover {
  filter:brightness(.97);
  transform:translateY(-1px)
}

.ntaa-button-secondary {
  margin-top:7px;
  color:var(--ntaa-ink)!important;
  background:var(--ntaa-surface);
  box-shadow:inset 0 0 0 1px var(--ntaa-border-soft)
}

.ntaa-grid-wrap {
  max-width:1200px
}

.ntaa-grid {
  grid-template-columns:repeat(var(--ntaa-columns,3),minmax(0,1fr))
}

.ntaa-grid .ntaa-product-main {
  grid-template-columns:1fr;
  align-content:start;
  height:100%;
  padding:30px 18px 18px
}

.ntaa-grid .ntaa-product-card {
  height:100%
}

.ntaa-grid .ntaa-buy-box {
  align-self:end
}

.ntaa-grid .ntaa-product-image img {
  height:170px
}

.ntaa-grid .ntaa-product-content h3 {
  font-size:17px
}

.ntaa-details {
  border-top:1px solid var(--ntaa-border)
}

.ntaa-details summary {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:11px 18px;
  color:var(--ntaa-muted);
  background:var(--ntaa-surface-soft);
  cursor:pointer;
  font-size:12px;
  font-weight:700;
  list-style:none
}

.ntaa-details summary::-webkit-details-marker {
  display:none
}

.ntaa-details[open] summary span {
  transform:rotate(180deg)
}

.ntaa-details-body {
  display:grid;
  gap:18px;
  padding:20px 24px;
  color:var(--ntaa-ink);
  font-size:14px;
  line-height:1.65
}

.ntaa-details-body h4 {
  margin:0 0 7px;
  color:var(--ntaa-ink-strong);
  font-size:15px
}

.ntaa-description p:first-child {
  margin-top:0
}

.ntaa-description p:last-child {
  margin-bottom:0
}

.ntaa-features {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px 24px;
  margin:0;
  padding-left:19px
}

.ntaa-pros-cons {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  padding:16px;
  border-radius:8px;
  background:var(--ntaa-surface-soft)
}

.ntaa-pros-cons ul {
  margin:0;
  padding-left:19px
}

.ntaa-pros-cons li {
  margin:4px 0
}

.ntaa-custom-tab {
  padding-top:15px;
  border-top:1px solid var(--ntaa-border-soft)
}

.ntaa-empty {
  padding:12px;
  border:1px dashed var(--ntaa-border-soft)
}

@media(max-width:800px) {
  .ntaa-product-main {
    grid-template-columns:150px minmax(0,1fr)
  }

  .ntaa-buy-box {
    grid-column:1/-1;
    display:grid;
    grid-template-columns:1fr 180px;
    align-items:center;
    gap:16px
  }

  .ntaa-price {
    margin:0
  }

  .ntaa-old-price {
    display:none
  }
}

@media(max-width:980px) {
  .ntaa-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}

@media(max-width:560px) {
  .ntaa-product-main {
    grid-template-columns:1fr;
    padding:32px 17px 18px
  }

  .ntaa-product-image {
    min-height:155px
  }

  .ntaa-product-image img {
    height:155px
  }

  .ntaa-buy-box {
    grid-template-columns:1fr
  }

  .ntaa-features,.ntaa-pros-cons {
    grid-template-columns:1fr
  }

  .ntaa-card-labels {
    left:10px
  }

  .ntaa-product-content h3 {
    font-size:18px
  }
}

@media(max-width:560px) {
  .ntaa-grid {
    grid-template-columns:1fr
  }
}

.ntaa-gallery {
  display:grid;
  gap:8px
}

.ntaa-gallery-main {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:170px
}

.ntaa-gallery-thumbs {
  display:flex;
  justify-content:center;
  gap:5px
}

.ntaa-gallery-thumbs button {
  width:42px;
  height:42px;
  padding:2px;
  border:1px solid var(--ntaa-border-soft);
  border-radius:6px;
  background:var(--ntaa-surface);
  cursor:pointer
}

.ntaa-gallery-thumbs button.is-active {
  border-color:var(--ntaa-blue);
  box-shadow:0 0 0 1px var(--ntaa-blue)
}

.ntaa-gallery-thumbs img {
  width:100%;
  height:100%;
  object-fit:contain
}

.ntaa-trust-row {
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  margin-top:9px;
  color:var(--ntaa-muted);
  font-size:12px
}

.ntaa-trust-row .ntaa-prime {
  color:#087e8b;
  font-weight:700
}

.ntaa-trust-row .is-current {
  color:var(--ntaa-success-strong)
}

.ntaa-trust-row .is-stale {
  color:#b54708
}

.ntaa-cta-note {
  display:block;
  margin-top:7px;
  color:var(--ntaa-muted);
  font-size:10px;
  line-height:1.35;
  text-align:center
}

.ntaa-style-editorial {
  border-left:4px solid var(--ntaa-navy)
}

.ntaa-style-compact .ntaa-product-main {
  min-height:180px;
  padding-block:22px
}

.ntaa-style-compact .ntaa-details {
  display:none
}

.ntaa-style-conversion .ntaa-button {
  box-shadow:0 4px 10px rgba(0,0,0,.18)
}

.ntaa-style-conversion .ntaa-buy-box {
  padding:12px;
  border-radius:9px;
  background:var(--ntaa-surface-soft)
}

.ntaa-style-classic {
  border-radius:8px;
  box-shadow:0 2px 9px rgba(15,23,42,.06)
}

.ntaa-style-classic .ntaa-product-main {
  grid-template-columns:145px minmax(0,1fr) 155px;
  gap:15px;
  min-height:178px;
  padding:22px 16px 16px
}

.ntaa-style-classic .ntaa-product-image {
  min-height:140px
}

.ntaa-style-classic .ntaa-product-image>a {
  display:flex;
  align-items:center;
  justify-content:center
}

.ntaa-style-classic .ntaa-product-image img {
  max-width:140px;
  height:140px
}

.ntaa-style-classic .ntaa-product-content h3 {
  margin-bottom:7px;
  font-size:17px;
  line-height:1.3
}

.ntaa-style-classic .ntaa-score {
  gap:7px;
  margin-bottom:8px;
  padding:5px 8px
}

.ntaa-style-classic .ntaa-score-stars {
  font-size:12px
}

.ntaa-style-classic .ntaa-score strong {
  font-size:13px
}

.ntaa-style-classic .ntaa-meta {
  gap:5px 10px;
  font-size:11px
}

.ntaa-style-classic .ntaa-highlights {
  gap:3px;
  margin-top:8px;
  font-size:12px
}

.ntaa-style-classic .ntaa-price {
  margin:2px 0 8px;
  font-size:21px
}

.ntaa-style-classic .ntaa-button {
  padding:10px 11px;
  font-size:12px
}

.ntaa-style-classic .ntaa-card-labels {
  top:-12px
}

.ntaa-style-classic .ntaa-rank {
  width:32px;
  height:32px;
  font-size:14px
}

.ntaa-style-classic .ntaa-badge {
  padding:5px 10px;
  font-size:10px
}

/* Wide comparison table (written by the NTAAwp AI add-on) — scrolls inside its
   own container instead of widening the page. These rules deliberately live in
   a stylesheet rather than an inline style: wp_kses strips `overflow-x` from
   inline styles on every post saved without `unfiltered_html` (i.e. every
   cron-run AI job) while keeping `min-width`, which left the table wide and
   unscrollable. Both selectors are needed — posts generated before this fix
   carry only the two Gutenberg classes, not `.ntaa-comparison-table`. */ .wp-block-table__scroll-container {
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch
}

.ntaa-comparison-table {
  max-width:100%;
  margin-left:0;
  margin-right:0
}

.wp-block-table__scroll-container>table {
  display:table;
  width:100%;
  min-width:700px;
  margin:0;
  border-collapse:collapse;
  overflow:visible
}

@media(max-width:760px) {
  .ntaa-style-classic .ntaa-product-main {
    grid-template-columns:120px minmax(0,1fr);
    gap:13px;
    padding:22px 14px 14px
  }

  .ntaa-style-classic .ntaa-product-image {
    min-height:115px
  }

  .ntaa-style-classic .ntaa-product-image img {
    max-width:115px;
    height:115px
  }

  .ntaa-style-classic .ntaa-buy-box {
    grid-column:1/-1;
    display:grid;
    grid-template-columns:minmax(0,1fr) 155px;
    gap:12px;
    align-items:center
  }

  .ntaa-style-classic .ntaa-price {
    margin:0
  }
}

@media(max-width:480px) {
  .ntaa-roundup-list {
    gap:16px
  }

  .ntaa-style-classic .ntaa-product-main {
    grid-template-columns:92px minmax(0,1fr);
    gap:10px;
    padding:20px 11px 12px
  }

  .ntaa-style-classic .ntaa-product-image {
    min-height:90px
  }

  .ntaa-style-classic .ntaa-product-image img {
    max-width:90px;
    height:90px
  }

  .ntaa-style-classic .ntaa-product-content h3 {
    font-size:15px;
    -webkit-line-clamp:3
  }

  .ntaa-style-classic .ntaa-score-stars {
    letter-spacing:0
  }

  .ntaa-style-classic .ntaa-highlights {
    font-size:11px;
    line-height:1.35
  }

  .ntaa-style-classic .ntaa-buy-box {
    display:grid;
    grid-template-columns:1fr;
    gap:7px
  }

  .ntaa-style-classic .ntaa-old-price {
    display:none
  }

  .ntaa-style-classic .ntaa-price {
    font-size:19px
  }
}
