/* Product detail uses WooCommerce's native product, gallery and summary containers. */
body.graham-product-detail { --graham-product-desktop-max: 1120px; background: #fff; color: #243746; }
body.graham-product-detail main:has(.product.graham-product-detail-layout) { background: #fff; }
body.graham-product-detail .product.graham-product-detail-layout { font-family: inherit; font-size: 15px; line-height: 1.5; }
/* Release the product from inherited sidebar/column widths. Only its ancestors match. */
body.graham-product-detail :is(main, #primary, #content, .site-main, .site-content, .content-area,
    .entry-content, .wp-block-post-content, .wp-block-woocommerce-legacy-template, .woocommerce,
    .wp-block-group, .wp-block-columns, .wp-block-column):has(.product.graham-product-detail-layout) {
    box-sizing: border-box; float: none !important; clear: both;
    width: 100% !important; max-width: none !important; min-width: 0 !important;
    margin-left: auto !important; margin-right: auto !important;
    left: auto !important; right: auto !important; transform: none !important;
    grid-column: 1 / -1 !important; flex-basis: 100% !important;
}
body.graham-product-detail :is(main, #primary, #content, .site-main, .site-content, .content-area,
    .entry-content, .wp-block-post-content, .wp-block-woocommerce-legacy-template, .woocommerce,
    .wp-block-group, .wp-block-columns, .wp-block-column):has(.product.graham-product-detail-layout) {
    display: block !important;
}
body.graham-product-detail main:has(.product.graham-product-detail-layout) {
    padding-left: clamp(14px, 2.5vw, 32px); padding-right: clamp(14px, 2.5vw, 32px);
}
body.graham-product-detail .wp-block-columns:has(.product.graham-product-detail-layout) > .wp-block-column:empty { display: none; }
body.graham-product-detail .woocommerce-breadcrumb {
    box-sizing: border-box; width: 100%; max-width: var(--graham-product-desktop-max);
    margin: 16px auto 24px !important; float: none; clear: both; overflow-wrap: anywhere;
    font-size: 12px; line-height: 1.6; color: #607080;
}
body.graham-product-detail div.product.graham-product-detail-layout {
    box-sizing: border-box; display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: min-content 1fr;
    align-items: start; column-gap: clamp(28px, 4vw, 56px); row-gap: 24px;
    width: 100% !important; max-width: var(--graham-product-desktop-max) !important; min-width: 0 !important;
    margin: 24px auto 40px !important; float: none !important; clear: both;
    position: relative; left: auto !important; right: auto !important; transform: none !important;
}
body.graham-product-detail .woocommerce-breadcrumb a { color: #526676; text-decoration: none; }
body.graham-product-detail .woocommerce-breadcrumb a:hover { color: var(--graham-blue); text-decoration: underline; }
/* Woo/theme clearfix pseudo-elements must not occupy empty grid columns. */
body.graham-product-detail div.product.graham-product-detail-layout::before,
body.graham-product-detail div.product.graham-product-detail-layout::after { content: none !important; display: none !important; }
body.graham-product-detail div.product.graham-product-detail-layout > * { grid-column: 1 / -1; min-width: 0; }
body.graham-product-detail div.product.graham-product-detail-layout > .woocommerce-product-gallery {
    grid-column: 1; grid-row: 1; align-self: start;
}
body.graham-product-detail div.product.graham-product-detail-layout > .summary {
    grid-column: 2; grid-row: 1 / span 2; display: block !important;
}
body.graham-product-detail div.product.graham-product-detail-layout > .graham-product-overview {
    grid-column: 1; grid-row: 2; padding-top: 0; margin-top: 0;
}
body.graham-product-detail div.product.graham-product-detail-layout .onsale { background: #b42318 !important; color: #fff !important; }
body.graham-product-detail div.product.graham-product-detail-layout > .onsale { position: absolute; z-index: 4; top: 8px; left: 8px; }
body.graham-product-detail div.product.graham-product-detail-layout > .summary,
body.graham-product-detail div.product.graham-product-detail-layout > .woocommerce-product-gallery {
    float: none !important; width: 100% !important; min-width: 0 !important; max-width: none !important;
    margin: 0 !important; padding: 0; background: #fff; border: 0; border-radius: 0; box-shadow: none;
    left: auto !important; right: auto !important; transform: none !important;
}
body.graham-product-detail div.product .summary .product_title {
    color: #17324a; font-size: clamp(1.35rem, 1.7vw, 1.7rem) !important;
    line-height: 1.3 !important; font-weight: 700 !important; letter-spacing: -.015em; margin: 0 0 8px !important; text-wrap: pretty; overflow-wrap: anywhere;
}
body.graham-product-detail .graham-product-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin-bottom: 8px; }
body.graham-product-detail .graham-product-identity .graham-product-manufacturer { order: 3; flex: 0 0 100%; width: 100%; min-width: 0; margin: 4px 0 0; padding: 0; border: 0; gap: 14px; background: none; }
body.graham-product-detail .graham-product-manufacturer-image { flex: 0 0 112px; width: 112px; max-width: 112px; height: 64px; }
body.graham-product-detail .graham-product-manufacturer-logo { max-width: 112px; max-height: 64px; width: auto; height: auto; }
body.graham-product-detail .graham-product-manufacturer-copy { gap: 4px; min-width: 0; }
body.graham-product-detail .graham-product-manufacturer-label { font-size: 11px; margin: 0; letter-spacing: .04em; }
body.graham-product-detail .graham-product-manufacturer-copy strong { font-size: 17px; font-weight: 600; color: var(--graham-blue); }
body.graham-product-detail div.product .summary .graham-single-item-code { display: block; order: 1; flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-wrap: anywhere; margin: 0; font-size: 14px; line-height: 1.5; color: #607080; }
body.graham-product-detail .graham-product-identity .graham-product-upcs { order: 2; flex: 0 1 auto; width: auto; display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 5px; font-size: 12px; margin: 0; }
body.graham-product-detail .graham-product-upc-values { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: 8px; }
body.graham-product-detail .graham-product-identity a { text-decoration: none; }
body.graham-product-detail .graham-product-identity a:hover { text-decoration: underline; }
body.graham-product-detail .graham-product-upc-value { border: 0; background: #f3f6f8; border-radius: 4px; color: #526676; }
body.graham-product-detail .graham-product-upc-value code { font-size: 11px; background: transparent; padding: 0; }
body.graham-product-detail .graham-product-upc-value small { margin-left: 3px; }
body.graham-product-detail div.product .summary:has(.graham-single-item-code) .product_meta .sku_wrapper { display: none; }
/* Real Woo price text, with one restrained Graham-blue treatment. */
body.single-product.graham-product-detail.woocommerce div.product div.summary .price {
    box-sizing: border-box; display: block; width: auto; max-width: 100%; min-width: 0;
    padding: 0 !important; margin: 16px 0 6px !important;
    color: var(--graham-blue, #075b9d) !important;
    font-size: clamp(1.85rem, 2.5vw, 2.25rem) !important;
    font-weight: 800 !important; line-height: 1.2 !important; letter-spacing: -.025em;
    background: none !important; border: 0; border-radius: 0; box-shadow: none;
    animation: none !important; overflow-wrap: anywhere;
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price::before,
body.single-product.graham-product-detail.woocommerce div.product div.summary .price::after {
    content: none !important; display: none !important;
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price :is(.woocommerce-Price-amount, bdi, .woocommerce-Price-currencySymbol) {
    color: inherit !important; font-weight: inherit !important; font-size: inherit !important;
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price .woocommerce-Price-amount {
    display: inline-block; white-space: nowrap;
    /* Initial Woo markup and UOM replacement must not inherit different wrapper sizes. */
    font-size: clamp(1.85rem, 2.5vw, 2.25rem) !important;
    font-weight: 800 !important; color: var(--graham-blue, #075b9d) !important;
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price del {
    color: #647482 !important; font-size: .65em; font-weight: 500; opacity: 1;
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price del .woocommerce-Price-amount {
    font-size: 1em !important; color: #647482 !important; font-weight: 500 !important;
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price ins { background: none; text-decoration: none; }
body.single-product.graham-product-detail.woocommerce div.product div.summary .price .graham-customer-price-label {
    display: block; width: fit-content; margin: 0 0 6px; padding: 0;
    border: 0; border-radius: 0; background: transparent; color: #526676;
    font-size: 12px !important; font-weight: 600; letter-spacing: normal; text-transform: none;
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price:has(.graham-price-review, .graham-login-to-view-price):not(:has(.woocommerce-Price-amount)) {
    font-size: 1rem !important; font-weight: 600 !important; line-height: 1.5 !important; letter-spacing: normal;
}
body.graham-product-detail div.product .summary :is(.graham-price-tax-note, .graham-price-review-message) {
    color: #607080; font-size: 13px; line-height: 1.5; margin: 0 0 8px;
}
body.graham-product-detail div.product .summary > .graham-product-family { float: none; clear: both; width: 100%; }
body.graham-product-detail .graham-purchase-panel { clear: both; background: #f7f9fb; border: 1px solid #e0e7ed; border-radius: 10px; padding: 20px; margin: 0 0 16px; }
/* The existing UOM form already supplies a purchase panel. Keep a single visual border. */
body.graham-product-detail div.product .graham-purchase-panel .graham-uom-purchase-row {
    border: 0; background: transparent; box-shadow: none; padding: 0 !important; margin: 0 !important;
}
body.graham-product-detail div.product.graham-product-detail-layout > .woocommerce-tabs {
    margin: 8px 0 0 !important; border: 0; border-top: 1px solid #e0e7ed;
    border-radius: 0; box-shadow: none; padding: 20px 0;
}
body.graham-product-detail div.product.graham-product-detail-layout > .woocommerce-tabs ul.tabs {
    margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important;
}
body.graham-product-detail .graham-purchase-panel:empty { display: none; }
body.graham-product-detail div.product .graham-purchase-panel form.cart { margin: 0; }
body.graham-product-detail div.product .graham-purchase-panel .single_add_to_cart_button { min-height: 48px; border-radius: 5px; }
/* Simple-product controls share a row when room permits; native variation forms
   keep their own layout. The button always follows the fields at full width. */
body.graham-product-detail div.product .graham-purchase-panel .graham-uom-purchase-row:has(> .graham-product-uom-picker):has(> .quantity):has(> .single_add_to_cart_button) {
    display: grid !important; grid-template-columns: minmax(0, 1fr) 128px;
    align-items: start !important; gap: 16px !important;
}
body.graham-product-detail .graham-purchase-panel .graham-uom-purchase-row > * { grid-column: 1 / -1; }
body.graham-product-detail .graham-purchase-panel .graham-uom-purchase-row > .graham-product-uom-picker { grid-column: 1; grid-row: 1; }
body.graham-product-detail .graham-purchase-panel .graham-uom-purchase-row > .quantity { grid-column: 2; grid-row: 1; }
body.graham-product-detail div.product .graham-purchase-panel :is(.graham-product-uom-picker select, .graham-product-uom-single, .quantity .qty) {
    border: 1px solid #b9c9d5; border-radius: 8px; font-size: 16px; font-weight: 600;
}
body.graham-product-detail div.product .graham-purchase-panel .graham-uom-purchase-row > .quantity {
    width: 100% !important; max-width: 128px !important; min-width: 0 !important;
}
body.graham-product-detail div.product .graham-purchase-panel form.cart .quantity .qty { width: 100% !important; }
body.graham-product-detail div.product .graham-purchase-panel .graham-product-uom-picker label,
body.graham-product-detail div.product .graham-purchase-panel .quantity::before {
    font-size: 12px; line-height: 1.4; font-weight: 600; color: #526676; letter-spacing: normal; text-transform: none;
}
body.graham-product-detail div.product .graham-purchase-panel .single_add_to_cart_button {
    box-shadow: none !important; border-radius: 8px !important; font-size: 16px !important; font-weight: 700 !important;
    transition: background-color .15s ease; transform: none !important;
}
body.graham-product-detail div.product .graham-purchase-panel .stock { margin: 0 0 16px; font-size: 14px; font-weight: 600; }
body.graham-product-detail div.product .graham-purchase-panel .stock.in-stock { color: #12833c; }
body.graham-product-detail div.product .graham-purchase-panel .graham-uom-live-price {
    background: transparent; border: 0; border-radius: 0; margin: 0; padding: 4px 0 0; gap: 4px 8px; animation: none;
}
body.graham-product-detail div.product .graham-uom-live-price-label { font-size: 12px; font-weight: 500; letter-spacing: normal; text-transform: none; }
body.graham-product-detail div.product .graham-uom-live-price-value { font-size: 15px; font-weight: 700; }
body.graham-product-detail div.product .summary .graham-admin-price-source {
    padding: 0; margin: 4px 0 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
body.graham-product-detail div.product .summary .graham-admin-price-source .graham-customer-product-status-item {
    gap: 4px;
}
body.graham-product-detail div.product .summary .graham-admin-price-source .graham-customer-product-status-badge {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #30363b;
    font-weight: 700;
}
body.graham-product-detail div.product .summary .graham-admin-price-source .graham-customer-product-status-detail {
    color: #626a70;
    font-weight: 400;
}
body.graham-product-detail div.product .summary .graham-product-save-actions { margin: 8px 0 16px; gap: 16px; }
body.graham-product-detail div.product .summary .graham-save-link { font-size: 13px; font-weight: 500; color: var(--graham-blue); }
body.graham-product-detail .graham-product-overview { padding-top: 0; margin-bottom: 0; }
body.graham-product-detail .graham-product-overview h2 { font-size: 18px; font-weight: 700; line-height: 1.4; margin: 0 0 12px; color: #17324a; }
body.graham-product-detail .graham-product-overview :is(.woocommerce-product-details__short-description, .woocommerce-product-details__description) { font-size: 15px; line-height: 1.65; color: #344956; overflow-wrap: anywhere; }
body.graham-product-detail .graham-product-overview .woocommerce-product-details__short-description + .woocommerce-product-details__description { margin-top: 16px; }
body.graham-product-detail .graham-product-overview img { max-width: 100%; height: auto; }
body.graham-product-detail .graham-product-overview p:first-child { margin-top: 0; }
body.graham-product-detail .graham-product-overview p:last-child { margin-bottom: 0; }
/* Block themes use columns and individual product blocks, not the classic
   gallery/summary hooks. Classes are added to their existing server markup. */
body.graham-product-detail div.product.graham-product-detail-blocks { grid-template-rows: auto; }
body.graham-product-detail div.product.graham-product-detail-blocks > .graham-product-media-column {
    grid-column: 1; grid-row: 1; min-width: 0; width: 100%; margin: 0; align-self: start;
}
body.graham-product-detail div.product.graham-product-detail-blocks > .summary {
    grid-column: 2; grid-row: 1; display: flex !important; flex-direction: column; gap: 0;
}
body.graham-product-detail div.product .graham-product-media-column .woocommerce-product-gallery {
    float: none !important; width: 100% !important; max-width: none !important;
    margin: 0 !important; padding: 0; border: 0; border-radius: 0; box-shadow: none;
}
body.graham-product-detail .graham-product-media-column > .graham-product-gallery-block { margin: 0 !important; }
body.graham-product-detail .graham-product-media-column > .graham-product-overview { margin: 24px 0 0 !important; padding: 0; }
body.graham-product-detail div.product.graham-product-detail-blocks > .summary > * { order: 20; max-width: 100%; }
body.graham-product-detail div.product.graham-product-detail-blocks > .summary > .product_title { order: 1; }
body.graham-product-detail div.product.graham-product-detail-blocks > .summary > .graham-product-identity { order: 2; margin-top: 0 !important; }
body.graham-product-detail div.product.graham-product-detail-blocks > .summary > .graham-popularity { order: 3; }
body.graham-product-detail div.product.graham-product-detail-blocks > .summary > .graham-main-product-price { order: 4; }
body.graham-product-detail div.product.graham-product-detail-blocks > .summary > :is(.graham-price-tax-note, .graham-price-review-message, .graham-admin-price-source, .graham-customer-product-status) { order: 5; }
body.graham-product-detail div.product.graham-product-detail-blocks > .summary > .graham-product-family { order: 10; }
body.graham-product-detail div.product.graham-product-detail-blocks > .summary > .graham-product-purchase-block { order: 11; }
/* Also handles templates that render their summary column before their gallery. */
body.graham-product-detail .graham-product-detail-blocks:has(.graham-product-overview) .summary > :is(.wp-block-woocommerce-product-summary, .wp-block-post-excerpt) { display: none !important; }
body.graham-product-detail:has(.graham-product-detail-blocks) :is(.wp-block-woocommerce-product-details, .wp-block-woocommerce-related-products) { width: 100%; max-width: var(--graham-product-desktop-max); margin-left: auto; margin-right: auto; }
/* Keep WooCommerce's own slider, zoom, swipe and lightbox. */
body.graham-product-detail div.product .woocommerce-product-gallery { position: relative; box-sizing: border-box; }
/* Thumbnails stay in normal flow below the image and wrap, including on phones. */
body.graham-product-detail div.product .woocommerce-product-gallery .flex-control-thumbs {
    position: static; overflow: visible; box-sizing: border-box;
    display: flex !important; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 10px;
    width: 100%; height: auto; max-height: none;
    margin: 12px 0 0 !important; padding: 3px !important; list-style: none;
}
body.graham-product-detail div.product .woocommerce-product-gallery .flex-control-thumbs li { float: none !important; width: 70px !important; min-width: 70px; margin: 0 !important; flex: 0 0 auto; }
body.graham-product-detail div.product .woocommerce-product-gallery .flex-control-thumbs img { box-sizing: border-box; width: 70px; height: 70px; object-fit: contain; border: 1px solid #d5dfe7; border-radius: 8px; opacity: 1; background: #fff; padding: 3px; }
body.graham-product-detail div.product .woocommerce-product-gallery .flex-control-thumbs img.flex-active { border: 2px solid #075b9d; padding: 2px; }
body.graham-product-detail div.product .woocommerce-product-gallery .flex-control-thumbs img:focus-visible { outline: 3px solid #16863f; outline-offset: -3px; }
body.graham-product-detail div.product .woocommerce-product-gallery__image img { width: 100%; object-fit: contain; background: white; }
/* Keep arrows centred on the square image, regardless of thumbnail row count. */
body.graham-product-detail .woocommerce-product-gallery .flex-direction-nav { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 1 / 1; max-height: 600px; pointer-events: none; list-style: none; padding: 0; margin: 0; }
body.graham-product-detail .woocommerce-product-gallery .flex-direction-nav a { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); margin: 0; pointer-events: auto; width: 34px; height: 34px; border: 1px solid #d5dfe7; border-radius: 50%; background: #fff; color: #075b9d; overflow: hidden; text-indent: -9999px; }
body.graham-product-detail .woocommerce-product-gallery .flex-prev { left: 5px; }
body.graham-product-detail .woocommerce-product-gallery .flex-next { right: 5px; }
body.graham-product-detail .woocommerce-product-gallery .flex-direction-nav a::after { position: absolute; inset: 0; display: grid; place-items: center; text-indent: 0; content: '›'; font-size: 27px; line-height: 1; }
body.graham-product-detail .woocommerce-product-gallery .flex-direction-nav a.flex-prev::after { content: '‹'; }
body.graham-product-detail .woocommerce-product-gallery .flex-disabled { opacity: .3; pointer-events: none; }
/* Family members are actual product links, usable with keyboard or without JavaScript. */
.graham-product-family { padding: 20px 0 0; margin: 16px 0 20px; border: 0; border-top: 1px solid #e0e7ed; border-radius: 0; background: none; }
.graham-product-family h2 { text-transform: none; letter-spacing: normal; font-size: 14px; line-height: 1.5; font-weight: 600; margin: 0 0 12px; color: #243746; }
.graham-family-image-options { display: flex; flex-wrap: wrap; gap: 8px; }
.graham-family-image-option { display: flex; flex-direction: column; box-sizing: border-box; width: 108px; border: 1px solid #d5dfe7; border-radius: 8px; padding: 8px; color: #075b9d; text-decoration: none !important; background: white; }
.graham-family-option-image { display: grid; place-items: center; height: 77px; }
.graham-family-option-image img { width: 100%; height: 77px; object-fit: contain; }
.graham-family-option-label { font-size: 12px; font-weight: 500; line-height: 1.35; margin-top: 7px; overflow-wrap: anywhere; }
.graham-family-option-code { font-size: 10px; color: #687d8b; overflow-wrap: anywhere; margin-top: 3px; }
.graham-family-selected-label { font-size: 10px; color: #075b9d; font-weight: 700; margin-top: 3px; }
.graham-family-image-option.is-selected { border: 2px solid #075b9d; padding: 7px; background: #f5f9fc; }
.graham-family-image-option:hover { background: #f5f9fc; border-color: #075b9d; }
.graham-family-image-option:focus-visible { outline: 3px solid #16863f; outline-offset: 2px; }
.graham-variation-image-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.graham-variation-image-choice { display: flex; flex-direction: column; align-items: center; width: 86px; min-height: 92px; padding: 5px; background: white; border: 1px solid #d5dfe7; border-radius: 8px; color: #075b9d; font-size: 12px; }
.graham-variation-image-choice img { width: 66px; height: 60px; object-fit: contain; }
.graham-variation-image-choice[aria-pressed="true"] { border: 2px solid #075b9d; padding: 4px; }
.graham-variation-image-choice:disabled { opacity: .4; cursor: not-allowed; }
.graham-variation-image-choice:focus-visible { outline: 3px solid #16863f; outline-offset: 2px; }
/* Unfolded phones and tablets have enough room for the desktop-style split.
   Keep the stacked sequence for genuinely narrow phone screens only. */
@media (min-width: 560px) and (max-width: 900px) {
    body.graham-product-detail div.product.graham-product-detail-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) !important;
        column-gap: clamp(18px, 3vw, 28px);
        row-gap: 18px;
        margin-top: 12px !important;
    }
    body.graham-product-detail div.product.graham-product-detail-layout > :is(.woocommerce-product-gallery, .graham-product-media-column) {
        grid-column: 1 !important; grid-row: 1 !important;
    }
    body.graham-product-detail div.product.graham-product-detail-layout > .summary {
        grid-column: 2 !important; grid-row: 1 / span 2 !important;
    }
    body.graham-product-detail div.product.graham-product-detail-layout > .graham-product-overview {
        grid-column: 1 !important; grid-row: 2 !important;
    }
    body.graham-product-detail div.product.graham-product-detail-layout > :is(.woocommerce-tabs, .related, .upsells) {
        grid-column: 1 / -1 !important;
    }
    body.graham-product-detail div.product .summary .product_title {
        font-size: clamp(1.15rem, 2.8vw, 1.45rem) !important;
    }
    body.graham-product-detail .graham-purchase-panel { padding: 14px; }
}
@media (max-width: 559px) {
    body.graham-product-detail div.product.graham-product-detail-layout {
        display: flex !important; flex-direction: column; gap: 22px; margin-top: 15px !important;
    }
    body.graham-product-detail div.product.graham-product-detail-layout > .woocommerce-product-gallery { order: 1; }
    body.graham-product-detail div.product.graham-product-detail-layout > .summary { order: 3; }
    body.graham-product-detail div.product.graham-product-detail-layout > .graham-product-overview { order: 2; }
    body.graham-product-detail div.product.graham-product-detail-layout > :is(.woocommerce-tabs, .related, .upsells) { order: 4; width: 100%; }
    body.graham-product-detail div.product .summary .product_title { font-size: 1.4rem !important; }
    body.graham-product-detail .graham-purchase-panel { padding: 14px; }
    body.graham-product-detail .graham-product-overview { padding-top: 0; }
    .graham-family-image-options { flex-wrap: nowrap; overflow-x: auto; padding: 3px 3px 7px; }
    .graham-family-image-option { flex: 0 0 102px; }
}
@media (max-width: 420px) {
    body.graham-product-detail .graham-product-manufacturer-image { flex-basis: 96px; width: 96px; max-width: 96px; height: 56px; }
    body.graham-product-detail .graham-product-manufacturer-logo { max-width: 96px; max-height: 56px; }
    body.graham-product-detail .graham-product-manufacturer-copy strong { font-size: 16px; }
    body.graham-product-detail div.product .graham-purchase-panel .graham-uom-purchase-row:has(> .graham-product-uom-picker):has(> .quantity):has(> .single_add_to_cart_button) { grid-template-columns: minmax(0, 1fr); }
    body.graham-product-detail .graham-purchase-panel .graham-uom-purchase-row > :is(.graham-product-uom-picker, .quantity) { grid-column: 1; grid-row: auto; }
}

.graham-popularity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 18px; }
.graham-popularity-score { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #465e6d; }
.graham-popularity-stars { color: #be7800; font-size: 18px; letter-spacing: 1px; }
.graham-popularity > small { flex-basis: 100%; font-size: 10px; color: #6a7c88; }
.graham-choice { display: inline-block; background: #075b9d; color: white; padding: 5px 9px; border-radius: 3px; font-size: 12px; font-weight: 700; }

/* Keep the same compact identity-to-price slot with or without popularity.
   Override theme block spacing on both the wrapper and its native price child. */
body.graham-product-detail div.product .summary > .graham-product-identity {
    margin-bottom: 0 !important;
}
body.graham-product-detail div.product .summary > .graham-popularity {
    box-sizing: border-box; min-height: 48px; flex-shrink: 0;
    align-content: center; align-items: center; gap: 2px 10px;
    margin: 0 !important; padding: 4px 0 !important; line-height: 1.25;
}
body.graham-product-detail div.product .summary > .graham-popularity .graham-popularity-score {
    min-width: 0; max-width: 100%; line-height: 1.25;
}
body.graham-product-detail div.product .summary > .graham-popularity > small {
    margin: 0 !important; padding: 0; line-height: 1.25;
}
body.single-product.graham-product-detail.woocommerce div.product div.summary > .price,
body.single-product.graham-product-detail.woocommerce div.product div.summary > .price .price {
    margin-top: 0 !important;
}
/* Mobile: heading/identity, existing gallery, purchase controls, then details. */
@media(max-width:559px){
 body.graham-product-detail div.product.graham-product-detail-layout > .summary{order:1}
 body.graham-product-detail div.product.graham-product-detail-layout > .graham-product-overview{order:3;width:100%}
 body.graham-product-detail div.product.graham-product-detail-layout > .woocommerce-product-gallery{order:2}
 body.graham-product-detail div.product.graham-mobile-sequence > .graham-mobile-empty-media{display:none!important}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > :is(.woocommerce-product-gallery,.graham-product-gallery-block){order:2;float:none!important;width:100%!important;max-width:100%!important;min-width:0;margin:16px 0 22px!important;clear:both}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary .product_title{font-size:1.4rem!important}
 body.graham-product-detail div.product.graham-mobile-sequence > .graham-product-overview{margin:0!important}
}

/* Mobile order must override block-theme flex order as well as classic markup.
   Moving the original nodes retains gallery events and live-editor state. */
@media(max-width:559px){
 body.graham-product-detail div.product.graham-mobile-sequence > .summary{display:flex!important;flex-direction:column;gap:0;width:100%!important}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > *{order:20}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > .product_title{order:1}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > .graham-product-identity{order:2}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > :is(.woocommerce-product-gallery,.graham-product-gallery-block){order:3}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > .graham-popularity{order:4}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > :is(.price,.graham-main-product-price){order:5}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > :is(.graham-price-tax-note,.graham-price-review-message,.graham-admin-price-source,.graham-customer-product-status){order:6}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > .graham-product-family{order:10}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > :is(.graham-purchase-panel,.graham-product-purchase-block){order:11}
}

@media(min-width:560px){
 body.graham-product-detail .graham-product-identity .graham-product-manufacturer{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;overflow:visible}
 body.graham-product-detail .graham-product-manufacturer-copy{min-width:0;overflow-wrap:anywhere}
 body.graham-product-detail div.product .summary .graham-product-manufacturer > .graham-product-save-actions-single{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;margin:0;padding:0;min-width:0}
 body.graham-product-detail .graham-product-manufacturer .graham-save-link{font-size:12px;white-space:normal;text-align:left}
 body.graham-product-detail .graham-product-manufacturer .graham-add-list-panel{left:auto;right:0;max-width:min(320px,80vw);z-index:30}
}

@media(min-width:560px){body.graham-product-detail .graham-product-identity>.graham-product-save-actions-single{flex:0 0 100%;margin:8px 0;display:flex;gap:16px;flex-wrap:wrap}body.graham-product-detail .graham-product-manufacturer>.graham-product-save-actions-single{grid-column:3}}

@media(min-width:560px){body.graham-product-detail .graham-product-manufacturer:not(:has(.graham-product-manufacturer-image)){grid-template-columns:minmax(0,1fr) auto}body.graham-product-detail .graham-product-manufacturer:not(:has(.graham-product-manufacturer-image))>.graham-product-save-actions-single{grid-column:2}}

/* 0.15.047: product-page Add to list is intentionally independent from the
 * catalogue cards. Keep the label visible and give the picker enough room for
 * a real list name, quantity, and action button. */
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-menu {
    position: relative;
    min-width: 148px;
}
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-menu > summary.graham-save-link {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #526878 !important;
    display: inline-flex;
    font-size: 13px !important;
    font-weight: 600 !important;
    gap: 6px;
    justify-content: flex-start;
    min-height: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
    width: auto;
}
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-menu > summary.graham-save-link .graham-save-label {
    display: inline !important;
    max-width: none !important;
    overflow: visible !important;
    text-indent: 0 !important;
    white-space: nowrap !important;
}
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-menu > summary.graham-save-link:hover,
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-menu[open] > summary.graham-save-link {
    background: transparent !important;
    color: #1269a7 !important;
}
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-panel {
    background: #fff;
    border: 1px solid #b9ceda;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 45, 68, 0.14);
    box-sizing: border-box;
    left: auto;
    margin-top: 6px;
    max-width: min(420px, calc(100vw - 32px));
    min-width: min(380px, calc(100vw - 32px));
    padding: 14px;
    right: 0;
    top: calc(100% + 2px);
    width: min(420px, calc(100vw - 32px));
    z-index: 50;
}
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-panel .graham-add-list-form {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 84px 64px;
}
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-panel :is(select, input[type="number"]) {
    box-sizing: border-box;
    min-height: 38px;
    width: 100%;
}
body.graham-product-detail .graham-product-save-actions-single .graham-add-list-panel .button {
    background: #13883f !important;
    border: 1px solid #13883f !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-weight: 700 !important;
    min-height: 38px;
    padding: 7px 10px !important;
}
body.graham-product-detail .graham-product-save-actions-single .graham-create-list-link {
    color: #1269a7;
    font-size: 13px;
    margin-top: 10px;
}

@media(max-width:559px){
    body.graham-product-detail .graham-product-save-actions-single .graham-add-list-panel {
        left: 0;
        max-width: calc(100vw - 32px);
        min-width: 0;
        right: auto;
        width: min(420px, calc(100vw - 32px));
    }
    body.graham-product-detail .graham-product-save-actions-single .graham-add-list-panel .graham-add-list-form {
        grid-template-columns: minmax(0, 1fr) 78px 58px;
    }
}

/* 0.13.207: compact the product lead-in on unfolded phones and tablets. */
@media(min-width:560px) and (max-width:1100px){
 body.graham-product-detail main:has(.product.graham-product-detail-layout),
 body.graham-product-detail #primary:has(.product.graham-product-detail-layout),
 body.graham-product-detail .site-main:has(.product.graham-product-detail-layout){margin-top:0!important;padding-top:6px!important}
 body.graham-product-detail .woocommerce-breadcrumb{margin:0 auto 8px!important;padding-top:0!important;line-height:1.45}
 body.graham-product-detail div.product.graham-product-detail-layout{margin-top:8px!important}
}

/* 0.13.209: keep desktop breadcrumbs close to the main navigation. */
@media(min-width:901px){
 body.graham-product-detail main:has(.product.graham-product-detail-layout),
 body.graham-product-detail #primary:has(.product.graham-product-detail-layout),
 body.graham-product-detail .site-main:has(.product.graham-product-detail-layout){margin-top:0!important;padding-top:8px!important}
 body.graham-product-detail .woocommerce-breadcrumb{margin:0 auto 10px!important;padding-top:0!important}
 body.graham-product-detail div.product.graham-product-detail-layout{margin-top:10px!important}
}

.graham-product-sds-panel{border-left:4px solid #8aa0ae;padding:12px 16px;max-width:760px;background:#f5f8fa}.graham-product-sds-panel h3{font-size:18px;line-height:1.3;margin:0 0 6px;color:#15354e}.graham-product-sds-panel p{margin:0 0 10px}.graham-product-sds-panel.is-available{border-left-color:#1db954;background:#f2fbf5}.graham-product-sds-panel.is-not-required{border-left-color:#075b9d;background:#f2f7fb}.graham-product-sds-panel.is-unavailable{border-left-color:#c58a17;background:#fff9ed}.graham-product-sds-panel .button{margin:0}
.graham-standard-specs{display:grid;gap:16px}.graham-spec-group{margin:0}.graham-spec-group h3{margin:0;padding:9px 12px;background:#edf6fb;color:#075b9d;font-size:12px;line-height:1.3;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.graham-standard-specs .woocommerce-product-attributes{width:100%;margin:0;border:1px solid #d6e2e9;border-top:0;border-collapse:collapse}.graham-standard-specs .woocommerce-product-attributes th,.graham-standard-specs .woocommerce-product-attributes td{padding:10px 12px;border:0;border-bottom:1px solid #d6e2e9;vertical-align:top;text-align:left}.graham-standard-specs .woocommerce-product-attributes tr:last-child th,.graham-standard-specs .woocommerce-product-attributes tr:last-child td{border-bottom:0}.graham-standard-specs .woocommerce-product-attributes th{width:34%;color:#607080;font-weight:600}.graham-standard-specs .woocommerce-product-attributes td{color:#243746}.graham-product-document-list{display:grid;gap:10px}.graham-product-document-item{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #d6e2e9}.graham-product-document-item:last-child{border-bottom:0}.graham-product-document-item strong{display:block;color:#15354e}.graham-product-document-item small{display:block;color:#607080;margin-top:3px}.graham-product-document-item .button{white-space:nowrap}
@media(max-width:559px){.graham-standard-specs .woocommerce-product-attributes th,.graham-standard-specs .woocommerce-product-attributes td{padding:9px 8px}.graham-standard-specs .woocommerce-product-attributes th{width:42%}.graham-product-document-item{align-items:flex-start}.graham-product-document-item .button{width:100%;text-align:center}}
/* Mobile first view prioritizes title, code, image and price. */
@media(max-width:559px){
 body.graham-product-detail div.product.graham-mobile-sequence{margin-top:6px!important;row-gap:14px}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary .product_title{font-size:18px!important;line-height:1.2!important;margin:0 0 4px!important}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > .graham-product-identity{margin:0!important;gap:0;min-height:0}
 body.graham-product-detail div.product.graham-mobile-sequence .graham-single-item-code{font-size:12px!important;line-height:1.4!important}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > :is(.woocommerce-product-gallery,.graham-product-gallery-block){margin:6px 0!important;padding:0!important}
 body.graham-product-detail .woocommerce-product-gallery .flex-viewport{height:clamp(150px,29svh,250px)!important}
 body.graham-product-detail .woocommerce-product-gallery__image:not(.flex-control-thumbs *) img{height:clamp(150px,29svh,250px)!important;max-height:250px!important;width:100%!important;object-fit:contain!important}
 body.graham-product-detail .woocommerce-product-gallery .flex-control-thumbs{gap:6px!important;margin:5px 0 0!important;padding:0!important}
 body.graham-product-detail .woocommerce-product-gallery .flex-control-thumbs li{width:44px!important;min-width:44px!important}
 body.graham-product-detail .woocommerce-product-gallery .flex-control-thumbs img{width:44px!important;height:44px!important;padding:2px}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > :is(.price,.graham-main-product-price){order:4;margin:2px 0 4px!important}
 body.single-product.graham-product-detail.woocommerce div.product div.summary .price,body.single-product.graham-product-detail.woocommerce div.product div.summary .price .woocommerce-Price-amount{font-size:26px!important;line-height:1.2!important}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > .graham-popularity{order:7;min-height:0;padding:4px 0!important}
 body.graham-product-detail div.product.graham-mobile-sequence > .summary > .graham-mobile-secondary-info{order:8;margin:6px 0!important;max-width:100%;min-width:0}
 body.graham-product-detail .woocommerce-breadcrumb{white-space:nowrap;overflow-x:auto;scrollbar-width:none;margin:4px 0 6px!important;font-size:10px!important}
 body.graham-product-detail .woocommerce-breadcrumb::-webkit-scrollbar{display:none}
}

/* 0.13.111: make inventory-special savings unmistakable on product pages. */
body.single-product.graham-product-detail.woocommerce div.product div.summary .price .graham-special-price {
 display:inline-flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;max-width:100%;line-height:1.15
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price .graham-special-price-label {
 flex-basis:100%;color:#b42318!important;font-size:12px!important;font-weight:850!important;letter-spacing:0;text-transform:uppercase
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price .graham-special-price del {
 color:#60778a!important;font-size:1rem!important;font-weight:600!important
}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price .graham-special-price del :is(.woocommerce-Price-amount,bdi,.woocommerce-Price-currencySymbol){font-size:inherit!important}
body.single-product.graham-product-detail.woocommerce div.product div.summary .price .graham-special-price ins,
body.single-product.graham-product-detail.woocommerce div.product div.summary .price .graham-special-price ins :is(.woocommerce-Price-amount,bdi,.woocommerce-Price-currencySymbol) {
 background:transparent!important;color:#b42318!important;font-size:1.08em!important;font-weight:900!important;text-decoration:none!important
}

/* Standardized product images are already shown at their useful maximum size. */
body.graham-product-detail .woocommerce-product-gallery__trigger{display:none!important}
body.graham-product-detail .woocommerce-product-gallery__image>a{cursor:default!important}

/* 0.13.453: remove residual lead-in space after the product-only filter is hidden. */
@media (max-width: 1280px) {
    body.graham-product-detail .wp-block-woocommerce-breadcrumbs {
        height: auto !important;
        margin: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    body.graham-product-detail main:has(.product.graham-product-detail-layout),
    body.graham-product-detail #primary:has(.product.graham-product-detail-layout),
    body.graham-product-detail .site-main:has(.product.graham-product-detail-layout) {
        padding-top: 2px !important;
    }

    body.graham-product-detail .woocommerce-breadcrumb {
        margin-bottom: 6px !important;
    }

    body.graham-product-detail div.product.graham-product-detail-layout {
        margin-top: 6px !important;
    }
}
