/* ── Cart Modal ── */
.cart-modal {
    position: fixed; top: 0; right: -400px; width: 400px; height: 100vh;
    background: white; z-index: 1003; transition: right 0.3s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2); overflow-y: auto;
    display: flex; flex-direction: column;
}
.cart-modal.active { right: 0; }
.cart-header { padding: 8px 0; border-bottom: 2px solid #eee; display: flex; justify-content: space-between; align-items: center; background: white; }
.cart-title { font-size: 20px; font-weight: 700; }
.cart-close { font-size: 24px; cursor: pointer; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background-color 0.3s ease; }
.cart-close:hover { background: #f0f0f0; }
.cart-items { padding: 0; margin-bottom: 12px; }
.cart-item { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid #eee; }
.cart-item-image { width: 60px; height: 60px; background: #f0f0f0; border-radius: 10px; flex-shrink: 0; overflow: hidden; }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.cart-item-details { flex: 1; }
.cart-item-name { font-weight: 600; margin-bottom: 5px; }
.cart-item-weight { font-size: 14px; color: #666; margin-bottom: 5px; }
.cart-item-price { font-weight: 700; color: var(--primary-black); display: flex; flex-direction: column; gap: 2px; }
.cart-item-price-eur { font-size: 16px; }
.cart-item-price-bgn { font-size: 13px; color: #666; }
.cart-item-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.quantity-controls { display: flex; align-items: center; gap: 10px; }
.qty-btn { width: 25px; height: 25px; border: 1px solid #ddd; background: white; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.3s ease; }
.qty-btn:hover { border-color: var(--primary-yellow); background: var(--primary-yellow); }
.remove-item { color: #ff4444; cursor: pointer; font-size: 14px; text-decoration: underline; }

/* ── Checkout Form ── */
.cart-form { padding: 20px; border-top: 2px solid #eee; }
.form-group { margin-bottom: 6px; }
.form-group label { display: block; margin-bottom: 5px; font-family: var(--font-secondary); font-weight: 600; color: #333; font-size: 14px; }
.form-group input { width: 100%; padding: 12px 15px; border:1.4px solid #ddd;; border-radius: 25px; font-family: inherit; font-size: 16px; transition: border-color 0.3s ease; }
.form-group input:focus { outline: none; border-color: var(--primary-yellow); }
.form-group input.valid { background-color: #e8f5e9; border-color: #4caf50; }
.form-group input.error { border-color: #ff4444; animation: shake 0.5s ease-in-out; }
.form-group input:disabled { background-color: #f5f5f5; color: #999; cursor: not-allowed; }
.form-group-big{background: #f5f5f5;padding: 6px;border-radius: 8px;margin-bottom: 25px;border: 1px solid #f1f1f1;}

.cart-total { padding: 5px 20px 20px; background: #fafafa; }
.total-amount { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 20px; }
.total-eur { font-size: 24px; font-weight: 800; color: var(--primary-black); }
.total-bgn { font-size: 18px; font-weight: 600; color: #666; margin-top: 5px; display: inline-block; }
.order-btn { width: 100%; background: var(--primary-yellow); color: var(--primary-black); border: none; padding: 15px; border-radius: 30px; font-family: var(--font-primary); font-size: 20px; font-weight: 900; font-style: italic; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px; }
.order-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.5); z-index: 1002; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.cart-overlay.active { opacity: 1; visibility: visible; }
.empty-cart { text-align: center; padding: 40px 20px; color: #666; }
.empty-cart-icon { font-size: 48px; margin-bottom: 20px; opacity: 0.5; }

/* ── Validation messages ── */
.validation-message { font-size: 12px; margin-top: 5px; padding-left: 15px; min-height: 18px; }
.validation-message.success { color: #4caf50; }
.validation-message.error { color: #ff4444; }

/* ── Autocomplete ── */
.autocomplete-container { position: relative; }
.autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; max-height: 300px; overflow-y: auto; background: #f1f1f1; border: 2px solid #ddd; border-top: none; border-radius: 0 0 15px 15px; z-index: 1000; display: none; margin: 0 13px; }
.autocomplete-dropdown.show { display: block; }
.autocomplete-item { padding: 12px 15px; cursor: pointer; transition: background 0.2s ease; font-size: 14px; border-top: 0.5px solid #adadad; }
.autocomplete-item:hover { background: #f5f5f5; }
.office-item { display: flex; align-items: center; gap: 10px; }
.office-badge { padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.office-badge.office { background: #e3f2fd; color: #1976d2; }
.office-badge.apt { background: #f3e5f5; color: #7b1fa2; }
.office-name { flex: 1; }

/* ── Delivery progress (in cart) ── */
#deliveryProgress { text-align: center; }

/* ── Terms checkbox ── */
#agreeTerms {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px; min-width: 20px;
    border: 2px solid #ddd; border-radius: 5px;
    cursor: pointer; transition: all 0.3s ease;
    background: white; position: relative;
}
#agreeTerms:checked { background: var(--primary-yellow); border-color: var(--primary-yellow); }
#agreeTerms:checked::after {
    content: '✓'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); font-size: 13px; font-weight: 700; color: var(--primary-black);
}

/* ── Responsive cart ── */
@media (max-width: 768px) {
    .cart-modal { width: 100vw; right: -100vw; height: 100dvh; }
    .cart-items { flex: 1; overflow-y: auto; padding-bottom: 20px; }
    .cart-total { flex-shrink: 0; padding-bottom: 30px; }
}

/* ── Delivery progress bar ── */
.delivery-text { font-size: 13px; color: #666; margin-bottom: 8px; }
.delivery-bar-track { height: 6px; background: #eee; border-radius: 10px; overflow: hidden; }
.delivery-bar-fill { height: 100%; width: 0%; border-radius: 10px; transition: width 0.4s ease; background: var(--primary-yellow); }

/* ── Agree box ── */
.agree-box { margin-bottom: 15px; }
.agree-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; color: #444; line-height: 1.5; }
.agree-terms-link { color: var(--primary-black); font-weight: 700; text-decoration: underline; cursor: pointer; }
.agree-msg { font-size: 12px; color: #ff4444; padding-left: 30px; min-height: 16px; margin-top: 4px; }
