/*
 * IBT Core — front-end styles.
 * The IBT theme ships the same design system; these rules are the
 * plugin's own copy so cards, comparison tables, the floating buy
 * box and disclosures stay presentable on any theme.
 *
 * Product card v1.2 (compact "ficha corta"): media box (4:3, image
 * or branded placeholder) + slim content (brand eyebrow, title,
 * 2-line-clamped short description, up to 3 spec chips, testing
 * badge, disclosure) + CTA rail. The buy button's stretched-link
 * overlay makes the whole card follow the /go/ link. The three-zone
 * row layout applies inside article bodies at >=900px; everywhere
 * else the card stacks (media on top, content, full-width CTA) —
 * one column on mobile.
 */
.ibt-product-card{position:relative;border:1px solid #e4e9f2;border-radius:14px;overflow:hidden;background:#fff;display:flex;flex-direction:column;margin:0 0 20px;text-align:left;transition:border-color .18s ease,box-shadow .18s ease}
.ibt-product-card:hover{border-color:#b9cbe4;box-shadow:0 6px 18px rgba(3,10,24,.08)}
.ibt-card-media{background:#eef3f9;aspect-ratio:4/3;display:flex;flex:none}
.ibt-card-media a{display:flex;flex:1;min-width:0}
.ibt-card-img{width:100%;height:100%;object-fit:contain;padding:10px;display:block}
.ibt-card-ph{flex:1;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;background:linear-gradient(135deg,#081226,#0d2b52);color:#6fd8ff}
.ibt-ph-initial{position:absolute;right:12px;bottom:0;font-size:48px;font-weight:700;line-height:1;color:rgba(255,255,255,.09)}
.ibt-product-card .body{padding:12px 14px;display:flex;flex-direction:column;gap:6px;flex:1}
.ibt-product-card h3,.ibt-product-card h4{font-size:16.5px;line-height:1.3}
.ibt-product-card p{font-size:13.5px;color:#5b6b82}
.ibt-product-card .ibt-brand{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8494ab}
.ibt-card-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ibt-spec-chips{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:2px 0 0;padding:0}
.ibt-spec-chips li{font-size:11.5px;background:#f0f4fa;border:1px solid #e1e9f4;border-radius:999px;padding:4px 9px;color:#43536b}
.ibt-spec-chips b{color:#101828;font-weight:600}
.ibt-card-cta{background:#f4f8fd;border-top:1px solid #e4e9f2;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.ibt-card-cta .price-btn{margin-top:0}
/* Whole-card click: the buy button's overlay covers the card, so a
   click anywhere follows the same /go/ link. The media and title
   keep their own product-page links underneath the overlay (they
   stay in the markup for semantics and no-CSS fallback); the card
   holds no other interactive elements, so nothing is blocked. */
.ibt-product-card .ibt-card-cta .price-btn::after{content:"";position:absolute;inset:0}
.ibt-unavailable{font-size:13px;color:#b54708;font-weight:600}
@media (min-width:900px){
  .article-body .ibt-product-card{display:grid;grid-template-columns:150px minmax(0,1fr) 170px}
  .article-body .ibt-card-media{align-self:start}
  .article-body .ibt-card-cta{border-top:none;border-left:1px solid #e4e9f2}
}
.ibt-product-card .badge,.ibt-deal-card .badge{display:inline-block;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;background:#eef6ff;color:#175cd3;padding:4px 8px;border-radius:999px;width:fit-content}
.ibt-product-card .badge.verify,.ibt-deal-card .badge.verify{background:#ecfdf3;color:#027a48}
.price-btn{display:block;text-align:center;background:#081226;color:#fff;font-weight:600;font-size:14px;padding:11px;border-radius:10px;margin-top:6px;text-decoration:none}
.ibt-product-card .verified,.ibt-deal-card .verified{font-size:11.5px;color:#027a48;font-weight:600}
.ibt-card-disclosure{font-size:11.5px;color:#5b6b82}
.ibt-disclosure{font-size:12px;color:#5b6b82;background:#f0f4fa;border:1px dashed #c3d2e8;border-radius:10px;padding:10px 14px;margin:18px 0}

/* Floating buy box (single posts, first product in the post) */
.ibt-buybox{position:fixed;right:18px;bottom:18px;z-index:40;width:320px;max-width:calc(100vw - 24px);background:#fff;border:1px solid #e4e9f2;border-radius:14px;box-shadow:0 12px 34px rgba(3,10,24,.22);padding:12px;display:flex;gap:12px;align-items:center;opacity:0;transform:translateY(10px);transition:opacity .25s ease,transform .25s ease}
.ibt-buybox.is-visible{opacity:1;transform:none}
.ibt-buybox[hidden]{display:none}
.ibt-buybox-media{width:64px;height:64px;flex:none;border-radius:10px;overflow:hidden;background:#eef3f9;display:flex}
.ibt-buybox-media .ibt-card-img{padding:6px}
.ibt-buybox-media .ibt-card-ph{flex:1}
.ibt-buybox-media .ibt-card-ph svg{width:26px;height:26px}
.ibt-buybox-media .ibt-ph-initial{font-size:26px;right:6px}
.ibt-buybox-info{flex:1;min-width:0}
.ibt-buybox-name{font-size:13.5px;font-weight:600;line-height:1.3;color:#101828;margin:0 22px 8px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ibt-buybox .price-btn{margin:0;padding:9px 10px;font-size:13px}
.ibt-buybox-close{position:absolute;top:6px;right:6px;width:24px;height:24px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:50%;color:#5b6b82;cursor:pointer;padding:0}
.ibt-buybox-close:hover{color:#101828;background:#f0f4fa}
@media (max-width:900px){
  /* Slim bar above the theme's mobile bottom nav (~56px + safe area). */
  .ibt-buybox{left:10px;right:10px;bottom:calc(64px + env(safe-area-inset-bottom));width:auto;max-width:none;padding:8px 10px;border-radius:12px}
  .ibt-buybox-media{display:none}
  .ibt-buybox-info{display:flex;align-items:center;gap:10px}
  .ibt-buybox-name{flex:1;margin:0;font-size:13px;-webkit-line-clamp:1}
  .ibt-buybox .price-btn{flex:none;padding:8px 12px}
  .ibt-buybox-close{position:static;width:22px;height:22px;flex:none;order:3}
}
@media (prefers-reduced-motion:reduce){
  .ibt-buybox{transition:none}
}
@media print{
  .ibt-buybox{display:none!important}
}

/* Comparison table: horizontal scroll, sticky first column, zebra */
.ibt-compare-wrap{overflow-x:auto;margin:0 0 20px}
table.ibt-compare{width:100%;border-collapse:collapse;font-size:14px;background:#fff}
table.ibt-compare th,table.ibt-compare td{border:1px solid #e4e9f2;padding:9px 11px;text-align:left;vertical-align:top}
table.ibt-compare th{background:#f0f4fa}
table.ibt-compare th:first-child{position:sticky;left:0;z-index:2;background:#e9eff8;min-width:110px}
table.ibt-compare tbody tr:nth-child(even) td{background:#f8fafd}
table.ibt-compare .ibt-compare-buy td{vertical-align:middle}
table.ibt-compare .ibt-compare-buy .price-btn{margin-top:0;white-space:nowrap}

.ibt-deals-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.ibt-deal-card{background:#081226;border-radius:14px;padding:22px;color:#fff;position:relative;overflow:hidden}
.ibt-deal-card h3{font-size:17px;margin:10px 0 6px;line-height:1.3}
.ibt-deal-card p{font-size:13px;color:#c3d3ea}
.ibt-deal-card .kicker{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;padding:5px 10px;border-radius:999px;background:rgba(247,144,9,.18);color:#ffb45e}
.ibt-deal-card .go{display:inline-block;margin-top:12px;background:#f79009;color:#231300;font-weight:700;font-size:13px;padding:8px 14px;border-radius:999px;text-decoration:none}
.ibt-sources{font-size:13.5px;color:#5b6b82;margin:20px 0}
@media (max-width:900px){
  /* One column on mobile, always (project rule). */
  .ibt-deals-grid{grid-template-columns:1fr}
}
