/* ==========================================================
   WooCommerce Cart Block - Professional Design
   ========================================================== */

/* ======================
   CART CONTAINER
   ====================== */
.wp-block-woocommerce-cart {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 
        0 10px 25px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.wp-block-woocommerce-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8, #10b981);
    border-radius: 20px 20px 0 0;
}

/* ======================
   CART TABLE STYLING
   ====================== */
.wc-block-cart-items {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #ffffff;
    margin-bottom: 2rem;
}

.wc-block-cart-items table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.wc-block-cart-items th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1.25rem 1rem;
    border-bottom: 2px solid #e5e7eb;
    text-align: left;
}

.wc-block-cart-items td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.wc-block-cart-items tr:hover td {
    background-color: #f8fafc;
}

.wc-block-cart-items tr:last-child td {
    border-bottom: none;
}

/* ======================
   PRODUCT INFO
   ====================== */
.wc-block-cart-items .wc-block-components-product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.wc-block-cart-items .wc-block-components-product-name a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wc-block-cart-items .wc-block-components-product-name a:hover {
    color: #3b82f6;
}

.wc-block-cart-items .wc-block-components-product-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.wc-block-cart-items .wc-block-components-product-image:hover {
    transform: scale(1.05);
}

.wc-block-cart-items .wc-block-components-product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}

.wc-block-cart-items .wc-block-components-product-metadata {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ======================
   QUANTITY INPUT
   ====================== */
.wc-block-cart-items .wc-block-components-quantity-selector {
    display: flex;
    align-items: center;
    gap: 0px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.25rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.wc-block-cart-items .wc-block-components-quantity-selector:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wc-block-cart-items .wc-block-components-quantity-selector input {
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    width: 50px;
    text-align: center;
    color: #374151;
    outline: none;
}

.wc-block-cart-items .wc-block-components-quantity-selector button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-block-cart-items .wc-block-components-quantity-selector button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.wc-block-cart-items .wc-block-components-quantity-selector button:active {
    transform: scale(0.95);
}

/* ======================
   PRICE STYLING
   ====================== */
.wc-block-cart-items .wc-block-components-product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
	display:none;
}

.wc-block-cart-items .wc-block-components-product-price .wc-block-formatted-money-amount {
    color: #059669;
}

/* ======================
   REMOVE BUTTON
   ====================== */
.wc-block-cart-items .wc-block-components-product-remove {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-block-cart-items .wc-block-components-product-remove:hover {
    background: #fecaca;
    color: #b91c1c;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* ======================
   CART TOTALS BOX
   ====================== */
.wc-block-cart-totals {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    box-shadow: 
        0 10px 25px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.wc-block-cart-totals::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8, #10b981);
    border-radius: 16px 16px 0 0;
}

.wc-block-cart-totals .wc-block-components-totals-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: #374151;
}

.wc-block-cart-totals .wc-block-components-totals-item:last-child {
    border-bottom: none;
}

.wc-block-cart-totals .wc-block-components-totals-footer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    border-top: 2px solid #e5e7eb;
    margin-top: 1rem;
}

.wc-block-cart-totals .wc-block-components-totals-footer-item .wc-block-formatted-money-amount {
    color: #059669;
    font-size: 1.5rem;
}


/* ======================
   COUPON SECTION
   ====================== */
.wc-block-cart__coupon-form {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.wc-block-cart__coupon-form .wc-block-components-text-input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 1rem;
}

.wc-block-cart__coupon-form .wc-block-components-text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.wc-block-cart__coupon-form .wc-block-components-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wc-block-cart__coupon-form .wc-block-components-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ======================
   EMPTY CART
   ====================== */
.wc-block-cart__empty-cart {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.wc-block-cart__empty-cart h2 {
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.wc-block-cart__empty-cart p {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.wc-block-cart__empty-cart .wc-block-components-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.wc-block-cart__empty-cart .wc-block-components-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* ======================
   RESPONSIVE DESIGN
   ====================== */
@media (max-width: 768px) {
    .wp-block-woocommerce-cart {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .wc-block-cart-items th,
    .wc-block-cart-items td {
        padding: 1rem 0.75rem;
    }
    
    .wc-block-cart-items .wc-block-components-product-image img {
        width: 60px;
        height: 60px;
    }
    
    .wc-block-cart-items .wc-block-components-product-name {
        font-size: 1rem;
    }
    
    .wc-block-cart-items .wc-block-components-quantity-selector {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .wc-block-cart-items .wc-block-components-quantity-selector input {
        width: 60px;
    }
    
    .wc-block-cart-totals {
        padding: 1.5rem;
    }
    
}

@media (max-width: 480px) {
    .wp-block-woocommerce-cart {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .wc-block-cart-items th,
    .wc-block-cart-items td {
        padding: 0.75rem 0.5rem;
    }
    
    .wc-block-cart-items .wc-block-components-product-image img {
        width: 50px;
        height: 50px;
    }
    
    .wc-block-cart-items .wc-block-components-product-name {
        font-size: 0.9rem;
    }
    
    .wc-block-cart-totals {
        padding: 1rem;
    }
    
    .wc-block-cart-totals .wc-block-components-totals-footer-item {
        font-size: 1.125rem;
    }
    
    .wc-block-cart-totals .wc-block-components-totals-footer-item .wc-block-formatted-money-amount {
        font-size: 1.25rem;
    }
}

/* ======================
   LOADING STATES
   ====================== */
.wc-block-cart__loading {
    opacity: 0.6;
    pointer-events: none;
}

.wc-block-cart__loading .wc-block-components-button {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ======================
   ANIMATIONS
   ====================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-block-cart-items tr {
    animation: fadeInUp 0.3s ease-out;
}

.wc-block-cart-totals {
    animation: fadeInUp 0.5s ease-out;
}

/* ======================
   ACCESSIBILITY
   ====================== */
.wc-block-cart-items .wc-block-components-quantity-selector button:focus,
.wc-block-cart__coupon-form .wc-block-components-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.wc-block-cart-items .wc-block-components-quantity-selector input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
