/* =========================================================================
   Product detail page (pages/product.php, pages/service.php)
   ========================================================================= */
.bpd {
    --bpd-navy: #021A54;
    --bpd-navy-2: #0b2f86;
    --bpd-orange: #f97316;
    --bpd-orange-2: #ea580c;
    --bpd-ink: #0f172a;
    --bpd-muted: #64748b;
    --bpd-line: #e2e8f0;
    --bpd-soft: #f8fafc;
    --bpd-green: #15803d;
    background: #f1f5f9;
    padding: 14px 0 56px;
}

.bpd__wrap {
    width: min(100% - 32px, 1200px);
    margin: 0 auto;
}

.bpd-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* ---------- Breadcrumb ---------- */
.bpd__crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    overflow: hidden;
    font-size: 13px;
    color: var(--bpd-muted);
    white-space: nowrap;
}

.bpd__crumbs a {
    color: var(--bpd-muted);
    text-decoration: none;
}

.bpd__crumbs a:hover {
    color: var(--bpd-navy);
    text-decoration: underline;
}

.bpd__crumbs > i {
    font-size: 9px;
    color: #94a3b8;
}

.bpd__crumbs span[aria-current] {
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--bpd-ink);
    font-weight: 600;
}

/* ---------- Top: gallery + info ---------- */
.bpd__top {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 18px;
}

/* Gallery */
.bpd-gallery {
    position: sticky;
    top: calc(var(--bnav-offset, 0px) + 16px);
}

.bpd-gallery__stage {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--bpd-line);
}

.bpd-gallery__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.bpd-gallery__track::-webkit-scrollbar {
    display: none;
}

.bpd .bpd-gallery__slide {
    flex: 0 0 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: none;
    border-radius: 0;
    background: #fff;
    cursor: zoom-in;
    scroll-snap-align: center;
}

.bpd-gallery__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bpd-gallery__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    pointer-events: none;
}

.bpd .bpd-gallery__arrow {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    border: none;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.92);
    color: var(--bpd-ink);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.bpd-gallery__stage:hover .bpd-gallery__arrow,
.bpd-gallery__arrow:focus-visible {
    opacity: 1;
}

.bpd-gallery__arrow--prev { left: 12px; }
.bpd-gallery__arrow--next { right: 12px; }

.bpd-gallery__count,
.bpd-gallery__zoom {
    position: absolute;
    bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

.bpd-gallery__count { left: 12px; }
.bpd-gallery__zoom { right: 12px; }

.bpd-gallery__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.bpd-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.bpd .bpd-gallery__thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 10px !important;
    background: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.bpd-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bpd-gallery__thumb:hover,
.bpd-gallery__thumb.is-active {
    opacity: 1;
}

.bpd-gallery__thumb.is-active {
    border-color: var(--bpd-navy);
}

/* Info column */
.bpd-info {
    min-width: 0;
}

.bpd-info__eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.bpd-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0e7ff;
    color: var(--bpd-navy);
    font-size: 12px;
    font-weight: 700;
}

.bpd-chip--hot {
    background: #ffedd5;
    color: #c2410c;
}

.bpd .bpd-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 6px 12px;
    border: 1px solid var(--bpd-line);
    border-radius: 999px !important;
    background: #fff;
    color: var(--bpd-ink);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.bpd-share:hover {
    border-color: var(--bpd-navy);
}

.bpd-info__title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--bpd-ink);
    word-break: break-word;
}

.bpd-info__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--bpd-muted);
}

.bpd-info__rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.bpd-info__rating strong {
    color: var(--bpd-ink);
}

.bpd-info__rating:hover span {
    text-decoration: underline;
}

.bpd-stars {
    display: inline-flex;
    gap: 1px;
    color: #f59e0b;
    font-size: 13px;
}

.bpd-dot {
    color: #cbd5e1;
}

/* Price */
.bpd-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 14px;
}

.bpd-price__now {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    color: var(--bpd-navy);
}

