/* VENTO Store Operations — cart, order preparation and checkout presentation */

/* CART: balanced desktop frame, overriding older child-theme cart dimensions. */
body.woocommerce-cart .vento-inner-container {
    width: min(calc(100% - 36px), 1440px) !important;
    max-width: 1440px !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .vento-inner-content,
body.woocommerce-cart .vento-cart-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .woocommerce {
    display: grid !important;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr) !important;
    gap: 24px !important;
    align-items: start !important;
    direction: rtl !important;
    width: 100% !important;
    min-width: 0 !important;
}
body.woocommerce-cart .woocommerce-notices-wrapper {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
}
body.woocommerce-cart .woocommerce-cart-form {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .cart-collaterals {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .cart-collaterals .cart_totals {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .woocommerce-cart-form table.shop_table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .woocommerce-cart-form table.shop_table th,
body.woocommerce-cart .woocommerce-cart-form table.shop_table td {
    vertical-align: middle !important;
    box-sizing: border-box !important;
}
body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail {
    width: 112px !important;
}
body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail img {
    display: block !important;
    width: 88px !important;
    height: 100px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    margin-inline: auto !important;
}
body.woocommerce-cart .woocommerce-cart-form td.product-name {
    min-width: 190px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.9 !important;
}
body.woocommerce-cart .woocommerce-cart-form td.product-price,
body.woocommerce-cart .woocommerce-cart-form td.product-subtotal {
    min-width: 105px !important;
    white-space: nowrap !important;
}
body.woocommerce-cart .woocommerce-cart-form td.product-quantity {
    min-width: 112px !important;
    white-space: nowrap !important;
}
body.woocommerce-cart .woocommerce-cart-form .quantity {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 100% !important;
}
body.woocommerce-cart .woocommerce-cart-form .quantity input.qty {
    width: 66px !important;
    min-width: 58px !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
    text-align: center !important;
}
body.woocommerce-cart .cart-collaterals .cart_totals h2 {
    margin-top: 0 !important;
}
body.woocommerce-cart .woocommerce-cart-form .coupon {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 9px !important;
}
body.woocommerce-cart .woocommerce-cart-form .coupon input#coupon_code {
    min-height: 44px !important;
    max-width: 240px !important;
    box-sizing: border-box !important;
}

/* CART ONLY: hide shipping methods, shipping totals and calculator.
   The shipping engine and all rates remain enabled for checkout. */
body.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals,
body.woocommerce-cart .cart_totals tr.shipping,
body.woocommerce-cart .cart_totals .shipping,
body.woocommerce-cart .woocommerce-shipping-calculator,
body.woocommerce-cart .shipping-calculator-button,
body.woocommerce-cart .shipping-calculator-form,
body.woocommerce-cart .woocommerce-shipping-destination,
body.woocommerce-cart .woocommerce-shipping-methods,
body.woocommerce-cart .wc-block-components-totals-shipping,
body.woocommerce-cart .wc-block-components-shipping-calculator,
body.woocommerce-cart .wc-block-cart__shipping {
    display: none !important;
}

/* ONLINE ORDER PREPARATION — seller-only account endpoint. */
.vso-online-orders {
    direction: rtl;
    width: 100%;
    max-width: 100%;
    margin: 0;
    color: #171717;
    box-sizing: border-box;
}
.vso-online-orders *,
.vso-online-order * {
    box-sizing: border-box;
}
.vso-online-orders__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 20px;
    padding: 0 0 18px;
    border-bottom: 1px solid #e5e5e5;
}
.vso-online-orders__header small {
    display: block;
    color: #777;
    font-size: 10px;
    letter-spacing: 1.5px;
}
.vso-online-orders__header h1 {
    margin: 7px 0 !important;
    color: #171717 !important;
    font-size: clamp(20px, 2.3vw, 28px) !important;
    line-height: 1.55 !important;
}
.vso-online-orders__header p {
    margin: 0 !important;
    color: #666;
    font-size: 12px;
    line-height: 1.9;
}
.vso-online-orders__count {
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid #e1e1e1;
    border-radius: 30px;
    background: #f7f7f7;
    color: #333;
    font-size: 12px;
    white-space: nowrap;
}
.vso-online-orders__empty {
    padding: 28px 20px;
    border: 1px dashed #d7d7d7;
    border-radius: 8px;
    background: #fafafa;
    text-align: center;
}
.vso-online-orders__empty strong {
    display: block;
    margin-bottom: 7px;
    font-size: 15px;
}
.vso-online-orders__empty p {
    margin: 0;
    color: #777;
    font-size: 12px;
    line-height: 1.9;
}
.vso-online-order {
    margin: 0 0 16px;
    padding: 17px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
}
.vso-online-order__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 13px;
    border-bottom: 1px solid #ededed;
}
.vso-online-order__identity {
    display: grid;
    gap: 4px;
}
.vso-online-order__identity strong {
    font-size: 14px;
}
.vso-online-order__identity small {
    color: #888;
    font-size: 11px;
}
.vso-online-order__status {
    padding: 6px 10px;
    border-radius: 20px;
    background: #f2f2f2;
    color: #444;
    font-size: 11px;
}
.vso-online-order__total {
    font-size: 13px;
    white-space: nowrap;
}
.vso-online-order__main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
    gap: 22px;
    padding: 16px 0;
}
.vso-online-order h2 {
    margin: 0 0 11px !important;
    color: #222 !important;
    font-size: 14px !important;
}
.vso-online-order__table-wrap {
    width: 100%;
    overflow-x: auto;
}
.vso-online-order__products table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.vso-online-order__products th,
.vso-online-order__products td {
    padding: 9px 8px;
    border-bottom: 1px solid #ededed;
    text-align: right;
    vertical-align: middle;
}
.vso-online-order__products th {
    background: #f7f7f7;
    font-weight: 700;
}
.vso-online-order__product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}
.vso-online-order__product-image {
    flex: 0 0 48px;
    width: 48px !important;
    height: 48px !important;
    object-fit: contain;
    border-radius: 5px;
    background: #f4f4f4;
}
.vso-online-order__item-meta {
    margin-top: 4px;
    color: #777;
    font-size: 10px;
    line-height: 1.8;
}
.vso-online-order__item-meta ul {
    margin: 0;
    padding-right: 15px;
}
.vso-online-order__customer p,
.vso-online-order__invoice p {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    line-height: 1.8;
}
.vso-online-order__customer p span,
.vso-online-order__invoice p span {
    flex: 0 0 auto;
    color: #777;
}
.vso-online-order__customer p strong,
.vso-online-order__invoice p strong {
    min-width: 0;
    text-align: left;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.vso-online-order__customer a {
    color: inherit;
    text-decoration: none;
    direction: ltr;
}
.vso-online-order__details {
    padding-top: 13px;
    border-top: 1px solid #ededed;
}
.vso-online-order__details summary {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    cursor: pointer;
    color: #171717;
    font-size: 12px;
    font-weight: 700;
}
.vso-online-order__details summary:hover {
    opacity: .7;
}
.vso-online-order__invoice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    padding-top: 15px;
}
.vso-online-order__grand-total {
    border-top: 1px solid #ddd;
    font-weight: 800;
}

