/* =========================================
   cart.css - עיצוב העגלה ומסך התשלום (גרסת יוקרה רכה)
   ========================================= */

/* פלטת צבעים מותאמת (רכה) */
:root {
    --cream-bg: #fdfbf5; /* רקע שמנת-חמאה רך */
    --coffee-text: #3e2723; /* חום-קפה כהה לטקסט (במקום שחור) */
    --gold-deep: #b38f4d; /* זהב עמוק ויוקרתי */
    --gold-light: rgba(197, 160, 89, 0.1); /* נגיעת זהב שקופה */
}

/* --- תפריט צד (Sidebar) של העגלה --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -100%; 
    width: 420px; /* רחב יותר, למראה נושם */
    max-width: 90vw; 
    height: 100vh;
    background: var(--cream-bg); /* רקע שמנת רך */
    box-shadow: 15px 0 35px rgba(179, 143, 77, 0.1); /* הצללה בגוון זהב עדין */
    z-index: 10500; 
    transition: left 0.5s cubic-bezier(0.22, 1, 0.36, 1); /* אנימציה חלקה יותר */
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(179, 143, 77, 0.1);
}

.cart-sidebar.active {
    left: 0;
}

/* --- הדר העגלה (ללא שחור!) --- */
.cart-header {
    padding: 30px 25px;
    background: #fff; /* רקע לבן נקי */
    color: var(--gold-deep); /* טקסט זהב עמוק */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee; /* קו הפרדה דק ועדין */
}

.cart-header h4 {
    margin: 0;
    font-weight: 900;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.cart-header h4 i {
    margin-right: 12px;
    font-size: 1.8rem;
}

.close-cart-btn {
    background: none;
    border: none;
    color: #bbb; /* צבע אפור נייטרלי */
    font-size: 1.6rem;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-cart-btn:hover {
    background: var(--gold-light); /* רקע זהב שקוף בתוך עיגול */
    color: var(--gold-deep);
    transform: rotate(90deg);
}

/* --- גוף העגלה --- */
.cart-items-container {
    flex: 1; 
    overflow-y: auto; 
    padding: 25px;
}

/* עיצוב פס הגלילה (זהוב עדין) */
.cart-items-container::-webkit-scrollbar { width: 5px; }
.cart-items-container::-webkit-scrollbar-thumb { background: rgba(179, 143, 77, 0.2); border-radius: 10px; }

.empty-cart-msg {
    text-align: center;
    margin-top: 100px;
    color: #bbb;
}

.empty-cart-msg i {
    color: rgba(179, 143, 77, 0.1);
    margin-bottom: 20px;
}

/* --- פריט בעגלה (רך ומעוגל) --- */
.cart-item {
    background: #fff; /* רקע לבן נקי לפריט */
    border-radius: 20px; /* מעוגל מאוד */
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #f1f1f1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.01); /* הצללה כמעט בלתי נראית */
    position: relative;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: rgba(179, 143, 77, 0.3);
    box-shadow: 0 8px 25px rgba(179, 143, 77, 0.08);
    transform: translateY(-2px);
}

.cart-item-title {
    font-weight: 800;
    color: var(--coffee-text); /* חום-קפה */
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.cart-item-details {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* --- מערכת כפתורי כמות (פלוס מינוס) לפריט --- */
.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.cart-qty-wrapper {
    display: flex;
    align-items: center;
    background: #fff; /* רקע לבן */
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    padding: 3px 6px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.cart-qty-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.cart-qty-btn:hover {
    background: var(--gold-light);
    color: var(--gold-deep);
}

.cart-qty-val {
    font-weight: 800;
    width: 28px;
    text-align: center;
    font-size: 1rem;
    color: var(--coffee-text);
}

.cart-item-price {
    font-weight: 900;
    color: var(--coffee-text);
    font-size: 1.2rem;
}

.remove-item-btn {
    color: #888; 
    background: none; 
    border: none; 
    width: 35px; 
    height: 35px;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: 0.2s;
    cursor: pointer;
}

.remove-item-btn:hover { 
    background: #fff5f5; 
    color: #dc3545; 
}

/* --- פוטר העגלה (סכום וכפתור תשלום) --- */
.cart-footer {
    padding: 25px;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.03);
    border-radius: 30px 30px 0 0; /* מעוגל מאוד */
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.25rem;
    color: var(--coffee-text);
}

.cart-total-label {
    font-weight: 700;
}

.cart-total-amount {
    font-weight: 900;
    color: var(--gold-deep);
    font-size: 1.5rem;
}

/* --- כפתור תשלום מקצועי ויוקרתי (Glassmorphism + Gold) --- */
.checkout-btn {
    /* אפקט זכוכית מטושטשת */
    background: rgba(255, 255, 255, 0.6); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    
    color: var(--gold-deep); /* טקסט זהב עמוק */
    border-radius: 50px;
    padding: 16px;
    font-size: 1.15rem;
    font-weight: 800;
    border: 2px solid var(--gold-deep); /* מסגרת זהב דקה ומקצועית */
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(179, 143, 77, 0.15); /* הצללה זהובה עדינה */
}

.checkout-btn i {
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.checkout-btn:hover {
    background: var(--gold-deep); /* הופך לזהב מלא במעבר עכבר */
    color: #fff; /* טקסט הופך ללבן */
    box-shadow: 0 8px 25px rgba(179, 143, 77, 0.3); /* הצללה חזקה יותר */
    transform: translateY(-3px); /* קופץ מעט למעלה */
}

.checkout-btn:hover i {
    transform: translateX(-5px);
}

/* --- מסך תשלום (Checkout Modal) - מעוגל ורך --- */
.modal-content {
    border-radius: 25px !important;
    background: var(--cream-bg) !important;
    border: none !important;
}

.modal-header {
    background: #fff !important;
    color: var(--gold-deep) !important;
    border-bottom: 1px solid #eee !important;
}

.delivery-option-btn {
    border: 2px solid #e0e0e0;
    background-color: #fff;
    color: #555;
    transition: all 0.3s ease;
    opacity: 0.8; 
    border-radius: 18px !important; /* מעוגל יותר */
    padding: 15px !important;
}

.btn-check:checked + .delivery-option-btn {
    background-color: #fff; /* נשאר לבן */
    color: var(--gold-deep); /* טקסט זהב */
    border-color: var(--gold-deep); /* מסגרת זהב */
    opacity: 1; 
    box-shadow: 0 5px 15px rgba(179, 143, 77, 0.1); 
    transform: translateY(-2px); 
    font-weight: bold;
}

@media (max-width: 576px) {
    .delivery-option-btn {
        padding: 12px !important;
        font-size: 0.95rem;
    }
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 12px 18px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold-deep);
    box-shadow: 0 0 0 0.25rem rgba(179, 143, 77, 0.15);
}