/* Product detail page — loaded only via ProductController's $extraStyles. */

.bb-gallery-main {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--color-surface-soft);
}
.bb-gallery-main img {
    width: 100%;
    aspect-ratio: var(--ratio-product);
    object-fit: cover;
    display: block;
}
.bb-gallery__count {
    position: absolute;
    bottom: var(--space-3);
    inset-inline-end: var(--space-3);
    background: rgba(var(--color-overlay-dark-rgb), 0.65);
    color: #fff;
    font-size: var(--fs-caption);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-pill);
}
.bb-gallery__zoom-hint {
    position: absolute;
    top: var(--space-3);
    inset-inline-end: var(--space-3);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--color-overlay-dark-rgb), 0.5);
    color: #fff;
    font-size: 0.9rem;
    pointer-events: none;
}
.bb-gallery-thumbs {
    margin-top: var(--space-3);
}
.bb-gallery-thumbs .swiper-slide {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: border-color var(--motion-fast) var(--motion-ease), opacity var(--motion-fast) var(--motion-ease);
}
.bb-gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bb-gallery-thumbs .swiper-slide-thumb-active {
    border-color: var(--color-primary);
    opacity: 1;
}

/* Loyalty points preview */
.bb-points-preview {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    font-size: var(--fs-small);
    font-weight: 600;
}

/* Variant picker */
.bb-variant-picker {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.bb-variant-option {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: var(--space-4);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text);
    font-size: var(--fs-small);
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}
.bb-variant-option:hover { border-color: var(--color-primary); }
.bb-variant-option.is-selected {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: #fff;
}
.bb-variant-option.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Quantity stepper: base .bb-qty-stepper styles now live in the shared
   components.css (also used by the cart page) — nothing product-specific left here. */

/* Wishlist + share toggles next to Add to Cart */
.bb-wishlist-btn,
.bb-share-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text);
    font-size: 1.1rem;
    transition: border-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}
.bb-wishlist-btn:hover,
.bb-share-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.bb-wishlist-btn.is-active {
    border-color: var(--color-danger);
    color: var(--color-danger);
}
.bb-share-btn.is-copied {
    border-color: var(--color-success);
    color: var(--color-success);
}

/* The buy-box previously used position:sticky on desktop to keep the CTA
   reachable while scrolling, but the sticky box visually overlapped the
   accordion content below it as the page scrolled (even with an opaque
   background — the accordion showed through). The mobile bottom bar
   (.bb-sticky-cart-bar below) already covers the "keep the CTA reachable"
   need below 992px, so the buy-box now stays in normal static flow at
   every width, which guarantees it can never overlap its own following
   siblings. */

/* .bb-specs-accordion styling lives in components.css — it's shared with
   the loyalty wallet page's rules accordion, not product-page-only. */
.bb-faq-list dt {
    font-weight: 700;
    margin-top: var(--space-3);
}
.bb-faq-list dt:first-child { margin-top: 0; }
.bb-faq-list dd {
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* Recently viewed (client-side only — see recently-viewed.js) */
.bb-recently-viewed {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    padding-bottom: var(--space-2);
}
.bb-recently-viewed__item {
    flex: 0 0 140px;
    text-decoration: none;
    color: var(--color-text);
}
.bb-recently-viewed__item img {
    width: 100%;
    aspect-ratio: var(--ratio-product);
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
}
.bb-recently-viewed__name {
    font-size: var(--fs-small);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bb-recently-viewed__price {
    font-size: var(--fs-small);
    font-weight: 700;
}

/* Sticky mobile add-to-cart bar */
.bb-sticky-cart-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1020;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
@media (min-width: 992px) {
    .bb-sticky-cart-bar { display: none; }
}
.bb-sticky-cart-bar__price {
    font-weight: 700;
    white-space: nowrap;
}
