/*
 * Norela Beauty — Luxury classic WooCommerce cart
 * For the [woocommerce_cart] shortcode
 * Scope: cart page only
 */

body.woocommerce-cart {
    --nc-wine: #6f1834;
    --nc-wine-dark: #4c0e22;
    --nc-rose: #b86d83;
    --nc-blush: #fbf3f5;
    --nc-cream: #fffaf7;
    --nc-ink: #34292d;
    --nc-muted: #7f7075;
    --nc-line: rgba(111, 24, 52, 0.12);
    --nc-shadow: 0 20px 60px rgba(76, 20, 40, 0.09);
    --nc-shadow-soft: 0 10px 32px rgba(76, 20, 40, 0.06);
    background: var(--nc-cream) !important;
}

body.woocommerce-cart .site-content,
body.woocommerce-cart .elementor-location-single,
body.woocommerce-cart .elementor {
    background:
        radial-gradient(circle at 90% 8%, rgba(232, 197, 207, 0.28), transparent 23rem),
        linear-gradient(180deg, #fffaf7 0, #fff 48rem) !important;
}

body.woocommerce-cart .elementor-widget-shortcode,
body.woocommerce-cart .elementor-widget-shortcode .elementor-widget-container,
body.woocommerce-cart .elementor-widget-shortcode .elementor-shortcode {
    width: 100% !important;
    max-width: 100% !important;
}

body.woocommerce-cart .elementor-widget-shortcode {
    padding: 0 !important;
}

body.woocommerce-cart .woocommerce {
    width: min(1200px, calc(100% - 40px));
    max-width: 1200px;
    min-height: 520px;
    margin: 0 auto !important;
    padding: 50px 0 90px;
    color: var(--nc-ink) !important;
}

body.woocommerce-cart .woocommerce::after {
    content: "";
    display: table;
    clear: both;
}

/* Notices */
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
    margin: 0 0 22px !important;
    padding: 15px 19px !important;
    color: #523d45 !important;
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid var(--nc-line) !important;
    border-right: 4px solid var(--nc-wine) !important;
    border-radius: 13px !important;
    box-shadow: var(--nc-shadow-soft);
    font-size: 13px;
    line-height: 1.9;
}

/* Main two-column layout */
body.woocommerce-cart .woocommerce-cart-form {
    float: right !important;
    width: calc(68% - 12px) !important;
    margin: 0 !important;
}

body.woocommerce-cart .woocommerce-cart-form::before {
    content: "سبد خرید شما";
    display: block;
    margin: 0 0 7px;
    color: var(--nc-ink);
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 850;
    line-height: 1.6;
}

body.woocommerce-cart .woocommerce-cart-form::after {
    content: "ارسال رایگان برای سفارش‌های بالای ۳ میلیون تومان";
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0 0 18px;
    padding: 10px 16px;
    color: #6b4855;
    background: linear-gradient(90deg, #fff, #fbf1f4);
    border: 1px solid rgba(111, 24, 52, 0.09);
    border-right: 3px solid var(--nc-rose);
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 650;
}

body.woocommerce-cart .cart-collaterals {
    float: left !important;
    width: calc(32% - 12px) !important;
    margin: 74px 0 0 !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
    position: sticky;
    top: 24px;
    float: none !important;
    width: 100% !important;
    padding: 26px !important;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--nc-line);
    border-radius: 22px;
    box-shadow: var(--nc-shadow);
}

body.woocommerce-cart .cart-collaterals .cart_totals::before {
    content: "";
    position: absolute;
    top: 0;
    right: 26px;
    left: 26px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4a2b0, var(--nc-wine), #d4a2b0, transparent);
    border-radius: 0 0 10px 10px;
}

body.woocommerce-cart .cart_totals h2 {
    margin: 3px 0 19px !important;
    color: var(--nc-ink) !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.7;
}

/* Cart product table */
body.woocommerce-cart table.shop_table.cart {
    width: 100% !important;
    margin: 0 !important;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--nc-line) !important;
    border-radius: 22px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    box-shadow: var(--nc-shadow);
}

body.woocommerce-cart table.shop_table.cart thead {
    background: #fcf5f7;
}

body.woocommerce-cart table.shop_table.cart thead th {
    padding: 14px 11px !important;
    color: #7d626c !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--nc-line) !important;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
    background: #fff;
}

body.woocommerce-cart table.shop_table.cart td {
    padding: 18px 10px !important;
    color: var(--nc-ink) !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(111, 24, 52, 0.07) !important;
    vertical-align: middle !important;
    font-size: 13px;
    text-align: center;
}

body.woocommerce-cart table.shop_table.cart td.product-thumbnail {
    width: 105px;
}

body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
    width: 82px !important;
    height: 82px !important;
    max-width: none !important;
    object-fit: cover;
    background: #fbf1ed;
    border: 1px solid rgba(111, 24, 52, 0.07);
    border-radius: 13px;
}

