/*
 * The block-based cart and checkout.
 *
 * WooCommerce renders these two screens with its block templates, so the
 * rules are scoped to .wc-block / .wp-block-woocommerce- or to the
 * .woocommerce-cart and .woocommerce-checkout body classes. None of them
 * can match anywhere else, so they load only on those two pages.
 */



/* ── Blog grid ────────────────────────────────────────────── */
/* Keep the primary Cart and Checkout actions visually identical. */
.pp-page-body--commerce .wc-block-cart__submit-button,
.pp-page-body--commerce .wc-block-components-checkout-place-order-button,
.woocommerce-cart .wc-block-cart__submit-button,
.woocommerce-checkout .wc-block-components-checkout-place-order-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    min-height: 52px !important;
    padding: 0 24px !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    background: #000 !important;
    color: #fff !important;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
}

.pp-page-body--commerce .wc-block-cart__submit-button span,
.pp-page-body--commerce .wc-block-components-checkout-place-order-button span,
.woocommerce-cart .wc-block-cart__submit-button span,
.woocommerce-checkout .wc-block-components-checkout-place-order-button span {
    color: inherit !important;
    text-decoration: none !important;
}

.pp-page-body--commerce .wc-block-cart__submit-button:hover,
.pp-page-body--commerce .wc-block-components-checkout-place-order-button:hover,
.woocommerce-cart .wc-block-cart__submit-button:hover,
.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
    background: #222 !important;
    border-color: #222 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* Gap and track width are set together by the mobile rail above - the two have
   to agree, because the track is calculated from the gap. */

/* Cart/checkout blocks: remove duplicate unit price under product names. */
.woocommerce-cart .wc-block-cart-item__product .wc-block-cart-item__prices,
.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-price,
.wp-block-woocommerce-cart .wc-block-cart-item__product .wc-block-cart-item__prices,
.wp-block-woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-price,
.woocommerce-checkout .wc-block-components-order-summary-item__description .wc-block-components-order-summary-item__individual-prices,
.woocommerce-checkout .wc-block-components-order-summary-item__description > .wc-block-components-product-price,
.wp-block-woocommerce-checkout .wc-block-components-order-summary-item__description .wc-block-components-order-summary-item__individual-prices,
.wp-block-woocommerce-checkout .wc-block-components-order-summary-item__description > .wc-block-components-product-price {
    display: none !important;
}
.woocommerce-cart .product-name .ppd-cart-edit,
.woocommerce-cart .wc-block-cart-item__product .ppd-cart-edit { margin-top: 8px; }

/* Checkout hierarchy: consistent strokes and clearly separated key sections. */
.woocommerce-checkout .wc-block-checkout {
    --pp-checkout-stroke: #d7ddd9;
    --pp-checkout-stroke-active: #35b777;
    --pp-checkout-card-radius: 10px;
}

.woocommerce-checkout .wc-block-checkout__shipping-option,
.woocommerce-checkout .wc-block-checkout__pickup-options,
.woocommerce-checkout .wc-block-checkout__shipping-fields,
.woocommerce-checkout .wc-block-checkout__shipping-method,
.woocommerce-checkout .wc-block-checkout__payment-method {
    background: #fff;
    border: 1px solid var(--pp-checkout-stroke);
    padding: 24px;
}

/* Delivery, address, and rates read as one connected checkout card. */
.woocommerce-checkout .wc-block-checkout__shipping-option {
    border-radius: var(--pp-checkout-card-radius) var(--pp-checkout-card-radius) 0 0 !important;
    margin: 0 0 -1px !important;
}

.woocommerce-checkout .wc-block-checkout__shipping-fields {
    border-radius: 0 !important;
    margin: -17px 0 -1px !important;
}

.woocommerce-checkout .wc-block-checkout__shipping-method,
.woocommerce-checkout .wc-block-checkout__pickup-options,
.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-method-block,
.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-methods-block {
    border-radius: 0 0 var(--pp-checkout-card-radius) var(--pp-checkout-card-radius) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    margin: 0 !important;
}

