/* PDP styling only. The description and payment-provider elements keep their existing styles. */
body.single-product #pn-product {
    --pn-product-blue: #526ba9;
}

body.single-product #pn-product :is(
    .pn-product-navigation, .pn-product-gallery, .pn-product-summary,
    .woocommerce-message, .woocommerce-info, .woocommerce-error
) a:any-link:not(.button, .added_to_cart) {
    color: var(--pn-product-blue);
}

body.single-product #pn-product :is(
    .pn-product-navigation, .pn-product-gallery, .pn-product-summary,
    .woocommerce-message, .woocommerce-info, .woocommerce-error
) a:any-link:not(.button, .added_to_cart):focus-visible {
    outline-color: var(--pn-product-blue);
}

body.single-product #pn-product :is(.woocommerce-breadcrumb, .pn-shop-navigation, .product_meta) {
    min-width: 0;
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

body.single-product #pn-product .pn-shop-cart-count {
    min-width: 1.75em;
    min-height: 1.75em;
    height: auto;
    padding-inline: .25em;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1;
}

body.single-product #pn-product button.pn-product-preview__trigger {
    font-size: 15px;
}

/* Product gallery and native purchase controls. */
body.single-product #pn-product {
    --pn-purchase-height: 54px;
}
body.single-product #pn-product .pn-product-summary .product_title {
    font-weight: 700;
    margin-bottom: 24px;
    overflow-wrap: anywhere;
}
body.single-product #pn-product .woocommerce-product-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 18px;
    margin: 0 0 24px;
    line-height: 32px;
}
body.single-product #pn-product .woocommerce-product-rating .star-rating {
    float: none;
    margin: 0;
    font-size: 22px;
}
body.single-product #pn-product .woocommerce-review-link {
    text-decoration: underline;
}
body.single-product #pn-product .pn-product-summary p.price {
    margin: 0 0 34px;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.12;
}
body.single-product #pn-product .pn-product-summary form.cart {
    margin: 0;
    padding: 0;
}
body.single-product #pn-product :is(form.cart:not(.variations_form), .woocommerce-variation-add-to-cart) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px clamp(10px, 1.3vw, 22px);
}
body.single-product #pn-product :is(.woocommerce-product-rating, form.cart:not(.variations_form), .woocommerce-variation-add-to-cart)::before,
body.single-product #pn-product :is(.woocommerce-product-rating, form.cart:not(.variations_form), .woocommerce-variation-add-to-cart)::after {
    display: none;
}
body.single-product #pn-product .woocommerce-variation-add-to-cart {
    width: 100%;
}
body.single-product #pn-product :is(form.cart, .woocommerce-variation-add-to-cart) > .quantity {
    margin: 0;
}
body.single-product #pn-product :is(form.cart, .woocommerce-variation-add-to-cart) > .quantity .qty {
    width: clamp(64px, 5.25vw, 92px);
    height: var(--pn-purchase-height);
    padding: 0 9px;
    margin: 0;
}
body.single-product #pn-product .pn-product-summary input.qty::-webkit-inner-spin-button {
    opacity: 1;
}
body.single-product #pn-product .cart .pn-product-preview {
    margin: 0;
    max-width: 100%;
}
/* Match purchase and gallery controls to the approved square style. */
body.single-product #pn-product .pn-product-summary :is(button.single_add_to_cart_button, button.pn-product-preview__trigger),
body.single-product #pn-product .pn-product-gallery .woocommerce-product-gallery__trigger {
    border-radius: 0;
}

