/* =========================================
   CART PAGE SPECIFIC STYLES
   ========================================= */

/* --- 1. CART HEADER (Fixed) --- */
.cart-header {
    background: transparent;
    padding: 120px 20px 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-size: 3rem;
    color: var(--rose-primary);
    margin-bottom: 10px;
}

.header-content p {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
    font-family: 'Playfair Display', serif;
}

/* --- 2. CART LAYOUT --- */
.cart-wrapper {
    max-width: 1100px;
    margin: 20px auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    position: relative;
    z-index: 2;
}

/* --- 3. CART ITEMS --- */
.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    border: 1px solid transparent;
    animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item:hover {
    box-shadow: 0 10px 25px rgba(183, 110, 121, 0.1);
    border-color: #fff0f5;
}

.cart-item-img {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    object-fit: cover;
    background: #fffcfc;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--rose-primary);
    font-weight: bold;
    font-size: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff0f5;
    padding: 5px 10px;
    border-radius: 30px;
}

.qty-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--rose-primary);
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.qty-btn:hover {
    background: var(--rose-primary);
    color: white;
}

.remove-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    margin-left: 10px;
    font-size: 1.1rem;
    transition: 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.remove-btn:hover {
    background: #ffebee;
    color: #ff6b6b;
}

.cart-empty-state {
    text-align: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    border: 2px dashed #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-empty-state i {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.btn-shop-now {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background: var(--rose-primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: 0.3s;
    font-weight: bold;
}

.btn-shop-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(183, 110, 121, 0.3);
}

/* --- 4. SUMMARY --- */
.cart-summary {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid #fff0f5;
}

.cart-summary h3 {
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 1.3rem;
    border-bottom: 2px solid #fff0f5;
    padding-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #666;
}

.summary-row.total {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--rose-primary);
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.hidden {
    display: none;
}

.coupon-box {
    display: flex;
    gap: 10px;
    margin: 25px 0 5px;
}

.coupon-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: 0.3s;
}

.coupon-box input:focus {
    border-color: var(--rose-primary);
}

#apply-coupon {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

#apply-coupon:hover {
    background: black;
}

#coupon-msg {
    font-size: 0.85rem;
    min-height: 20px;
    margin-bottom: 15px;
}

.msg-success {
    color: #4CAF50;
}

.msg-error {
    color: #ff6b6b;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d4af37, #b76e79);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(183, 110, 121, 0.3);
}

.secure-text {
    text-align: center;
    color: #aaa;
    font-size: 0.8rem;
    margin-top: 15px;
}

/* --- 5. MODALS & BUTTONS --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Success Card */
.checkout-success-card {
    background: white;
    width: 450px;
    padding: 40px;
    text-align: center;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.active .checkout-success-card {
    transform: scale(1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #e8f5e9;
    color: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Receipt Card */
.receipt-card {
    background: white;
    width: 500px;
    max-width: 95%;
    max-height: 80vh;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 30px;
    position: relative;
}

.receipt-body {
    overflow-y: auto;
    margin: 20px 0;
    border-top: 2px dashed #eee;
    border-bottom: 2px dashed #eee;
    padding: 20px 0;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 10px;
    color: var(--rose-primary);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
}

/* Modal Buttons */
.modal-actions {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 15px;
}

.modal-btn {
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    font-size: 1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn.primary {
    background: var(--rose-primary);
    color: white;
    box-shadow: 0 5px 15px rgba(183, 110, 121, 0.3);
}

.modal-btn.primary:hover {
    background: var(--rose-dark);
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: #fff0f5;
    color: var(--rose-primary);
}

.modal-btn.secondary:hover {
    background: #ffe4e1;
}

.modal-btn.full-width {
    width: 100%;
}

@media (max-width: 900px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
    }
}