.woocommerce-checkout .wc-block-checkout__payment-method {
    border-radius: var(--pp-checkout-card-radius) !important;
    margin: 24px 0 !important;
}

/* Keep every checkout section heading consistent with Shipping address. */
.woocommerce-checkout .wc-block-checkout__shipping-option
    .wc-block-components-checkout-step__title,
.woocommerce-checkout .wc-block-checkout__shipping-option
    .wc-block-components-title,
.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-components-checkout-step__title,
.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-components-title,
.woocommerce-checkout .wc-block-checkout__shipping-option h2,
.woocommerce-checkout .wc-block-checkout__payment-method h2 {
    color: #111;
    font-family: 'Poppins', Arial, sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.35 !important;
    margin: 0 0 16px !important;
    text-transform: none !important;
}

/* Address and shipping-option headings share one smaller secondary style. */
.woocommerce-checkout .wc-block-checkout__shipping-option h3,
.woocommerce-checkout .wc-block-checkout__shipping-option h4,
.woocommerce-checkout .wc-block-checkout__pickup-options h3,
.woocommerce-checkout .wc-block-checkout__pickup-options h4,
.woocommerce-checkout .wc-block-checkout__payment-method h3,
.woocommerce-checkout .wc-block-checkout__payment-method h4,
.woocommerce-checkout .wc-block-checkout__shipping-fields
    .wc-block-components-checkout-step__title,
.woocommerce-checkout .wc-block-checkout__shipping-fields
    .wc-block-components-title,
.woocommerce-checkout .wc-block-checkout__shipping-method
    .wc-block-components-checkout-step__title,
.woocommerce-checkout .wc-block-checkout__shipping-method
    .wc-block-components-title,
.woocommerce-checkout .wc-block-checkout__pickup-options
    .wc-block-components-checkout-step__title,
.woocommerce-checkout .wc-block-checkout__pickup-options
    .wc-block-components-title,
.woocommerce-checkout .wc-block-checkout__billing-fields
    .wc-block-components-checkout-step__title,
.woocommerce-checkout .wc-block-checkout__billing-fields
    .wc-block-components-title,
.woocommerce-checkout .wc-block-checkout__shipping-fields h2,
.woocommerce-checkout .wc-block-checkout__shipping-method h2,
.woocommerce-checkout .wc-block-checkout__pickup-options h2,
.woocommerce-checkout .wc-block-checkout__billing-fields h2 {
    color: #111;
    font-family: 'Poppins', Arial, sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    letter-spacing: 0;
    line-height: 1.35 !important;
    margin: 0 0 16px !important;
    text-transform: none !important;
}

/* Woo uses different title elements for Contact, Delivery, Payment, Order
   summary, and Additional information. Normalize them across checkout. */
.woocommerce-checkout .wc-block-checkout
    .wc-block-components-checkout-step__title,
.woocommerce-checkout .wc-block-checkout
    .wc-block-components-title,
.woocommerce-checkout .wc-block-checkout h2 {
    color: #111 !important;
    font-family: 'Poppins', Arial, sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.35 !important;
    margin-bottom: 16px !important;
    margin-top: 0 !important;
    text-transform: none !important;
}

/* When separate billing details are opened, contain the complete form in a card. */
.woocommerce-checkout .wc-block-checkout__billing-fields,
.woocommerce-checkout .wp-block-woocommerce-checkout-billing-address-block {
    background: #fff;
    border: 1px solid var(--pp-checkout-stroke);
    border-radius: var(--pp-checkout-card-radius) !important;
    box-sizing: border-box;
    margin: 24px 0 !important;
    padding: 24px !important;
}

.woocommerce-checkout .wc-block-checkout__billing-fields
    .wc-block-components-checkout-step__container,
