/**
 * Plantscount Product Page Layout Improvements
 * 
 * Fixes:
 * - Reduces excessive white space around breadcrumb
 * - Compacts the layout so upsell widget is higher
 * - Improves visual hierarchy
 * - Better mobile experience
 * 
 * Note: Most !important declarations are needed to override WooCommerce
 * and theme default spacing/margins for compact layout.
 */

/* ===== Breadcrumb Area - Less White Space ===== */
.woocommerce-breadcrumb,
.breadcrumb-wrapper,
.shoptimizer-breadcrumb {
    padding-top: 12px !important;
    padding-bottom: 8px !important;
    margin-bottom: 0 !important;
    font-size: 13px;
}

/* Remove extra margin after breadcrumb container */
.breadcrumb-wrapper+*,
nav.woocommerce-breadcrumb+* {
    margin-top: 0 !important;
}

/* ===== Product Container - Tighter Spacing ===== */
.single-product .site-content {
    padding-top: 0 !important;
}

.single-product .content-area {
    padding-top: 0 !important;
}

/* Product wrapper */
.single-product div.product {
    margin-top: 10px !important;
    padding-top: 0 !important;
}

/* ===== Product Summary - Compact Layout ===== */
.single-product .summary.entry-summary {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Product title */
.single-product .product_title {
    font-size: 26px !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
    margin-top: 0 !important;
}

/* Price */
.single-product .summary .price {
    margin-bottom: 4px !important;
    font-size: 24px !important;
}

/* Short description - more compact */
.single-product .woocommerce-product-details__short-description {
    margin-bottom: 6px !important;
    padding: 0 !important;
    font-size: 14px;
    line-height: 1.45;
}

.single-product .woocommerce-product-details__short-description p {
    margin-bottom: 4px !important;
}

.single-product .woocommerce-product-details__short-description p:last-child {
    margin-bottom: 0 !important;
}

/* ===== Variations Form - Compact ===== */
.single-product .variations_form {
    margin-bottom: 4px !important;
}

.single-product .variations {
    margin-bottom: 4px !important;
}

.single-product .variations tr {
    margin-bottom: 4px;
}

.single-product .variations .label {
    padding-bottom: 2px !important;
}

/* ===== Quantity & Add to Cart Row ===== */
.single-product .quantity {
    margin-right: 10px !important;
}

.single-product form.cart {
    margin-bottom: 4px !important;
    margin-top: 0 !important;
}

/* Single add to cart button */
.single-product .single_add_to_cart_button {
    padding: 14px 24px !important;
    font-size: 15px !important;
}

/* ===== Product Gallery - Aligned Better ===== */
.single-product .woocommerce-product-gallery {
    margin-bottom: 0 !important;
}

/* Thumbnails row */
.single-product .flex-control-thumbs {
    margin-top: 10px !important;
}

/* ===== Direct van de Kweker Block ===== */
.single-product .pc-kweker-block,
.single-product .direct-kweker,
.single-product .trust-badges {
    margin-top: 8px !important;
    padding: 10px 14px !important;
}

/* ===== Meta Info (SKU, Categories) ===== */
.single-product .product_meta {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #e5e5e5;
    font-size: 13px;
}

/* ===== Upsell Widget Position Helpers ===== */
/* These ensure the upsell widget sits nicely in the flow */
.pc-upsell {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}

/* When widget is before add-to-cart button */
form.cart .pc-upsell {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

/* ===== Tabs Area - Reduce Top Gap ===== */
.single-product .woocommerce-tabs {
    margin-top: 30px !important;
}

.single-product .woocommerce-tabs ul.tabs {
    margin-bottom: 0 !important;
}

/* ===== Related Products - Tighter ===== */
.single-product .related.products {
    margin-top: 40px !important;
}

.single-product .related.products>h2 {
    margin-bottom: 20px !important;
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 768px) {

    /* Breadcrumb */
    .woocommerce-breadcrumb,
    .breadcrumb-wrapper {
        padding: 10px 0 6px !important;
        font-size: 12px;
    }

    /* Title */
    .single-product .product_title {
        font-size: 22px !important;
        margin-bottom: 6px !important;
    }

    /* Price */
    .single-product .summary .price {
        font-size: 20px !important;
        margin-bottom: 10px !important;
    }

    /* Short description */
    .single-product .woocommerce-product-details__short-description {
        font-size: 13px;
        margin-bottom: 12px !important;
    }

    /* Gallery to summary gap */
    .single-product .woocommerce-product-gallery {
        margin-bottom: 16px !important;
    }

    /* Product area overall */
    .single-product div.product {
        margin-top: 0 !important;
    }

    /* Upsell widget */
    .pc-upsell {
        margin-top: 12px !important;
        margin-bottom: 14px !important;
    }
}

/* ===== Extra Small Screens ===== */
@media (max-width: 480px) {
    .single-product .product_title {
        font-size: 20px !important;
    }

    .single-product .summary .price {
        font-size: 18px !important;
    }
}

/* ===== Shoptimizer Theme Specific Overrides ===== */
body.flavor-flavor-one .single-product .summary.entry-summary {
    padding-top: 0 !important;
}

.shoptimizer-single-product-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Fix for Shoptimizer's sticky add to cart */
.shoptimizer-single-product-wrapper .summary {
    padding-top: 0 !important;
}

/* ===== Remove any top spacers added by theme ===== */
.single-product .col-full>.woocommerce>.woocommerce-notices-wrapper+div.product,
.single-product .col-full>div.product {
    margin-top: 10px !important;
}

/* ===== Ensure images align with content start ===== */
.single-product .woocommerce-product-gallery__wrapper {
    margin-top: 0 !important;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image:first-child {
    margin-top: 0 !important;
}