/* =========================================================
   SINGLE PRODUCT DETAIL PAGE — flowerbouquetshop.pk
   Targets WooCommerce/Astra DEFAULT classes wherever the
   element is native (gallery, price, add-to-cart, related
   products) and new fbs- classes for injected content.
   ========================================================= */

:root {
    --fbs-brand: #0f3828;
    --fbs-brand-dark: #092a1e;
    --fbs-brand-light: #eaf3ee;
    --fbs-accent: #d8a85a;
    --fbs-text: #202520;
    --fbs-muted: #707770;
    --fbs-border: #e5e8e5;
    --fbs-soft-bg: #f7f9f7;
    --fbs-success: #26734d;
    --fbs-radius: 16px;
}

/* =========================================================
   LAYOUT — product summary area
   Astra/WooCommerce already outputs .summary.entry-summary
   next to .woocommerce-product-gallery inside .product; we
   only add spacing/grid refinements, not structural changes.
   ========================================================= */

.single-product div.product {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    gap: 60px;
    align-items: start;
}


/* Breadcrumb now renders above the whole product block (see PHP:
   fbs_reposition_breadcrumb). Align it to the same width/edge as the
   gallery+summary grid below it. */
.single-product .woocommerce-breadcrumb {


    font-size: 14px;
    color: #707770;
}

.single-product .woocommerce-breadcrumb a {
    color: #707770;
    text-decoration: none;
}

.single-product .woocommerce-breadcrumb a:hover {
    color: var(--fbs-brand);
}



@media (min-width: 922px) {
    .woocommerce #content .ast-woocommerce-container div.product div.images, .woocommerce .ast-woocommerce-container div.product div.images, .woocommerce-page #content .ast-woocommerce-container div.product div.images, .woocommerce-page .ast-woocommerce-container div.product div.images {
        width: fit-content !important;
    }
    .woocommerce #content .ast-woocommerce-container div.product div.summary, .woocommerce .ast-woocommerce-container div.product div.summary, .woocommerce-page #content .ast-woocommerce-container div.product div.summary, .woocommerce-page .ast-woocommerce-container div.product div.summary{
        width: fit-content !important;
    }
}

@media (max-width: 900px) {
    .single-product div.product {
        display: block;
    }
}

/* woocommerce_after_single_product_summary content (info sections, related
   heading, related products loop) are siblings of the gallery/summary inside
   the SAME div.product grid — force them to span both columns instead of
   being squeezed into one. */
.single-product div.product > .fbs-product-information,
.single-product div.product > .fbs-related-heading,
.single-product div.product > .related.products,
.single-product div.product > .woocommerce-tabs {
    grid-column: 1 / -1;
}

.single-product div.product .woocommerce-product-gallery {
    position: sticky;
    top: 30px;
}

@media (max-width: 900px) {
    .single-product div.product .woocommerce-product-gallery {
        position: static;
    }
}


/* =========================================================
   GALLERY (default WooCommerce gallery markup, restyled)
   ========================================================= */

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery .flex-viewport {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: #f8f8f6;
    aspect-ratio: 1 / 1;
}

.woocommerce-product-gallery .woocommerce-product-gallery__image,
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper > div {
    height: 100%;
}

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper img,
.woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.woocommerce-product-gallery .flex-control-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.woocommerce-product-gallery .flex-control-thumbs li {
    list-style: none;
}

.woocommerce-product-gallery .flex-control-thumbs img {
    border-radius: 12px;
    border: 1px solid var(--fbs-border);
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
}

.woocommerce-product-gallery .flex-control-thumbs img.flex-active {
    border: 2px solid var(--fbs-brand);
}

/* Badge + zoom icon injected by JS */
.fbs-gallery-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 5;
    background: var(--fbs-brand);
    color: #fff;
    padding: 7px 13px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

.fbs-gallery-zoom {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
    cursor: pointer;
}


/* =========================================================
   SUMMARY — title, rating, price, excerpt (default markup)
   ========================================================= */

