/* ============================================================
   AFRICA ANGEL — CART PAGE STYLES
   Migrated from WP Customizer > Additional CSS into the child theme.
   Loaded ONLY on the cart page via is_cart() (xstore-child/functions.php).
   ============================================================ */

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info {
    background: #f2f8f2 !important;
    border: 1px solid #cfe6d0 !important;
    border-left: 4px solid #2f7d32 !important;
    border-radius: 10px !important;
    color: #33513a !important;
    box-shadow: none !important;
}
body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-info::before {
    color: #2f7d32 !important;
}

/* "Return to shop" + bulk pricing note */
body.woocommerce-cart .return-to-shop .button {
    background: #2f7d32 !important;
    color: #fff !important;
    border-radius: 8px !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .03em;
    padding: 12px 22px !important;
}
body.woocommerce-cart .return-to-shop .button:hover { background: #1e5631 !important; }

/* =========================================================
   CART ITEMS TABLE -> clean card
   ========================================================= */
body.woocommerce-cart .woocommerce-cart-form {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 10px 24px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
}
body.woocommerce-cart table.cart {
    border: 0 !important;
    margin: 0 !important;
}
body.woocommerce-cart table.cart thead th {
    border: 0 !important;
    border-bottom: 2px solid #eee !important;
    padding: 16px 12px !important;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7a7a7a;
    font-weight: 700;
    text-align: left;
}
body.woocommerce-cart table.cart tbody td {
    border: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 20px 12px !important;
    vertical-align: middle;
}
body.woocommerce-cart table.cart tbody tr:last-child td {
    border-bottom: 0 !important;
}

/* product thumbnail */
body.woocommerce-cart table.cart .product-thumbnail img {
    width: 72px !important;
    height: 72px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 6px;
    background: #fff;
}

/* product name + meta */
body.woocommerce-cart table.cart .product-name a,
body.woocommerce-cart .product-name > a {
    color: #1f2d24;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 4px;
}
body.woocommerce-cart table.cart .product-name a:hover,
body.woocommerce-cart .product-name > a:hover { color: #2f7d32; }

/* ---- product meta (Size / Bulk Pricing) — clean aligned rows ---- */
body.woocommerce-cart .product-name .variation,
body.woocommerce-cart .product-name-info .variation {
    margin: 6px 0 0 !important;
    padding: 0 !important;
    font-size: 13px;
    line-height: 1.55;
    overflow: hidden;
    display: block;
}
body.woocommerce-cart .product-name .variation dt,
body.woocommerce-cart .product-name-info .variation dt {
    float: none !important;
    clear: none !important;
    display: inline !important;
    width: auto !important;
    margin: 0 5px 0 0 !important;
    padding: 0 !important;
    font-weight: 600 !important;
    color: #6b7169 !important;
}
body.woocommerce-cart .product-name .variation dd,
body.woocommerce-cart .product-name-info .variation dd {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #1f2d24 !important;
}
body.woocommerce-cart .product-name .variation dd p,
body.woocommerce-cart .product-name-info .variation dd p {
    display: inline !important;
    margin: 0 !important;
}
/* force each label:value pair onto its own line */
body.woocommerce-cart .product-name .variation dd::after,
body.woocommerce-cart .product-name-info .variation dd::after {
    content: "";
    display: block;
}

/* remove (×) button */
body.woocommerce-cart table.cart .product-remove a.remove {
    color: #c0392b !important;
    font-size: 22px;
    width: 28px; height: 28px; line-height: 26px;
    border-radius: 50%;
    transition: background .2s ease;
}
body.woocommerce-cart table.cart .product-remove a.remove:hover {
    background: #fdecea !important;
    color: #c0392b !important;
}

/* price: struck regular + special-offer chip */
body.woocommerce-cart table.cart .product-price del { color: #b5b5b5; }
body.woocommerce-cart table.cart .product-subtotal { font-weight: 700; color: #1f2d24; }

/* quantity stepper */
body.woocommerce-cart .quantity {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
body.woocommerce-cart .quantity .minus,
body.woocommerce-cart .quantity .plus {
    background: #f7f7f5 !important;
    border: 0 !important;
    width: 34px;
    color: #444 !important;
    cursor: pointer;
    font-size: 16px;
}
body.woocommerce-cart .quantity .minus:hover,
body.woocommerce-cart .quantity .plus:hover { background: #eef4ee !important; color: #2f7d32 !important; }
body.woocommerce-cart .quantity input.qty {
    border: 0 !important;
    border-left: 1px solid #eee !important;
    border-right: 1px solid #eee !important;
    width: 44px;
    text-align: center;
    background: #fff;
}

/* =========================================================
   COUPON + UPDATE CART ROW
   ========================================================= */
body.woocommerce-cart .cart .actions .coupon input#coupon_code {
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    min-height: 46px;
}
body.woocommerce-cart .cart .actions .coupon .button {
    background: #2f7d32 !important;
    color: #fff !important;
    border-radius: 8px !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .03em;
    min-height: 46px;
    padding: 0 22px !important;
}
body.woocommerce-cart .cart .actions .coupon .button:hover { background: #1e5631 !important; }

/* Update cart button -> hidden (quantity now auto-updates via AJAX) */
body.woocommerce-cart .cart .actions > .button[name="update_cart"],
body.woocommerce-cart .cart .actions button[name="update_cart"],
body.woocommerce-cart button[name="update_cart"],
body.woocommerce-cart input[name="update_cart"] {
    display: none !important;
}

/* =========================================================
   CART TOTALS -> matching card
   ========================================================= */
body.woocommerce-cart .cart-collaterals .cart_totals {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 28px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
}
body.woocommerce-cart .cart_totals h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2d24;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid #2f7d32;
}
body.woocommerce-cart .cart_totals table {
    border: 0 !important;
    margin: 0 !important;
}
body.woocommerce-cart .cart_totals table th,
body.woocommerce-cart .cart_totals table td {
    border: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 14px 0 !important;
}
body.woocommerce-cart .cart_totals table th { color: #444; font-weight: 600; }
body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
    border-bottom: 0 !important;
    padding-top: 18px !important;
}
body.woocommerce-cart .cart_totals .order-total .amount {
    color: #2f7d32 !important;
    font-size: 26px;
    font-weight: 700;
}
/* coupon remove / change address links */
body.woocommerce-cart .cart_totals a { color: #2f7d32; }

/* =========================================================
   CHECKOUT + PAYMENT BUTTONS -> unified, brand-led hierarchy
   ========================================================= */
/* Primary: Proceed to checkout -> brand green (was black) */
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    background: #2f7d32 !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 16px !important;
    font-size: 15px !important;
    box-shadow: 0 8px 20px rgba(47,125,50,.28);
    margin-bottom: 14px;
}
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background: #1e5631 !important;
}
/* express buttons (Link / PayPal) -> keep brand shapes, rounded */
body.woocommerce-cart .wc-proceed-to-checkout .paypal-buttons,
body.woocommerce-cart .wc-proceed-to-checkout #wc-stripe-payment-request-button,
body.woocommerce-cart .cart_totals .woocommerce-Price-amount {
    border-radius: 10px !important;
    overflow: hidden;
}
/* Continue shopping -> quiet text link style */
body.woocommerce-cart .wc-proceed-to-checkout a.button:not(.checkout-button) {
    background: #fff !important;
    color: #666 !important;
    border: 1px solid #e4e4e4 !important;
    border-radius: 10px !important;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .03em;
}
body.woocommerce-cart .wc-proceed-to-checkout a.button:not(.checkout-button):hover {
    border-color: #2f7d32 !important;
    color: #2f7d32 !important;
}

/* =========================================================
   BEST SELLERS (cross-sells) -> product-card grid like related
   ========================================================= */
body.woocommerce-cart .cross-sells > h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1f2d24;
    margin: 40px 0 24px;
}
body.woocommerce-cart .cross-sells ul.products li.product {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
    transition: transform .25s ease, box-shadow .25s ease;
}
body.woocommerce-cart .cross-sells ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(0,0,0,.10);
    border-color: #cfe6d0;
}
body.woocommerce-cart .cross-sells ul.products li.product img {
    max-height: 150px; width: auto; margin: 0 auto 12px; object-fit: contain;
}
body.woocommerce-cart .cross-sells ul.products li.product .price {
    color: #2f7d32 !important; font-weight: 700;
}
body.woocommerce-cart .cross-sells ul.products li.product .button {
    background: #2f7d32 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    text-transform: uppercase;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .03em;
    padding: 10px 16px !important;
}
body.woocommerce-cart .cross-sells ul.products li.product .button:hover { background: #1e5631 !important; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    body.woocommerce-cart .woocommerce-cart-form { padding: 6px 12px 16px; }
    body.woocommerce-cart .cart-collaterals .cart_totals { padding: 22px 20px; }
    body.woocommerce-cart table.cart .product-thumbnail img { width: 56px !important; height: 56px; }
}
.elementor-26102 .elementor-element.elementor-element-c2e4f6d:not(.elementor-motion-effects-element-type-background) > .elementor-widget-wrap, .elementor-26102 .elementor-element.elementor-element-c2e4f6d > .elementor-widget-wrap > .elementor-motion-effects-container > .elementor-motion-effects-layer {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 10px 24px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
}
body.woocommerce-cart .wc-proceed-to-checkout a.button:not(.checkout-button) {
    margin: 10px 0px 10px 0px;
}

body.woocommerce-cart .elementor-jet-cart-table .product-thumbnail img,
body.woocommerce-cart table.cart .product-thumbnail img,
body.woocommerce-cart .cart_item .product-thumbnail img {
    display: block !important;
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    min-width: 72px !important;
    object-fit: contain !important;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 6px;
    background: #fff;
    visibility: visible !important;
    opacity: 1 !important;
}

/* make sure the thumbnail cell doesn't shrink to zero */
body.woocommerce-cart .elementor-jet-cart-table .product-thumbnail,
body.woocommerce-cart table.cart td.product-thumbnail {
    width: 90px !important;
    min-width: 90px !important;
    text-align: center;
}

/* lazyload sometimes keeps image hidden — force it visible in cart */
body.woocommerce-cart .product-thumbnail img.lazyload,
body.woocommerce-cart .product-thumbnail img.lazyloading {
    opacity: 1 !important;
    width: 72px !important;
    aspect-ratio: 1 / 1 !important;
}

@media (max-width: 768px) {
    body.woocommerce-cart .elementor-jet-cart-table .product-thumbnail img,
    body.woocommerce-cart table.cart .product-thumbnail img,
    body.woocommerce-cart .cart_item .product-thumbnail img {
        width: 60px !important;
        height: 60px !important;
        max-width: 60px !important;
        min-width: 60px !important;
    }
    body.woocommerce-cart .elementor-jet-cart-table .product-thumbnail,
    body.woocommerce-cart table.cart td.product-thumbnail {
        width: 74px !important;
        min-width: 74px !important;
    }
}

/* =========================================================
   CART — MOBILE SPACE FIX (≤768px)
   Tighten padding, let rows breathe, stop content cutoff
   ========================================================= */
@media (max-width: 768px) {

    /* kill the big outer card padding that eats width */
    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .elementor-26102 .elementor-element-c2e4f6d:not(.elementor-motion-effects-element-type-background) > .elementor-widget-wrap {
        padding: 12px !important;
        border-radius: 12px;
    }

    /* table + cells: minimal side padding on mobile */
    body.woocommerce-cart table.cart tbody td,
    body.woocommerce-cart .elementor-jet-cart-table td {
        padding: 10px 6px !important;
    }
    body.woocommerce-cart table.cart thead th,
    body.woocommerce-cart .elementor-jet-cart-table th {
        padding: 10px 6px !important;
        font-size: 10px !important;
    }

    /* product name / meta: smaller, no wasted wrap */
    body.woocommerce-cart .product-name,
    body.woocommerce-cart .product-name a {
        font-size: 13px !important;
        line-height: 1.35 !important;
    }
    body.woocommerce-cart .product-name .variation,
    body.woocommerce-cart .product-name dl {
        font-size: 12px !important;
        margin: 4px 0 !important;
    }

    /* price / special-offer chip: stop the right-edge cutoff */
    body.woocommerce-cart .product-price {
        font-size: 12px !important;
    }
    body.woocommerce-cart .product-price del { font-size: 11px !important; }
    body.woocommerce-cart .wcx-tiers-wrap,
    body.woocommerce-cart .special-offer,
    body.woocommerce-cart .product-price .button {
        font-size: 10px !important;
        padding: 4px 6px !important;
        white-space: normal !important;
        word-break: break-word;
    }

    /* quantity stepper: shrink so it fits */
    body.woocommerce-cart .quantity .minus,
    body.woocommerce-cart .quantity .plus { width: 26px !important; font-size: 14px !important; }
    body.woocommerce-cart .quantity input.qty { width: 34px !important; }

    /* remove (×): smaller footprint */
    body.woocommerce-cart .product-remove a.remove {
        font-size: 18px !important;
        width: 24px !important; height: 24px !important; line-height: 22px !important;
    }

    /* coupon row: stack input + button full width */
    body.woocommerce-cart .cart .actions .coupon {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    body.woocommerce-cart .cart .actions .coupon input#coupon_code,
    body.woocommerce-cart .cart .actions .coupon .button {
        width: 100% !important;
        margin: 0 !important;
    }

    /* totals card: trim padding */
    body.woocommerce-cart .cart-collaterals .cart_totals { padding: 18px 16px !important; }

    /* cross-sells: single column, no crush */
    body.woocommerce-cart .cross-sells ul.products {
        grid-template-columns: 1fr !important;
        display: grid !important;
        gap: 16px;
    }
    body.woocommerce-cart .cross-sells ul.products li.product {
        width: auto !important;
        float: none !important;
        margin: 0 !important;
    }
}

/* very small phones */
@media (max-width: 480px) {
    body.woocommerce-cart table.cart tbody td,
    body.woocommerce-cart .elementor-jet-cart-table td {
        padding: 8px 4px !important;
    }
    body.woocommerce-cart .product-thumbnail img,
    body.woocommerce-cart .elementor-jet-cart-table .product-thumbnail img {
        width: 48px !important; height: 48px !important;
        max-width: 48px !important; min-width: 48px !important;
    }
    body.woocommerce-cart .elementor-jet-cart-table .product-thumbnail,
    body.woocommerce-cart table.cart td.product-thumbnail {
        width: 58px !important; min-width: 58px !important;
    }
}