.bpd-price__was {
    font-size: 1.05rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.bpd-price__save {
    padding: 3px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: var(--bpd-green);
    font-size: 12px;
    font-weight: 700;
}

/* Service pricing: "From ₦5,000 per hour", "Negotiable", "Price on request" */
.bpd-price__prefix,
.bpd-price__unit {
    font-size: 14px;
    font-weight: 700;
    color: var(--bpd-muted);
}

.bpd-price__now--text {
    font-size: 1.6rem;
}

.bpd-price__tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 12px;
    font-weight: 700;
}

.bpd-svc {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
    padding: 12px 14px;
    list-style: none;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--bpd-line);
}

.bpd-svc li {
    display: flex;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--bpd-muted);
}

.bpd-svc i {
    width: 18px;
    margin-top: 2px;
    text-align: center;
    color: var(--bpd-navy);
}

.bpd-svc strong {
    color: var(--bpd-ink);
    margin-right: 4px;
}

/* Stock */
.bpd-stock {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
}

.bpd-stock small {
    flex-basis: 100%;
    font-size: 12px;
    font-weight: 500;
}

.bpd-stock.is-ok { color: var(--bpd-green); }
.bpd-stock.is-low { color: #c2410c; }
.bpd-stock.is-out { color: #b91c1c; }

/* Buy box */
.bpd-buy {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--bpd-line);
}

.bpd-buy__row {
    display: flex;
    gap: 10px;
}

.bpd-qty {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
}

.bpd .bpd-qty button {
    width: 40px;
    height: 46px;
    border: none;
    background: var(--bpd-soft);
    color: var(--bpd-navy);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.bpd .bpd-qty button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.bpd-qty input {
    width: 46px;
    height: 46px;
    border: none;
    text-align: center;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: var(--bpd-ink);
    -moz-appearance: textfield;
}

.bpd-qty input::-webkit-outer-spin-button,
.bpd-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bpd .bpd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 10px !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.bpd .bpd-btn:active {
    transform: scale(0.98);
}

.bpd .bpd-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.bpd .bpd-btn--cart {
    flex: 1;
    background: var(--bpd-navy);
    color: #fff;
}

.bpd .bpd-btn--cart:hover:not(:disabled) {
    background: var(--bpd-navy-2);
}

.bpd .bpd-btn--buy {
    background: var(--bpd-orange);
    border-color: var(--bpd-orange-2);
    color: #fff;
}

.bpd .bpd-btn--buy:hover:not(:disabled) {
    background: var(--bpd-orange-2);
}

.bpd .bpd-btn--ghost {
    background: #fff;
    border-color: var(--bpd-line);
    color: var(--bpd-navy);
}

.bpd .bpd-btn--ghost:hover {
    border-color: var(--bpd-navy);
}

.bpd .bpd-btn--sm {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.bpd-btn.is-busy {
    pointer-events: none;
    opacity: 0.7;
}

.bpd-buy__incart {
    margin: 0;
    font-size: 13px;
    color: var(--bpd-green);
    font-weight: 600;
}

.bpd-buy__incart a,
.bpd-buy__alt {
    color: var(--bpd-navy);
    font-weight: 700;
}

.bpd-buy__alt {
    font-size: 13px;
    text-decoration: none;
}

/* Trust */
.bpd-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.bpd-trust li {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--bpd-line);
    font-size: 12px;
    line-height: 1.45;
    color: var(--bpd-muted);
}

.bpd-trust i {
    margin-top: 2px;
    color: var(--bpd-green);
    font-size: 16px;
}

.bpd-trust strong {
    display: block;
    color: var(--bpd-ink);
    font-size: 13px;
}

/* Cards */
.bpd-card {
    margin-bottom: 14px;
    padding: 16px;
    border-radius: 14px !important;
    background: #fff;
    border: 1px solid var(--bpd-line);
}

.bpd-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bpd-ink);
}

.bpd-card__title i {
    color: var(--bpd-navy);
}

.bpd-delivery ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bpd-delivery li {
    display: flex;
    gap: 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
}

.bpd-delivery li i {
    width: 18px;
    margin-top: 2px;
    text-align: center;
    color: var(--bpd-muted);
}

