/* ============================================================================
 * public/veranda/veranda.css — shared Veranda storefront styles (Stage 3)
 * Used by index.php / products.php / product.php. Shared Quora tokens come
 * from ../assets/quora.css; everything here is prefixed vp- and kept
 * low-saturation / warm per the design policy.
 * ========================================================================== */

/* --- layout -------------------------------------------------------------- */
.vp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
           gap: 14px; }
.vp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
           gap: 10px; }

/* --- product card --------------------------------------------------------- */
.vp-card { background: #fff; border: 1px solid var(--q-border); border-radius: 8px;
           overflow: hidden; display: flex; flex-direction: column; }
.vp-card:hover { border-color: #c9c4bc; }
.vp-card-masked { opacity: .92; background: #faf9f7; }
.vp-card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.vp-card-title { font-size: 14px; font-weight: 700; line-height: 1.35; }
.vp-card-title a { color: var(--q-ink); text-decoration: none; }
.vp-card-title a:hover { color: var(--q-red); }
.vp-card-meta { font-size: 12px; color: var(--q-muted); }
.vp-card-price { font-size: 15px; font-weight: 700; }
.vp-card-moq { font-size: 11px; color: var(--q-muted); font-weight: 400; }
.vp-card-actions { margin-top: auto; padding-top: 8px; }

/* --- CSS image placeholder (fallback when a product has no gallery images) - */
.vp-ph { display: flex; align-items: center; justify-content: center;
         aspect-ratio: 4 / 3; background: #f3efe9; color: #a89f92;
         font-size: 44px; font-weight: 700; user-select: none; }
.vp-ph span { display: block; text-align: center; }
.vp-ph small { display: block; font-size: 11px; font-weight: 400; margin-top: 4px;
               letter-spacing: .04em; text-transform: uppercase; }

/* --- product images (migration_060 gallery) -------------------------------- */
.vp-card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
               background: #f3efe9; }
.vp-gallery-main { border-radius: 8px; overflow: hidden; border: 1px solid var(--q-border); }
.vp-gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
                       background: #f3efe9; }
.vp-gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.vp-gallery-thumb { border: 2px solid transparent; border-radius: 6px; padding: 0;
                    background: none; cursor: pointer; width: 64px; overflow: hidden; }
.vp-gallery-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.vp-gallery-thumb.active { border-color: var(--q-red); }

/* --- badges ---------------------------------------------------------------- */
.vp-badge { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 9px;
            padding: 2px 8px; text-transform: uppercase; letter-spacing: .04em; }
.vp-badge-pom   { background: #fdecec; color: var(--q-red); }
.vp-badge-otc   { background: #e7f6ec; color: #1e7e34; }
.vp-badge-cold  { background: #e3f0f7; color: #22607e; }
.vp-badge-class { background: #f0ede7; color: #6b655c; }
.vp-badge-b2b   { background: #f5e9d7; color: #8a5a00; }

/* --- stock indicator (national pool — never per-warehouse) ----------------- */
.vp-stock { font-size: 12px; font-weight: 700; }
.vp-stock-in   { color: #1e7e34; }
.vp-stock-low  { color: #b26a00; }
.vp-stock-out  { color: var(--q-red); }

/* --- masked / restricted state --------------------------------------------- */
.vp-masked-note { font-size: 12px; color: #8a5a00; background: #fdf6e9;
                  border: 1px solid #f0e2c0; border-radius: 6px; padding: 8px 10px; }

/* --- search bar / filter bar ------------------------------------------------ */
.vp-hero { background: #fff; border: 1px solid var(--q-border); border-radius: 8px;
           padding: 22px; margin-bottom: 16px; }
.vp-search { display: flex; gap: 8px; }
.vp-search .q-input { flex: 1; }
.vp-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
              background: #fff; border: 1px solid var(--q-border); border-radius: 8px;
              padding: 12px 14px; margin-bottom: 14px; }
.vp-filters .q-field { margin: 0; min-width: 130px; }
.vp-filters label { font-size: 11px; }
.vp-search-simple { padding: 10px 14px; }
.vp-chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 10px;
               margin-bottom: 8px; scrollbar-width: thin; }
.vp-chip { flex: 0 0 auto; border: 1px solid var(--q-border); background: #fff;
           color: var(--q-muted); border-radius: 18px; padding: 7px 14px;
           font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.vp-chip:hover { border-color: #b8afa2; color: var(--q-ink); background: #faf9f7; }
.vp-chip.active { border-color: var(--q-red); background: #fdecec; color: var(--q-red); }
.vp-fulfilment-group { margin-bottom: 16px; }
.vp-fulfilment-head { display: flex; justify-content: space-between; align-items: center;
                      gap: 10px; padding: 8px 4px; color: var(--q-ink); font-size: 13px; }
.vp-fulfilment-head span { font-weight: 700; }
.vp-fulfilment-head i { color: var(--q-red); margin-right: 5px; }
.vp-fulfilment-head small { color: var(--q-muted); font-size: 11px; text-align: right; }
.vp-address-card { position: static; margin-bottom: 12px; background: #faf9f7; }
.vp-address-text { font-size: 13px; line-height: 1.55; padding: 7px 0 2px; }
.vp-destination-card { border: 1px solid var(--q-border); background: #faf9f7;
                       border-radius: 8px; padding: 10px 12px; margin: 4px 0 10px; }
@media (max-width: 640px) {
  .vp-chip-row { margin-right: -12px; padding-right: 12px; }
  .vp-fulfilment-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .vp-fulfilment-head small { text-align: left; }
}

/* --- category tile ----------------------------------------------------------- */
.vp-cat { background: #fff; border: 1px solid var(--q-border); border-radius: 8px;
          padding: 14px; text-align: center; text-decoration: none; color: var(--q-ink);
          font-size: 13px; font-weight: 700; }
.vp-cat:hover { border-color: var(--q-red); color: var(--q-red); }
.vp-cat .fa-solid { display: block; font-size: 20px; color: #a89f92; margin-bottom: 8px; }
.vp-cat:hover .fa-solid { color: var(--q-red); }

/* --- product page -------------------------------------------------------------- */
.vp-product-body { overflow-x: hidden; }
.vp-product-page, .vp-product-shell, .vp-top,
.vp-product-identity, .vp-product-media, .vp-product-details { min-width: 0; }
.vp-product-back { font-size: 12px; overflow-wrap: anywhere; }
.vp-top { display: grid; grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas: "media identity" "media details"; gap: 14px 18px;
  align-items: start; }
.vp-product-identity { grid-area: identity; }
.vp-product-media { grid-area: media; width: 100%; }
.vp-product-details { grid-area: details; }
.vp-product-title { margin: 0; font-size: 22px; line-height: 1.3;
  overflow-wrap: anywhere; }
.vp-product-brand { font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; }
.vp-product-placeholder { border-radius: 8px; }
.vp-quickfacts { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.vp-quickfacts .vp-qf { max-width: 100%; overflow-wrap: anywhere; }
.vp-quickfacts .vp-qf-pom { border-color: var(--q-red); color: var(--q-red); }
.vp-quickfacts .vp-qf-cold { color: #22607e; }
.vp-variant-trigger { width: 100%; }
.vp-pills-hidden { display: none; }
.vp-product-price-row { display: flex; align-items: center; gap: 8px 12px;
  flex-wrap: wrap; margin: 10px 0 12px; }
.vp-product-price { font-size: 26px; line-height: 1.2; font-weight: 700; }
.vp-product-moq { font-size: 12px; }
.vp-product-price-row .vp-stock { display: inline-flex; align-items: center;
  border-radius: 999px; padding: 3px 9px; background: #f7f4ee; }
.vp-product-price-row .vp-stock-in { background: #e7f6ec; }
.vp-product-price-row .vp-stock-low { background: #fdf6e9; }
.vp-product-price-row .vp-stock-out { background: #fdecec; }
.vp-merch-note { margin: 0 0 12px; }
.vp-action-buttons { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.vp-action-buttons .q-btn { white-space: normal; text-align: center;
  overflow-wrap: anywhere; }
.vp-primary-action, .vp-pom-actions .q-btn:not(.secondary) {
  background: var(--q-red); color: #fff; border-color: var(--q-red); }
.vp-primary-action:hover, .vp-pom-actions .q-btn:not(.secondary):hover {
  background: var(--q-red-hover); color: #fff; }
.vp-product-details .vp-action-card { border: 1px solid var(--q-border, #e3e0da);
  border-radius: 10px; background: #f7f4ee; padding: 18px; margin-top: 14px; }
.vp-action-card h2 { margin: 0; font-size: 16px; line-height: 1.35; }
.vp-action-card p { margin: 4px 0 12px; color: var(--q-muted, #6b655c);
  font-size: 12px; line-height: 1.55; }
.vp-pom-actions { background: #fdf9f4; }
.vp-pom-note { font-size: 12px; margin: 10px 0 0; overflow-wrap: anywhere; }
.vp-shelf-heading { flex: 0 0 100%; }
.vp-shelf-heading p { margin-bottom: 0; }
.vp-shelf-card .vp-action-buttons { flex: 1 0 100%; }
.vp-shelf-bench.vp-local-available { color: #1e7e34; }
.vp-shelf-bench.vp-local-unavailable { color: #8a5a00; }
.vp-product-page .vp-accordion, .vp-product-page .vp-calc,
.vp-product-page .vp-video { width: 100%; min-width: 0; }
.vp-product-page .vp-acc-body, .vp-product-page .vp-chapter,
.vp-product-page .vp-spec-row { overflow-wrap: anywhere; }

@media (max-width: 767px) {
  .vp-product-page { width: 100%; max-width: 100%; margin: 16px auto;
    padding: 0 12px 104px; overflow-x: hidden; }
  .vp-product-page .vp-stream-nav { max-width: 100%; }
  .vp-product-back { margin: 12px 0; }
  .vp-product-shell { width: 100%; padding: 16px 14px; }
  .vp-top { grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "identity" "media" "details"; gap: 16px; }
  .vp-product-title { font-size: 22px; }
  .vp-product-media, .vp-gallery, .vp-gallery-main, .vp-product-placeholder {
    width: 100%; max-width: 100%; }
  .vp-gallery-main img { width: 100%; }
  .vp-product-details, .vp-product-details > * { max-width: 100%; min-width: 0; }
  .vp-quickfacts .vp-qf { border-radius: 12px; padding: 5px 10px; }
  .vp-pills { max-width: 100%; }
  .vp-pill { white-space: normal; overflow-wrap: anywhere; }
  .vp-product-price-row { margin: 12px 0 14px; }
  .vp-product-details .vp-action-card { width: 100%; padding: 18px 16px;
    margin-top: 16px; }
  .vp-product-details .vp-action-buttons { display: grid;
    grid-template-columns: minmax(0, 1fr); width: 100%; gap: 10px; }
  .vp-product-details .vp-action-buttons .q-btn { width: 100%; min-height: 46px;
    padding: 11px 14px; border-radius: 10px; }
  .vp-shelf-card .vp-shelf-thumb { display: none; }
  .vp-shelf-card .vp-shelf-info { flex: 1 1 100%; min-width: 0; }
  .vp-product-page .vp-accordion > button { min-height: 50px; padding: 14px 16px;
    gap: 12px; white-space: normal; }
  .vp-product-page .vp-accordion > button i { flex: 0 0 auto; }
  .vp-product-page .vp-acc-body { padding: 0 16px 16px; }
  .vp-product-page .vp-chapter { align-items: flex-start; }
  .vp-product-page .vp-chapter .vp-ch-time { flex: 0 0 70px; min-width: 0; }
  .vp-product-page .q-faint, .vp-product-page a { overflow-wrap: anywhere; }
}

@media (max-width: 360px) {
  .vp-product-page { padding-left: 10px; padding-right: 10px; }
  .vp-product-shell { padding-left: 12px; padding-right: 12px; }
  .vp-product-title { font-size: 20px; }
  .vp-product-details .vp-action-card { padding-left: 14px; padding-right: 14px; }
}

.vp-quickfacts .vp-qf { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
                        font-weight: 700; border: 1px solid var(--q-border); border-radius: 14px;
                        padding: 4px 12px; background: #fff; }
.vp-quickfacts .fa-solid { color: #a89f92; }
.vp-pills { display: flex; gap: 8px; flex-wrap: wrap; }
/* POM pack/strength is descriptive text, not an interactive option. */
.vp-pills:has(.vp-pack-description-item) { display: block; }
.vp-pack-description-item { display: block; color: var(--q-text, #26221c);
  font-size: 14px; line-height: 1.6; cursor: default; }
.vp-pack-description-item + .vp-pack-description-item { margin-top: 4px; }
.vp-pill { border: 1px solid var(--q-border); background: #fff; border-radius: 16px;
           padding: 6px 14px; font-size: 13px; cursor: pointer; }
.vp-pill:hover { border-color: #939598; }
.vp-pill.selected { border-color: var(--q-red); color: var(--q-red); font-weight: 700; }
.vp-pill.out { opacity: .45; cursor: not-allowed; text-decoration: line-through; }

.vp-accordion { border: 1px solid var(--q-border); border-radius: 8px; background: #fff;
                margin-bottom: 8px; overflow: hidden; }
.vp-accordion > button { width: 100%; text-align: left; background: none; border: none;
                         padding: 13px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
                         display: flex; justify-content: space-between; align-items: center; }
.vp-accordion > button:hover { background: #faf9f7; }
.vp-accordion .vp-acc-body { display: none; padding: 0 16px 14px; font-size: 13px;
                             color: var(--q-ink); white-space: pre-wrap; line-height: 1.55; }
.vp-accordion.open .vp-acc-body { display: block; }

.vp-video { background: #fff; border: 1px solid var(--q-border); border-radius: 8px;
            padding: 14px; margin-bottom: 14px; }
.vp-video video { width: 100%; border-radius: 6px; background: #111; }
.vp-chapters { margin-top: 10px; }
.vp-chapter { display: flex; gap: 10px; align-items: center; padding: 7px 10px;
              border-radius: 6px; font-size: 13px; cursor: pointer; }
.vp-chapter:hover { background: #faf9f7; }
.vp-chapter .vp-ch-time { font-variant-numeric: tabular-nums; color: var(--q-faint);
                          font-size: 12px; min-width: 78px; }

.vp-calc { background: #fff; border: 1px solid var(--q-border); border-radius: 8px;
           padding: 14px; margin-bottom: 14px; }
.vp-calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
                gap: 10px; }
.vp-calc-out { margin-top: 10px; font-size: 15px; font-weight: 700; }
.vp-calc-note { font-size: 11px; color: var(--q-faint); margin-top: 6px; }

/* ------------------------- Stage 4: cart & checkout ---------------------- */

.vp-cart-count { display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 4px;
                 background: var(--q-red); color: #fff; border-radius: 8px;
                 font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }

.vp-cart-row { display: flex; gap: 12px; align-items: flex-start; background: #fff;
               border: 1px solid var(--q-border); border-radius: 8px; padding: 12px 14px;
               margin-bottom: 10px; }
.vp-cart-row.vp-cart-off { opacity: .6; }
.vp-cart-check { margin-top: 4px; }
.vp-cart-check input { width: 16px; height: 16px; }
.vp-cart-main { flex: 1; min-width: 0; }
.vp-cart-title { font-size: 14px; font-weight: 700; }
.vp-cart-title a { color: var(--q-ink); text-decoration: none; }
.vp-cart-title a:hover { color: var(--q-red); }
.vp-cart-attrs { font-size: 12px; color: var(--q-muted); margin-top: 2px; }
.vp-cart-side { text-align: right; display: flex; flex-direction: column; gap: 6px;
                align-items: flex-end; }
.vp-cart-line { font-size: 14px; font-weight: 700; }
.vp-cart-unit { font-size: 11px; color: var(--q-faint); }

.vp-qty { display: inline-flex; align-items: center; border: 1px solid var(--q-border);
          border-radius: 6px; overflow: hidden; background: #fff; }
.vp-qty button { width: 28px; height: 28px; border: none; background: #faf9f7; cursor: pointer;
                 font-size: 14px; color: var(--q-ink); }
.vp-qty button:hover { background: #f0ede7; }
.vp-qty button:disabled { opacity: .4; cursor: not-allowed; }
.vp-qty input { width: 44px; height: 28px; border: none; text-align: center; font-size: 13px; }

.vp-summary { background: #fff; border: 1px solid var(--q-border); border-radius: 8px;
              padding: 14px 16px; position: sticky; top: 12px; }
.vp-summary-row { display: flex; justify-content: space-between; font-size: 13px;
                  padding: 5px 0; }
.vp-summary-row.vp-total { border-top: 1px solid var(--q-border); margin-top: 6px;
                           padding-top: 10px; font-size: 16px; font-weight: 700; }
.vp-summary-free { font-size: 12px; color: #1e7e34; }
.vp-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .vp-layout { grid-template-columns: 1fr; } }

.vp-note { font-size: 12px; border-radius: 6px; padding: 8px 12px; margin: 10px 0; }
.vp-note-info { background: #eef4fb; color: #2c5d8a; }
.vp-note-warn { background: #fdf6e9; color: #8a5a00; }
.vp-note-err  { background: #fdecec; color: var(--q-red); }
.vp-note-ok   { background: #e7f6ec; color: #1e7e34; }

.vp-status { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 9px;
             padding: 2px 9px; text-transform: capitalize; }
.vp-status-pending, .vp-status-rx_review { background: #fdf6e9; color: #8a5a00; }
.vp-status-packed, .vp-status-dispatched, .vp-status-in_transit { background: #eef4fb; color: #2c5d8a; }
.vp-status-delivered { background: #e7f6ec; color: #1e7e34; }
.vp-status-cancelled, .vp-status-refunded { background: #f0ede7; color: #6b655c; }
.vp-pay { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 9px;
          padding: 2px 9px; }
.vp-pay-paid { background: #e7f6ec; color: #1e7e34; }
.vp-pay-unpaid { background: #fdf6e9; color: #8a5a00; }
.vp-pay-refund_pending, .vp-pay-refunded { background: #f0ede7; color: #6b655c; }

.vp-order-card { background: #fff; border: 1px solid var(--q-border); border-radius: 8px;
                 padding: 12px 14px; margin-bottom: 10px; display: block; color: var(--q-ink);
                 text-decoration: none; }
.vp-order-card:hover { border-color: #c9c4bc; }
.vp-order-head { display: flex; justify-content: space-between; align-items: center;
                 gap: 10px; flex-wrap: wrap; }
.vp-order-ref { font-weight: 700; font-size: 14px; }
.vp-order-meta { font-size: 12px; color: var(--q-muted); margin-top: 4px; }

.vp-otp { display: inline-block; background: #111; color: #fff; font-size: 22px;
          letter-spacing: 8px; font-weight: 700; border-radius: 8px; padding: 10px 18px; }

.vp-ledger { width: 100%; border-collapse: collapse; background: #fff;
             border: 1px solid var(--q-border); border-radius: 8px; overflow: hidden; }
.vp-ledger th, .vp-ledger td { padding: 9px 12px; font-size: 13px; text-align: left;
                               border-bottom: 1px solid var(--q-border); }
.vp-ledger th { background: #faf9f7; font-size: 11px; text-transform: uppercase;
                letter-spacing: .4px; color: var(--q-muted); }
.vp-ledger tr:last-child td { border-bottom: none; }
.vp-rw { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 9px;
         padding: 2px 9px; }
.vp-rw-pending { background: #fdf6e9; color: #8a5a00; }
.vp-rw-credited { background: #e7f6ec; color: #1e7e34; }
.vp-rw-cancelled { background: #f0ede7; color: #6b655c; }

.vp-geo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }


/* ---------------------------------------------------------------------------
 * B2C Stage 2 (migration_071): location anchor, stream badges, modal
 * ------------------------------------------------------------------------- */

/* "Deliver to" anchor in the storefront nav */
.vp-loc-anchor { display: inline-flex; align-items: center; gap: 6px; border: 0;
  background: none; cursor: pointer; font-size: 12px; color: var(--q-muted, #6b655c);
  padding: 4px 8px; border-radius: 6px; }
.vp-loc-anchor:hover { background: #f0ede7; }
.vp-loc-anchor strong { color: var(--q-text, #26221c); font-weight: 600; }
.vp-loc-anchor i { color: #8a5a00; }

/* Corner stream badge overlaid on the card image (layout unchanged — the
   badge is absolutely positioned inside a relative wrapper). */
.vp-card-imgwrap { position: relative; }
.vp-card-imgwrap > a { display: block; }
.vp-stream-badge { position: absolute; top: 8px; left: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px;
  font-weight: 700; border-radius: 9px; padding: 3px 9px; line-height: 1.4;
  border: 0; cursor: default; box-shadow: 0 1px 3px rgba(38, 34, 28, .18); }
.vp-stream-a { background: #e3edfb; color: #1d4fa1; }            /* blue lock — e-Rx */
.vp-stream-b { background: #e7f6ec; color: #1e7e34; }            /* emerald — local stock */
.vp-stream-c { background: #eceff3; color: #4d5a6a; }            /* slate — direct dispatch */
button.vp-stream-badge { cursor: pointer; }
.vp-stream-setloc { background: #fdf6e9; color: #8a5a00; }

/* Location modal */
.vp-loc-modal { position: fixed; inset: 0; z-index: 1000; display: flex;
  align-items: center; justify-content: center; background: rgba(38, 34, 28, .45);
  padding: 16px; }
.vp-loc-box { width: 100%; max-width: 380px; }

/* Product page: B_OTC local-dispatch stockist line */
.vp-stockist-line { font-size: 13px; margin: 6px 0 0; }
.vp-stockist-line .q-faint { font-size: 12px; }
.vp-stockist-near { color: #1e7e34; font-weight: 600; }
.vp-stockist-none { color: #8a5a00; }

/* ---------------------------------------------------------------------------
 * migration_074 (B2C Stage 5): persistent portal switcher + partner hub
 * banner + "Stock This Item" flywheel callout.
 * ------------------------------------------------------------------------- */
.vp-portal-switch { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--q-border, #e3e0da);
  background: #faf8f4; padding: 0 16px; }
.vp-ps-tab { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  font-weight: 600; color: var(--q-muted, #6b655c); text-decoration: none;
  padding: 8px 14px; border-bottom: 2px solid transparent; }
a.vp-ps-tab:hover { background: #f0ede7; color: var(--q-text, #26221c); }
.vp-ps-tab.active { color: var(--q-text, #26221c); border-bottom-color: var(--q-red, #b92b27); }
.vp-loc-anchor-r3 { margin-left: auto; max-width: min(100%, 520px); text-align: left; }
.vp-loc-anchor-r3 strong { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .vp-loc-anchor-r3 { margin-left: 0; width: 100%; justify-content: flex-start; }
}

.vp-partner-banner { display: flex; align-items: center; gap: 8px; font-size: 13px;
  background: #fdf6e9; border-bottom: 1px solid #ecd9ae; color: #6b4e12; padding: 8px 16px; }
.vp-partner-banner i { color: #8a5a00; }
.vp-partner-banner a { color: #8a5a00; font-weight: 700; }

.vp-stock-callout { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px;
  font-size: 13px; line-height: 1.5; background: #f5f2ec; border: 1px dashed #cfc7b8;
  border-radius: 8px; padding: 10px 12px; color: #57503f; }
.vp-stock-callout i { color: #8a5a00; margin-top: 2px; }
.vp-stock-callout a { color: var(--q-red, #b92b27); font-weight: 600; }

/* ---------------------------------------------------------------------------
 * STAGE A (guideline V2): storefront home — three gateway cards + B2B strip
 * + header B2B-login button. Low-saturation, warm Quora palette; no gradients.
 * ------------------------------------------------------------------------- */

/* Distinct Pharmacy B2B Login button in the persistent header */
.vp-b2b-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  font-weight: 700; text-decoration: none; border-radius: 14px; padding: 5px 12px;
  background: #f5e9d7; color: #8a5a00; border: 1px solid #e3cfa3; white-space: nowrap; }
.vp-b2b-btn:hover { background: #efdcbc; color: #6b4e12; }

/* Section head */
.vp-gateways-head { margin: 4px 0 12px; }
.vp-gateways-head h2 { font-size: 16px; margin: 0 0 4px; letter-spacing: .02em; }
.vp-gateways-head p { margin: 0; font-size: 13px; color: var(--q-muted, #6b655c); }

/* Card grid: three across, stacks on mobile */
.vp-gateways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 20px; }
@media (max-width: 900px) { .vp-gateways { grid-template-columns: 1fr; } }

.vp-gateway { position: relative; display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--q-border, #e3e0da); border-radius: 10px; overflow: hidden;
  text-decoration: none; color: var(--q-ink, #26221c); }
.vp-gateway:hover { border-color: #c9c4bc; box-shadow: 0 2px 8px rgba(38, 34, 28, .08); }

/* Photo area — CSS placeholder panel (drop a real <img> here later; the
   markup in index.php carries an HTML comment marking the exact spot). */
.vp-gateway-media { display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 7; background: #f3efe9; color: #a89f92; user-select: none; }
.vp-gateway-media .vp-gw-emoji { font-size: 40px; line-height: 1; }
.vp-gateway-media small { display: block; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; color: #b3aa9c; }
.vp-gateway-media > span { text-align: center; }

/* Badge pill floating top-left over the photo area (reuses stream palette) */
.vp-gateway-badge { position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700;
  border-radius: 9px; padding: 3px 9px; line-height: 1.4; text-transform: uppercase;
  letter-spacing: .04em; box-shadow: 0 1px 3px rgba(38, 34, 28, .18); }
.vp-gateway-badge.gw-a { background: #e3edfb; color: #1d4fa1; }
.vp-gateway-badge.gw-b { background: #e7f6ec; color: #1e7e34; }
.vp-gateway-badge.gw-c { background: #eceff3; color: #4d5a6a; }

.vp-gateway-body { padding: 14px 16px 16px; display: flex; flex-direction: column;
  gap: 8px; flex: 1; }
.vp-gateway-ident { font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--q-muted, #6b655c); text-transform: uppercase; }
.vp-gateway-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.vp-gateway-desc { font-size: 13px; line-height: 1.55; color: var(--q-muted, #6b655c); }
.vp-gateway-points { margin: 2px 0 0; padding: 0; list-style: none; }
.vp-gateway-points li { position: relative; font-size: 12px; line-height: 1.5;
  color: var(--q-ink, #26221c); padding-left: 18px; margin-bottom: 4px; }
.vp-gateway-points li::before { content: "\2713"; position: absolute; left: 0;
  color: #1e7e34; font-weight: 700; }
.vp-gateway-cta { margin-top: auto; padding-top: 10px; }
.vp-gateway-cta .q-btn { width: 100%; }

/* "ARE YOU A REGISTERED PHARMACY?" strip — visible to ALL visitors */
.vp-b2b-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fdf6e9; border: 1px solid #ecd9ae; border-radius: 10px;
  padding: 14px 18px; margin-bottom: 22px; }
.vp-b2b-strip .vp-b2b-strip-emoji { font-size: 26px; }
.vp-b2b-strip strong { display: block; font-size: 14px; color: #6b4e12;
  letter-spacing: .02em; }
.vp-b2b-strip p { margin: 2px 0 0; font-size: 12px; color: #8a5a00; flex: 1; min-width: 220px; }
.vp-b2b-strip .q-btn { white-space: nowrap; }

/* ---------------------------------------------------------------------------
 * STAGE B (guideline V2 Part 5): horizontal 3-gateway catalog sub-nav
 * (products.php + product.php via _stream_nav.php) and the Gateway A
 * clinical intercept modal (product.php, A_POM only).
 * ------------------------------------------------------------------------- */
.vp-stream-nav { display: flex; gap: 4px; flex-wrap: wrap; background: #faf8f4;
  border: 1px solid var(--q-border, #e3e0da); border-radius: 10px; padding: 6px;
  margin-bottom: 14px; overflow-x: auto; }
.vp-snv-tab { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 600; color: var(--q-muted, #6b655c); text-decoration: none;
  padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
a.vp-snv-tab:hover { background: #f0ede7; color: var(--q-text, #26221c); }
.vp-snv-tab.active { background: #fff; color: var(--q-text, #26221c);
  box-shadow: 0 1px 3px rgba(38, 34, 28, .12); cursor: default; }

/* Clinical intercept modal (Gateway A) — mirrors the vp-loc-modal pattern */
.vp-modal { position: fixed; inset: 0; z-index: 1000; display: flex;
  align-items: center; justify-content: center; background: rgba(38, 34, 28, .45);
  padding: 16px; }
.vp-modal-box { width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; }
.vp-rx-opt { display: flex; gap: 12px; align-items: flex-start; text-decoration: none;
  color: var(--q-ink, #26221c); background: #fff; border: 2px solid var(--q-border, #e3e0da);
  border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.vp-rx-opt:hover { border-color: var(--q-red, #b92b27); }
.vp-rx-opt .vp-rx-opt-emoji { font-size: 22px; line-height: 1.2; }
.vp-rx-opt strong { display: block; font-size: 14px; margin-bottom: 3px; }
.vp-rx-opt p { margin: 0; font-size: 12px; line-height: 1.5;
  color: var(--q-muted, #6b655c); }
.vp-rx-smallprint { font-size: 11px; color: var(--q-faint, #a89f92);
  line-height: 1.5; margin: 10px 0 0; }

/* ---------------------------------------------------------------------------
 * STAGE C (guideline V2 Part 3): local-stock card + stockist drawer
 * ------------------------------------------------------------------------- */

/* Prominent local-stock card replacing the old passive stockist line */
.vp-shelf-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #f7f4ee; border: 1px solid var(--q-border, #e3e0da); border-radius: 10px;
  padding: 12px 14px; margin-top: 12px; }
.vp-shelf-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden;
  flex-shrink: 0; background: #f3efe9; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--q-border, #e3e0da); }
.vp-shelf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-shelf-thumb-ph { font-size: 22px; font-weight: 700; color: #a89f92; }
.vp-shelf-info { flex: 1; min-width: 160px; }
.vp-shelf-pack { font-size: 12px; color: var(--q-muted, #6b655c); }
.vp-shelf-bench { font-size: 14px; font-weight: 700; margin-top: 2px; }

/* Slide-over drawer (right side, full height, Quora-clean) */
.vp-drawer { position: fixed; inset: 0; z-index: 1000; background: rgba(38, 34, 28, .45); }
.vp-drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: 100%;
  max-width: 420px; background: #faf9f7; border-left: 1px solid var(--q-border, #e3e0da);
  box-shadow: -4px 0 16px rgba(38, 34, 28, .18); overflow-y: auto; padding: 18px; }
.vp-drawer-head { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; }
.vp-drawer-head strong { font-size: 15px; }
.vp-shelf-prod { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px;
  padding: 10px 12px; }
.vp-shelf-reshead { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--q-muted, #6b655c); margin: 14px 0 8px; }

/* "Verified Pharmacies Near You" comparison card */
.vp-pharm-card { background: #fff; border: 1px solid var(--q-border, #e3e0da);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.vp-pharm-head { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; }
.vp-pharm-head strong { font-size: 14px; }
.vp-pharm-badge { font-size: 11px; font-weight: 700; color: #1e7e34; margin-top: 4px; }
.vp-pharm-meta { font-size: 12px; color: var(--q-muted, #6b655c); margin-top: 4px; }
.vp-pharm-eta { font-size: 12px; color: #8a5a00; margin-top: 4px; }
.vp-pharm-price { font-size: 17px; font-weight: 700; margin: 8px 0; }
.vp-open-pill { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 9px;
  padding: 2px 9px; background: #e7f6ec; color: #1e7e34; white-space: nowrap; }
.vp-closed-pill { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 9px;
  padding: 2px 9px; background: #f0ede7; color: #6b655c; white-space: nowrap; }

/* ---------------- Stage E: C_LIFESTYLE variant modal ------------------ */
.vp-variant-group { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--q-muted, #6b655c); margin: 14px 0 8px; }
.vp-variant-row { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; width: 100%; text-align: left; background: #fff;
  border: 1px solid var(--q-border, #e3e0da); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 8px; cursor: pointer; font: inherit; }
.vp-variant-row:hover:not(:disabled) { border-color: #b6ab99; background: #fdfcfa; }
.vp-variant-row:disabled { opacity: .5; cursor: not-allowed; }
.vp-variant-attrs { font-size: 13px; font-weight: 600; }
.vp-variant-stock { font-size: 11px; color: var(--q-muted, #6b655c); margin-top: 3px; }
.vp-variant-stock.out { color: var(--q-red, #b92b27); }
.vp-variant-price { font-size: 15px; font-weight: 700; white-space: nowrap; }
.vp-spec-row { display: flex; justify-content: space-between; gap: 10px;
  padding: 6px 0; border-bottom: 1px dashed var(--q-border, #e3e0da);
  font-size: 13px; }
.vp-spec-row:last-child { border-bottom: 0; }
.vp-spec-row span:first-child { color: var(--q-muted, #6b655c); text-transform: capitalize; }

/* ---------------------------------------------------------------------------
 * STAGE-NAV: three-row storefront header (works with the .vp-nav3 markup in
 * _nav.php). Additive — existing .q-nav / .tm-menu / .vp-* rules untouched.
 *   R1: brand + location anchor + B2B hub button  |  Shop / Rewards / Cart
 *   R2: primary navigation (the .tm-menu link row)
 *   R3: .vp-portal-switch (unchanged, sits directly under the nav)
 * ------------------------------------------------------------------------- */
.q-nav.vp-nav3 { height: auto; min-height: 50px; flex-direction: column;
  align-items: stretch; justify-content: flex-start; padding: 4px 20px 6px; gap: 0; }
.vp-nav-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.vp-nav-r1 { justify-content: space-between; min-height: 40px; }
.vp-nav-r1 .vp-nav-left,
.vp-nav-r1 .vp-nav-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vp-nav-r2 { justify-content: center; border-top: 1px solid var(--q-border, #e3e0da);
  margin-top: 2px; padding-top: 4px; }
.vp-nav-r2.tm-menu { flex: none; } /* rows manage their own width/centering */

@media (max-width: 720px) {
  .q-nav.vp-nav3 { padding: 4px 12px 6px; }
  .vp-nav-r1 { justify-content: center; }
  .vp-nav-r1 .vp-nav-left,
  .vp-nav-r1 .vp-nav-right { justify-content: center; }
  .vp-nav-r2 { justify-content: flex-start; }
}

/* Keep the final medication-safety/report link clear of floating support and
   shield controls on narrow product screens. */
@media (max-width: 767px) {
  .vp-product-body .vp-product-page { padding-bottom: 88px; }
}
