/* ==========================================================================
   v0.65 — DEFINITIVE COMMERCE CARDS
   Native PHP markup only. No JS card reconstruction.
   ========================================================================== */

.ss-commerce-card-v65{
  --ss65-bg:var(--card);
  --ss65-soft:color-mix(in srgb,var(--accent) 4%,var(--soft2));
  --ss65-line:color-mix(in srgb,var(--accent) 16%,var(--line));
  --ss65-ink:var(--ink);
  --ss65-muted:var(--muted);
  position:relative!important;
  box-sizing:border-box!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
  background:var(--ss65-bg)!important;
  border:1px solid var(--ss65-line)!important;
  border-radius:18px!important;
  box-shadow:0 12px 34px rgba(18,42,29,.065)!important;
  transform:none;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important;
}
.ss-commerce-card-v65:hover{
  transform:translateY(-2px)!important;
  border-color:color-mix(in srgb,var(--accent) 38%,var(--line))!important;
  box-shadow:0 18px 42px rgba(18,42,29,.095)!important;
}
.ss-commerce-card-v65:before{
  content:"";
  position:absolute;
  z-index:5;
  left:0;top:0;
  width:100%;height:3px;
  background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 18%,transparent) 62%,transparent);
  pointer-events:none;
}
html[data-theme="dark"] .ss-commerce-card-v65{
  --ss65-bg:#181c1a;
  --ss65-soft:#202522;
  --ss65-line:#313935;
  box-shadow:0 14px 38px rgba(0,0,0,.20)!important;
}

/* ---------------- HOME ---------------- */
.home-page .deal-grid{
  align-items:stretch!important;
}
.home-page .ss-commerce-home-v65{
  display:flex!important;
  flex-direction:column!important;
}
.home-page .ss-commerce-home-v65>a{
  display:flex!important;
  flex:1!important;
  flex-direction:column!important;
  gap:0!important;
  min-height:0!important;
  height:auto!important;
  padding:10px 10px 12px!important;
}
.home-page .ss-commerce-home-v65 .deal-img{
  width:100%!important;
  aspect-ratio:4/3!important;
  min-height:0!important;
  margin:0!important;
  padding:15px!important;
  border:1px solid var(--ss65-line)!important;
  border-radius:14px!important;
  background:
    radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--accent) 9%,transparent),transparent 50%),
    var(--ss65-soft)!important;
}
.home-page .ss-commerce-home-v65 .deal-img img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  margin:0!important;
}
.home-page .ss-commerce-home-v65 .deal-source{
  width:max-content!important;
  max-width:100%!important;
  min-height:22px!important;
  margin:10px 0 0!important;
  padding:5px 8px!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--accent) 8%,transparent)!important;
  color:var(--accent)!important;
  font-size:9px!important;
  line-height:1!important;
  letter-spacing:.08em!important;
}
.home-page .ss-commerce-home-v65 h3{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  min-height:0!important;
  height:auto!important;
  margin:8px 0 7px!important;
  overflow:hidden!important;
  font-size:17px!important;
  line-height:1.16!important;
  letter-spacing:-.35px!important;
}
.home-page .ss-commerce-home-v65 .price-row{
  min-height:0!important;
  margin:3px 0 0!important;
  gap:7px!important;
}
.home-page .ss-commerce-home-v65 .price-row strong{
  font-size:25px!important;
  line-height:1!important;
  letter-spacing:-.8px!important;
  color:var(--ink)!important;
}
.home-page .ss-commerce-home-v65 .price-row del{
  font-size:10px!important;
}
.home-page .ss-commerce-home-v65 .deal-time{
  margin-top:auto!important;
  padding-top:8px!important;
  font-size:9px!important;
}
.home-page .ss-commerce-home-v65 .home-deal-compare-btn-v53{
  right:16px!important;
  top:16px!important;
  z-index:12!important;
  min-height:34px!important;
  max-width:106px!important;
  padding:7px 10px!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--card) 88%,transparent)!important;
  backdrop-filter:blur(10px)!important;
}

