/*
 * pcbuyer-intelligence v5.5.1 — product page redesign layer
 *
 * Loaded AFTER assets/css/product-page.min.css so its rules can override.
 * Scoped under .pcb-v550-* class names everywhere except a handful of
 * sticky-CTA breakpoints that need to add padding to existing layout.
 *
 * Sections (in order):
 *   1. Freshness pill              .pcb-v550-freshness-pill
 *   2. Deal-first hero card        .pcb-v550-deal-card
 *   3. Score strip                 .pcb-v550-score-strip
 *   4. Disclaimer notice           .pcb-v550-data-notice
 *   5. Sticky bottom CTA (mobile)  .pcb-v550-sticky-cta
 *   6. Mobile / tablet breakpoints
 */

/* ------- 1. Freshness pill ----------------------------------------- */
.pcb-v550-freshness-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EAF3DE;
  color: #173404;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  margin-left: 8px;
}
.pcb-v550-freshness-pill > span[aria-hidden] {
  color: #639922;
  font-size: 9px;
}

/* ------- 2. Deal-first hero card ----------------------------------- */
.pcb-v550-deal-card {
  background: #EAF3DE;
  border: 0.5px solid #97C459;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0 14px;
}
.pcb-v550-deal-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: #173404;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pcb-v550-deal-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 4px;
  flex-wrap: wrap;
}
.pcb-v550-deal-price {
  font-size: 28px;
  font-weight: 500;
  color: #173404;
  line-height: 1.1;
}
.pcb-v550-deal-bb {
  font-size: 12px;
  color: #27500A;
}
.pcb-v550-deal-meta {
  font-size: 12px;
  color: #27500A;
  margin-bottom: 10px;
}
.pcb-v550-deal-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1257ee;
  color: #ffffff !important;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
}
.pcb-v550-deal-cta:hover {
  background: #0b43c9;
  text-decoration: none;
}

/* ------- 3. Score strip -------------------------------------------- */
.pcb-v550-score-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #52657e;
  padding: 8px 0 4px;
  border-top: 0.5px solid #dbe5f5;
  border-bottom: 0.5px solid #dbe5f5;
  margin: 6px 0 12px;
}
.pcb-v550-score-item {
  display: inline-block;
  position: relative;
}
.pcb-v550-score-item > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 0;
}
.pcb-v550-score-item > summary::-webkit-details-marker { display: none; }
.pcb-v550-score-item .lbl {
  font-size: 10px;
  font-weight: 500;
  color: #52657e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pcb-v550-score-item strong {
  font-size: 13px;
  font-weight: 500;
  color: #0b1730;
}
.pcb-v550-score-item > p {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 5;
  margin: 0;
  padding: 10px 12px;
  background: #ffffff;
  border: 0.5px solid #dbe5f5;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #0b1730;
  width: 240px;
  max-width: calc(100vw - 32px);
}
.pcb-v550-score-sep {
  color: #b5c0d2;
  font-size: 11px;
}

/* ------- 4. Disclaimer notice -------------------------------------- */
.pcb-v550-data-notice {
  margin-top: 16px;
}
.pcb-v550-data-notice > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #52657e;
  list-style: none;
  padding: 4px 0;
}
.pcb-v550-data-notice > summary::-webkit-details-marker { display: none; }
.pcb-v550-data-notice > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}
.pcb-v550-data-notice[open] > summary::before {
  content: "▾ ";
}
.pcb-v550-data-notice > p {
  font-size: 12px;
  color: #52657e;
  line-height: 1.6;
  margin: 8px 0 0;
}

/* ------- 5. Sticky bottom CTA (mobile only) ------------------------ */
.pcb-v550-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #ffffff;
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pcb-v550-sticky-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pcb-v550-sticky-label {
  font-size: 10px;
  color: #52657e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcb-v550-sticky-price {
  font-size: 17px;
  font-weight: 500;
  color: #0b1730;
  line-height: 1.1;
}
.pcb-v550-sticky-button {
  flex: 0 0 auto;
  background: #1257ee;
  color: #ffffff !important;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.pcb-v550-sticky-button:hover {
  background: #0b43c9;
  text-decoration: none;
}

/* ------- 6. Breakpoints -------------------------------------------- */
/* Tablet — slightly tighter deal card */
@media (max-width: 1024px) {
  .pcb-v550-deal-card { padding: 10px 14px; }
  .pcb-v550-deal-price { font-size: 24px; }
}

/* Mobile — sticky CTA visible, hero deal card stretches full width */
@media (max-width: 720px) {
  .pcb-v550-sticky-cta {
    display: flex;
  }
  /* Reserve space at page bottom so the sticky bar never covers the last
     row of offers or the footer's first link. */
  body.single-pcb_product {
    padding-bottom: 74px;
  }
  .pcb-v550-deal-card { padding: 12px 14px; }
  .pcb-v550-deal-price { font-size: 24px; }
  .pcb-v550-deal-cta {
    display: flex;
    justify-content: center;
    width: 100%;
    text-align: center;
  }
  /* Score strip wraps to two lines if needed on narrow screens */
  .pcb-v550-score-strip {
    font-size: 11px;
  }
  .pcb-v550-score-item > p {
    width: 220px;
  }
  /* Hide the desktop three-panel score sidebar — main column gets the score
     strip instead so the deal card sits above the fold. */
  .pcb-product-score-card { display: none; }
  /* Promote the offers table cells to stacked card style. The legacy
     responsive table already declares [data-label] on every cell, so this
     just refines the visual treatment. */
  .pcb-product-offer-table-v442 table,
  .pcb-product-offer-table-v442 thead,
  .pcb-product-offer-table-v442 tbody,
  .pcb-product-offer-table-v442 tr,
  .pcb-product-offer-table-v442 td {
    display: block;
    width: 100%;
  }
  .pcb-product-offer-table-v442 thead { display: none; }
  .pcb-product-offer-table-v442 tr {
    border: 0.5px solid #dbe5f5;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #ffffff;
  }
  .pcb-product-offer-table-v442 td {
    padding: 4px 0;
    border: none;
  }
  .pcb-product-offer-table-v442 td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    font-size: 10px;
    color: #52657e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 6px;
    min-width: 70px;
  }
  .pcb-product-offer-table-v442 td.pcb-offer-picture-cell::before { display: none; }
  .pcb-product-offer-table-v442 td.pcb-offer-product-cell::before { display: none; }
  .pcb-product-offer-table-v442 td.pcb-offer-product-cell {
    margin-top: 4px;
    margin-bottom: 6px;
  }
  .pcb-product-offer-table-v442 td.pcb-offer-picture-cell {
    float: right;
    width: 56px;
    margin-left: 8px;
  }
  .pcb-product-offer-table-v442 td.pcb-offer-picture-cell img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
  }
}

/* v5.5.1: manufacturer/catalog text now lives inside Product Specifications. */
.pcb-product-manufacturer-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}
.pcb-product-manufacturer-details > h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.25;
  color: #0b1730;
}
.pcb-product-manufacturer-details p,
.pcb-product-manufacturer-details li {
  color: #475569;
  line-height: 1.58;
}
