/* ==========================================================
   PRODUCT PAGE POLISH (2026-06-17)
   Senior-design pass over the product detail page: kill the white
   space created by always-rendered-but-empty blocks, tighten the
   right-column rhythm, trim cavernous card padding, and make the
   Documents/FBT row behave when only one side is present.
   Loaded AFTER product-enhancements.css (versioned) so it wins.
   All scoped to #product.
   ========================================================== */

/* ---- 1. Collapse empty always-rendered containers ----
   These render even with no content (no variants / no discounts /
   empty hook areas) and reserve vertical space → the big gap between
   the short description and the Add-to-Cart box. :not(:has(*)) hides
   them only when they contain no element children (so a populated
   block is never touched). */
#product .product-variants:not(:has(*)),
#product .js-product-variants:not(:has(*)),
#product .product-discounts:not(:has(*)),
#product .js-product-discounts:not(:has(*)),
#product .product-additional-info:not(:has(*)),
#product .product-customization:not(:has(*)),
#product .product-pack:not(:has(*)) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---- 2. Tighter vertical rhythm in the right column ---- */
#product .product-prices {
    margin: 6px 0 10px !important;
}
#product .product-information .product-description {
    margin-bottom: 10px !important;
}
#product .product-actions {
    margin-top: 0 !important;
}
#product .product-add-to-cart {
    margin: 0 0 12px !important;
    padding: 14px 15px !important;
}

/* unified, tighter spacing between the stacked info boxes */
#product .product-information #kbmp-seller-info,
#product .product-information .payment-detail,
#product .product-information .product-action-buttons,
#product .product-information .product-social-reassurance-row,
#product .product-information .kb-product-rating-summary {
    margin-top: 10px !important;
}
#product .product-information #kbmp-seller-info,
#product .product-information .payment-detail {
    padding: 12px 14px !important;
}
#product .product-information .product-social-reassurance-row {
    padding-top: 12px !important;
    margin-top: 12px !important;
}

/* ---- 3. Tabs: hide empty panes, trim padding ---- */
#product .tabs .tab-content,
#product .product-details-section .tab-content {
    padding: 16px 20px !important;
}
#product .product-description:empty,
#product .tab-pane:empty,
#product #description:empty,
#product #product-details:empty {
    display: none !important;
}

/* ---- 4. Full-width section cards below: tighter, no big top gap ---- */
#product .product-additional-sections {
    margin-top: 18px !important;
    padding-top: 0 !important;
    border-top: none !important;
}
#product .product-documents-section,
#product .product-fbt-section {
    margin-bottom: 18px !important;
}
#product .product-documents-section .kbpd-documents,
#product .product-fbt-section .kbfbt-block,
#product .kbpv-product-videos {
    padding: 16px 18px !important;
}

/* When only ONE of Documents / FBT is present, span the full width
   instead of leaving a narrow card with empty space beside it. */
#product .product-additional-sections > [class*="col-"]:only-child {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* ---- 5. Reviews / videos / cross-sell: tighter top gap ---- */
#product .product-reviews-section {
    margin-top: 18px !important;
    padding-top: 0 !important;
}
#product .product-videos-section,
#product .product-crossselling-section {
    margin-top: 18px !important;
}