/* ---------------- OFFERS GRID ---------------- */
.offers-v38 .ss-commerce-offer-v65{
  border-radius:13px!important;
  display:flex!important;
  flex-direction:column!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-product-shell-v52{
  display:flex!important;
  flex:1!important;
  flex-direction:column!important;
  min-height:0!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-media{
  height:150px!important;
  min-height:150px!important;
  padding:14px!important;
  border-bottom:1px solid var(--ss65-line)!important;
  background:
    radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--accent) 8%,transparent),transparent 50%),
    var(--ss65-soft)!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-media img{
  object-fit:contain!important;
  transform:none!important;
}
.offers-v38 .ss-commerce-offer-v65:hover .ddeals-media img{
  transform:scale(1.018)!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-copy{
  display:flex!important;
  flex:1!important;
  flex-direction:column!important;
  min-height:0!important;
  padding:10px 11px 11px!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-brand{
  min-height:15px!important;
  margin:0!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-brand small{
  display:none!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-copy-link-v52{
  display:flex!important;
  flex:1!important;
  flex-direction:column!important;
  min-height:0!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-copy h3{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  min-height:0!important;
  height:auto!important;
  margin:6px 0 7px!important;
  overflow:hidden!important;
  font-size:13px!important;
  line-height:1.17!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-prices{
  margin:0!important;
  padding:0!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-now strong{
  font-size:21px!important;
  line-height:1!important;
  letter-spacing:-.65px!important;
  color:var(--ink)!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-footer{
  margin-top:auto!important;
  padding-top:7px!important;
  border-top:1px solid var(--ss65-line)!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-footer small{
  font-size:8px!important;
}
.offers-v38 .ss-commerce-offer-v65 .ddeals-offer-inline-v54{
  font-size:9px!important;
  font-weight:900!important;
}

/* ---------------- OFFERS SPOTLIGHT ---------------- */
.offers-picked-v38 .ss-commerce-spotlight-v65{
  border-radius:15px!important;
}
.offers-picked-v38 .ss-commerce-spotlight-v65>a{
  grid-template-columns:118px minmax(0,1fr)!important;
  min-height:130px!important;
}
.offers-picked-v38 .ss-commerce-spotlight-v65 .deal-editor-media{
  padding:12px!important;
  background:var(--ss65-soft)!important;
}
.offers-picked-v38 .ss-commerce-spotlight-v65 .deal-editor-media img{
  height:105px!important;
}
.offers-picked-v38 .ss-commerce-spotlight-v65 .deal-editor-copy{
  padding:12px 13px!important;
}
.offers-picked-v38 .ss-commerce-spotlight-v65 .deal-editor-copy h3{
  -webkit-line-clamp:2!important;
  font-size:14px!important;
}
.offers-picked-v38 .ss-commerce-spotlight-v65 .deal-editor-price strong{
  padding:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--ink)!important;
  font-size:21px!important;
}

/* ---------------- INLINE / UNDER VERDICT ---------------- */
.article-body .ss-commerce-inline-v65,
.ss-verdict-linked-product .ss-commerce-inline-v65,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65{
  width:min(900px,100%)!important;
  max-width:100%!important;
  min-width:0!important;
  margin:34px auto!important;
  transform:none!important;
  display:grid!important;
  grid-template-columns:220px minmax(0,1fr)!important;
  gap:0!important;
  border-radius:20px!important;
}
.article-body .ss-commerce-inline-v65 .product-tech-visual,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-visual,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .product-tech-visual{
  width:220px!important;
  min-width:220px!important;
  min-height:190px!important;
  height:190px!important;
  max-height:190px!important;
  padding:18px!important;
  border-right:1px solid var(--ss65-line)!important;
  border-bottom:0!important;
  background:
    radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--accent) 8%,transparent),transparent 52%),
    var(--ss65-soft)!important;
}
.article-body .ss-commerce-inline-v65 .product-tech-visual:before,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-visual:before,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .product-tech-visual:before{
  display:none!important;
}
.article-body .ss-commerce-inline-v65 .product-tech-visual img,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-visual img,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .product-tech-visual img{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  transform:none!important;
  filter:drop-shadow(0 10px 18px rgba(16,21,19,.10))!important;
}
.article-body .ss-commerce-inline-v65 .product-zoom-hint,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-zoom-hint,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .product-zoom-hint{
  display:none!important;
}
.article-body .ss-commerce-inline-v65 .product-tech-content,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-content,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .product-tech-content{
  min-height:190px!important;
  padding:18px 20px!important;
  gap:0!important;
}
.article-body .ss-commerce-inline-v65 .product-tech-topline,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-topline,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .product-tech-topline{
  margin:0 0 8px!important;
}
.article-body .ss-commerce-inline-v65 h3,
.ss-verdict-linked-product .ss-commerce-inline-v65 h3,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 h3{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  min-height:0!important;
  margin:0 0 7px!important;
  overflow:hidden!important;
  font-size:22px!important;
  line-height:1.1!important;
  letter-spacing:-.55px!important;
}
.article-body .ss-commerce-inline-v65 .native-product-brand{
  margin:0 0 4px!important;
  font-size:9px!important;
}
.article-body .ss-commerce-inline-v65 .native-product-price,
.ss-verdict-linked-product .ss-commerce-inline-v65 .native-product-price,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .native-product-price{
  margin:4px 0 0!important;
  gap:7px!important;
}
.article-body .ss-commerce-inline-v65 .native-product-price strong,
.ss-verdict-linked-product .ss-commerce-inline-v65 .native-product-price strong,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .native-product-price strong{
  font-size:25px!important;
  line-height:1!important;
  letter-spacing:-.75px!important;
}
.article-body .ss-commerce-inline-v65 .product-tech-footer,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-footer,
.ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .product-tech-footer{
  margin-top:auto!important;
  padding-top:9px!important;
  gap:10px!important;
}
.article-body .ss-commerce-inline-v65 .product-commerce-copy strong,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-commerce-copy strong{
  font-size:10px!important;
}
.article-body .ss-commerce-inline-v65 .product-commerce-copy span,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-commerce-copy span{
  font-size:9px!important;
}
.article-body .ss-commerce-inline-v65 .product-tech-actions-v53,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-actions-v53{
  gap:6px!important;
  flex-wrap:nowrap!important;
}
.article-body .ss-commerce-inline-v65 .product-tech-actions-v53>*,
.ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-actions-v53>*{
  min-height:34px!important;
  font-size:9px!important;
}
.article-body .ss-commerce-inline-v65 a.amazon-cta.product-tech-cta,
.ss-verdict-linked-product .ss-commerce-inline-v65 a.amazon-cta.product-tech-cta{
  min-width:0!important;
  min-height:34px!important;
  padding:0 10px!important;
  border-radius:10px!important;
  font-size:9px!important;
}

/* Linked product wrapper must never create a giant empty area. */
.ss-verdict-linked-product,
.ss-verdict-linked-product-mounted{
  box-sizing:border-box!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}
.ss-verdict-linked-product-mounted{
  width:min(940px,calc(100vw - 190px))!important;
  margin:28px auto 38px!important;
}

/* ---------------- PRICE HISTORY UI ---------------- */
.ss-price-history-slot-v65{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:0!important;
  margin:7px 0 0!important;
  padding:0!important;
}
.ss-ph65-new{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  width:auto!important;
  max-width:100%!important;
  padding:5px 7px!important;
  border:1px solid color-mix(in srgb,var(--accent) 15%,var(--line))!important;
  border-radius:8px!important;
  background:color-mix(in srgb,var(--accent) 4%,transparent)!important;
  color:var(--muted)!important;
  font-size:9px!important;
  font-weight:650!important;
  line-height:1.1!important;
}
.ss-ph65-new:before{
  content:"";
  width:6px;height:6px;flex:0 0 6px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 10%,transparent);
}
.ss-ph65-box{
  display:grid!important;
  gap:5px!important;
  width:100%!important;
  max-width:100%!important;
  padding:7px 8px!important;
  border:1px solid color-mix(in srgb,var(--accent) 13%,var(--line))!important;
  border-radius:9px!important;
  background:var(--ss65-soft,var(--soft2))!important;
}
.ss-ph65-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:7px!important;
}
.ss-ph65-head span{
  color:var(--accent)!important;
  font-size:8px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.ss-ph65-badge{
  padding:3px 6px!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--accent) 10%,transparent)!important;
  color:var(--accent)!important;
  font-size:8px!important;
  font-weight:950!important;
}
.ss-ph65-values{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
}
.ss-ph65-values>span{
  display:flex!important;
  align-items:baseline!important;
  justify-content:space-between!important;
  gap:5px!important;
  min-width:0!important;
  color:var(--muted)!important;
  font-size:8px!important;
  font-weight:750!important;
}
.ss-ph65-values strong{
  color:var(--ink)!important;
  font-size:9px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

/* History placement is compact in every context. */
.home-page .ss-commerce-home-v65 .ss-price-history-slot-v65{margin-top:7px!important}
.offers-v38 .ss-commerce-offer-v65 .ss-price-history-slot-v65{margin-top:6px!important}
.offers-v38 .ss-commerce-offer-v65 .ss-ph65-box{padding:6px!important}
.offers-v38 .ss-commerce-offer-v65 .ss-ph65-values strong{font-size:8px!important}
.article-body .ss-commerce-inline-v65 .ss-price-history-slot-v65{max-width:380px!important}

/* ---------------- RELATED ---------------- */
.related-block-v65{
  overflow:hidden!important;
}
.related-grid-v65{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
  align-items:stretch!important;
}
.related-grid-v65 .related-card-v65{
  min-width:0!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
  border:1px solid var(--line)!important;
  border-radius:17px!important;
  background:var(--card)!important;
  box-shadow:0 9px 26px rgba(18,42,29,.05)!important;
}
.related-grid-v65 .related-card-v65>a{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-width:0!important;
  padding:0 0 13px!important;
}
.related-grid-v65 .related-card-v65 img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:16/9!important;
  margin:0 0 11px!important;
  padding:0!important;
  object-fit:cover!important;
  border-radius:0!important;
}
.related-grid-v65 .related-card-v65 .kicker{
  margin:0 12px 6px!important;
  font-size:9px!important;
}
.related-grid-v65 .related-card-v65 h3{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:0!important;
  height:auto!important;
  margin:0 12px 8px!important;
  padding:0!important;
  overflow:hidden!important;
  overflow-wrap:anywhere!important;
  white-space:normal!important;
  font-size:15px!important;
  line-height:1.18!important;
  letter-spacing:-.25px!important;
}
.related-grid-v65 .related-card-v65 small{
  margin:auto 12px 0!important;
  font-size:9px!important;
  color:var(--muted)!important;
}

/* ---------------- RESPONSIVE ---------------- */
@media(max-width:1050px){
  .related-grid-v65{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
  .article-body .ss-commerce-inline-v65,
  .ss-verdict-linked-product .ss-commerce-inline-v65,
  .ss-verdict-linked-product-mounted .ss-commerce-inline-v65{
    width:100%!important;
    grid-template-columns:140px minmax(0,1fr)!important;
    margin:26px auto!important;
    border-radius:16px!important;
  }
  .article-body .ss-commerce-inline-v65 .product-tech-visual,
  .ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-visual,
  .ss-verdict-linked-product-mounted .ss-commerce-inline-v65 .product-tech-visual{
    width:140px!important;
    min-width:140px!important;
    height:150px!important;
    min-height:150px!important;
    padding:12px!important;
  }
  .article-body .ss-commerce-inline-v65 .product-tech-content,
  .ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-content{
    min-height:150px!important;
    padding:13px!important;
  }
  .article-body .ss-commerce-inline-v65 h3,
  .ss-verdict-linked-product .ss-commerce-inline-v65 h3{
    font-size:17px!important;
  }
  .article-body .ss-commerce-inline-v65 .native-product-price strong,
  .ss-verdict-linked-product .ss-commerce-inline-v65 .native-product-price strong{
    font-size:21px!important;
  }
  .article-body .ss-commerce-inline-v65 .product-commerce-copy{
    display:none!important;
  }
  .article-body .ss-commerce-inline-v65 .product-tech-footer,
  .ss-verdict-linked-product .ss-commerce-inline-v65 .product-tech-footer{
    padding-top:7px!important;
  }
  .ss-verdict-linked-product-mounted{
    width:calc(100vw - 40px)!important;
  }
}
@media(max-width:560px){
  .home-page .deal-grid{gap:9px!important}
  .home-page .ss-commerce-home-v65>a{padding:8px 8px 10px!important}
  .home-page .ss-commerce-home-v65 .deal-img{padding:10px!important}
  .home-page .ss-commerce-home-v65 h3{font-size:14px!important}
  .home-page .ss-commerce-home-v65 .price-row strong{font-size:20px!important}
  .related-grid-v65{
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
}
