/* =========================================
   WooCommerce Cart Block - Premium Glass (V2)
   Compatible with WC 10.5
========================================= */


/* =========================================
   Cart Page Title - Premium Glass Header
========================================= */

.entry-header {

    position: relative;
    text-align: center;
    margin: 3rem auto 4rem auto;
    padding: 3rem 2rem;

    max-width: 900px;
z-index: 1;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.4);

    box-shadow: 0 20px 60px rgba(0,0,0,0.08);

    overflow: hidden;
}



/* Title Style */

.entry-title {
    position: relative;
    z-index: 1;

    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;

    background: linear-gradient(135deg, #1b5e20, #2d8659);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    margin: 0;
}

/* Decorative Line Under Title */

.entry-title::after {
    content: "";
    display: block;
    width: 90px;
    height: 4px;
    margin: 1rem auto 0 auto;
    border-radius: 10px;

    background: linear-gradient(90deg, #2d8659, #4caf50);
}

/* Subtle Animation */

.entry-header {
    animation: fadeGlass 0.8s ease-out;
}

@keyframes fadeGlass {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */

@media (max-width: 768px) {

    .entry-header {
        padding: 2rem 1.2rem;
        margin: 2rem 1rem 3rem 1rem;
    }

    .entry-title {
        font-size: 1.8rem;
    }
}

/* ===== Glass Panels ===== */
.wc-block-cart__main,
.wc-block-cart__sidebar {
    /* استفاده از گرادیان برای شبیه‌سازی نور روی شیشه */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.25) 100%);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-radius: 28px;
    padding: 2.5rem;
    /* ترکیب سایه بیرونی برای عمق و سایه داخلی برای بازتاب نور لبه شیشه */
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ===== Cart Items ===== */
.wc-block-cart-items {
    border-collapse: separate;
    border-spacing: 0 1.2rem;
}

.wc-block-cart-items__row {
    /* حذف رنگ سفید خالص و استفاده از شیشه مات ثانویه */
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    /* انیمیشن نرم و جذاب‌تر */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.wc-block-cart-items__row:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
}

/* Product image */
.wc-block-cart-item__image img {
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.wc-block-cart-items__row:hover .wc-block-cart-item__image img {
    transform: scale(1.06) rotate(-1deg);
}

/* Product Typography */
.wc-block-components-product-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b; /* رنگ خاکستری تیره و مدرن به جای مشکی خالص */
    text-decoration: none;
}

.wc-block-components-product-price__value {
    font-weight: 600;
    font-size: 1.1rem;
    color: #334155;
}

/* ===== Quantity Modern Style ===== */
.wc-block-components-quantity-selector {
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 4px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Remove button */
.wc-block-cart-item__remove-link {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important;
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wc-block-cart-item__remove-link:hover {
    background: #ef4444;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ===== Totals Section ===== */
.wc-block-cart__totals-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.wc-block-components-totals-item {
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Grand Total Highlight */
.wc-block-components-totals-footer-item {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

/* ===== Checkout Button (Premium Dark Sleek) ===== */
.wc-block-cart__submit-button {
    border-radius: 50px !important;
    padding: 1.2rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    color: #fff !important;
    /* گرادیان تیره و بسیار مدرن برای تضاد زیبا با شیشه روشن */
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%) !important;
    border: none !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2) !important;
}

.wc-block-cart__submit-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.35) !important;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%) !important;
}

/* ===== Coupon Input ===== */
.wc-block-components-text-input input {
    border-radius: 50px !important;
    padding: 0.9rem 1.4rem !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
}

.wc-block-components-text-input input:focus {
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1) !important;
    border-color: rgba(15, 23, 42, 0.3) !important;
    outline: none !important;
}

/* =========================================
   Empty Cart - Modern Glass
========================================= */
.woocommerce-cart .wc-empty-cart-message,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    max-width: 760px;
    margin: 0 auto;
}

.woocommerce-cart .wc-empty-cart-message .cart-empty.woocommerce-info {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 2.6rem 2rem !important;
    border: 1px solid rgba(255, 255, 255, 0.62) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.62) !important;
    border-radius: 30px;
    color: #0f1f2f;
    text-align: center;
    font-size: 1.08rem;
    line-height: 1.85;
    font-weight: 600;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.36) 100%);
    box-shadow:
        0 26px 55px rgba(9, 30, 66, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.woocommerce-cart .wc-empty-cart-message .cart-empty.woocommerce-info::before {
    content: "";
    display: block;
    width: 78px;
    height: 78px;
    margin: 0 auto 1.1rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.45)),
        linear-gradient(135deg, rgba(20, 83, 45, 0.18), rgba(15, 118, 110, 0.24));
    box-shadow:
        0 10px 24px rgba(15, 118, 110, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.woocommerce-cart .wc-empty-cart-message .cart-empty.woocommerce-info::after,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block::after {
    content: "";
    position: absolute;
    inset: auto -90px -110px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.2) 0%, rgba(15, 118, 110, 0) 70%);
}

.woocommerce-cart .return-to-shop {
    margin: 1.35rem auto 0;
    text-align: center;
}

.woocommerce-cart .return-to-shop .button,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block > p a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.82rem 1.95rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.56);
    text-decoration: none !important;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff !important;
    background: linear-gradient(130deg, #0f766e 0%, #14532d 100%);
    box-shadow:
        0 12px 30px rgba(15, 118, 110, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.26);
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}

.woocommerce-cart .return-to-shop .button:hover,
.woocommerce-cart .return-to-shop .button:focus,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block > p a:hover,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block > p a:focus {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow:
        0 18px 34px rgba(15, 118, 110, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    position: relative;
    overflow: hidden;
    margin-top: 0.6rem;
    padding: 2.8rem 2.1rem 2.3rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    text-align: center;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.34) 100%);
    box-shadow:
        0 30px 58px rgba(9, 30, 66, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(22px) saturate(165%);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
}

.woocommerce-cart .wc-block-cart__empty-cart__title {
    margin: 0;
    color: #0f1f2f;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.woocommerce-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
    width: 5.2em;
    height: 5.2em;
    margin: 0 auto 1.2rem;
    background-color: #0f766e;
    opacity: 0.95;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block > p {
    margin: 1.3rem 0 0;
}

@media (max-width: 782px) {
    .woocommerce-cart .wc-empty-cart-message .cart-empty.woocommerce-info,
    .woocommerce-cart .wp-block-woocommerce-empty-cart-block {
        border-radius: 24px;
        padding: 2.1rem 1.2rem;
    }

    .woocommerce-cart .return-to-shop .button,
    .woocommerce-cart .wp-block-woocommerce-empty-cart-block > p a {
        width: min(100%, 330px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .woocommerce-cart .return-to-shop .button,
    .woocommerce-cart .wp-block-woocommerce-empty-cart-block > p a {
        transition: none;
    }
}
