/* Alfa Food B2B v4.4.4 | iOS quantity focus + visually separated cart items.
   Layered after v4.4.2. Intentionally leaves touch/pinch zoom enabled. */

/* Quantity fields: iOS Safari can auto-zoom when text is smaller than 16px.
   Keep all three B2B number-entry locations comfortably above that threshold. */
.af-product-card .inline-cart .af-qty-stepper input[name="quantity"],
.afc-checkout .afc-item-controls .afc-quantity input[data-afc-qty],
.af443-editor .af443-stepper input[data-af443-qty] {
    font-size:18px!important;
    -webkit-text-size-adjust:100%;
    min-width:0!important;
    text-align:center;
}

/* No content should force a product card wider than its responsive column. */
.af-product-card,.af-product-card .product-body,
.af-product-card .af-product-buy,.af-product-card .af-add-form,
.af-product-card .af-qty-stepper { min-width:0;max-width:100%; }
.af-product-card .af-add-form .af-qty-stepper { box-sizing:border-box; }
.af-product-card .af-add-form .af-qty-stepper input[name="quantity"] {
    width:100%;max-width:100%;box-sizing:border-box;
}

/* Cart list: visually separate each SKU with a bordered, numbered card. */
.afc-checkout .afc-products-panel .afc-items {
    display:grid;gap:14px;padding:16px;
    background:#f5f8f6;border-top:1px solid #e1e9e3;
    min-width:0;
}
.afc-checkout .afc-products-panel .afc-items > .afc-item.af444-item {
    box-sizing:border-box;position:relative;min-width:0;max-width:100%;
    display:grid;
    grid-template-columns:72px minmax(0,1fr) 140px 110px;
    grid-template-areas:
        "itemhead itemhead itemhead itemhead"
        "thumb main controls total"
        "thumb price controls remove";
    gap:9px 15px;
    padding:0 16px 16px;
    background:#fff;
    border:1px solid #d6e5da;
    border-left:4px solid #1c6848;
    border-radius:16px;
    box-shadow:0 3px 14px rgba(16,69,45,.065);
    overflow:hidden;
}
.afc-checkout .afc-products-panel .afc-items > .afc-item.af444-item:nth-child(even) {
    border-left-color:#c89a42;
}
.afc-checkout .af444-item-header {
    grid-area:itemhead;min-width:0;
    display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
    gap:6px 10px;margin:0 -16px;padding:10px 14px;
    border-bottom:1px solid #dceade;
    background:#edf6f0;
}
.afc-checkout .af444-item-index {
    display:inline-flex;align-items:center;min-height:24px;
    font-size:12px;line-height:1.3;font-weight:900;
    color:#155137;letter-spacing:.015em;
}
.afc-checkout .af444-item-unit {
    font-size:11px;line-height:1.3;font-weight:750;
    color:#456951;text-align:right;overflow-wrap:anywhere;
}
.afc-checkout .af444-item .afc-item-main h3 {font-size:14px;line-height:1.4;}
.afc-checkout .af444-item .afc-remove {align-self:end;}

/* Crucially, retain the 3-column quantity/total arrangement from v4.4.2. */
@media(max-width:740px) {
    .afc-checkout .afc-products-panel .afc-items {gap:15px;padding:12px;}
    .afc-checkout .afc-products-panel .afc-items > .afc-item.af444-item {
        grid-template-columns:72px minmax(0,1fr) minmax(0,1fr)!important;
        grid-template-areas:
            "itemhead itemhead itemhead"
            "thumb main main"
            "price price price"
            "controls controls total"
            "remove remove remove"!important;
        gap:10px 11px;
        padding:0 13px 13px;
    }
    .afc-checkout .af444-item-header {margin:0 -13px;padding:10px 13px;}
    .afc-checkout .af444-item .afc-thumb {max-width:100%;}
    .afc-checkout .af444-item .afc-item-controls {min-width:0;max-width:100%;}
    .afc-checkout .af444-item .afc-item-total {min-width:0;overflow-wrap:anywhere;}
    .afc-checkout .af444-item .afc-item-price {min-width:0;}
    .afc-checkout .af444-item .afc-item-price .afc-small-label {flex:0 0 auto;}
    .afc-checkout .af444-item .afc-remove {justify-self:end;}
}
@media(max-width:380px) {
    .afc-checkout .afc-products-panel .afc-items {padding:9px;gap:12px;}
    .afc-checkout .afc-products-panel .afc-items > .afc-item.af444-item {
        grid-template-columns:64px minmax(0,1fr) minmax(0,1fr)!important;
        column-gap:8px;padding:0 11px 12px;
    }
    .afc-checkout .af444-item-header {margin:0 -11px;padding:9px 11px;}
    .afc-checkout .af444-item .afc-item-controls .afc-quantity > button {
        flex-basis:38px;width:38px;min-width:38px;
    }
}