.woocommerce-checkout .wp-block-woocommerce-checkout-billing-address-block
    .wc-block-components-checkout-step__container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove Woo's default step gaps so the three delivery panels touch. */
.woocommerce-checkout .wc-block-checkout__shipping-option,
.woocommerce-checkout .wc-block-checkout__shipping-method,
.woocommerce-checkout .wc-block-checkout__pickup-options {
    margin-top: 0 !important;
}

.woocommerce-checkout .wc-block-checkout__shipping-option
    .wc-block-components-checkout-step__container,
.woocommerce-checkout .wc-block-checkout__shipping-fields
    .wc-block-components-checkout-step__container,
.woocommerce-checkout .wc-block-checkout__shipping-method
    .wc-block-components-checkout-step__container,
.woocommerce-checkout .wc-block-checkout__pickup-options
    .wc-block-components-checkout-step__container,
.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-components-checkout-step__container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Give addresses, choices, and the payment/card entry area room to breathe. */
.woocommerce-checkout .wc-block-checkout__shipping-fields
    .wc-block-components-address-card {
    padding: 16px !important;
}

.woocommerce-checkout .wc-block-checkout__shipping-method
    .wc-block-components-radio-control__option,
.woocommerce-checkout .wc-block-checkout__pickup-options
    .wc-block-components-radio-control__option,
.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-components-radio-control__option {
    align-items: center !important;
    display: flex !important;
    gap: 10px !important;
    min-height: 52px;
    padding: 14px 16px !important;
}

.woocommerce-checkout .wc-block-checkout__shipping-method
    .wc-block-components-radio-control__input,
.woocommerce-checkout .wc-block-checkout__pickup-options
    .wc-block-components-radio-control__input,
.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-components-radio-control__input {
    flex: 0 0 18px;
    left: auto !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
}

.woocommerce-checkout .wc-block-components-radio-control__option
    .wc-block-components-radio-control__label,
.woocommerce-checkout .wc-block-components-radio-control__option
    .wc-block-components-radio-control__description,
.woocommerce-checkout .wc-block-components-radio-control__option
    .wc-block-components-payment-method-label {
    flex: 1 1 auto;
    min-width: 0;
}

.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-components-radio-control {
    margin-top: 8px;
}

.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-components-radio-control-accordion-content {
    padding: 18px 16px 20px !important;
}

.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-gateway-container {
    box-sizing: border-box;
    padding: 16px !important;
}

.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-components-text-input,
.woocommerce-checkout .wc-block-checkout__payment-method
    .wc-block-gateway-input {
    margin-bottom: 12px;
}

/* Normalize the light 1px strokes used by checkout fields and choices. */
.woocommerce-checkout .wc-block-components-text-input input,
.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input,
.woocommerce-checkout .wc-block-components-address-card,
.woocommerce-checkout .wc-block-components-radio-control,
.woocommerce-checkout .wc-block-components-radio-control__option,
.woocommerce-checkout .wc-block-components-checkbox .wc-block-components-checkbox__input,
.woocommerce-checkout .wc-block-components-totals-coupon__form input {
    border-color: var(--pp-checkout-stroke) !important;
    border-width: 1px !important;
}

.woocommerce-checkout .wc-block-components-text-input input:focus,
.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input:focus {
    border-color: var(--pp-checkout-stroke-active) !important;
    box-shadow: 0 0 0 1px var(--pp-checkout-stroke-active) !important;
    outline: 0 !important;
}

/* Selected delivery, shipping and payment choices use one strong treatment. */
.woocommerce-checkout .wc-block-components-radio-control__option:has(input:checked),
.woocommerce-checkout .wc-block-components-radio-control__option-checked,
.woocommerce-checkout .wc-block-components-radio-control__option--checked {
    background: #111 !important;
    border-color: #111 !important;
    box-shadow: none !important;
    color: #fff !important;
}

