/**
 * Luzi Storefront — Cart page (Elementor Pro cart widget, page #11)
 * Hooks: .luzi-cart-page, .luzi-cart-head, .luzi-cart-wrap, .luzi-cart (widget).
 * Desktop: items card + sticky totals card. Mobile (<=767px): each row becomes a product card.
 */
body.woocommerce-cart .luzi-cart-wrap { background: transparent !important; padding: 0 !important; }
body.woocommerce-cart .luzi-cart-wrap > .e-con-inner { padding: 0 !important; max-width: 100% !important; }
body.woocommerce-cart .luzi-cart-head { padding: 8px 0 20px !important; background: transparent !important; min-height: 0 !important; }
body.woocommerce-cart .luzi-cart-head .elementor-divider { display: none !important; }
body.woocommerce-cart .luzi-cart-head .elementor-heading-title {
    margin: 0; text-align: right !important; font: 800 clamp(24px, 3vw, 32px)/1.5 var(--lz-font) !important; color: var(--lz-ink) !important;
}

/* Notices (global look is in components.css; cart page hides the redundant "view cart" button) */
body.woocommerce-cart .luzi-cart .woocommerce-message .wc-forward { display: none; }

/* ---------- Layout ---------- */
body.woocommerce-cart .luzi-cart .e-cart__container {
    display: grid !important; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; direction: rtl;
}
body.woocommerce-cart .luzi-cart .e-cart__column { width: auto !important; min-width: 0; padding: 0 !important; margin: 0 !important; }
body.woocommerce-cart .luzi-cart .e-cart__column-inner.e-sticky-right-column { top: 92px; }
body.woocommerce-cart .luzi-cart .e-cart-section {
    background: #fff !important; border: 1px solid var(--lz-line) !important; border-radius: var(--lz-r-xl) !important;
    box-shadow: var(--lz-sh-2); padding: 20px 24px !important; margin: 0 0 16px !important;
}

/* ---------- Items table ---------- */
body.woocommerce-cart .luzi-cart table.shop_table { width: 100%; margin: 0; border: 0 !important; border-collapse: collapse; background: transparent; }
body.woocommerce-cart .luzi-cart table.shop_table thead th {
    padding: 4px 8px 14px; border: 0 !important; background: transparent !important;
    font: 600 13px/1.6 var(--lz-font); color: var(--lz-mute); text-align: right;
}
body.woocommerce-cart .luzi-cart table.shop_table tbody td { padding: 16px 8px; border: 0 !important; border-top: 1px solid var(--lz-line-soft) !important; vertical-align: middle; text-align: right; background: transparent !important; }
body.woocommerce-cart .luzi-cart td.product-thumbnail { width: 96px; }
body.woocommerce-cart .luzi-cart td.product-thumbnail img { display: block; width: 84px; height: 84px; object-fit: cover; border-radius: var(--lz-r-md); background: var(--lz-surface-2); border: 1px solid var(--lz-line); }
body.woocommerce-cart .luzi-cart td.product-name a { font: 700 15.5px/1.8 var(--lz-font); color: var(--lz-ink) !important; text-decoration: none; }
body.woocommerce-cart .luzi-cart td.product-name a:hover { color: var(--lz-pink) !important; }
body.woocommerce-cart .luzi-cart td.product-price,
body.woocommerce-cart .luzi-cart td.product-subtotal { font: 600 14.5px var(--lz-font); color: var(--lz-ink-2); white-space: nowrap; }
body.woocommerce-cart .luzi-cart td.product-subtotal { font-weight: 800; color: var(--lz-ink); }
body.woocommerce-cart .luzi-cart .woocommerce-Price-currencySymbol { font-size: .8em; font-weight: 500; color: var(--lz-mute); margin-inline-start: 3px; }

