/* Keep the home cards' titles and copy centered in the space each card owns. */
#main #products .home-product-copy-v14 :is(h3, h3 a, p),
#main #products .section-heading > div,
#main #products #products-title-v11,
#main .hero-carousel .slide-summary-v19 :is(h2, p) {
    text-align: center !important;
    text-align-last: auto !important;
}
#main #products .home-product-copy-v14 br.home-summary-break { display: inline !important; }
#main .contact-page-v35 #contact-heading-v35::after { display: none !important; content: none !important; }

/* The theme measures both its sticky header and the WordPress toolbar. */
body.psg-product-v37 #main:has(> #psg48-product) {
    height: auto !important;
    min-height: 0 !important;
    padding-block: 0 !important;
}
#main #psg48-product {
    box-sizing: border-box !important;
    height: calc(100vh - var(--psg-header-height, 84px) - var(--psg-admin-height, 0px)) !important;
    height: calc(100dvh - var(--psg-header-height, 84px) - var(--psg-admin-height, 0px)) !important;
    min-height: 0 !important;
    padding-block: clamp(5px, 1.4vh, 16px) !important;
    display: flex !important;
    flex-direction: column !important;
}
#main #psg48-product .product-heading-v37 {
    flex: 0 0 auto;
    padding-bottom: clamp(3px, 1vh, 12px) !important;
    margin-bottom: clamp(4px, 1vh, 12px) !important;
}
#main #psg48-product .product-layout-v46 {
    flex: 1 1 0%;
    min-height: 0;
    max-height: 450px;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch !important;
}
#main #psg48-product :is(.product-media-v37, .product-details-v46) {
    box-sizing: border-box !important;
    height: 100% !important;
    min-height: 0 !important;
}
#main #psg48-product .product-gallery-v18 {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 3px;
    height: 100% !important;
}
#main #psg48-product .product-media-v37 :is(.gallery-frame-v18, .product-image-v15, button[data-zoom-src]) {
    height: 100% !important;
    block-size: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin-block: 0 !important;
    box-sizing: border-box !important;
}
#main #psg48-product .product-panels-v46 {
    flex: 1 1 0%;
    min-height: 0 !important;
    height: auto !important;
    overflow: auto !important;
}
#main #psg48-product .product-tabs-ready .product-panels-v46 { overflow: hidden !important; }
#main #psg48-product .product-tabs-ready .product-panel-v46 {
    height: 100% !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
}
@media (max-width: 740px) {
    #main #psg48-product .product-layout-v46 {
        max-height: none;
        grid-template-rows: minmax(0, 0.8fr) minmax(0, 1.2fr);
        gap: clamp(4px, 1vh, 10px) !important;
    }
    #main #psg48-product .product-media-v37 { padding: clamp(4px, 1vh, 12px) !important; }
}
@media (max-height: 550px) {
    #main #psg48-product .product-heading-v37 { gap: 5px 12px !important; }
    #main #psg48-product .product-heading-v37 h1 { font-size: clamp(19px, 3vw, 26px) !important; }
    #main #psg48-product .product-tabs-v46 { height: 48px !important; padding: 2px 6px !important; }
}
