/* Keep a permanent, native preference control without covering the mobile dock. */
body.adp-cookie-preferences-in-footer #cmplz-manage-consent {
    display: none !important;
}

.alfamix-theme .am-footer-column .adp-cookie-preferences {
    display: block;
    position: static;
    width: fit-content;
    min-height: 44px;
    margin: 0;
    padding: 10px 0;
    border: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
}

.alfamix-theme .am-footer-column .adp-cookie-preferences:hover {
    color: #fff;
    text-decoration: underline;
}

.alfamix-theme .am-footer-column .adp-cookie-preferences:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

@media (max-width: 680px) {
    .alfamix-theme .am-search button[type="submit"] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        box-sizing: border-box;
        width: auto;
        min-width: 72px;
        min-height: 44px;
        margin: 4px;
        padding: 0 14px;
        overflow: visible;
        color: #fff;
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .alfamix-theme .am-search button[type="submit"]::before {
        content: none;
    }
}

/* Do not let Storefront's notice links strip the button's right/vertical padding. */
.alfamix-theme .woocommerce-message .button,
.alfamix-theme .woocommerce-info .button,
.alfamix-theme .woocommerce-error .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 20px !important;
    margin: 0 0 0 16px;
    border: 1px solid var(--am-navy);
    border-radius: 12px;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.alfamix-theme .woocommerce-message,
.alfamix-theme .woocommerce-info,
.alfamix-theme .woocommerce-error li {
    display: flow-root;
}

.alfamix-theme.single-product div.product form.cart .quantity .qty {
    grid-row: 1;
    height: 52px;
    color: var(--am-ink);
    -webkit-text-fill-color: var(--am-ink);
    opacity: 1;
}

.alfamix-theme.single-product .am-qty-step:disabled,
.alfamix-theme.single-product .am-qty-step:disabled:hover {
    color: var(--am-muted);
    background: transparent;
    opacity: .4;
    cursor: not-allowed;
}

/* Storefront's percentage margins must not be combined with the flex gap. */
.alfamix-theme.single-product .woocommerce-product-gallery .flex-control-thumbs::before,
.alfamix-theme.single-product .woocommerce-product-gallery .flex-control-thumbs::after {
    display: none;
    content: none;
}

.alfamix-theme.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    clear: none !important;
    margin: 0 !important;
}

.alfamix-theme.single-product .woocommerce-product-gallery .flex-control-thumbs img {
    object-fit: contain;
}

/* Commerce pages need more room than an editorial reading-width page. */
.alfamix-theme.woocommerce-checkout .am-reading-width {
    max-width: 1200px;
}

.alfamix-theme.woocommerce-checkout form.checkout {
    display: flow-root;
    padding: clamp(18px, 2.2vw, 28px);
}

.alfamix-theme.woocommerce-checkout form.checkout #customer_details {
    float: left;
    width: 45%;
    margin: 0;
    min-width: 0;
}

.alfamix-theme.woocommerce-checkout form.checkout #order_review_heading,
.alfamix-theme.woocommerce-checkout form.checkout #order_review {
    float: right;
    clear: right;
    width: 51%;
    margin-right: 0;
    min-width: 0;
}

.alfamix-theme.woocommerce-checkout #order_review table.shop_table {
    width: 100%;
    table-layout: fixed;
}

.alfamix-theme.woocommerce-checkout #order_review table th,
.alfamix-theme.woocommerce-checkout #order_review table td {
    padding: 14px 12px;
    vertical-align: top;
    line-height: 1.5;
}

.alfamix-theme.woocommerce-checkout #order_review .product-name {
    width: 60%;
    overflow-wrap: anywhere;
}

.alfamix-theme.woocommerce-checkout #order_review .product-total,
.alfamix-theme.woocommerce-checkout #order_review .cart-subtotal td,
.alfamix-theme.woocommerce-checkout #order_review .order-total td {
    text-align: right;
}

.alfamix-theme.woocommerce-checkout #order_review .amount {
    white-space: nowrap;
}

.alfamix-theme.woocommerce-checkout #order_review .woocommerce-shipping-totals th[hidden] {
    display: none;
}

.alfamix-theme.woocommerce-checkout .adp-shipping-heading {
    margin-bottom: 12px;
    font-weight: 700;
}

.alfamix-theme.woocommerce-checkout #order_review #shipping_method {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alfamix-theme.woocommerce-checkout #order_review #shipping_method li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid var(--am-line);
    border-radius: 10px;
    background: #fff;
}

.alfamix-theme.woocommerce-checkout #order_review #shipping_method li:has(input:checked) {
    border-color: var(--am-navy);
    background: #f4f9f6;
}

.alfamix-theme.woocommerce-checkout #order_review #shipping_method input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
}

