/* ============================================
   Cart Page Styles - Anas Plastic Enterprises
   ============================================ */

.cart-section {
    padding: 60px 0;
    min-height: 60vh;
    background: #F8FAFC;
}

.cart-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #E5E7EB;
    transition: all 0.3s ease;
    position: relative;
}

.cart-item:hover {
    border-color: #1E3A8A;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.15);
    transform: translateY(-2px);
}

.cart-item-image {
    width: 130px;
    height: 130px;
    border-radius: 12px;
    overflow: hidden;
    background: #F3F4F6;
    flex-shrink: 0;
    border: 1px solid #E5E7EB;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-details h4 {
    font-size: 1.15rem;
    color: #1F2937;
    margin-bottom: 6px;
    font-weight: 600;
    line-height: 1.4;
}

.cart-item-details h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-item-details h4 a:hover {
    color: #1E3A8A;
}

.cart-item-category {
    font-size: 0.8rem;
    color: #DC2626;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 15px;
    padding: 4px 12px;
    background: #FEF2F2;
    border-radius: 20px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.cart-item-quantity .qty-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #E5E7EB;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
    color: #1F2937;
    line-height: 1;
}

.cart-item-quantity .qty-btn:hover {
    background: #1E3A8A;
    color: #ffffff;
    border-color: #1E3A8A;
    transform: scale(1.1);
}

.cart-item-quantity span {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 35px;
    text-align: center;
    color: #1F2937;
}

.cart-item-actions {
    flex-shrink: 0;
    align-self: flex-start;
}

.remove-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #DC2626;
    color: #ffffff;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Cart Summary */
.cart-summary {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #E5E7EB;
}

.cart-summary h3 {
    font-size: 1.4rem;
    color: #1F2937;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #E5E7EB;
    font-weight: 700;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    font-size: 1.05rem;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

.summary-row:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.summary-row span:last-child {
    font-weight: 700;
    color: #1F2937;
    font-size: 1.1rem;
}

.summary-note {
    text-align: center;
    color: #92400E;
    font-weight: 600;
    padding: 16px;
    background: #FEF3C7;
    border-radius: 12px;
    margin: 25px 0;
    font-size: 0.95rem;
    border: 1px solid #FCD34D;
    line-height: 1.5;
}

.summary-note i {
    margin-right: 8px;
    color: #F59E0B;
}

.checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    background: #25D366;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.checkout-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: #ffffff;
}

.clear-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #DC2626;
    border: 2px solid #FCA5A5;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-cart-btn:hover {
    background: #DC2626;
    color: #ffffff;
    border-color: #DC2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.empty-cart i {
    font-size: 5rem;
    color: #D1D5DB;
    margin-bottom: 25px;
    display: block;
}

.empty-cart h2 {
    font-size: 2rem;
    color: #1F2937;
    margin-bottom: 12px;
    font-weight: 700;
}

.empty-cart p {
    color: #6B7280;
    font-size: 1.1rem;
    margin-bottom: 35px;
}

.empty-cart .btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: #1E3A8A;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empty-cart .btn-primary:hover {
    background: #152C6B;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10B981;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    max-width: 400px;
}

.cart-notification.show {
    transform: translateX(0);
}

.cart-notification i {
    font-size: 1.3rem;
}

.cart-notification a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 700;
    margin-left: 5px;
}

.cart-notification button {
    background: #ffffff;
    color: #DC2626;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.cart-notification button:hover {
    background: #DC2626;
    color: #ffffff;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .cart-section {
        padding: 30px 0;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }

    .cart-item-image {
        width: 160px;
        height: 160px;
        margin: 0 auto;
    }

    .cart-item-details {
        text-align: center;
    }

    .cart-item-quantity {
        justify-content: center;
    }

    .cart-item-actions {
        align-self: center;
        margin-top: 10px;
    }

    .cart-summary {
        padding: 25px;
    }

    .checkout-btn {
        padding: 15px;
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .cart-item-image {
        width: 140px;
        height: 140px;
    }

    .cart-item-details h4 {
        font-size: 1rem;
    }

    .cart-summary {
        padding: 20px;
    }

    .cart-summary h3 {
        font-size: 1.2rem;
    }

    .checkout-btn {
        font-size: 0.95rem;
        padding: 14px;
    }

    .empty-cart h2 {
        font-size: 1.5rem;
    }

    .empty-cart i {
        font-size: 3.5rem;
    }
}

/* ============================================
   Cart Quantity Controls & Clear Cart Modal
   ============================================ */

/* Cart Quantity Controls */
.cart-quantity-controls {
    margin-top: 15px;
}

.cart-quantity-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    max-width: 220px;
    border: 2px solid #E5E7EB;
    border-radius: 50px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.cart-quantity-row:focus-within {
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.cart-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #F3F4F6;
    color: #1F2937;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cart-qty-btn:hover {
    background: #1E3A8A;
    color: white;
}

.cart-qty-btn:active {
    transform: scale(0.95);
}

.cart-qty-input {
    flex: 1;
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #1F2937;
    background: white;
    outline: none;
    webkit-moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Quick Quantity Buttons in Cart */
.quick-qty-btns {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.quick-cart-qty {
    padding: 5px 12px;
    border: 1px solid #E5E7EB;
    background: white;
    color: #374151;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-cart-qty:hover {
    background: #1E3A8A;
    color: white;
    border-color: #1E3A8A;
}

/* Summary Warning */
.summary-warning {
    text-align: center;
    color: #92400E;
    font-weight: 600;
    padding: 12px;
    background: #FEF3C7;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 0.9rem;
    border: 1px solid #FCD34D;
}

.summary-warning i {
    color: #F59E0B;
    margin-right: 6px;
}

/* Clear Cart Modal */
.clear-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    webkit-backdrop-filter: blur(4px);
}

.clear-cart-modal.show {
    opacity: 1;
}

.clear-cart-modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.clear-cart-modal.show .clear-cart-modal-content {
    transform: scale(1);
}

.clear-cart-modal-icon {
    width: 70px;
    height: 70px;
    background: #FEE2E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.clear-cart-modal-icon i {
    font-size: 2rem;
    color: #DC2626;
}

.clear-cart-modal h3 {
    font-size: 1.5rem;
    color: #1F2937;
    margin-bottom: 15px;
}

.clear-cart-modal p {
    color: #6B7280;
    margin-bottom: 10px;
    line-height: 1.6;
}

.clear-cart-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.cancel-clear-btn {
    padding: 12px 28px;
    background: #F3F4F6;
    color: #374151;
    border: 2px solid #D1D5DB;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-clear-btn:hover {
    background: #E5E7EB;
}

.confirm-clear-btn {
    padding: 12px 28px;
    background: #DC2626;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-clear-btn:hover {
    background: #B91C1C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Cart Notification Overrides */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    max-width: 400px;
    color: white;
}

.cart-notification.show {
    transform: translateX(0);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .cart-quantity-row {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .cart-item-details {
        text-align: center;
    }
    
    .cart-quantity-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .quick-qty-btns {
        justify-content: center;
    }
    
    .clear-cart-modal-actions {
        flex-direction: column;
    }
    
    .cancel-clear-btn,
    .confirm-clear-btn {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .cart-qty-btn {
        width: 35px;
        height: 35px;
    }
    
    .cart-qty-input {
        height: 35px;
        font-size: 0.9rem;
    }
    
    .clear-cart-modal-content {
        padding: 25px;
    }
}