.bpd-delivery li strong {
    display: block;
    color: var(--bpd-ink);
}

/* Seller */
.bpd-seller {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bpd-seller__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bpd-navy), var(--bpd-navy-2));
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.bpd-seller__info {
    display: grid;
    flex: 1;
    min-width: 140px;
}

.bpd-seller__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--bpd-muted);
}

.bpd-seller__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--bpd-ink);
    text-decoration: none;
}

.bpd-seller__name:hover {
    color: var(--bpd-navy);
    text-decoration: underline;
}

.bpd-seller__meta {
    font-size: 12px;
    color: var(--bpd-muted);
}

.bpd-seller__meta i {
    color: #f59e0b;
}

.bpd-seller__actions {
    display: flex;
    gap: 8px;
}

.bpd-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
}

.bpd-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.bpd-alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--bpd-green);
}

/* ---------- Section tabs ---------- */
.bpd-tabs {
    position: sticky;
    top: var(--bnav-offset, 0px);
    z-index: 15;
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    padding: 6px;
    overflow-x: auto;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--bpd-line);
    scrollbar-width: none;
}

.bpd-tabs::-webkit-scrollbar {
    display: none;
}

.bpd-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.bpd-tabs a span {
    padding: 0 7px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 11px;
}

.bpd-tabs a:hover {
    background: var(--bpd-soft);
}

.bpd-tabs a.is-active {
    background: #eef2ff;
    color: var(--bpd-navy);
}

.bpd-section {
    scroll-margin-top: 70px;
    padding: 20px;
}

.bpd-section__title {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bpd-ink);
}

/* Description */
.bpd-desc {
    position: relative;
    color: #334155;
    font-size: 15px;
    line-height: 1.7;
}

.bpd-desc.is-collapsed {
    max-height: 220px;
    overflow: hidden;
}

.bpd-desc.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}

.bpd .bpd-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 0;
    border: none;
    background: none;
    color: var(--bpd-navy);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.bpd-specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 0;
}

.bpd-specs div {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bpd-soft);
}

.bpd-specs dt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--bpd-muted);
}

.bpd-specs dd {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bpd-ink);
}

/* Reviews */
.bpd-reviews__summary {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bpd-line);
}

.bpd-reviews__score {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
}

.bpd-reviews__score strong {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--bpd-ink);
}

.bpd-reviews__score .bpd-stars {
    font-size: 16px;
}

.bpd-reviews__score span:last-child {
    font-size: 13px;
    color: var(--bpd-muted);
}

.bpd-reviews__bars {
    display: grid;
    gap: 6px;
}

.bpd-bar {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--bpd-muted);
}

.bpd-bar i {
    color: #f59e0b;
    font-size: 10px;
}

.bpd-bar__track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f5f9;
}

.bpd-bar__track span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #f59e0b;
}

.bpd-reviews__note {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bpd-soft);
    font-size: 13px;
    color: #475569;
}

.bpd-reviews__note a {
    color: var(--bpd-navy);
    font-weight: 700;
}

.bpd-review-form {
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid var(--bpd-line);
}

.bpd-review-form summary {
    padding: 12px 14px;
    cursor: pointer;
    color: var(--bpd-navy);
    font-weight: 700;
}

.bpd-review-form form {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}

.bpd-rate {
    margin: 0;
    padding: 0;
    border: none;
}

.bpd-rate legend {
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bpd-ink);
}

/* Stars are listed 5..1 and shown reversed, so "this and every star after it" lights up on hover. */
.bpd-rate__stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.bpd-rate__stars input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.bpd-rate__stars label {
    color: #cbd5e1;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.1s ease;
}

.bpd-rate__stars label:hover,
.bpd-rate__stars label:hover ~ label,
.bpd-rate__stars input:checked ~ label {
    color: #f59e0b;
}

.bpd-rate__stars input:focus-visible + label {
    outline: 2px solid var(--bpd-navy);
    outline-offset: 2px;
}

.bpd-field {
    display: grid;
    gap: 6px;
}

