/* =================================================================
   BP Shop Core – Single Product Page
   Brand: #D7AE01 gold + #000000 black | Poppins
================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body.bpsc-single-product-page {
    background: #f5f5f5 !important;
    font-family: var(--bpsc-font-family, 'Poppins', sans-serif) !important;
    color: #222 !important;
}

body.bpsc-single-product-page .site-main,
body.bpsc-single-product-page #primary,
body.bpsc-single-product-page #main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.bpsc-single-product-page .woocommerce-notices-wrapper {
    max-width: var(--bpsc-container-mw, 1700px);
    margin: 0 auto;
    padding: 12px 24px 0;
}

/* Hide default WC single product output if theme still renders it */
body.bpsc-single-product-page .woocommerce div.product {
    display: none !important;
}

#bpsc-single-product-wrap {
    padding-top: 24px;
    padding-bottom: 60px;
}

#bpsc-single-product-wrap .bpsc-container {
    max-width: 1550px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.bpsc-sp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.bpsc-sp-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.bpsc-sp-breadcrumb a:hover {
    color: var(--bpsc-product-primary, #D7AE01);
}

.bpsc-sp-bc-sep {
    color: #bbb;
}

.bpsc-sp-bc-current {
    color: #111;
    font-weight: 500;
}

/* ── Main layout ──────────────────────────────────────────── */
.bpsc-sp-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 40px;
    margin-bottom: 24px;
}

.bpsc-sp-gallery-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bpsc-sp-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.bpsc-sp-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid #e8e8e8;
    background: #fff;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: border-color 0.2s;
    overflow: hidden;
}

