﻿/* =====================================================
   BD SINGLE PRODUCT PAGE
   ===================================================== */

.bd-single-product { padding: 24px 0 70px; }

/* ── Breadcrumb ───────────────────────────────── */
.bd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.bd-breadcrumb a  { color: #6b7280; text-decoration: none; transition: color .2s; }
.bd-breadcrumb a:hover { color: #ff4da6; }
.bd-breadcrumb .fa-chevron-right { font-size: 9px; color: #d1d5db; }
.bd-breadcrumb span { color: #111827; font-weight: 600; }

/* ── Main 2-col grid ──────────────────────────── */
.bd-sp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

/* ── Gallery col ──────────────────────────────── */
.bd-sp-gallery {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 30px rgba(15,23,42,.07);
    border: 1px solid #f0f0f4;
}

.bd-sp-disc-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 10;
    background: linear-gradient(135deg, #ff4da6, #2563eb);
    color: #fff;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 4px 14px rgba(255,77,166,.35);
}

/* WooCommerce gallery inside our wrapper */
.bd-sp-gallery .woocommerce-product-gallery {
    margin: 0 !important;
    padding: 0 !important;
}
.bd-sp-gallery .woocommerce-product-gallery__wrapper img {
    border-radius: 18px 18px 0 0;
    width: 100% !important;
    height: 460px !important;
    object-fit: cover !important;
}
.bd-sp-gallery .flex-control-thumbs {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.bd-sp-gallery .flex-control-thumbs li { flex-shrink: 0; }
.bd-sp-gallery .flex-control-thumbs img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: border-color .2s;
}
.bd-sp-gallery .flex-control-thumbs li.flex-active img { border-color: #ff4da6; }

/* ── Info col ─────────────────────────────────── */
.bd-sp-info { padding-top: 4px; }

/* Type badge */
.bd-sp-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.bd-badge-course  { background: #fdf2f8; color: #be185d; }
.bd-badge-digital { background: #eff6ff; color: #1d4ed8; }
.bd-badge-physical { background: #f0fdf4; color: #15803d; }

/* Title */
.bd-sp-title {
    font-size: 32px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
    margin: 0 0 14px;
    letter-spacing: -.01em;
}

/* Star rating row */
.bd-sp-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.bd-sp-stars { display: inline-flex; gap: 2px; }
.bd-sp-stars .fas.fa-star,
.bd-sp-stars .fas.fa-star-half-stroke { color: #f59e0b; font-size: 15px; }
.bd-sp-stars .far.fa-star { color: #d1d5db; font-size: 15px; }
.bd-sp-rating-val { font-weight: 800; font-size: 15px; color: #111827; }
.bd-sp-review-link { color: #6b7280; font-size: 13px; text-decoration: underline; }
.bd-sp-review-link:hover { color: #ff4da6; }
.bd-sp-sold { background: #fdf2f8; color: #be185d; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* Price box */
.bd-sp-price-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fdf2f8 0%, #eff6ff 100%);
    border-radius: 14px;
    border: 1px solid #fce7f3;
}
.bd-sp-price-box .price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.bd-sp-price-box .price ins {
    font-size: 34px;
    font-weight: 900;
    color: #111827;
    text-decoration: none;
}
.bd-sp-price-box .price del {
    font-size: 18px;
    color: #9ca3af;
    font-weight: 500;
}
.bd-sp-price-box .price .woocommerce-Price-amount:only-child {
    font-size: 34px;
    font-weight: 900;
    color: #111827;
}
.bd-sp-you-save {
    background: #ff4da6;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Stock status */
.bd-sp-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.bd-sp-stock.in-stock  { background: #f0fdf4; color: #15803d; }
.bd-sp-stock.out-of-stock { background: #fef2f2; color: #dc2626; }

/* Short description */
.bd-sp-short-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 22px;
    border-left: 3px solid #ff4da6;
    padding-left: 14px;
}
.bd-sp-short-desc ul { padding-left: 18px; }
.bd-sp-short-desc li { margin-bottom: 4px; }

/* ── Add to cart area (WooCommerce) ───────────── */
.bd-sp-cart-wrap { margin-bottom: 12px; }

/* Qty input */
.bd-sp-cart-wrap .quantity { display: flex; align-items: center; gap: 0; margin-bottom: 14px; }
.bd-sp-cart-wrap .qty {
    width: 68px !important;
    padding: 12px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    -moz-appearance: textfield;
}
.bd-sp-cart-wrap .qty:focus { border-color: #ff4da6; outline: none; }

/* Variations */
.variations { width: 100%; margin-bottom: 14px; border-collapse: collapse; }
.variations td, .variations th { padding: 6px 0; font-size: 14px; }
.variations label { font-weight: 600; color: #374151; }
.variations select {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    min-width: 160px;
    cursor: pointer;
    transition: border-color .2s;
}
.variations select:focus { border-color: #ff4da6; outline: none; }
.reset_variations { font-size: 12px; color: #9ca3af; margin-top: 4px; display: inline-block; }

/* Add to Cart button */
.single_add_to_cart_button,
.bd-sp-cart-wrap .button.single_add_to_cart_button {
    width: 100% !important;
    display: block !important;
    padding: 16px !important;
    border: none !important;
    border-radius: 50px !important;
    background: linear-gradient(90deg, #ff4da6, #8b5cf6, #2563eb) !important;
    background-size: 200% auto !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    letter-spacing: .02em !important;
    transition: background-position .4s, transform .2s, box-shadow .2s !important;
    box-shadow: 0 6px 24px rgba(255,77,166,.28) !important;
}
.single_add_to_cart_button:hover {
    background-position: right center !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 32px rgba(255,77,166,.38) !important;
}

/* Buy Now button (from hook) */
.buy-now-button {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 15px !important;
    border-radius: 50px !important;
    background: #0f172a !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin-top: 12px !important;
    text-decoration: none !important;
    transition: background .2s, transform .2s !important;
    box-shadow: 0 4px 16px rgba(15,23,42,.2) !important;
}
.buy-now-button:hover { background: #1e293b !important; transform: translateY(-2px) !important; }

/* ── WhatsApp Button ─────────────────────────── */
.bd-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 24px;
    margin-top: 12px;
    border-radius: 50px;
    background: linear-gradient(90deg, #25d366, #128c7e);
    color: #fff !important;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none !important;
    letter-spacing: .02em;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    box-shadow: 0 6px 22px rgba(37,211,102,.30);
}
.bd-wa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37,211,102,.40);
    opacity: .93;
}
.bd-wa-btn .fab { font-size: 22px; }

/* ── Secondary action buttons ────────────────── */
.bd-sp-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.bd-sp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .2s, color .2s, background .2s;
    white-space: nowrap;
}
.bd-sp-action-btn:hover { border-color: #ff4da6; color: #ff4da6; }
.bd-sp-action-btn.in-wishlist { border-color: #fbb6ce; color: #ff4da6; background: #fdf2f8; }

.bd-share-fb:hover { border-color: #1877f2; color: #1877f2; }
.bd-share-tw:hover { border-color: #000; color: #000; }

/* ── Trust Badges ────────────────────────────── */
.bd-sp-trust {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin-top: 22px;
    border: 1px solid #f0f0f4;
    border-radius: 14px;
    overflow: hidden;
}
.bd-trust-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    border-right: 1px solid #f0f0f4;
    background: #fafafa;
    transition: background .2s;
}
.bd-trust-item:last-child { border-right: none; }
.bd-trust-item:hover { background: #fdf2f8; color: #ff4da6; }
.bd-trust-item i { font-size: 20px; color: #ff4da6; }

/* ── Product Meta ─────────────────────────────── */
.bd-sp-meta {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bd-sp-meta-row {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #374151;
    align-items: flex-start;
}
.bd-sp-meta-label {
    font-weight: 700;
    color: #6b7280;
    min-width: 82px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.bd-sp-meta a { color: #ff4da6; text-decoration: none; }
.bd-sp-meta a:hover { text-decoration: underline; }

/* ── Tabs section ─────────────────────────────── */
.bd-sp-tabs-wrap { margin-top: 60px; }

.woocommerce-tabs {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
}
.woocommerce-tabs .tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    scrollbar-width: none;
}
.woocommerce-tabs .tabs li { flex-shrink: 0; }
.woocommerce-tabs .tabs li a {
    display: block;
    padding: 14px 26px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 700;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: color .2s;
    white-space: nowrap;
}
.woocommerce-tabs .tabs li.active a,
.woocommerce-tabs .tabs li a:hover { color: #ff4da6; border-bottom-color: #ff4da6; }
.woocommerce-tabs .panel { padding: 32px; line-height: 1.85; color: #374151; display: none; }
.woocommerce-tabs .panel.active { display: block; }
.woocommerce-tabs .panel h2 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }

/* Review form */
#review_form .comment-reply-title { font-size: 18px; font-weight: 700; }
#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 12px;
    transition: border-color .2s;
}
#review_form input:focus, #review_form textarea:focus { border-color: #ff4da6; outline: none; }
#review_form .submit {
    padding: 12px 32px;
    background: linear-gradient(90deg, #ff4da6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

/* ── Related products ─────────────────────────── */
.bd-sp-related { margin-top: 60px; }

/* Template override: .bd-related-section */
.bd-related-section { display: block; width: 100%; }

.bd-related-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.bd-rel-accent {
    display: block;
    width: 5px;
    height: 30px;
    border-radius: 4px;
    background: linear-gradient(180deg, #ff4da6, #2563eb);
    flex-shrink: 0;
}
.bd-related-heading h2 {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
}

/* Related products grid */
ul.bd-related-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* Smaller image height for related product cards so content fits */
.bd-related-grid .bd-card-img-wrap img {
    height: 200px !important;
}

/* Keep the old .related.products as fallback (block display) */
section.related.products,
.related.products { display: block !important; }

.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* ── Dark mode ────────────────────────────────── */
body.dark-mode .bd-sp-gallery   { background: #1e293b; border-color: rgba(255,255,255,.07); box-shadow: 0 4px 30px rgba(0,0,0,.3); }
body.dark-mode .bd-sp-title     { color: #f1f5f9; }
body.dark-mode .bd-sp-price-box { background: linear-gradient(135deg, #1a0d1a, #0d1a2d); border-color: rgba(255,255,255,.08); }
body.dark-mode .bd-sp-price-box .price ins,
body.dark-mode .bd-sp-price-box .price .woocommerce-Price-amount:only-child { color: #f1f5f9; }
body.dark-mode .bd-sp-short-desc { color: #94a3b8; }
body.dark-mode .bd-sp-action-btn { background: #1e293b; border-color: rgba(255,255,255,.1); color: #cbd5e1; }
body.dark-mode .bd-sp-meta { background: #1e293b; }
body.dark-mode .bd-sp-meta-row  { color: #e2e8f0; }
body.dark-mode .bd-trust-item   { background: #1e293b; border-color: rgba(255,255,255,.06); color: #94a3b8; }
body.dark-mode .woocommerce-tabs { border-color: rgba(255,255,255,.08); }
body.dark-mode .woocommerce-tabs .tabs { background: #1e293b; border-bottom-color: rgba(255,255,255,.08); }
body.dark-mode .woocommerce-tabs .tabs li a { color: #94a3b8; }
body.dark-mode .woocommerce-tabs .panel { color: #cbd5e1; }
body.dark-mode .related.products > h2,
body.dark-mode .bd-related-heading h2 { color: #f1f5f9; }
body.dark-mode .bd-related-section { background: transparent; }
body.dark-mode .bd-breadcrumb a { color: #94a3b8; }
body.dark-mode .bd-breadcrumb span { color: #f1f5f9; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 1100px) {
    .bd-sp-grid { gap: 36px; }
    .bd-sp-title { font-size: 26px; }
}

@media (max-width: 900px) {
    .bd-sp-grid { grid-template-columns: 1fr; }
    .bd-sp-gallery .woocommerce-product-gallery__wrapper img { height: 360px !important; }
    .related.products ul.products,
    ul.bd-related-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .bd-trust-item span { display: none; }
    .bd-trust-item { padding: 14px 8px; }
}

@media (max-width: 540px) {
    .bd-sp-title { font-size: 22px; }
    .bd-sp-price-box .price ins { font-size: 26px; }
    .bd-sp-actions { gap: 8px; }
    .bd-sp-action-btn { padding: 9px 14px; font-size: 12px; }
    .related.products ul.products,
    ul.bd-related-grid { grid-template-columns: 1fr !important; }
}
