/* Cart and classic checkout only; shared WooFood/menu styles stay untouched. */
body.lecco-commerce { --lecco-red: #b71920; --lecco-line: #e7e3df; --lecco-muted: #65615c; background: #f7f6f3; }
.lecco-commerce #main { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #292622; }
.lecco-commerce #main > .main-inner { padding: 36px 0 64px; min-height: 65vh; }
.lecco-commerce #main .container { max-width: 1240px; }
.lecco-commerce .entry-title { font: 700 clamp(28px, 3vw, 40px)/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: left; margin: 0 0 28px; letter-spacing: -.035em; }
.lecco-commerce #main h2, .lecco-commerce #main h3 { font-family: inherit; font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin-bottom: 20px; }
.lecco-commerce .lecco-checkout-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.lecco-commerce .lecco-customer-panel, .lecco-commerce .lecco-order-panel,
.lecco-commerce .woocommerce-cart-form, .lecco-commerce .cart_totals {
    background: white; padding: 28px; border: 1px solid var(--lecco-line); border-radius: 16px; min-width: 0; box-shadow: 0 4px 18px #29262204;
}
.lecco-commerce .woocommerce .woocommerce-cart-form { float: left; width: 62%; margin: 0 0 28px; }
.lecco-commerce .woocommerce .cart-collaterals { float: right; width: 35%; }
.lecco-commerce .woocommerce .cart-collaterals .cart_totals { width: 100%; float: none; margin: 0; text-align: left; }
.lecco-commerce .entry-content::after { content: ""; display: block; clear: both; }
.lecco-commerce .woocommerce form .form-row { padding: 0; margin: 0 0 18px; display: block; width: 100%; float: none; }
.lecco-commerce .woocommerce form .form-row label { display: block; font-size: 14px; font-weight: 600; line-height: 1.6; margin-bottom: 6px; }
.lecco-commerce .woocommerce form .form-row label.checkbox { font-weight: 400; }
.lecco-commerce .woocommerce .optional { color: var(--lecco-muted); font-weight: 400; }
.lecco-commerce .woocommerce form input.input-text, .lecco-commerce .woocommerce form textarea,
.lecco-commerce .woocommerce form select { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid #ccc7c1; border-radius: 8px; background: #fff; color: #292622; font: inherit; font-size: 16px; box-shadow: none; }
.lecco-commerce .woocommerce form textarea { min-height: 100px; }
.lecco-commerce .woocommerce form input:focus-visible, .lecco-commerce .woocommerce form textarea:focus-visible,
.lecco-commerce .woocommerce form select:focus-visible, .lecco-commerce .woocommerce a:focus-visible,
.lecco-commerce .woocommerce button:focus-visible { outline: 3px solid #b7192055; outline-offset: 3px; }
.lecco-commerce .select2-container .select2-selection--single { min-height: 48px; border: 1px solid #ccc7c1; border-radius: 8px; padding: 8px 4px; }
.lecco-commerce .select2-container .select2-selection__arrow { height: 46px; }
.lecco-commerce .woocommerce .woocommerce-additional-fields { margin-top: 26px; }
.lecco-commerce .woocommerce table.shop_table { width: 100%; border: 0; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
.lecco-commerce .woocommerce table.shop_table th, .lecco-commerce .woocommerce table.shop_table td { padding: 16px 8px; border: 0; border-bottom: 1px solid var(--lecco-line); vertical-align: middle; background: transparent; color: #292622; }
.lecco-commerce .woocommerce table.shop_table thead th { color: var(--lecco-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.lecco-commerce .woocommerce table.shop_table .product-total, .lecco-commerce .woocommerce table.shop_table .product-subtotal { text-align: right; }
.lecco-commerce .woocommerce table.shop_table .order-total { font-size: 18px; }
.lecco-commerce .woocommerce table.shop_table .order-total th, .lecco-commerce .woocommerce table.shop_table .order-total td { border-bottom: 0; }
.lecco-commerce .woocommerce .product-name a { color: #292622; font-weight: 600; }
.lecco-commerce .woocommerce .product-thumbnail img { width: 56px; max-width: 56px; border-radius: 8px; }
.lecco-commerce .woocommerce .quantity { display: inline-flex; align-items: center; }
.lecco-commerce .woocommerce .quantity .qty { min-width: 44px; width: 48px; min-height: 44px; padding: 4px; text-align: center; }
.lecco-commerce .woocommerce .quantity .qty-change-button { min-width: 32px; min-height: 44px; line-height: 44px; background: #f0eeeb; color: #292622; }
.lecco-commerce .woocommerce a.remove { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 44px; }
.lecco-commerce .woocommerce .button, .lecco-commerce .woocommerce button.button,
.lecco-commerce .woocommerce #payment #place_order { border-radius: 8px; min-height: 48px; padding: 14px 18px; background: var(--lecco-red); background-image: none; color: #fff !important; border: 1px solid var(--lecco-red); font: 600 15px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; box-shadow: none; text-shadow: none; }
.lecco-commerce .woocommerce .button:hover, .lecco-commerce .woocommerce #payment #place_order:hover { background: #92131a; opacity: 1; }
.lecco-commerce .woocommerce button.button:disabled { opacity: .5; cursor: not-allowed; }
.lecco-commerce .woocommerce .checkout-button, .lecco-commerce .woocommerce #payment #place_order { position: static; width: 100%; float: none; display: block; margin: 16px 0 0; text-align: center; }
.lecco-commerce .woocommerce .coupon { display: flex; gap: 8px; flex-wrap: wrap; float: none; margin-bottom: 12px; }
.lecco-commerce .woocommerce .coupon #coupon_code { width: auto; flex: 1 1 150px; }
.lecco-commerce .woocommerce .coupon label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lecco-commerce .woocommerce #payment { background: transparent; border-radius: 0; }
.lecco-commerce .woocommerce #payment ul.payment_methods { padding: 18px 0; border-bottom: 1px solid var(--lecco-line); }
.lecco-commerce .woocommerce #payment div.payment_box { background: #f7f6f3; color: #4a4540; border-radius: 8px; padding: 16px; }
.lecco-commerce .woocommerce #payment div.payment_box::before { display: none; }
.lecco-commerce .woocommerce #payment .place-order { padding: 18px 0 0; }
.lecco-commerce .woocommerce-privacy-policy-text { font-size: 13px; line-height: 1.7; color: var(--lecco-muted); }
.lecco-commerce .woocommerce .woocommerce-info, .lecco-commerce .woocommerce .woocommerce-message,
.lecco-commerce .woocommerce .woocommerce-error { background: white; border-radius: 10px; box-shadow: none; margin-bottom: 16px; }
.lecco-commerce .woocommerce .woocommerce-info { border-top-color: var(--lecco-line); }
.lecco-commerce .woocommerce .woocommerce-info a { color: var(--lecco-red); }
.lecco-commerce .woocommerce .bg-dark { background: #f7f6f3 !important; color: #292622 !important; border-radius: 6px; padding: 8px 10px; }
.lecco-commerce .woocommerce .bg-dark label { color: #292622 !important; }
.lecco-commerce .woocommerce .woocommerce-checkout-review-order { margin-top: 20px; }
@media (max-width: 900px) {
    .lecco-commerce .lecco-checkout-layout { grid-template-columns: 1fr; gap: 20px; }
    .lecco-commerce .woocommerce .woocommerce-cart-form, .lecco-commerce .woocommerce .cart-collaterals { float: none; width: 100%; }
}
@media (max-width: 768px) {
    .lecco-commerce #main > .main-inner { padding: 24px 0 40px; }
    .lecco-commerce #main .container { padding: 0 12px; }
    .lecco-commerce #main .container > .col-md-12 { padding: 0; }
    .lecco-commerce .lecco-customer-panel, .lecco-commerce .lecco-order-panel,
    .lecco-commerce .woocommerce-cart-form, .lecco-commerce .cart_totals { padding: 18px; border-radius: 12px; }
    .lecco-commerce .woocommerce table.cart thead { display: none; }
    .lecco-commerce .woocommerce table.cart tbody, .lecco-commerce .woocommerce table.cart tr { display: block; }
    .lecco-commerce .woocommerce table.cart tr.cart_item { position: relative; padding: 8px 0 20px; }
    .lecco-commerce .woocommerce table.cart tr.cart_item td { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: right; padding: 10px 0; }
    .lecco-commerce .woocommerce table.cart tr.cart_item td::before { content: attr(data-title); font-weight: 600; text-align: left; }
    .lecco-commerce .woocommerce table.cart tr.cart_item .product-thumbnail { display: none; }
    .lecco-commerce .woocommerce table.cart td.actions { display: block; padding: 16px 0 0; }
    .lecco-commerce .woocommerce table.cart .actions .button { width: 100%; }
    .lecco-commerce .woocommerce table.cart .coupon { display: flex; }
    .lecco-commerce .woocommerce table.cart .coupon #coupon_code { width: 100%; }
    .lecco-commerce .woocommerce .product-name { overflow-wrap: anywhere; }
}
/* Reset legacy flex/table and fixed-button rules from the parent theme. */
.lecco-commerce.woocommerce-cart .entry-content > .woocommerce { display: block; }
.lecco-commerce .woocommerce .cart-collaterals { margin: 0; display: block; }
.lecco-commerce .woocommerce .cart_totals::after { content: ""; display: block; clear: both; }
.lecco-commerce .woocommerce .wc-proceed-to-checkout { float: none; padding: 0; }
.lecco-commerce .woocommerce .cart_totals h2 { text-align: left; }
.lecco-commerce .woocommerce a.checkout-button.button.alt.wc-forward { background: var(--lecco-red) !important; color: #fff !important; font-size: 16px; }
.lecco-commerce .woocommerce .woocommerce-info .showlogin { background: transparent; padding: 0; border: 0; color: var(--lecco-red) !important; text-decoration: underline; }
.lecco-commerce .woocommerce .quantity .qty-change-button * { color: #292622 !important; }
.lecco-commerce .woocommerce .wf_tdlvr_title { background: transparent !important; color: #292622 !important; font-size: 14px; font-weight: 600; padding: 0 0 8px !important; }
.lecco-commerce .woocommerce form p.form-row { margin-bottom: 18px !important; }
.lecco-commerce #main article { background: transparent; }
@media (min-width: 769px) {
    .lecco-commerce .woocommerce table.cart thead { display: table-header-group; float: none; }
    .lecco-commerce .woocommerce table.cart tbody { display: table-row-group; float: none; }
    .lecco-commerce .woocommerce table.cart tr { display: table-row; float: none; }
    .lecco-commerce .woocommerce table.cart td, .lecco-commerce .woocommerce table.cart th { float: none; width: auto; }
}
.lecco-commerce .woocommerce .quantity .qty-change-button i::before { color: #292622 !important; }
@media (min-width: 769px) {
    .lecco-commerce .woocommerce table.shop_table.cart.woocommerce-cart-form__contents thead { display: table-header-group; float: none; }
    .lecco-commerce .woocommerce table.shop_table.cart.woocommerce-cart-form__contents tbody { display: table-row-group; float: none; }
    .lecco-commerce .woocommerce table.shop_table.cart.woocommerce-cart-form__contents tr { display: table-row; float: none; }
    .lecco-commerce .woocommerce table.shop_table.cart.woocommerce-cart-form__contents td,
    .lecco-commerce .woocommerce table.shop_table.cart.woocommerce-cart-form__contents th { display: table-cell; float: none; width: auto; }
}
.lecco-commerce #main .woocommerce a.checkout-button { position: static; inset: auto; margin: 16px 0 0; }
.lecco-commerce #main .woocommerce .quantity .qty-change-button i { color: #292622 !important; }
.lecco-commerce #main .woocommerce .quantity .qty-change-button i::before { color: #292622 !important; }
.lecco-commerce #main .woocommerce .woofood_order_type { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.lecco-commerce #main .woocommerce .woofood_order_type .wf_field_wrapper { font: 500 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; min-height: 44px; width: auto; flex: 1 1 100px; }
@media (max-width: 768px) {
    .lecco-commerce .header-cart { display: none; }
    .lecco-commerce #main .woocommerce table.cart { display: block; width: 100%; }
    .lecco-commerce #main .woocommerce table.cart thead { display: none; }
    .lecco-commerce #main .woocommerce table.cart tbody,
    .lecco-commerce #main .woocommerce table.cart tr { display: block; float: none; width: 100%; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item { padding-top: 0; border-top: 0; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td { display: flex; float: none; flex-direction: row; width: 100%; max-width: none; min-width: 0; justify-content: space-between; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-remove { justify-content: flex-end; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-thumbnail { display: none; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-name { line-height: 1.5; }
    .lecco-commerce #main .woocommerce table.cart td.actions { display: block; float: none; width: 100%; }
    .lecco-commerce #main .woocommerce .woocommerce-info { padding: 16px 20px; border-left-width: 4px; font-size: 14px; }
}
.lecco-commerce #main .woocommerce .quantity .qty-change-button i { -webkit-text-fill-color: #292622; }
@media (max-width: 768px) {
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-name { display: block; text-align: left; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-name::before { display: none; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td::before { white-space: nowrap; }
}

/* Clear floated metadata and align each option with its value. */
.lecco-commerce #main .woocommerce table.cart .product-name dl.variation {
    display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 4px 12px; float: none; width: 100%; margin: 6px 0 0;
}
.lecco-commerce #main .woocommerce table.cart .product-name dl.variation dt,
.lecco-commerce #main .woocommerce table.cart .product-name dl.variation dd {
    float: none; width: auto; min-width: 0; margin: 0; padding: 0;
    font-size: inherit; overflow-wrap: anywhere; text-align: left;
}
.lecco-commerce #main .woocommerce table.cart .product-name dl.variation::before,
.lecco-commerce #main .woocommerce table.cart .product-name dl.variation::after { display: none; }
@media (max-width: 768px) {
    .lecco-commerce #main .woocommerce table.cart tr.cart_item {
        padding: 16px 0; border-bottom: 1px solid var(--lecco-line);
    }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-remove {
        position: absolute; top: 16px; right: 0; width: 36px; padding: 0; border: 0;
    }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-remove::before { display: none; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-name {
        padding: 0 44px 12px 0; border: 0;
    }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-price { display: none; }
    .lecco-commerce #main .woocommerce table.cart tr.cart_item td.product-subtotal { border-bottom: 0; }
    .lecco-commerce #main .woocommerce table.cart .quantity { float: none !important; flex-shrink: 0; }
}

.lecco-commerce #main .woocommerce table.cart .product-name dl.variation dd.lecco-item-data-heading {
    grid-column: 1 / -1;
    margin-top: 4px;
    text-align: left;
}

/* Totals must share table-row heights; legacy floats split the separator. */
.lecco-commerce #main .woocommerce .cart_totals table.shop_table {
    display: table; border-collapse: collapse;
}
.lecco-commerce #main .woocommerce .cart_totals table.shop_table tbody { display: table-row-group; }
.lecco-commerce #main .woocommerce .cart_totals table.shop_table tr { display: table-row; }
.lecco-commerce #main .woocommerce .cart_totals table.shop_table th,
.lecco-commerce #main .woocommerce .cart_totals table.shop_table td {
    display: table-cell; float: none; width: auto; line-height: 1.5; vertical-align: middle;
}
.lecco-commerce #main .woocommerce .cart_totals table.shop_table td::before { display: none; }

/* Checkout extras use paired rows, with category headings spanning both columns. */
.lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table .product-name dl.variation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(75px, .45fr);
    gap: 4px 12px;
    float: none;
    width: 100%;
    margin: 8px 0 0;
    padding: 0;
    text-align: left;
}
.lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table .product-name dl.variation dt,
.lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table .product-name dl.variation dd {
    float: none;
    clear: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-align: left;
}
.lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table .product-name dl.variation dd.lecco-item-data-heading {
    grid-column: 1 / -1;
    margin-top: 8px;
}
.lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table .product-name dl.variation::before,
.lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table .product-name dl.variation::after { display: none; }
.lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table .product-name dl.variation p { margin: 0; }
@media (max-width: 768px) {
    /* Give long option names the full panel width; place each item total below. */
    .lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name {
        display: block; float: none; width: 100%; min-width: 0; border-bottom: 0;
        padding-bottom: 8px;
    }
    .lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total {
        display: block; float: none; width: 100%; padding-top: 0; text-align: right;
    }
    .lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table tbody tr.cart_item {
        display: block;
    }
    .lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table tbody {
        display: block;
    }
    .lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table { display: block; }
    .lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table thead { display: none; }
    .lecco-commerce #main .woocommerce .woocommerce-checkout-review-order-table tfoot {
        display: table; width: 100%; border-collapse: collapse;
    }
}