@media (max-width: 1050px) {
    body.woocommerce-cart .woocommerce {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals {
        grid-column: 1 !important;
    }
}
@media (max-width: 760px) {
    body.woocommerce-cart .vento-inner-container {
        width: calc(100% - 20px) !important;
        margin: 8px auto !important;
        padding: 12px !important;
    }
    body.woocommerce-cart .woocommerce {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals {
        width: 100% !important;
        min-width: 0 !important;
        padding: 10px !important;
    }
    body.woocommerce-cart .woocommerce-cart-form {
        order: 1 !important;
    }
    body.woocommerce-cart .cart-collaterals {
        order: 2 !important;
    }
    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive {
        display: block !important;
        width: 100% !important;
        border: 0 !important;
        border-spacing: 0 !important;
    }
    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive thead {
        display: none !important;
    }
    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive tbody {
        display: grid !important;
        gap: 14px !important;
        width: 100% !important;
    }
    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive tr.cart_item {
        position: relative !important;
        display: grid !important;
        grid-template-columns: 96px minmax(0, 1fr) !important;
        grid-template-areas:
            "thumbnail name"
            "thumbnail quantity"
            "thumbnail price"
            "thumbnail subtotal" !important;
        align-items: start !important;
        gap: 9px 13px !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 15px !important;
        border: 1px solid #dedede !important;
        border-radius: 10px !important;
        background: #fff !important;
        box-shadow: none !important;
    }
    body.woocommerce-cart .woocommerce-cart-form table.shop_table_responsive tr.cart_item td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        text-align: right !important;
        box-sizing: border-box !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-thumbnail {
        grid-area: thumbnail !important;
        align-self: start !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-thumbnail img {
        display: block !important;
        width: 96px !important;
        height: 112px !important;
        max-width: 100% !important;
        object-fit: contain !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 7px !important;
        background: #f4f4f4 !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-name {
        grid-area: name !important;
        min-width: 0 !important;
        padding-left: 38px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.9 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-quantity {
        grid-area: quantity !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-price {
        grid-area: price !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-subtotal {
        grid-area: subtotal !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-remove {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        z-index: 3 !important;
        display: block !important;
        width: auto !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-remove a.remove {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
        border-radius: 50% !important;
        line-height: 1 !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-thumbnail::before,
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-name::before,
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-remove::before {
        display: none !important;
        content: none !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-price::before,
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-quantity::before,
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-subtotal::before {
        display: inline-block !important;
        float: none !important;
        min-width: 55px !important;
        margin-left: 7px !important;
        color: #777 !important;
        font-size: 10px !important;
        font-weight: 500 !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item .quantity {
        display: inline-flex !important;
        align-items: center !important;
        max-width: 100% !important;
    }
    body.woocommerce-cart .woocommerce-cart-form tr.cart_item .quantity input.qty {
        width: 62px !important;
        min-width: 58px !important;
        min-height: 40px !important;
        padding: 5px !important;
        text-align: center !important;
    }
    body.woocommerce-cart .woocommerce-cart-form .actions {
        display: grid !important;
        gap: 9px !important;
    }
    body.woocommerce-cart .woocommerce-cart-form .coupon {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px !important;
    }
    body.woocommerce-cart .woocommerce-cart-form .coupon input#coupon_code,
    body.woocommerce-cart .woocommerce-cart-form .coupon button,
    body.woocommerce-cart .woocommerce-cart-form button[name="update_cart"] {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 43px !important;
    }
    .vso-online-orders__header {
        display: block;
    }
    .vso-online-orders__count {
        display: inline-block;
        margin-top: 12px;
    }
    .vso-online-order {
        padding: 13px;
    }
    .vso-online-order__main,
    .vso-online-order__invoice {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .vso-online-order__top {
        align-items: flex-start;
    }
    .vso-online-order__total {
        width: 100%;
    }
}