.alfamix-theme.woocommerce-checkout #order_review #shipping_method label {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.alfamix-theme.woocommerce-checkout #order_review #shipping_method .amount {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    font-weight: 700;
}

.alfamix-theme.woocommerce-checkout #order_review #shipping_method li:not(:has(input[type="radio"])) {
    grid-template-columns: minmax(0, 1fr);
}

/* Align only the gateway's outer layout, never its secure card-field iframes. */
.alfamix-theme #mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-row.mp-checkout-custom-dual-column-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px !important;
    align-items: start;
}

.alfamix-theme #mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-dual-column-row .mp-checkout-custom-card-column {
    width: 100% !important;
    min-width: 0;
    justify-content: flex-start;
}

.alfamix-theme #mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-dual-column-row input-label {
    display: block;
    min-height: 40px;
}

.alfamix-theme #mp-checkout-custom-root #mp-custom-checkout-form-container #form-checkout__expirationDate-container.mp-checkout-custom-left-card-input {
    margin-right: 0 !important;
}

/* Contain inherited floats so addresses and the footer stay in normal flow. */
.alfamix-theme.woocommerce-order-received #conteudo,
.alfamix-theme.woocommerce-order-received .am-page-card,
.alfamix-theme.woocommerce-order-received .am-entry-content,
.alfamix-theme.woocommerce-order-received .woocommerce-order {
    display: flow-root;
}

.alfamix-theme.woocommerce-order-received .woocommerce-order-details,
.alfamix-theme.woocommerce-order-received .woocommerce-customer-details {
    clear: both;
    float: none;
    width: 100%;
    margin: 28px 0 0;
}

.alfamix-theme.woocommerce-order-received .woocommerce-customer-details .col2-set.addresses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    float: none;
    width: 100%;
    margin: 0;
}

.alfamix-theme.woocommerce-order-received .col2-set.addresses::before,
.alfamix-theme.woocommerce-order-received .col2-set.addresses::after,
.alfamix-theme.woocommerce-order-received ul.woocommerce-order-overview::before,
.alfamix-theme.woocommerce-order-received ul.woocommerce-order-overview::after {
    display: none;
    content: none;
}

.alfamix-theme.woocommerce-order-received .woocommerce-customer-details .col2-set.addresses > .woocommerce-column {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--am-line);
    border-radius: 14px;
    background: #f8fafc;
}

.alfamix-theme.woocommerce-order-received .woocommerce-customer-details address {
    margin-bottom: 0;
    font-style: normal;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.alfamix-theme.woocommerce-order-received .woocommerce-column__title {
    margin: 0 0 12px;
    font-size: clamp(20px, 2vw, 24px);
}

.alfamix-theme.woocommerce-order-received .woocommerce-table--order-details .product-total,
.alfamix-theme.woocommerce-order-received .woocommerce-table--order-details tfoot td {
    text-align: right;
}

.alfamix-theme.woocommerce-order-received ul.woocommerce-order-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    list-style: none;
    border-radius: 14px;
    background: #f8fafc;
}

.alfamix-theme.woocommerce-order-received ul.woocommerce-order-overview li {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
}

.alfamix-theme.woocommerce-order-received .am-footer {
    clear: both;
    float: none;
    width: 100%;
}

/* A 1fr track keeps the gallery's intrinsic width on narrow screens. */
@media (max-width: 900px) {
    .alfamix-theme.woocommerce-checkout form.checkout #customer_details,
    .alfamix-theme.woocommerce-checkout form.checkout #order_review_heading,
    .alfamix-theme.woocommerce-checkout form.checkout #order_review {
        float: none;
        clear: both;
        width: 100%;
    }

    .alfamix-theme.woocommerce-checkout form.checkout #order_review_heading {
        margin-top: 28px;
    }

    .alfamix-theme.single-product div.product {
        grid-template-columns: minmax(0, 1fr);
    }

    .alfamix-theme.single-product div.product > * {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .alfamix-theme #mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-card-row.mp-checkout-custom-dual-column-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .alfamix-theme #mp-checkout-custom-root #mp-custom-checkout-form-container .mp-checkout-custom-dual-column-row input-label {
        min-height: 22px;
    }

    .alfamix-theme.woocommerce-checkout .am-page-shell article {
        padding: 20px 14px;
    }

    .alfamix-theme.woocommerce-order-received .woocommerce-customer-details .col2-set.addresses {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .alfamix-theme .woocommerce-message .button,
    .alfamix-theme .woocommerce-info .button,
    .alfamix-theme .woocommerce-error .button {
        float: none;
        display: flex;
        width: fit-content;
        max-width: 100%;
        margin: 0 0 12px;
    }
}