body.woocommerce-cart table.shop_table.cart td.product-name {
    min-width: 185px;
    text-align: right;
}

body.woocommerce-cart table.shop_table.cart td.product-name a {
    color: var(--nc-ink) !important;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.9;
    text-decoration: none;
}

body.woocommerce-cart table.shop_table.cart td.product-name a:hover {
    color: var(--nc-wine) !important;
}

body.woocommerce-cart table.shop_table.cart .variation {
    margin: 7px 0 0;
    color: var(--nc-muted) !important;
    font-size: 11px;
}

body.woocommerce-cart table.shop_table.cart td.product-price,
body.woocommerce-cart table.shop_table.cart td.product-subtotal,
body.woocommerce-cart table.shop_table.cart td.product-price *,
body.woocommerce-cart table.shop_table.cart td.product-subtotal * {
    color: var(--nc-wine) !important;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
}

body.woocommerce-cart table.shop_table.cart td.product-remove {
    width: 45px;
}

body.woocommerce-cart table.shop_table.cart td.product-remove a.remove {
    display: grid !important;
    place-items: center;
    width: 31px !important;
    height: 31px !important;
    margin: 0 auto;
    color: #9a6878 !important;
    background: #fbf2f5 !important;
    border: 1px solid rgba(111, 24, 52, 0.1);
    border-radius: 50% !important;
    font-size: 18px !important;
    line-height: 1 !important;
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

body.woocommerce-cart table.shop_table.cart td.product-remove a.remove:hover {
    color: #fff !important;
    background: var(--nc-wine) !important;
    transform: rotate(8deg);
}

body.woocommerce-cart table.shop_table.cart .quantity .qty {
    width: 62px !important;
    height: 42px !important;
    padding: 0 7px;
    color: var(--nc-ink) !important;
    background: #fff;
    border: 1px solid rgba(111, 24, 52, 0.18) !important;
    border-radius: 10px !important;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* Coupon and update row */
body.woocommerce-cart table.shop_table.cart td.actions {
    padding: 16px !important;
    background: #fdf9fa !important;
    border-bottom: 0 !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon {
    float: right !important;
    display: flex;
    gap: 8px;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon label {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon .input-text {
    width: 170px !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 8px 13px !important;
    color: var(--nc-ink) !important;
    background: #fff;
    border: 1px solid rgba(111, 24, 52, 0.16) !important;
    border-radius: 10px !important;
    font-size: 12px;
}

body.woocommerce-cart table.shop_table.cart td.actions button,
body.woocommerce-cart table.shop_table.cart td.actions .button {
    min-height: 44px;
    padding: 9px 16px !important;
    color: var(--nc-wine) !important;
    background: #fff !important;
    border: 1px solid rgba(111, 24, 52, 0.28) !important;
    border-radius: 10px !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
}

body.woocommerce-cart table.shop_table.cart td.actions > button[name="update_cart"] {
    float: left !important;
}

body.woocommerce-cart table.shop_table.cart td.actions button:hover,
body.woocommerce-cart table.shop_table.cart td.actions .button:hover {
    color: #fff !important;
    background: var(--nc-wine) !important;
}

/* Totals table */
body.woocommerce-cart .cart_totals table.shop_table {
    margin: 0 0 18px !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
}

body.woocommerce-cart .cart_totals table.shop_table tr th,
body.woocommerce-cart .cart_totals table.shop_table tr td {
    padding: 13px 0 !important;
    color: #55464c !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(111, 24, 52, 0.08) !important;
    font-size: 12.5px;
    line-height: 1.8;
}

body.woocommerce-cart .cart_totals table.shop_table tr th {
    font-weight: 650;
    text-align: right;
}

body.woocommerce-cart .cart_totals table.shop_table tr td {
    color: var(--nc-wine) !important;
    font-weight: 800;
    text-align: left;
}

body.woocommerce-cart .cart_totals table.shop_table .order-total th,
body.woocommerce-cart .cart_totals table.shop_table .order-total td,
body.woocommerce-cart .cart_totals table.shop_table .order-total td * {
    color: var(--nc-wine) !important;
    font-size: 15px !important;
    font-weight: 850 !important;
}

body.woocommerce-cart .cart_totals .woocommerce-shipping-methods,
body.woocommerce-cart .cart_totals .woocommerce-shipping-destination,
body.woocommerce-cart .cart_totals .woocommerce-shipping-calculator {
    color: #6e5c63 !important;
    font-size: 11px;
    line-height: 1.9;
}

/* Checkout button */
body.woocommerce-cart .wc-proceed-to-checkout {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 55px;
    margin: 0 !important;
    padding: 13px 20px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #913854, var(--nc-wine) 56%, var(--nc-wine-dark)) !important;
    border: 0 !important;
    border-radius: 13px !important;
    box-shadow: 0 12px 28px rgba(111, 24, 52, 0.25);
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
    filter: saturate(1.08) brightness(0.96);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(111, 24, 52, 0.31);
}

body.woocommerce-cart .cart_totals::after {
    content: "✓ تضمین اصالت کالا   •   پرداخت امن   •   ارسال سریع";
    display: block;
    margin-top: 17px;
    padding: 12px 13px;
    color: #725965;
    background: var(--nc-blush);
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.9;
    text-align: center;
}

/* Cross-sells */
body.woocommerce-cart .cart-collaterals .cross-sells {
    float: none !important;
    clear: both;
    width: 100% !important;
    margin: 45px 0 0;
}

body.woocommerce-cart .cross-sells > h2 {
    color: var(--nc-ink) !important;
    font-size: 22px !important;
    font-weight: 800 !important;
}

/* Empty cart */
body.woocommerce-cart .cart-empty {
    max-width: 650px;
    margin: 30px auto 18px !important;
    padding: 35px !important;
    color: #66545b !important;
    background: #fff !important;
    border: 1px solid var(--nc-line) !important;
    border-radius: 20px !important;
    box-shadow: var(--nc-shadow);
    text-align: center;
}

body.woocommerce-cart .return-to-shop {
    text-align: center;
}

body.woocommerce-cart .return-to-shop .button {
    color: #fff !important;
    background: var(--nc-wine) !important;
    border-radius: 11px !important;
}

/* Tablet */
@media (max-width: 980px) {
    body.woocommerce-cart .woocommerce {
        width: min(760px, calc(100% - 30px));
        padding-top: 35px;
    }

    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals {
        float: none !important;
        width: 100% !important;
    }

    body.woocommerce-cart .cart-collaterals {
        margin-top: 25px !important;
    }

    body.woocommerce-cart .cart-collaterals .cart_totals {
        position: relative;
        top: auto;
    }
}

/* Mobile cart cards */
@media (max-width: 640px) {
    body.woocommerce-cart .woocommerce {
        width: calc(100% - 22px);
        padding: 25px 0 60px;
    }

    body.woocommerce-cart .woocommerce-cart-form::before {
        font-size: 26px;
    }

    body.woocommerce-cart table.shop_table.cart {
        overflow: visible;
        background: transparent;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none;
    }

    body.woocommerce-cart table.shop_table.cart thead {
        display: none !important;
    }

    body.woocommerce-cart table.shop_table.cart tbody,
    body.woocommerce-cart table.shop_table.cart tr.cart_item {
        display: block !important;
        width: 100%;
    }

    body.woocommerce-cart table.shop_table.cart tr.cart_item {
        position: relative;
        margin: 0 0 14px;
        padding: 15px;
        overflow: hidden;
        background: #fff;
        border: 1px solid var(--nc-line);
        border-radius: 17px;
        box-shadow: var(--nc-shadow-soft);
    }

    body.woocommerce-cart table.shop_table.cart tr.cart_item td {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        min-width: 0 !important;
        padding: 9px 0 !important;
        border-bottom: 1px solid rgba(111, 24, 52, 0.06) !important;
        text-align: left !important;
    }

    body.woocommerce-cart table.shop_table.cart tr.cart_item td::before {
        color: #88747c;
        font-size: 10.5px;
        font-weight: 600;
    }

    body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail {
        display: block !important;
        padding: 0 0 12px !important;
        text-align: center !important;
    }

    body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail::before,
    body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name::before,
    body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-remove::before {
        display: none;
    }

    body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
        width: 125px !important;
        height: 125px !important;
    }

    body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name {
        justify-content: center;
        padding: 4px 0 11px !important;
        text-align: center !important;
    }

    body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name a {
        font-size: 13px;
        text-align: center;
    }

    body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-remove {
        position: absolute;
        top: 11px;
        left: 11px;
        width: 32px !important;
        padding: 0 !important;
        border: 0 !important;
    }

    body.woocommerce-cart table.shop_table.cart td.actions {
        display: block !important;
        padding: 13px 0 0 !important;
        background: transparent !important;
    }

    body.woocommerce-cart table.shop_table.cart td.actions .coupon {
        float: none !important;
        display: grid;
        grid-template-columns: 1fr auto;
        width: 100%;
        margin-bottom: 9px;
    }

    body.woocommerce-cart table.shop_table.cart td.actions .coupon .input-text {
        width: 100% !important;
    }

    body.woocommerce-cart table.shop_table.cart td.actions > button[name="update_cart"] {
        float: none !important;
        width: 100%;
    }

    body.woocommerce-cart .cart-collaterals .cart_totals {
        padding: 22px 18px !important;
        border-radius: 18px;
    }

    body.woocommerce-cart .cart_totals::after {
        font-size: 9.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.woocommerce-cart *,
    body.woocommerce-cart *::before,
    body.woocommerce-cart *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