/* Remove button */
body.woocommerce-cart .luzi-cart td.product-remove { width: 48px; }
body.woocommerce-cart .luzi-cart a.remove {
    display: inline-flex !important; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
    background: rgba(225, 29, 72, .08); color: var(--lz-danger) !important; transition: background var(--lz-dur) var(--lz-ease), color var(--lz-dur) var(--lz-ease), transform var(--lz-dur) var(--lz-ease);
}
body.woocommerce-cart .luzi-cart a.remove:hover { background: var(--lz-danger); color: #fff !important; transform: scale(1.06); }
body.woocommerce-cart .luzi-cart a.remove svg { width: 16px; height: 16px; }

/* Quantity stepper */
body.woocommerce-cart .luzi-cart .quantity {
    display: inline-flex; align-items: center; height: 44px; padding: 0 4px; background: var(--lz-surface-2); border: 1px solid var(--lz-line); border-radius: var(--lz-r-md);
}
body.woocommerce-cart .luzi-cart .quantity input.qty {
    width: 40px; height: 100%; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important;
    text-align: center; font: 700 15px var(--lz-font); color: var(--lz-ink); -moz-appearance: textfield; appearance: textfield;
}
body.woocommerce-cart .luzi-cart .quantity input.qty::-webkit-outer-spin-button,
body.woocommerce-cart .luzi-cart .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
html body.woocommerce-cart .luzi-cart .quantity .luzi-qty-btn.luzi-qty-btn {
    width: 32px !important; height: 32px !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important;
    background: #fff !important; color: var(--lz-ink) !important; border: 0 !important; border-radius: 10px !important;
    box-shadow: var(--lz-sh-1) !important; line-height: 1 !important;
}
html body.woocommerce-cart .luzi-cart .quantity .luzi-qty-btn.luzi-qty-btn:hover { background: var(--lz-pink) !important; color: #fff !important; }

/* ---------- Coupon ---------- */
body.woocommerce-cart .luzi-cart .coupon .coupon-col { display: flex; gap: 10px; margin: 0; align-items: stretch; }
body.woocommerce-cart .luzi-cart .coupon .coupon-col-start { flex: 1 1 auto; min-width: 0; padding: 0; width: auto; }
body.woocommerce-cart .luzi-cart .coupon .coupon-col-end { flex: 0 0 auto; padding: 0; width: auto; }
body.woocommerce-cart .luzi-cart .coupon input.input-text { width: 100%; height: 48px; padding: 0 16px; background: var(--lz-surface-2) !important; border: 1px solid var(--lz-line) !important; border-radius: var(--lz-r-md) !important; font: 500 14.5px var(--lz-font); }
body.woocommerce-cart .luzi-cart .coupon input.input-text:focus { outline: 0; background: #fff !important; border-color: var(--lz-pink) !important; box-shadow: 0 0 0 4px var(--lz-pink-a08); }
body.woocommerce-cart .luzi-cart .coupon .button {
    height: 48px; padding: 0 22px; border: 1px solid var(--lz-pink-a30) !important; border-radius: var(--lz-r-md) !important;
    background: #fff !important; color: var(--lz-pink) !important; font: 700 14px var(--lz-font); cursor: pointer;
}
body.woocommerce-cart .luzi-cart .coupon .button:hover { background: var(--lz-pink-a08) !important; }
body.woocommerce-cart .luzi-cart button[name="update_cart"] { display: none; } /* cart updates automatically */

/* ---------- Totals ---------- */
body.woocommerce-cart .luzi-cart .cart_totals h2 {
    position: relative; margin: 0 0 12px; padding-inline-start: 16px; font: 800 19px/1.6 var(--lz-font); color: var(--lz-ink); text-align: right;
}
body.woocommerce-cart .luzi-cart .cart_totals h2::before { content: ''; position: absolute; inset-inline-start: 0; top: 50%; width: 5px; height: 20px; margin-top: -10px; border-radius: 5px; background: var(--lz-grad); }
body.woocommerce-cart .luzi-cart .cart_totals table { width: 100%; margin: 0 0 18px; border: 0 !important; }
body.woocommerce-cart .luzi-cart .cart_totals table th,
body.woocommerce-cart .luzi-cart .cart_totals table td { padding: 14px 0 !important; border: 0 !important; border-top: 1px solid var(--lz-line-soft) !important; background: transparent !important; text-align: right; vertical-align: top; font: 500 14.5px/1.9 var(--lz-font); color: var(--lz-mute); }
body.woocommerce-cart .luzi-cart .cart_totals table td { text-align: left; color: var(--lz-ink); font-weight: 700; }
body.woocommerce-cart .luzi-cart .cart_totals tr:first-child th,
body.woocommerce-cart .luzi-cart .cart_totals tr:first-child td { border-top: 0 !important; }
body.woocommerce-cart .luzi-cart .cart_totals .order-total th { color: var(--lz-ink); font-weight: 800; font-size: 16px; }
body.woocommerce-cart .luzi-cart .cart_totals .order-total td .woocommerce-Price-amount { font: 800 22px var(--lz-font); color: var(--lz-pink); }
body.woocommerce-cart .luzi-cart .cart_totals .shipping td { text-align: right; font-weight: 500; }
body.woocommerce-cart .luzi-cart .shipping-calculator-button {
    display: inline-flex; align-items: center; margin-top: 8px; padding: 8px 16px; border-radius: var(--lz-r-pill);
    background: var(--lz-pink-a08); color: var(--lz-pink) !important; font: 700 13.5px var(--lz-font); text-decoration: none;
}
body.woocommerce-cart .luzi-cart .shipping-calculator-form { margin-top: 12px; }
body.woocommerce-cart .luzi-cart .shipping-calculator-form .form-row { margin: 0 0 10px; padding: 0; }
body.woocommerce-cart .luzi-cart .shipping-calculator-form label { display: block; margin-bottom: 4px; font: 600 13px var(--lz-font); color: var(--lz-ink-2); }
body.woocommerce-cart .luzi-cart .shipping-calculator-form input.input-text,
body.woocommerce-cart .luzi-cart .shipping-calculator-form select { width: 100%; height: 46px; padding: 0 14px; background: var(--lz-surface-2) !important; border: 1px solid var(--lz-line) !important; border-radius: var(--lz-r-md) !important; font: 500 14px var(--lz-font); }
body.woocommerce-cart .luzi-cart .shipping-calculator-form button { height: 46px; padding: 0 22px; border: 0 !important; border-radius: var(--lz-r-md) !important; background: var(--lz-ink) !important; color: #fff !important; font: 700 14px var(--lz-font); cursor: pointer; }
body.woocommerce-cart .luzi-cart .wc-proceed-to-checkout { padding: 0 !important; margin: 0 !important; }
body.woocommerce-cart .luzi-cart .wc-proceed-to-checkout .checkout-button {
    display: flex !important; align-items: center; justify-content: center; width: 100%; min-height: 58px; padding: 0 24px !important; margin: 0 !important;
    border: 0 !important; border-radius: var(--lz-r-md) !important; background: var(--lz-grad) !important; color: #fff !important;
    font: 800 17px/1 var(--lz-font) !important; box-shadow: 0 16px 30px -12px rgba(204, 0, 129, .65);
    transition: transform var(--lz-dur) var(--lz-ease), box-shadow var(--lz-dur) var(--lz-ease);
}
body.woocommerce-cart .luzi-cart .wc-proceed-to-checkout .checkout-button:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -12px rgba(204, 0, 129, .75); }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
    body.woocommerce-cart .luzi-cart .e-cart__container { grid-template-columns: 1fr; }
    body.woocommerce-cart .luzi-cart .e-cart__column-inner.e-sticky-right-column { position: static !important; }
    body.woocommerce-cart { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---------- Mobile: rows become product cards ---------- */
@media (max-width: 767px) {
    body.woocommerce-cart .luzi-cart .e-cart-section { padding: 14px !important; border-radius: var(--lz-r-lg) !important; }
    body.woocommerce-cart .luzi-cart .e-shop-table.e-cart-section { padding: 0 !important; border: 0 !important; box-shadow: none; background: transparent !important; }
    body.woocommerce-cart .luzi-cart table.shop_table_responsive,
    body.woocommerce-cart .luzi-cart table.shop_table_responsive tbody { display: block; }
    body.woocommerce-cart .luzi-cart table.shop_table_responsive thead { display: none; }
    body.woocommerce-cart .luzi-cart table.shop_table_responsive tr.cart_item {
        position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto;
        grid-template-areas: "thumb name remove" "thumb price price" "thumb qty sub";
        gap: 6px 12px; align-items: center; margin: 0 0 12px; padding: 14px;
        background: #fff; border: 1px solid var(--lz-line); border-radius: var(--lz-r-lg); box-shadow: var(--lz-sh-1);
    }
    body.woocommerce-cart .luzi-cart table.shop_table_responsive tr.cart_item td { display: block; padding: 0 !important; border: 0 !important; text-align: start !important; width: auto !important; }
    body.woocommerce-cart .luzi-cart table.shop_table_responsive tr.cart_item td::before { content: none !important; }
    body.woocommerce-cart .luzi-cart tr.cart_item td.product-thumbnail { grid-area: thumb; width: 84px !important; }
    body.woocommerce-cart .luzi-cart tr.cart_item td.product-thumbnail img { width: 84px; height: 84px; }
    body.woocommerce-cart .luzi-cart tr.cart_item td.product-name { grid-area: name; align-self: start; }
    body.woocommerce-cart .luzi-cart tr.cart_item td.product-name a { font-size: 14.5px; line-height: 1.8; }
    body.woocommerce-cart .luzi-cart tr.cart_item td.product-remove { grid-area: remove; align-self: start; justify-self: end; }
    body.woocommerce-cart .luzi-cart tr.cart_item td.product-price { grid-area: price; font-size: 13px; color: var(--lz-mute); }
    body.woocommerce-cart .luzi-cart tr.cart_item td.product-quantity { grid-area: qty; }
    body.woocommerce-cart .luzi-cart tr.cart_item td.product-subtotal { grid-area: sub; justify-self: end; font-size: 15px; }
    body.woocommerce-cart .luzi-cart a.remove { width: 32px; height: 32px; }
    body.woocommerce-cart .luzi-cart .quantity { height: 40px; }
    html body.woocommerce-cart .luzi-cart .quantity .luzi-qty-btn.luzi-qty-btn { width: 28px !important; height: 28px !important; font-size: 18px !important; }
    body.woocommerce-cart .luzi-cart .coupon .coupon-col { flex-direction: column; }
    body.woocommerce-cart .luzi-cart .coupon .button { width: 100%; }
    body.woocommerce-cart .luzi-cart .cart_totals table th, body.woocommerce-cart .luzi-cart .cart_totals table td { display: table-cell; }
    body.woocommerce-cart .luzi-cart .wc-proceed-to-checkout .checkout-button { min-height: 54px; font-size: 16px !important; }
}

/* Our empty state already has shop/home buttons: hide the widget's blue "return to shop" button */
body.woocommerce-cart .return-to-shop,
body.woocommerce-cart .luzi-cart .wc-backward { display: none !important; }
body.woocommerce-cart [name="update_cart"] { display: none !important; }