.single-product .summary.entry-summary {
    padding-top: 12px;
}

.fbs-category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--fbs-brand);
    margin-bottom: 9px;
}

.single-product .summary .product_title {
    font-size: clamp(28px, 3vw, 43px);
    line-height: 1.12;
    margin: 0 0 13px;
    font-weight: 700;
    letter-spacing: -.8px;
}

.single-product .summary .woocommerce-product-rating {
    margin-bottom: 20px;
}

.single-product .summary .star-rating {
    color: #e1a52d;
}

.single-product .summary p.price {
    font-size: 29px;
    font-weight: 700;
    color: var(--fbs-brand);
    margin-bottom: 15px;
}

.single-product .summary .woocommerce-product-details__short-description {
    font-size: 16px;
    color: #626962;
    margin-bottom: 5px;
    max-width: 560px;
}


/* =========================================================
   DELIVERY BOX / TRUST POINTS (injected)
   ========================================================= */

.fbs-delivery-box {
    background: var(--fbs-brand-light);
    border: 1px solid #d6e7dc;
    border-radius: 14px;
    padding: 15px 17px;
    margin: 18px 0 20px;
}

.fbs-delivery-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--fbs-brand);
    margin-bottom: 3px;
}

.fbs-delivery-text {
    font-size: 13px;
    color: #566158;
    padding-left: 27px;
}

.fbs-trust-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 18px;
    margin: 0 0 10px;
}

.fbs-trust-item {
    font-size: 13px;
    color: #4e574f;
    display: flex;
    align-items: center;
    gap: 7px;
}

.fbs-trust-item span {
    color: var(--fbs-success);
    font-weight: 700;
}


/* =========================================================
   ADD TO CART (default WooCommerce form, restyled)
   ========================================================= */

.single-product form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    margin-top: 22px;
}

.single-product form.cart .quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
    width: 115px;
    border: 1px solid #d9ded9;
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
}

.single-product form.cart .quantity input.qty {
    width: 38px;
    border: 0;
    text-align: center;
    font-size: 15px;
    outline: none;
    height: 100%;
}

.single-product form.cart .fbs-qty-minus,
.single-product form.cart .fbs-qty-plus {
    border: 0;
    background: transparent;
    width: 36px;
    height: 100%;
    cursor: pointer;
    font-size: 19px;
    color: var(--fbs-text);
}

.single-product form.cart button.single_add_to_cart_button {
    flex: 1;
    height: 54px;
    border: 0;
    border-radius: 10px;
    background: var(--fbs-brand) !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    transition: .2s ease;
}

.single-product form.cart button.single_add_to_cart_button:hover {
    background: var(--fbs-brand-dark) !important;
    transform: translateY(-1px);
}


/* =========================================================
   WHATSAPP + PAYMENT (injected)
   ========================================================= */

.fbs-whatsapp-button {
    height: 54px;
    width: 100%;
    margin-top: 12px;
    border-radius: 10px;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    gap: 8px;
    transition: .2s ease;
}

.fbs-whatsapp-button:hover {
    background: #1ebe5d;
    color: #fff;
    transform: translateY(-1px);
}

.fbs-whatsapp-note {
    text-align: center;
    font-size: 16px;
    color: var(--fbs-muted);
    margin-top: 7px;
}

.fbs-payment-box {
    border-top: 1px solid var(--fbs-border);
    margin-top: 25px;
    padding-top: 20px;
}

.fbs-payment-title {
    text-align: center;
    font-size: 12px;
    color: #626a63;
    margin-bottom: 13px;
    font-weight: 600;
}

.fbs-payment-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
}