body.single-product #pn-product .pn-product-summary :is(button.single_add_to_cart_button, button.pn-product-preview__trigger) {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    min-height: var(--pn-purchase-height);
    max-width: 100%;
    margin: 0;
    padding: 8px clamp(12px, 1.4vw, 25px);
    border: 1px solid;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .035em;
    line-height: 1.2;
    white-space: normal;
}
body.single-product #pn-product .pn-product-summary button.single_add_to_cart_button {
    min-width: min(100%, clamp(170px, 15.1vw, 264px));
    background: #dc5534;
    color: #f7f1dc;
    border-color: #dc5534;
}
body.single-product #pn-product .pn-product-summary button.pn-product-preview__trigger {
    min-width: min(100%, clamp(158px, 14.2vw, 248px));
    background: #f5f5f5;
    border-color: #d4d4d4;
    color: #171717;
}
body.single-product #pn-product .pn-product-summary button.pn-product-preview__trigger:is(:hover, :active) {
    background: #ececec;
    border-color: #aaa;
    color: #171717;
    box-shadow: none;
}
body.single-product #pn-product .pn-product-summary button.pn-product-preview__trigger:focus-visible {
    outline-color: var(--pn-product-blue);
}
body.single-product #pn-product :is(.product-type-simple, .product-type-variable, .product-type-grouped) button.single_add_to_cart_button::before,
body.single-product #pn-product button.pn-product-preview__trigger::before {
    content: '';
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    background: currentColor;
    mask: var(--pn-purchase-icon) center / contain no-repeat;
}
body.single-product #pn-product button.single_add_to_cart_button {
    --pn-purchase-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l2.5 12h12l2-8H6m2 8-.8 2.5h12.6'/%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='18' cy='21' r='1'/%3E%3C/svg%3E");
}
body.single-product #pn-product button.pn-product-preview__trigger {
    --pn-purchase-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s4-6.5 10-6.5S22 12 22 12s-4 6.5-10 6.5S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.8'/%3E%3C/svg%3E");
}
@media (min-width: 1024px) {
    body.single-product.pn-shop-proposal #pn-product {
        width: 94%;
        max-width: 1644px;
        padding-top: 56px;
    }
    body.single-product #pn-product .pn-product-navigation {
        padding-bottom: 22px;
        margin-bottom: 52px;
    }
    body.single-product #pn-product .pn-product-hero {
        grid-template-columns: minmax(0, .93fr) minmax(0, 1fr);
        gap: clamp(32px, 3.1vw, 54px);
    }
    body.single-product #pn-product .pn-product-gallery { padding: 22px; }
    body.single-product #pn-product .pn-product-gallery .woocommerce-product-gallery__image > a > img {
        width: min(100%, 416px);
    }
    body.single-product #pn-product .pn-product-gallery ol.flex-control-thumbs {
        gap: 14px;
        margin-top: 22px !important;
        padding-inline-start: 10px;
    }
    body.single-product #pn-product .pn-product-gallery .flex-control-thumbs img:not(.flex-active) {
        opacity: .88;
    }
    body.single-product #pn-product .pn-product-gallery .woocommerce-product-gallery__trigger {
        top: 0;
        right: 0;
        width: 44px;
        height: 44px;
        box-sizing: border-box;
        border: 1px solid #d4d4d4;
    }
    body.single-product #pn-product .pn-product-gallery .woocommerce-product-gallery__trigger::before { inset: 11px auto auto 11px; }
    body.single-product #pn-product .pn-product-gallery .woocommerce-product-gallery__trigger::after { inset: 21px auto auto 24px; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
    body.single-product #pn-product .pn-product-summary :is(button.single_add_to_cart_button, button.pn-product-preview__trigger) {
        gap: 8px;
        padding-inline: 12px;
        font-size: 16px;
    }
}
@media (max-width: 767px) {
    body.single-product #pn-product { --pn-purchase-height: 48px; }
    body.single-product #pn-product .pn-product-summary .product_title { margin-bottom: 16px; }
    body.single-product #pn-product .woocommerce-product-rating {
        gap: 4px 8px;
        line-height: 1.45;
        margin-bottom: 16px;
    }
    body.single-product #pn-product .woocommerce-product-rating .star-rating { font-size: 18px; }
    body.single-product #pn-product .pn-product-summary p.price {
        font-size: 28px;
        margin-bottom: 22px;
    }
    body.single-product #pn-product .pn-product-summary :is(button.single_add_to_cart_button, button.pn-product-preview__trigger) {
        font-size: 16px;
    }
}

body.single-product #pn-product .pn-product-summary p.price .woocommerce-Price-amount {
    color: #000;
}

body.single-product #pn-product .pn-product-summary button.single_add_to_cart_button:is(:hover, :focus, :active) {
    background: #dc5534;
    color: #f7f1dc;
    box-shadow: inset 0 0 0 2px #f7f1dc;
}

@media (max-width: 359px) {
    body.single-product #pn-product .pn-product-summary form.cart {
        column-gap: 10px;
    }
    body.single-product #pn-product .pn-product-summary button.single_add_to_cart_button {
        width: auto;
    }
    body.single-product #pn-product .pn-product-summary .cart .pn-product-preview {
        flex: 0 0 100%;
    }
}

/* Match the approved express-payment controls on product pages. */
body.single-product #pn-product .pn-product-summary .ppc-button-wrapper:has(> :not(:empty)) {
    width: 100%;
    margin-top: 36px;
    padding-top: 40px;
    border-top: 1px solid #dededb;
}
body.single-product #pn-product .pn-product-summary #ppc-button-ppcp-gateway-v6 {
    width: 100%;
    gap: 16px;
}
body.single-product #pn-product .pn-product-summary #ppc-button-ppcp-gateway-v6 > :is(paypal-button, paypal-pay-later-button) {
    width: 100%;
    height: var(--pn-purchase-height) !important;
}
body.single-product #pn-product .pn-product-summary #ppc-button-ppcp-gateway-v6 > paypal-button { order: -2; }
body.single-product #pn-product .pn-product-summary #ppc-button-ppcp-gateway-v6 > paypal-pay-later-button { order: -1; }

@media (max-width: 767px) {
    body.single-product #pn-product .pn-product-summary .ppc-button-wrapper:has(> :not(:empty)) {
        margin-top: 24px;
        padding-top: 22px;
    }
}