.bpd-field span {
    font-size: 13px;
    font-weight: 700;
    color: var(--bpd-ink);
}

.bpd-field input,
.bpd-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: var(--bpd-ink);
}

.bpd-field input:focus,
.bpd-field textarea:focus {
    outline: none;
    border-color: var(--bpd-navy);
    box-shadow: 0 0 0 3px rgba(2, 26, 84, 0.12);
}

.bpd-review-form .bpd-btn {
    justify-self: start;
}

.bpd-reviews__list {
    display: grid;
}

.bpd-review {
    padding: 16px 0;
    border-bottom: 1px solid #eef2f6;
}

.bpd-review:last-child {
    border-bottom: none;
}

.bpd-review.is-extra {
    display: none;
}

.bpd-reviews__list.show-all .bpd-review.is-extra {
    display: block;
}

.bpd-review__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.bpd-review__head > span:nth-child(2) {
    display: grid;
    flex: 1;
    min-width: 0;
    font-size: 14px;
}

.bpd-review__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e7ff;
    color: var(--bpd-navy);
    font-weight: 800;
}

.bpd-review__badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--bpd-green);
}

.bpd-review time {
    font-size: 12px;
    color: var(--bpd-muted);
    white-space: nowrap;
}

.bpd-review h3 {
    margin: 6px 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--bpd-ink);
}

.bpd-review p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.bpd-review__reply {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--bpd-navy);
    border-radius: 0 10px 10px 0;
    background: var(--bpd-soft);
    font-size: 13px;
}

.bpd-review__reply strong {
    color: var(--bpd-navy);
}

.bpd-empty {
    padding: 26px 10px;
    text-align: center;
    color: var(--bpd-muted);
    font-size: 14px;
}

.bpd-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 30px;
    color: #cbd5e1;
}

/* ---------- Related rails ---------- */
.bpd-related {
    margin-bottom: 18px;
    scroll-margin-top: 70px;
}

#related {
    scroll-margin-top: 70px;
}

.bpd-related__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.bpd-related__head h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--bpd-ink);
}

.bpd-related__head a {
    color: var(--bpd-navy);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.bpd-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 180px;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.bpd-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    padding-bottom: 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--bpd-line);
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
    transition: box-shadow 0.15s ease;
}

.bpd-mini:hover {
    box-shadow: 0 10px 22px -14px rgba(2, 26, 84, 0.5);
}

.bpd-mini__img {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    margin-bottom: 4px;
    background: var(--bpd-soft);
}

.bpd-mini__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bpd-mini__off,
.bpd-mini__out {
    position: absolute;
    left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.bpd-mini__off {
    top: 8px;
    background: #ef4444;
    color: #fff;
}

.bpd-mini__out {
    bottom: 8px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
}

.bpd-mini__name,
.bpd-mini__store,
.bpd-mini__price {
    padding: 0 10px;
}

.bpd-mini__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--bpd-ink);
}

.bpd-mini__store {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--bpd-muted);
}

.bpd-mini__price {
    font-size: 14px;
    font-weight: 800;
    color: var(--bpd-navy);
}

.bpd-mini__price s {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}

/* ---------- Mobile buy bar ---------- */
.bpd-bar-mobile {
    display: none;
}

/* ---------- Lightbox ---------- */
.bpd-lightbox[hidden],
.bpd-sheet[hidden],
.bpd-toast[hidden] {
    display: none !important;
}

.bpd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.94);
    touch-action: pan-y;
}

.bpd-lightbox img {
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
    user-select: none;
}

.bpd-lightbox button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.bpd-lightbox button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.bpd-lightbox__close {
    top: calc(14px + env(safe-area-inset-top));
    right: 14px;
}

.bpd-lightbox__nav--prev { left: 14px; }
.bpd-lightbox__nav--next { right: 14px; }

