/* TANKZONE_MOBILE_CART_CHECKOUT_FLOW_V38
   Presentation only. No price, stock, order, reward or shipping logic lives here. */

html.tz38-cart-page .cart-section,
html.tz38-checkout-page .checkout-section {
    scroll-margin-top: 110px;
}

.tz38-cart-auto-status {
    min-height: 18px;
    margin: 5px 0 0;
    color: #686863;
    font-size: 12px;
    line-height: 1.35;
}

.tz38-cart-auto-status.is-saving {
    color: #a51d24;
}

.tz38-cart-update-button {
    display: none !important;
}

.tz38-rewards-final {
    margin: 12px 0 0 !important;
}

.tz38-rewards-final.tz-v11-rewards-prepurchase-hidden {
    display: block !important;
}

@media (max-width: 760px) {
    /* ----------------------------------------------------------
       CART: one compact decision path
       ---------------------------------------------------------- */
    html.tz38-cart-page .compact-page-hero {
        padding-block: 24px !important;
    }

    html.tz38-cart-page .cart-section.section-space {
        padding-top: 18px !important;
        padding-bottom: 34px !important;
    }

    html.tz38-cart-page .cart-grid {
        display: block !important;
    }

    html.tz38-cart-page .cart-items,
    html.tz38-cart-page .order-summary {
        width: 100% !important;
        max-width: 100% !important;
    }

    html.tz38-cart-page .cart-item {
        display: grid !important;
        grid-template-columns: 82px minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: start !important;
        padding: 14px 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    html.tz38-cart-page .cart-item-image {
        width: 82px !important;
        max-width: 82px !important;
        min-width: 82px !important;
        align-self: start !important;
    }

    html.tz38-cart-page .cart-item-image img {
        width: 82px !important;
        height: 98px !important;
        object-fit: contain !important;
    }

    html.tz38-cart-page .cart-item-copy {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px 10px !important;
        min-width: 0 !important;
    }

    html.tz38-cart-page .cart-item-copy h2 {
        flex: 0 0 100% !important;
        margin: 0 0 1px !important;
        font-size: 15px !important;
        line-height: 1.35 !important;
    }

    html.tz38-cart-page .cart-item-copy > p {
        margin: 0 !important;
        font-size: 12.5px !important;
        line-height: 1.35 !important;
    }

    /* One visible money value is enough on the narrow card. */
    html.tz38-cart-page .cart-item-copy > strong {
        display: none !important;
    }

    html.tz38-cart-page .cart-item-controls {
        display: inline-flex !important;
        align-items: center !important;
        gap: 7px !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    html.tz38-cart-page .cart-item-controls label {
        margin: 0 !important;
        font-size: 11.5px !important;
        color: #676762 !important;
    }

    html.tz38-cart-page .cart-item-controls input[type="number"] {
        width: 58px !important;
        min-width: 58px !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 6px 7px !important;
        text-align: center !important;
        font-size: 16px !important;
    }

    html.tz38-cart-page .cart-item-controls > span {
        margin-inline-start: 2px !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }

    html.tz38-cart-page .cart-remove-trigger {
        grid-column: 2 !important;
        justify-self: start !important;
        margin: -3px 0 0 !important;
        padding: 4px 0 !important;
        min-height: 30px !important;
        font-size: 12px !important;
        color: #74746f !important;
    }

    html.tz38-cart-page .order-summary {
        margin-top: 14px !important;
        padding: 16px !important;
        border-radius: 12px !important;
        box-shadow: none !important;
    }

    html.tz38-cart-page .order-summary h2 {
        margin-bottom: 12px !important;
        font-size: 22px !important;
    }

    html.tz38-cart-page .summary-row {
        padding-block: 8px !important;
        margin: 0 !important;
        min-height: 0 !important;
    }

    html.tz38-cart-page .summary-row.grand-total {
        margin-top: 2px !important;
        padding-top: 12px !important;
        font-size: 18px !important;
    }

    html.tz38-cart-page .summary-note {
        margin: 8px 0 !important;
        font-size: 11.5px !important;
        line-height: 1.5 !important;
    }

    html.tz38-cart-page .tz-free-shipping-card {
        margin: 8px 0 10px !important;
        padding: 10px 11px !important;
        border-radius: 8px !important;
    }

    html.tz38-cart-page .tz-free-shipping-card small,
    html.tz38-cart-page .tz34-cart-delivery-note small {
        display: none !important;
    }

    html.tz38-cart-page .tz34-cart-delivery-note {
        margin: 5px 0 !important;
        font-size: 11.5px !important;
        line-height: 1.45 !important;
    }

    html.tz38-cart-page .order-summary .full-button,
    html.tz38-cart-page .order-summary .button-primary {
        min-height: 52px !important;
        margin-top: 10px !important;
        font-size: 16px !important;
    }

    html.tz38-cart-page .coupon-form {
        margin-top: 14px !important;
        padding-top: 12px !important;
    }

    /* ----------------------------------------------------------
       CHECKOUT: form first, summary later, rewards at the end
       ---------------------------------------------------------- */
    html.tz38-checkout-page .compact-page-hero {
        padding-block: 22px !important;
    }

    html.tz38-checkout-page .checkout-section.section-space {
        padding-top: 14px !important;
        padding-bottom: 34px !important;
    }

    html.tz38-checkout-page .checkout-section > .tz-free-shipping-card {
        margin: 0 0 10px !important;
        padding: 9px 11px !important;
        border-radius: 8px !important;
    }

    html.tz38-checkout-page .checkout-section > .tz-free-shipping-card small {
        display: none !important;
    }

    html.tz38-checkout-page .checkout-section > .tz-free-shipping-card .tz-free-shipping-track {
        margin-top: 7px !important;
        height: 4px !important;
    }

    html.tz38-checkout-page form.checkout-grid[data-checkout-form] {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    html.tz38-checkout-page form.checkout-grid[data-checkout-form] > .checkout-fields {
        order: 1 !important;
        width: 100% !important;
    }

    html.tz38-checkout-page form.checkout-grid[data-checkout-form] > .checkout-summary,
    html.tz38-checkout-page form.checkout-grid[data-checkout-form] > .order-summary {
        order: 2 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    html.tz38-checkout-page .tz-v11-unified-panel,
    html.tz38-checkout-page .checkout-panel,
    html.tz38-checkout-page .checkout-summary,
    html.tz38-checkout-page .order-summary {
        box-shadow: none !important;
    }

    html.tz38-checkout-page .tz-v11-intro {
        padding: 18px 16px 16px !important;
    }

    html.tz38-checkout-page .tz-v11-intro__kicker {
        margin-bottom: 8px !important;
    }

    html.tz38-checkout-page .tz-v11-intro h2 {
        font-size: 24px !important;
    }

    html.tz38-checkout-page .tz-v11-intro p {
        margin-top: 7px !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    html.tz38-checkout-page .tz-v11-step__head,
    html.tz38-checkout-page .tz-v11-step__body {
        padding-inline: 14px !important;
    }

    html.tz38-checkout-page .tz-v11-step__head {
        min-height: 62px !important;
        padding-block: 12px !important;
    }

    html.tz38-checkout-page .tz-v11-step__body {
        padding-top: 8px !important;
        padding-bottom: 14px !important;
    }

    html.tz38-checkout-page .tz-v11-field-grid {
        gap: 11px !important;
    }

    html.tz38-checkout-page .tz-v11-final {
        margin-top: 10px !important;
        padding: 15px 14px !important;
        border-radius: 10px !important;
    }

    html.tz38-checkout-page .tz-v11-review-grid {
        gap: 0 !important;
    }

    html.tz38-checkout-page .tz-v11-review-row {
        padding-block: 8px !important;
    }

    html.tz38-checkout-page .tz-v11-rewards-note {
        display: none !important;
    }

    html.tz38-checkout-page .tz38-rewards-final.loyalty-checkout-card {
        padding: 13px !important;
        margin: 12px 0 0 !important;
        border-radius: 10px !important;
    }

    html.tz38-checkout-page .tz38-rewards-final .loyalty-checkout-benefits {
        display: none !important;
    }

    html.tz38-checkout-page .tz38-rewards-final h3,
    html.tz38-checkout-page .tz38-rewards-final h2 {
        margin-bottom: 5px !important;
        font-size: 17px !important;
        line-height: 1.35 !important;
    }

    html.tz38-checkout-page .tz38-rewards-final p {
        margin-block: 5px !important;
        font-size: 12.5px !important;
        line-height: 1.45 !important;
    }

    html.tz38-checkout-page .tz38-rewards-final a,
    html.tz38-checkout-page .tz38-rewards-final button {
        min-height: 44px !important;
        margin-top: 7px !important;
    }

    html.tz38-checkout-page .tz-v11-confirm-wrap {
        margin-top: 12px !important;
    }

    html.tz38-checkout-page .tz-v11-confirm-button {
        min-height: 54px !important;
        font-size: 17px !important;
    }

    /* The detailed summary remains available, but AFTER the purchase flow. */
    html.tz38-checkout-page .checkout-summary {
        padding: 14px !important;
        border-radius: 10px !important;
    }

    html.tz38-checkout-page .checkout-summary h2 {
        margin-bottom: 10px !important;
        font-size: 20px !important;
    }

    html.tz38-checkout-page .checkout-summary .summary-row {
        padding-block: 7px !important;
    }

    html.tz38-checkout-page .checkout-summary .tz-free-shipping-card,
    html.tz38-checkout-page .checkout-summary .tz-free-shipping-card-copy {
        padding: 9px !important;
    }

    html.tz38-checkout-page .checkout-summary .tz-free-shipping-card small,
    html.tz38-checkout-page .checkout-summary .tz34-cart-delivery-note small {
        display: none !important;
    }

    html.tz38-checkout-page .tz-v26-redeem {
        margin-top: 12px !important;
        padding: 13px !important;
        border-radius: 10px !important;
    }
}
/* TANKZONE_CART_POLISH_V38_1
   Mobile cart polish only: remove/quantity separation + coupon near totals. */
@media (max-width: 760px) {
    html.tz38-cart-page .tz381-item-actions {
        flex: 0 0 100% !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        margin-top: 4px !important;
        padding-top: 7px !important;
        border-top: 1px solid rgba(17, 17, 17, .08) !important;
    }

    html.tz38-cart-page .tz381-item-actions .cart-item-controls {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
    }

    html.tz38-cart-page .tz381-item-actions .cart-remove-trigger {
        position: static !important;
        inset: auto !important;
        grid-column: auto !important;
        grid-row: auto !important;
        flex: 0 0 auto !important;
        justify-self: auto !important;
        align-self: center !important;
        margin: 0 !important;
        padding: 7px 2px !important;
        min-width: max-content !important;
        min-height: 36px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        z-index: 1 !important;
    }

    html.tz38-cart-page .order-summary .coupon-form.tz381-coupon-near-total {
        margin: 8px 0 9px !important;
        padding: 9px 0 10px !important;
        border-top: 1px solid rgba(17, 17, 17, .09) !important;
        border-bottom: 1px solid rgba(17, 17, 17, .09) !important;
    }

    html.tz38-cart-page .order-summary .coupon-form.tz381-coupon-near-total label {
        display: block !important;
        margin: 0 0 6px !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        line-height: 1.35 !important;
    }

    html.tz38-cart-page .order-summary .coupon-form.tz381-coupon-near-total > div {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 7px !important;
        align-items: stretch !important;
    }

    html.tz38-cart-page .order-summary .coupon-form.tz381-coupon-near-total input {
        width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        font-size: 16px !important;
    }

    html.tz38-cart-page .order-summary .coupon-form.tz381-coupon-near-total button {
        min-width: 74px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding-inline: 13px !important;
        white-space: nowrap !important;
    }

    /* Keep the final amount visually tied to any applied discount. */
    html.tz38-cart-page .order-summary .coupon-form.tz381-coupon-near-total + .discount-row,
    html.tz38-cart-page .order-summary .coupon-form.tz381-coupon-near-total + .grand-total {
        margin-top: 0 !important;
    }
}