.bpsc-sp-thumb.is-active,
.bpsc-sp-thumb:hover {
    border-color: var(--bpsc-product-primary, #D7AE01);
}

.bpsc-sp-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bpsc-sp-main-image {
    border: 1px solid #eee;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    padding: 20px;
}

.bpsc-sp-featured-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* ── Summary ──────────────────────────────────────────────── */
.bpsc-sp-title {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
    line-height: 1.3;
}

.bpsc-sp-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.bpsc-sp-rating .star-rating {
    color: var(--bpsc-product-primary, #D7AE01);
}

.bpsc-sp-review-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.bpsc-sp-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.bpsc-sp-price {
    font-size: 26px;
    font-weight: 700;
}

.bpsc-sp-price ins {
    text-decoration: none;
    color: var(--bpsc-product-primary, #D7AE01);
}

.bpsc-sp-price del {
    color: #999;
    font-size: 18px;
    font-weight: 400;
    margin-right: 8px;
}

.bpsc-sp-save-badge {
    display: inline-flex;
    align-items: center;
    background: #22c55e;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
}

.bpsc-sp-short-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ── Quantity ─────────────────────────────────────────────── */
.bpsc-sp-qty-row {
    margin-bottom: 16px;
}

.bpsc-sp-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.bpsc-sp-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    color: #333;
}

.bpsc-sp-qty-btn:hover {
    background: var(--bpsc-product-primary, #D7AE01);
    color: #000;
}

.bpsc-sp-qty-input {
    width: 56px;
    height: 40px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
}

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

/* ── Variable product overrides ─────────────────────────────── */
.bpsc-sp-variations-wrap .variations {
    margin-bottom: 16px;
}

.bpsc-sp-variations-wrap .variations td,
.bpsc-sp-variations-wrap .variations th {
    padding: 6px 0;
    vertical-align: middle;
}

.bpsc-sp-variations-wrap .variations label {
    font-weight: 600;
    font-size: 13px;
}

.bpsc-sp-variations-wrap .variations select {
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bpsc-sp-variations-wrap .woocommerce-variation-price {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--bpsc-product-primary, #D7AE01);
}

.bpsc-sp-variations-wrap .single_variation_wrap .quantity {
    display: none !important;
}

.bpsc-sp-variations-wrap .single_variation_wrap .single_add_to_cart_button {
    display: none !important;
}

/* ── Action buttons ─────────────────────────────────────────── */
.bpsc-sp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.bpsc-sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: opacity 0.2s, transform 0.15s;
    text-align: center;
}

.bpsc-sp-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.bpsc-sp-btn-cart {
    background: var(--bpsc-product-primary, #D7AE01);
    color: #000;
    border-color: var(--bpsc-product-primary, #D7AE01);
}

.bpsc-sp-btn-cart:hover {
    opacity: 0.9;
}

.bpsc-sp-btn-buy {
    background: var(--bpsc-product-dark, #000);
    color: #fff;
    border-color: var(--bpsc-product-dark, #000);
}

.bpsc-sp-btn-buy:hover {
    opacity: 0.9;
}

.bpsc-sp-btn-whatsapp {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}

.bpsc-sp-btn-call {
    background: #fff;
    color: var(--bpsc-product-dark, #000);
    border-color: var(--bpsc-product-dark, #000);
}

.bpsc-sp-btn-facebook {
    background: var(--bpsc-product-dark, #000);
    color: var(--bpsc-product-primary, #D7AE01);
    border-color: var(--bpsc-product-dark, #000);
    grid-column: 1 / -1;
}

.bpsc-sp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bpsc-sp-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ── Brand & meta ───────────────────────────────────────────── */
.bpsc-sp-brand,
.bpsc-sp-meta {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.bpsc-sp-brand-label {
    color: #666;
    margin-right: 6px;
}

.bpsc-sp-brand-name {
    font-weight: 600;
    color: var(--bpsc-product-primary, #D7AE01);
}

/* ── Frequently Bought Together ───────────────────────────── */
.bpsc-sp-fbt {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 28px 0;
    margin-bottom: 24px;
}

.bpsc-sp-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px;
}

.bpsc-sp-fbt-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.bpsc-sp-fbt-items {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bpsc-sp-fbt-plus {
    font-size: 22px;
    font-weight: 700;
    color: #999;
}

.bpsc-sp-fbt-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 120px;
    text-align: center;
    cursor: pointer;
}

.bpsc-sp-fbt-check {
    margin: 0;
}

.bpsc-sp-fbt-thumb img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid #eee;
}

.bpsc-sp-fbt-name {
    font-size: 12px;
    line-height: 1.3;
    color: #333;
}

.bpsc-sp-fbt-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--bpsc-product-primary, #D7AE01);
}

.bpsc-sp-fbt-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.bpsc-sp-fbt-total {
    font-size: 14px;
    color: #666;
}

.bpsc-sp-fbt-total strong {
    font-size: 20px;
    color: #111;
    margin-left: 6px;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.bpsc-sp-tabs-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    margin-bottom: 24px;
}

.bpsc-sp-tabs-nav {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 24px;
}

.bpsc-sp-tab-btn {
    background: none;
    border: none;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.bpsc-sp-tab-btn.is-active,
.bpsc-sp-tab-btn:hover {
    color: var(--bpsc-product-primary, #D7AE01);
    border-bottom-color: var(--bpsc-product-primary, #D7AE01);
}

.bpsc-sp-tab-pane {
    display: none;
    padding: 28px 24px;
}

.bpsc-sp-tab-pane.is-active {
    display: block;
}

.bpsc-sp-tab-content {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
}

.bpsc-sp-tab-content h2,
.bpsc-sp-tab-content h3 {
    color: #111;
    margin: 20px 0 10px;
}

/* ── Reviews ──────────────────────────────────────────────── */
.bpsc-sp-reviews-wrap .woocommerce-Reviews-title {
    display: none;
}

.bpsc-sp-reviews-wrap #review_form_wrapper {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.bpsc-sp-reviews-wrap .comment-form-rating label {
    font-weight: 600;
}

.bpsc-sp-reviews-wrap #respond input[type="submit"] {
    background: var(--bpsc-product-primary, #D7AE01) !important;
    color: #000 !important;
    border: none !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
}

/* ── Related / Cross-sell grids ───────────────────────────── */
.bpsc-sp-products-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 28px 24px;
    margin-bottom: 24px;
}

.bpsc-sp-section-head {
    margin-bottom: 20px;
    display: block;
    width: 100%;
}

.bpsc-sp-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

/* Reuse shop card styles on product page - exact match */
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-card {
    background: var(--shop-white, #fff) !important;
    border-radius: var(--shop-radius, 8px) !important;
    border: 1px solid var(--shop-border, #e5e7eb) !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: none !important;
    transition: border-color 0.22s ease, box-shadow 0.22s ease !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-card:hover {
    border-color: #b8a0cc !important;
    box-shadow: 0 2px 12px rgba(123, 82, 158, 0.08) !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-img-wrap {
    position: relative !important;
    overflow: hidden !important;
    background: #fff !important;
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    padding: 12px !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-img-wrap img,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-img-wrap .attachment-woocommerce_thumbnail,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-img-wrap .bpsc-product-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 auto !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-sale-pct {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 4 !important;
    background: var(--shop-primary, #7b52be) !important;
    color: #fff !important;
    border-radius: 0 !important;
    padding: 2px 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    font-family: var(--shop-font, 'Poppins', sans-serif) !important;
    line-height: 1.4 !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 12px 10px !important;
    background: linear-gradient(to top, rgba(255,255,255,0.97) 55%, rgba(255,255,255,0) 100%) !important;
    transform: translateY(100%) !important;
    transition: transform 0.25s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 5 !important;
    pointer-events: none !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-card:hover .bpsc-atc-overlay {
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay .button,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay a.button,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay .bpsc-atc-btn,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay .add_to_cart_button,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay .single_add_to_cart_button,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay button.button {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    background: var(--shop-primary, #7b52be) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: var(--shop-font, 'Poppins', sans-serif) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay .button:hover,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay a.button:hover,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay .bpsc-atc-btn:hover,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay .add_to_cart_button:hover,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay .single_add_to_cart_button:hover,
body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-atc-overlay button.button:hover {
    background: var(--shop-primary-dark, #6b3fa8) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(123, 82, 158, 0.3) !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-card {
    background: var(--shop-white, #fff) !important;
    border-radius: var(--shop-radius, 8px) !important;
    border: 1px solid var(--shop-border, #e5e7eb) !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: none !important;
    transition: border-color 0.22s ease, box-shadow 0.22s ease !important;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-card .bpsc-product-content {
    padding: 16px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-title a {
    color: #222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

body.bpsc-single-product-page .bpsc-sp-products-grid .bpsc-product-price {
    color: var(--shop-primary, #7b52be);
    font-weight: 700;
    font-size: 16px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .bpsc-sp-main {
        grid-template-columns: 1fr;
    }

    .bpsc-sp-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #bpsc-single-product-wrap {
        padding-top: calc(var(--bpsc-header-height, 120px) + 8px);
    }

    .bpsc-sp-main {
        padding: 20px;
    }

    .bpsc-sp-gallery-col {
        grid-template-columns: 1fr;
    }

    .bpsc-sp-thumbs {
        flex-direction: row;
        order: 2;
        overflow-x: auto;
    }

    .bpsc-sp-thumb {
        min-width: 64px;
    }

    .bpsc-sp-actions {
        grid-template-columns: 1fr;
    }

    .bpsc-sp-btn-facebook {
        grid-column: auto;
    }

    .bpsc-sp-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bpsc-sp-fbt-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .bpsc-sp-fbt-action {
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .bpsc-sp-products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .bpsc-sp-title {
        font-size: 22px;
    }
}