.woocommerce-checkout .wc-block-components-radio-control__option:has(input:checked) *,
.woocommerce-checkout .wc-block-components-radio-control__option-checked *,
.woocommerce-checkout .wc-block-components-radio-control__option--checked * {
    color: #fff !important;
}

.woocommerce-checkout .wc-block-components-radio-control__option:has(input:checked) svg,
.woocommerce-checkout .wc-block-components-radio-control__option-checked svg,
.woocommerce-checkout .wc-block-components-radio-control__option--checked svg {
    fill: none;
    stroke: #fff !important;
}

.woocommerce-checkout .wc-block-components-radio-control__label,
.woocommerce-checkout .wc-block-components-radio-control__description,
.woocommerce-checkout .wc-block-components-payment-method-label {
    font-size: 13px;
}

/* Keep the order summary concise while retaining Promotion, Color, and price. */
.woocommerce-checkout .wc-block-components-product-metadata__description,
.woocommerce-checkout .wc-block-components-order-summary-item__description > p,
.woocommerce-checkout .wc-block-components-product-details__design,
.woocommerce-checkout [class*="wc-block-components-product-details__design"] {
    display: none !important;
}

/* Keep variation and promotion details visually attached to their product. */
.woocommerce-checkout .wc-block-components-order-summary-item__description {
    align-self: start !important;
    display: block !important;
}

.woocommerce-checkout .wc-block-components-order-summary-item__description
    .wc-block-components-product-name {
    display: block;
    line-height: 1.35;
    margin: 0 !important;
}

.woocommerce-checkout .wc-block-components-order-summary-item__description
    .wc-block-components-product-metadata,
.woocommerce-checkout .wc-block-components-order-summary-item__description
    .wc-block-components-product-details {
    margin: 4px 0 0 !important;
    padding: 0 !important;
}

.woocommerce-checkout .wc-block-components-order-summary-item__description
    .wc-block-components-product-details li,
.woocommerce-checkout .wc-block-components-order-summary-item__description
    [class*="wc-block-components-product-details__"] {
    line-height: 1.35;
    margin: 0 !important;
    padding: 0 !important;
}

/* Brand the final checkout action without changing the cart-page button. */
.woocommerce-checkout .wc-block-components-checkout-place-order-button {
    background: #35b777 !important;
    border-color: #35b777 !important;
}

.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
.woocommerce-checkout .wc-block-components-checkout-place-order-button:focus {
    background: #2ca066 !important;
    border-color: #2ca066 !important;
}@media (max-width: 600px) {
    .woocommerce-checkout .wc-block-checkout__shipping-option,
    .woocommerce-checkout .wc-block-checkout__pickup-options,
    .woocommerce-checkout .wc-block-checkout__shipping-fields,
    .woocommerce-checkout .wc-block-checkout__shipping-method,
    .woocommerce-checkout .wc-block-checkout__payment-method {
        padding: 18px;
    }

    .woocommerce-checkout .wc-block-checkout__billing-fields,
    .woocommerce-checkout .wp-block-woocommerce-checkout-billing-address-block {
        border-radius: 8px !important;
        margin: 18px 0 !important;
        padding: 18px !important;
    }

    .woocommerce-checkout .wc-block-checkout__shipping-option {
        border-radius: 8px 8px 0 0 !important;
    }

    .woocommerce-checkout .wc-block-checkout__shipping-method,
    .woocommerce-checkout .wc-block-checkout__pickup-options {
        border-radius: 0 0 8px 8px !important;
        margin-bottom: 0 !important;
    }

    .woocommerce-checkout .wc-block-checkout__payment-method {
        border-radius: 8px !important;
        margin: 18px 0 !important;
    }

    .woocommerce-checkout .wc-block-checkout__payment-method
        .wc-block-components-radio-control-accordion-content,
    .woocommerce-checkout .wc-block-checkout__payment-method
        .wc-block-gateway-container {
        padding: 14px !important;
    }
}