.fbs-payment-method {
   height: 45px;
    min-width: 100px;
    padding: 10px 10px;
    background: #fff;
    border: 1px solid var(--fbs-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fbs-payment-method img {
    max-width: 100px;
    object-fit: contain;
}


/* =========================================================
   PRODUCT INFORMATION SECTIONS (replaces default tabs)
   ========================================================= */

.fbs-product-information {
    border-top: 1px solid var(--fbs-border);
    padding-top: 55px;
}

.fbs-info-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 65px;
}

.fbs-section-title {
    font-size: 25px;
    line-height: 1.2;
    margin: 0 0 20px;
    color: var(--fbs-text);
}

.fbs-description-text {
    color: #616861;
    font-size: 15px;
    max-width: 760px;
}

.fbs-occasion-box {
    background: var(--fbs-soft-bg);
    padding: 24px;
    border-radius: 16px;
}

.fbs-occasion-box h3 {
    margin: 0 0 14px;
    font-size: 17px;
}

.fbs-occasion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fbs-occasion {
    padding: 7px 12px;
    border-radius: 50px;
    background: #fff;
    border: 1px solid var(--fbs-border);
    font-size: 12px;
}

.fbs-details-section {
    margin-top: 55px;
}

.fbs-details-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 800px;
}

.fbs-details-table tr {
    border-bottom: 1px solid var(--fbs-border);
}

.fbs-details-table td {
    padding: 13px 5px;
    font-size: 14px;
}

.fbs-details-table td:first-child {
    width: 35%;
    color: var(--fbs-muted);
}

.fbs-details-table td:last-child {
    font-weight: 600;
}

.fbs-delivery-section {
    margin-top: 55px;
    background: var(--fbs-soft-bg);
    border-radius: 18px;
}

.fbs-delivery-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.fbs-delivery-card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--fbs-border);
}

.fbs-delivery-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.fbs-delivery-card p {
    margin: 0;
    color: var(--fbs-muted);
    font-size: 13px;
}

.fbs-reviews-section {
    margin-top: 60px;
}

.fbs-review-summary {
    display: flex;
    align-items: center;
    gap: 22px;
    background: var(--fbs-soft-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.fbs-review-score {
    font-size: 40px;
    font-weight: 700;
    color: var(--fbs-brand);
}

.fbs-review-count {
    font-size: 13px;
    color: var(--fbs-muted);
}

/* Native WooCommerce review list/form under our summary — light restyle only */
.fbs-reviews-section #comments,
.fbs-reviews-section #review_form_wrapper {
    margin-top: 25px;
}


/* =========================================================
   RELATED PRODUCTS (default WooCommerce loop, restyled)
   ========================================================= */

.fbs-related-heading {
    
    padding-top: 55px;
    border-top: 1px solid var(--fbs-border);
}

.fbs-related-heading h2 {
    font-size: 27px;
    margin: 0 0 7px;
}

.fbs-related-heading p {
    margin: 0;
    color: var(--fbs-muted);
    font-size: 14px;
}


@media (max-width: 900px) {
    .related.products ul.products,
    .related.products ul.products.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* =========================================================
   MOBILE STICKY BAR (injected)
   ========================================================= */

.fbs-mobile-sticky-bar {
    display: none;
}

@media (max-width: 768px) {
    .fbs-mobile-sticky-bar {
        position: fixed;
        display: flex;
        align-items: center;
        gap: 8px;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        padding: 10px 12px;
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--fbs-border);
        box-shadow: 0 -5px 25px rgba(0, 0, 0, .08);
    }

    .fbs-sticky-price {
        font-size: 14px;
        font-weight: 700;
        color: var(--fbs-brand);
        white-space: nowrap;
    }

    .fbs-sticky-cart {
        flex: 1;
        height: 46px;
        border: 0;
        border-radius: 8px;
        background: var(--fbs-brand);
        color: #fff;
        font-size: 13px;
        font-weight: 700;
    }

    .fbs-sticky-whatsapp {
        width: 46px;
        height: 46px;
        border-radius: 8px;
        border: 0;
        background: #25d366;
        color: #fff;
        font-size: 19px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Give room at the bottom so the sticky bar doesn't cover content */
    .single-product div.product {
        padding-bottom: 70px;
    }

    .fbs-info-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .fbs-delivery-cards {
        grid-template-columns: 1fr;
    }
}
