/* ==========================
   CART PAGE STYLES
========================== */

.cart-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.cart-title {
    text-align: center;
    margin-bottom: 30px;
    font-family: 'Playfair Display', serif;
    font-size: 50px;
    color: #4b145f;
}

/* ==========================
   CART ITEMS
========================== */

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #ff4e8b;
}

.cart-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-details {
    flex: 1;
}

.cart-details h3 {
    margin-bottom: 5px;
    color: #4b145f;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
}

.cart-details p {
    color: #ff4e8b;
    font-weight: 600;
}

.cart-subtotal {
    font-weight: bold;
    color: #8e2de2;
    min-width: 120px;
    text-align: right;
}

/* ==========================
   EMPTY CART
========================== */

.empty-cart {
    text-align: center;
    padding: 50px;
    background: #fff;
    border-radius: 12px;
}

.empty-cart h3 {
    color: #4b145f;
    font-family: 'Playfair Display', serif;
}

/* ==========================
   QUANTITY BOX
========================== */

.qty-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-box button {
    width: 35px;
    height: 35px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: #8e2de2;
    color: white;
    font-size: 18px;
    transition: 0.3s;
    font-weight: bold;
}

.qty-box button:hover {
    background: #6a1ba5;
    transform: scale(1.1);
}

.qty-box span {
    min-width: 25px;
    text-align: center;
    font-weight: bold;
    color: #4b145f;
}

/* ==========================
   CART SUMMARY
========================== */

.cart-summary {
    background: #fff;
    margin-top: 30px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-top: 3px solid #ff4e8b;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.summary-row span {
    color: #4b145f;
}

.summary-row.total {
    font-size: 22px;
    font-weight: bold;
    color: #8e2de2;
}

.cart-summary hr {
    border: none;
    border-top: 1px solid #f1f1f1;
    margin: 15px 0;
}

/* ==========================
   OFFER SUMMARY
========================== */

.offer-summary-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 15px;
    background: linear-gradient(135deg, #fff0f7, #f5e8ff);
    border: 1px solid #e8b6ff;
    font-size: 14px;
    line-height: 1.6;
    color: #4b145f;
}

.offer-summary-card {
    background: #fff7fb;
    color: #4b145f;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 14px;
    border-left: 3px solid #ff4e8b;
}

.freebie-message {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 78, 139, 0.1);
    border-radius: 8px;
    font-size: 13px;
}

/* ==========================
   CHECKOUT BUTTON
========================== */

.checkout-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #8e2de2, #ff4e8b);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 78, 139, 0.3);
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================
   POPUP OVERLAY & DELIVERY POPUP
========================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

.popup-overlay:not(.hidden) {
    display: flex !important;
}

.delivery-popup {
    width: 500px;
    max-width: 95%;
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0px 15px 40px rgba(0, 0, 0, 0.2);
    animation: popupFade 0.3s ease;
    border: 2px solid #ff4e8b;
    max-height: 90vh;
    overflow-y: auto;
}

.delivery-popup h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #4b145f;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
}

.delivery-popup input,
.delivery-popup textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
}

.delivery-popup input:focus,
.delivery-popup textarea:focus {
    border-color: #ff4e8b;
    box-shadow: 0 0 8px rgba(255, 78, 139, 0.2);
}

.delivery-popup textarea {
    min-height: 90px;
    resize: vertical;
}

/* ==========================
   POPUP BUTTONS
========================== */

.popup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.popup-buttons button {
    flex: 1;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    transition: 0.3s;
    font-size: 14px;
}

#orderWhatsappBtn {
    background: #25d366;
}

#orderWhatsappBtn:hover {
    background: #1fa853;
    transform: translateY(-2px);
}

#closePopupBtn {
    background: #777;
}

#closePopupBtn:hover {
    background: #555;
    transform: translateY(-2px);
}

/* ==========================
   POPUP ANIMATION
========================== */

@keyframes popupFade {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================
   MOBILE RESPONSIVE
========================== */

@media (max-width: 768px) {
    .cart-section {
        padding: 15px;
    }

    .cart-title {
        font-size: 35px;
        margin-bottom: 20px;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cart-image {
        width: 120px;
        height: 120px;
    }

    .cart-subtotal {
        text-align: center;
        min-width: auto;
    }

    .summary-row {
        flex-direction: column;
        gap: 10px;
    }

    .summary-row.total {
        font-size: 18px;
    }

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

    .delivery-popup {
        width: 95%;
        padding: 20px;
    }

    .delivery-popup h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .popup-buttons {
        flex-direction: column;
    }

    .popup-buttons button {
        padding: 10px;
    }

    .qty-box {
        justify-content: center;
    }
}

/* ==========================
   REMOVE CART
========================== */

.remove-cart-item {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #f1c8d9;
    border-radius: 9px;
    background: #fff;
    color: #a21d4c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 600px) {
    .cart-section {
        margin: 16px auto;
        padding: 12px;
    }

    .cart-title {
        font-size: 36px;
        margin-bottom: 18px;
    }

    .cart-item {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 10px;
        padding: 11px;
    }

    .cart-image {
        width: 76px;
        height: 76px;
        grid-row: span 2;
    }

    .cart-details h3 {
        font-size: 14px;
    }

    .qty-box {
        gap: 8px;
    }

    .qty-box button {
        width: 44px;
        height: 44px;
    }

    .cart-subtotal {
        min-width: 0;
        text-align: left;
    }

    .remove-cart-item {
        grid-column: 2;
        justify-self: start;
    }

    .cart-summary {
        padding: 16px;
    }

    .summary-row.total {
        font-size: 20px;
    }

    .checkout-btn {
        min-height: 48px;
    }
}

/* ==========================
   FREE DELIVERY
========================== */

.free-delivery-message {
    margin: 10px 0 16px;
    padding: 12px 14px;
    border: 1px solid #f2cfe1;
    border-radius: 12px;
    background: #fff7fb;
    color: #4b145f;
    font-size: 13px;
    line-height: 1.6;
}

.free-delivery-message:empty {
    display: none;
}
      
