/* ============================================================
   BestiBest — Single Product Page Styles
   Loaded only on product pages.
   ============================================================ */

.bb-product-page {
    padding: 48px 0 96px;
}

/* ===== Two-column layout ===== */
.bb-product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

/* ===== Gallery ===== */
.bb-gallery { display: flex; flex-direction: column; gap: 16px; }

.bb-gallery__main,
.bb-gallery__video,
.bb-gallery__thumb {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.bb-gallery__main {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bb-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bb-gallery__main--placeholder {
    background:
        linear-gradient(135deg, rgba(245, 166, 35, 0.05), transparent),
        var(--glass-bg);
}

/* Video wrap (16:9) */
.bb-video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
}
.bb-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Thumbs */
.bb-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.bb-gallery__thumb {
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bb-gallery__thumb:hover {
    transform: translateY(-2px);
    box-shadow: var(--gold-glow);
}
.bb-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Summary (right side) ===== */
.bb-summary {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bb-product-page .bb-product__title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.bb-product__rating { color: var(--accent-gold); }
.bb-product__rating .star-rating { color: var(--accent-gold); }

.bb-product__price {
    color: var(--accent-gold) !important;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
}
.bb-product__price del {
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 12px;
    font-size: 0.7em;
}
.bb-product__price ins {
    background: transparent;
    color: var(--accent-gold);
    text-decoration: none;
}

.bb-product__short { color: var(--text-muted); line-height: 1.6; }

/* ===== Benefits list ===== */
.bb-benefits {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bb-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.5;
}
.bb-benefits__icon {
    flex: 0 0 32px;
    height: 32px;
    width: 32px;
    border-radius: 8px;
    background: rgba(245, 166, 35, 0.12);
    color: var(--accent-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}
.bb-benefits__text { padding-top: 4px; }

/* ===== Cart wrap (provides hook for sticky-mobile in woocommerce.css) ===== */
.bb-cart-wrap { margin-top: 8px; }
.bb-cart-wrap form.cart {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}
.bb-cart-wrap form.cart .quantity { margin: 0 !important; }
.bb-cart-wrap form.cart .single_add_to_cart_button {
    flex: 1;
    min-width: 200px;
}

/* Variations form */
.bb-cart-wrap form.variations_form {
    display: block;
}
.bb-cart-wrap form.variations_form .variations {
    margin-bottom: 16px;
    width: 100%;
}

/* Meta */
.bb-product__meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
}
.bb-product__meta .sku_wrapper,
.bb-product__meta .posted_in,
.bb-product__meta .tagged_as { display: block; margin-bottom: 4px; }
.bb-product__meta a { color: var(--accent-gold); }

/* ===== Long Description ===== */
.bb-description {
    margin-top: 96px;
    padding: 48px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
}
.bb-description .bb-section__title {
    text-align: left;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: 24px;
}
.bb-description__body { color: var(--text-muted); line-height: 1.7; }
.bb-description__body h2,
.bb-description__body h3 { color: var(--text-main); margin-top: 32px; }
.bb-description__body img { border-radius: 8px; margin: 16px 0; }

/* ===== Reviews section ===== */
.bb-reviews-section {
    margin-top: 64px;
}
.bb-reviews-section #reviews {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    padding: 40px;
}
.bb-reviews-section #comments .commentlist {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
}
.bb-reviews-section #comments .commentlist li.comment {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 16px;
}
.bb-reviews-section .comment-text { color: var(--text-main); }
.bb-reviews-section .meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 12px;
}
.bb-reviews-section .meta strong { color: var(--text-main); }

/* Review images */
.bb-review-image {
    margin-top: 16px;
    max-width: 240px;
}
.bb-review-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Comment form */
.bb-reviews-section #respond {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.bb-reviews-section #commentform .comment-form-image label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.875rem;
}
.bb-reviews-section #commentform input[type="file"] {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    padding: 10px;
    width: 100%;
}
.bb-reviews-section #commentform input[type="file"]::file-selector-button {
    background: var(--accent-gold);
    color: #121212;
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
}

/* ===== Related Products ===== */
.bb-related { margin-top: 96px; }
.bb-related .related.products > h2,
.bb-related h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    text-align: center;
    color: var(--text-main);
    margin: 0 0 40px;
}
.bb-related ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.bb-related ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
}

/* ===== Mobile ===== */
@media (max-width: 900px) {
    .bb-product-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .bb-summary {
        position: static;
        gap: 16px;
    }
    .bb-description { padding: 32px 24px; }
    .bb-reviews-section #reviews { padding: 24px; }
    .bb-related ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .bb-product-page { padding: 24px 0 120px; }
    .bb-gallery__thumbs { grid-template-columns: repeat(3, 1fr); }
    .bb-related { margin-top: 64px; }
    .bb-related ul.products {
        grid-template-columns: 1fr !important;
    }
}
