/**
 * Cart Page Styles
 * Modern, minimal and attractive design for WooCommerce cart page
 */

/* Main Cart Wrapper */
.emadbrz-cart-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 60px;
}

/* Cart Header */
.emadbrz-cart-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cart-title {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    font-family: 'IRANSansX', sans-serif;
}

.cart-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin: 0;
    font-family: 'IRANSansX', sans-serif;
}

/* Cart Items Wrapper */
.cart-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

/* Cart Item Card */
.cart-item-card {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cart-item-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.cart-item-card:hover::before {
    opacity: 1;
}

/* Cart Item Image */
.cart-item-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    position: relative;
    z-index: 1;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.cart-item-card:hover .cart-item-image img {
    transform: scale(1.05);
}

/* Cart Item Details */
.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item-name {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-family: 'IRANSansX', sans-serif;
    line-height: 1.4;
}

.cart-item-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-item-name a:hover {
    color: #667eea;
}

.cart-item-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-family: 'IRANSansX', sans-serif;
}

.price-value {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    font-family: 'IRANSansX', sans-serif;
}

/* Cart Item Actions */
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: 'IRANSansX', sans-serif;
}

.cart-item-quantity .quantity {
    display: inline-flex;
}

.cart-item-quantity input.qty {
    width: 70px;
    height: 45px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    font-weight: 600;
    font-family: 'IRANSansX', sans-serif;
    transition: all 0.3s ease;
}

.cart-item-quantity input.qty:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.cart-item-subtotal {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtotal-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-family: 'IRANSansX', sans-serif;
}

.subtotal-value {
    color: #667eea;
    font-size: 22px;
    font-weight: 700;
    font-family: 'IRANSansX', sans-serif;
}

.cart-item-remove {
    margin-right: auto;
}

.cart-item-remove .remove-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 12px;
    color: #ff3b30;
    font-size: 14px;
    font-weight: 600;
    font-family: 'IRANSansX', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cart-item-remove .remove-item:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: #ff3b30;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 59, 48, 0.3);
}

/* Cart Actions Bar */
.cart-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cart-coupon {
    flex: 1;
    min-width: 300px;
}

.coupon-wrapper label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    font-family: 'IRANSansX', sans-serif;
    margin-bottom: 12px;
}

.coupon-input-group {
    display: flex;
    gap: 12px;
}

.coupon-input-group input[type="text"] {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    font-family: 'IRANSansX', sans-serif;
    transition: all 0.3s ease;
}

.coupon-input-group input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.coupon-input-group input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.apply-coupon,
.update-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'IRANSansX', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.apply-coupon:hover,
.update-cart:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Cart Collaterals (Totals) */
.cart-collaterals {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
}

.cart-totals-wrapper {
    width: 100%;
    max-width: 500px;
}

.cart_totals {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cart_totals h2 {
    font-size: 28px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    font-family: 'IRANSansX', sans-serif;
}

.cart_totals table {
    width: 100%;
    border: none;
    margin-bottom: 30px;
}

.cart_totals table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart_totals table tr:last-child {
    border-bottom: none;
}

.cart_totals table th,
.cart_totals table td {
    padding: 20px 0;
    border: none;
    font-size: 16px;
    font-family: 'IRANSansX', sans-serif;
}

.cart_totals table th {
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.cart_totals table td {
    text-align: left;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* Order Total */
.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: 24px;
    font-weight: 700;
    padding-top: 25px;
}

.cart_totals .order-total .amount {
    color: #667eea;
    font-size: 32px;
}

/* Checkout Button */
.wc-proceed-to-checkout {
    margin-top: 30px;
}

.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    font-family: 'IRANSansX', sans-serif;
}

.wc-proceed-to-checkout .checkout-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5);
}

/* Empty Cart */
.woocommerce-info,
.cart-empty {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    margin: 40px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    font-family: 'IRANSansX', sans-serif;
}

.cart-empty::before {
    content: "🛒";
    display: block;
    font-size: 80px;
    margin-bottom: 20px;
}

.return-to-shop {
    margin-top: 30px;
}

.return-to-shop .button {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    font-family: 'IRANSansX', sans-serif;
}

.return-to-shop .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* WooCommerce Messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    border-radius: 16px;
    font-family: 'IRANSansX', sans-serif;
    margin-bottom: 30px;
}

.woocommerce-message {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.woocommerce-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

.woocommerce-message::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
}

.woocommerce-error::before {
    content: "✕";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #ff3b30;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .emadbrz-cart-wrapper {
        padding: 60px 15px 40px;
    }

    .cart-title {
        font-size: 36px;
    }
}

@media screen and (max-width: 768px) {
    .cart-item-card {
        flex-direction: column;
        padding: 20px;
    }

    .cart-item-image {
        width: 100%;
        height: 250px;
    }

    .cart-item-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cart-item-quantity,
    .cart-item-subtotal {
        justify-content: space-between;
        width: 100%;
    }

    .cart-item-remove {
        margin-right: 0;
        width: 100%;
    }

    .cart-item-remove .remove-item {
        width: 100%;
        justify-content: center;
    }

    .cart-actions-bar {
        flex-direction: column;
        padding: 20px;
    }

    .cart-coupon {
        width: 100%;
        min-width: auto;
    }

    .coupon-input-group {
        flex-direction: column;
    }

    .apply-coupon,
    .update-cart {
        width: 100%;
        justify-content: center;
    }

    .cart-collaterals {
        justify-content: center;
    }

    .cart-totals-wrapper {
        max-width: 100%;
    }

    .cart_totals {
        padding: 30px 20px;
    }

    .cart_totals h2 {
        font-size: 24px;
    }

    .cart_totals .order-total th,
    .cart_totals .order-total td {
        font-size: 20px;
    }

    .cart_totals .order-total .amount {
        font-size: 26px;
    }
}

@media screen and (max-width: 480px) {
    .emadbrz-cart-wrapper {
        padding: 40px 10px 30px;
    }

    .cart-title {
        font-size: 28px;
    }

    .cart-subtitle {
        font-size: 14px;
    }

    .emadbrz-cart-header {
        padding: 30px 15px;
        margin-bottom: 40px;
    }

    .cart-item-card {
        padding: 15px;
    }

    .cart-item-image {
        height: 200px;
    }

    .cart-item-name {
        font-size: 18px;
    }

    .cart_totals {
        padding: 20px 15px;
    }

    .wc-proceed-to-checkout .checkout-button {
        font-size: 16px;
        padding: 16px;
    }
}

/* Loading State */
.woocommerce-cart-form.processing {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.woocommerce-cart-form.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Animations */
.cart-item-card {
    animation: fadeInUp 0.5s ease backwards;
}

.cart-item-card:nth-child(1) { animation-delay: 0.1s; }
.cart-item-card:nth-child(2) { animation-delay: 0.15s; }
.cart-item-card:nth-child(3) { animation-delay: 0.2s; }
.cart-item-card:nth-child(4) { animation-delay: 0.25s; }
.cart-item-card:nth-child(5) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

