/* Material UI Enhanced Website Cart Styles */

/* Material Cart Items Container */
.material-cart-items-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 24px;
}

/* Material Cart Item */
.material-cart-item {
    display: flex;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid rgba(224, 224, 224, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.material-cart-item:last-child {
    border-bottom: none;
}

.material-cart-item:hover {
    background-color: rgba(255, 107, 53, 0.04);
    border-radius: 8px;
    margin: 0 -8px;
    padding: 20px 8px;
}

/* Material Product Image */
.material-product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.material-cart-item:hover .material-product-image {
    transform: scale(1.05);
}

.material-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.material-product-image img:hover {
    opacity: 0.9;
}

.material-product-image .placeholder-icon {
    color: #bdbdbd;
    font-size: 24px;
}

/* Material Product Details */
.material-product-details {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.material-product-info {
    flex: 1;
}

.material-product-name {
    font-size: 16px;
    font-weight: 500;
    color: #212121;
    margin: 0 0 4px 0;
    line-height: 1.4;
    font-family: 'Roboto', sans-serif;
}

.material-product-size {
    font-size: 14px;
    color: #757575;
    margin: 0 0 8px 0;
    font-weight: 400;
}

.material-price-qty {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.material-quantity {
    display: inline-flex;
    align-items: center;
    background: #FF6B35;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}

.material-unit-price {
    font-size: 13px;
    color: #757575;
    font-weight: 400;
}

/* Material Quantity Controls */
.material-quantity-controls {
    display: flex;
    align-items: center;
    margin-top: 12px;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
    background: white;
}

.material-quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    color: #424242;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.material-quantity-btn:hover {
    background: #f5f5f5;
    color: #FF6B35;
}

.material-quantity-btn:active {
    background: #eeeeee;
}

.material-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.material-quantity-input {
    width: 50px;
    height: 36px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    background: white;
    outline: none;
}

/* Material Product Actions */
.material-product-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.material-product-total {
    text-align: right;
}

.material-total-amount {
    background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.material-remove-item {
    color: #f44336;
    font-size: 12px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.material-remove-item:hover {
    background: rgba(244, 67, 54, 0.2);
    color: #d32f2f;
    text-decoration: none;
    transform: translateY(-1px);
}

.material-remove-item:active {
    transform: translateY(0);
}

/* Material Cart Summary */
.material-cart-summary {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(224, 224, 224, 0.6);
}

.material-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(224, 224, 224, 0.6);
}

.material-summary-row:last-child {
    border-bottom: none;
}

.material-summary-row.total {
    border-top: 2px solid #FF6B35;
    margin-top: 16px;
    padding-top: 16px;
    font-weight: 600;
}

.material-summary-label {
    font-size: 14px;
    color: #757575;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.material-summary-value {
    font-size: 16px;
    font-weight: 600;
    color: #212121;
}

.material-summary-row.total .material-summary-value {
    color: #FF6B35;
    font-size: 18px;
    font-weight: 700;
}

.material-shipping-note {
    font-size: 12px;
    color: #757575;
    font-style: italic;
    margin-top: 4px;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .material-cart-item {
        padding: 16px 0;
    }
    
    .material-product-image {
        width: 60px;
        height: 60px;
        margin-right: 12px;
    }
    
    .material-product-details {
        flex-direction: column;
        gap: 12px;
    }
    
    .material-product-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .material-product-name {
        font-size: 14px;
    }
    
    .material-quantity-controls {
        margin-top: 8px;
    }
    
    .material-quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .material-quantity-input {
        width: 45px;
        height: 32px;
        font-size: 13px;
    }
    
    .material-cart-summary {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .material-cart-items-container {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .material-product-image {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .material-product-name {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .material-product-size {
        font-size: 12px;
    }
    
    .material-cart-summary {
        padding: 16px;
    }
    
    .material-summary-row {
        padding: 8px 0;
    }
}

/* Loading State */
.material-cart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #757575;
}

.material-cart-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF6B35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.material-empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #757575;
}

.material-empty-cart .empty-icon {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.material-empty-cart .empty-title {
    font-size: 24px;
    font-weight: 500;
    color: #424242;
    margin-bottom: 12px;
}

.material-empty-cart .empty-description {
    font-size: 16px;
    color: #757575;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Animation Classes */
.material-item-enter {
    animation: materialSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.material-item-exit {
    animation: materialSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes materialSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes materialSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}