.bpd-lightbox__count {
    position: absolute;
    bottom: calc(18px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Share sheet ---------- */
.bpd-sheet {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
}

.bpd-sheet__panel {
    display: grid;
    gap: 14px;
    width: min(100%, 420px);
    margin: 16px;
    padding: 18px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.bpd-sheet h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.bpd-sheet__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.bpd-sheet__grid a,
.bpd-sheet__grid button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border: 1px solid #e2e8f0;
    border-radius: 12px !important;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.bpd-sheet__grid i {
    font-size: 20px;
}

.bpd-sheet__grid .fa-whatsapp { color: #16a34a; }
.bpd-sheet__grid .fa-facebook { color: #1877f2; }

.bpd-sheet .bpd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 10px !important;
    background: #fff;
    color: #021A54;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* ---------- Toast ---------- */
.bpd-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 4100;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 32px);
    padding: 12px 16px;
    transform: translateX(-50%);
    border-radius: 12px;
    background: #0f172a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
    animation: bpd-toast-in 0.2s ease;
}

.bpd-toast a {
    color: #fdba74;
    font-weight: 700;
    white-space: nowrap;
}

.bpd-toast.is-error {
    background: #b91c1c;
}

@keyframes bpd-toast-in {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Floating cart button is redundant here: the page has its own buy controls. */
.bpd-page .cart-fab {
    display: none !important;
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
    .bpd__top {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bpd-gallery {
        position: static;
    }

    .bpd-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
    .bpd {
        padding: 0 0 calc(150px + env(safe-area-inset-bottom));
    }

    .bpd__wrap {
        width: 100%;
    }

    .bpd__crumbs {
        margin: 0;
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Edge-to-edge photos on phones. */
    .bpd-gallery__stage {
        border: none;
        border-radius: 0;
    }

    .bpd-gallery__arrow,
    .bpd-gallery__zoom {
        display: none !important;
    }

    .bpd-gallery__thumbs {
        padding: 0 12px;
    }

    .bpd .bpd-gallery__thumb {
        width: 56px;
        height: 56px;
    }

    .bpd-info,
    .bpd-tabs,
    .bpd-section,
    #related {
        margin-left: 12px;
        margin-right: 12px;
    }

    .bpd-info__title {
        font-size: 1.3rem;
    }

    .bpd-price__now {
        font-size: 1.7rem;
    }

    .bpd-buy {
        padding: 12px;
    }

    .bpd .bpd-btn {
        min-height: 42px;
        padding: 0 14px;
        font-size: 14px;
    }

    .bpd .bpd-qty button {
        width: 36px;
        height: 42px;
    }

    .bpd-qty input {
        width: 40px;
        height: 42px;
    }

    .bpd-trust {
        grid-template-columns: 1fr;
    }

    .bpd-card {
        padding: 14px;
    }

    .bpd-section {
        padding: 16px 14px;
    }

    .bpd-seller__actions {
        width: 100%;
    }

    .bpd-seller__actions .bpd-btn {
        flex: 1;
    }

    .bpd-reviews__summary {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .bpd-specs {
        grid-template-columns: 1fr 1fr;
    }

    .bpd-rail {
        grid-auto-columns: 148px;
        gap: 10px;
    }

    .bpd-bar-mobile {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(64px + env(safe-area-inset-bottom));
        z-index: 998;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        background: #fff;
        border-top: 1px solid var(--bpd-line);
        box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
        transform: translateY(0);
        transition: transform 0.2s ease;
    }

    .bpd-bar-mobile.is-hidden {
        transform: translateY(160%);
    }

    .bpd-bar-mobile > div {
        display: grid;
        flex: 1;
        min-width: 0;
        line-height: 1.15;
    }

    .bpd-bar-mobile strong {
        font-size: 17px;
        color: var(--bpd-navy);
    }

    .bpd-bar-mobile s {
        font-size: 11px;
        color: #94a3b8;
    }

    .bpd-bar-mobile .bpd-btn {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

    .bpd-bar-mobile .bpd-btn--cart {
        flex: 0 0 auto;
    }

    .bpd-toast {
        bottom: calc(140px + env(safe-area-inset-bottom));
    }

    .bpd-lightbox__nav {
        display: none !important;
    }
}
