html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h, 93px) + var(--cats-h, 56px) + 8px);
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: #f8fafc; color: #1e293b; min-height: 100vh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }

.announcement-bar {
    background-color: #15803d;
    color: #ffffff;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative; /* שלב 4: הפס הירוק נגלל עם הדף, רק הכותרת הלבנה נשארת למעלה */
}

header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}
/* שלב 4: הלוגו רחב, ולכן מוצג במלואו כמלבן מעוגל ולא נחתך לעיגול */
.logo-img { height: 60px; width: auto; aspect-ratio: 1768 / 889; border-radius: 10px; object-fit: contain; background: #f6e7b4; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08); flex-shrink: 0; }
h1 { font-size: 1.5rem; font-weight: 900; color: #0f172a; }
.subtitle { font-size: 0.75rem; color: #64748b; font-weight: 500; }
.cart-btn {
    background: #15803d;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.cart-btn:hover { background: #166534; }
.cart-badge { background: white; color: #15803d; font-size: 0.75rem; font-weight: bold; padding: 0.125rem 0.5rem; border-radius: 9999px; }

main { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 1.5rem 1rem 5rem 1rem; 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
}

.top-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-info-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

/* שלב 4: במחשב (מ־1024 פיקסלים) הסל עובר לעמודה הצדדית ונשאר גלוי בזמן הגלילה */
@media(min-width: 1024px) {
    .top-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
    }
    .side-info-panel {
        position: sticky;
        top: calc(var(--header-h, 93px) + 1rem); /* מתחת לכותרת הלבנה */
        max-height: calc(100vh - var(--header-h, 93px) - 2rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        padding: 3px; /* מקום למסגרת הפוקוס */
        margin: -3px;
    }
    .side-info-panel .bottom-cart-panel {
        max-width: none;
        margin: 0;
        padding: 1rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    }
    .side-info-panel .checkout-form { margin-top: 1rem; padding: 0.85rem; }
    .side-info-panel .success-box { padding: 1rem 0.25rem; }
}

.sidebar-box {
    background: white;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.section-title { font-size: 1.25rem; font-weight: bold; color: #0f172a; margin-bottom: 1rem; }

.catalog-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

@media(min-width: 768px) {
    .catalog-header {
        flex-direction: row;
        align-items: center !important;
    }
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 0.65rem 2.5rem;
    font-size: 16px !important;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 9999px;
    outline: none;
    transition: all 0.2s ease;
    color: #1e293b;
}

.search-container input:focus {
    border-color: #16a34a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.search-icon {
    position: absolute;
    right: 0.8rem;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.clear-search-btn {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    color: #64748b;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.clear-search-btn:hover {
    background: #cbd5e1;
    color: #1e293b;
}

@media (max-width: 767px) {
    .search-container { max-width: 100%; }
    .header-inner .subtitle { display: flex !important; font-size: 0.72rem; margin-top: 0.15rem; }
    .quantity-control { height: 44px !important; }
    .unit-select, .unit-badge { height: 44px !important; }
}

.categories-bar { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.75rem; margin-bottom: 1rem; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.categories-bar::-webkit-scrollbar { display: none; }
.category-tab { background: #e2e8f0; color: #475569; border: none; padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.category-tab:hover { background: #cbd5e1; }
.category-tab.active { background: #15803d; color: white; }

.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
@media(min-width: 768px) { 
    .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
}
/* מסך בינוני עם סל בצד: 3 מוצרים בשורה, כדי שהכרטיסים לא יידחסו */
@media(min-width: 1024px) and (max-width: 1279px) {
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.product-card { background: white; border-radius: 1rem; overflow: hidden; border: 1px solid #f1f5f9; box-shadow: 0 1px 2px rgba(0,0,0,0.02); display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.2s, box-shadow 0.2s; position: relative; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }

.product-card.out-of-stock { background: #f1f5f9; opacity: 0.75; }
.product-card.out-of-stock img { filter: grayscale(100%); }

.product-img-container { width: 100%; height: 160px; background: #e2e8f0; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .product-img { transform: scale(1.04); }

.product-info { padding: 0.85rem 0.75rem; display: flex; flex-direction: column; justify-content: space-between; flex-grow: 1; gap: 0.75rem; text-align: right; }
.product-name { font-weight: bold; font-size: 1rem; color: #1e293b; }
.product-price { color: #15803d; font-weight: 600; font-size: 0.875rem; }

.product-actions-wrapper { margin-top: 0.25rem; }
.card-action-row { display: flex; align-items: center; gap: 0.35rem; width: 100%; }

.quantity-control {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.2s;
}

.quantity-control:focus-within { border-color: #16a34a; }

.qty-btn {
    background: #f1f5f9;
    color: #334155;
    border: none;
    width: 28px;
    height: 100%;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    user-select: none;
}

.qty-btn:hover:not(:disabled) { background: #e2e8f0; color: #0f172a; }
.qty-btn:active:not(:disabled) { background: #cbd5e1; }

.product-input {
    width: 100%;
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    font-size: 16px !important;
    font-weight: 600;
    color: #0f172a;
    border: none;
    border-right: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    outline: none;
    background: #ffffff;
    text-align: center;
    appearance: textfield; 
    -moz-appearance: textfield; 
}

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

.unit-select {
    height: 36px;
    padding: 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
    transition: border-color 0.2s;
}

.unit-select:focus { border-color: #16a34a; }

.unit-badge {
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-qty-row { display: flex; gap: 0.3rem; margin-bottom: 0.45rem; flex-wrap: wrap; }
.quick-qty-btn { font-size: 0.72rem; font-weight: 500; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 0.375rem; padding: 0.2rem 0.45rem; cursor: pointer; color: #334155; transition: all 0.15s; }
.quick-qty-btn:hover { background: #dcfce7; border-color: #86efac; color: #15803d; }

.bottom-cart-panel { 
    background: white; 
    border-radius: 1rem; 
    border: 1px solid #e2e8f0; 
    padding: 1.5rem; 
    width: 100%;
    max-width: 750px;
    margin: 1rem auto 0 auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header-box { margin-bottom: 0.75rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 0.75rem; }
.sidebar-header-box h2 { font-size: 1.15rem !important; font-weight: bold !important; color: #0f172a; margin-bottom: 0.15rem; }
.sidebar-subtitle { font-size: 0.75rem !important; color: #64748b !important; display: block; }

.clear-cart-btn { background: none; border: none; color: #64748b; font-size: 0.75rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; transition: color 0.2s; padding: 0.25rem 0.5rem; border-radius: 0.25rem; margin-bottom: 0.25rem; }
.clear-cart-btn:hover { color: #ef4444; background: #fee2e2; }

.cart-items-list { margin-top: 0.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.cart-item { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; padding: 0.5rem 0.75rem; border-radius: 0.75rem; font-size: 0.875rem; }

.remove-btn { color: #64748b; border: none; background: none; font-size: 1rem; cursor: pointer; padding: 0.25rem; transition: color 0.2s; }
.remove-btn:hover { color: #ef4444; }

.hours-title { font-weight: bold; margin-bottom: 0.2rem; display: flex; align-items: center; gap: 0.25rem; color: #0f172a; }
.hours-card { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 0.75rem; }
.hours-grid { display: flex; flex-direction: column; gap: 0.15rem; color: #334155; line-height: 1.25; }

.checkout-form { margin-top: 1.5rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.checkout-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; gap: 0.5rem; }
.no-payment-badge { font-size: 0.7rem; color: #15803d; font-weight: 600; background: #dcfce7; padding: 0.125rem 0.375rem; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }

.form-group label { display: block; font-size: 0.75rem; font-weight: 600; color: #475569; margin-bottom: 0.25rem; }
.form-group input, .form-group textarea { width: 100%; padding: 0.5rem 0.75rem; font-size: 16px !important; border: 1px solid #cbd5e1; border-radius: 0.75rem; outline: none; background: #ffffff; }
.form-group input:focus, .form-group textarea:focus { border-color: #16a34a; }

.save-details-group { margin-top: -0.25rem; margin-bottom: 0.25rem; }
.save-details-label { display: flex !important; align-items: center; gap: 0.5rem; font-size: 0.75rem !important; color: #475569 !important; font-weight: 500 !important; cursor: pointer; }
.save-details-label input[type="checkbox"] { width: 16px !important; height: 16px !important; cursor: pointer; accent-color: #16a34a; }

.submit-btn { width: 100%; margin-top: 0.5rem; background: #15803d; color: white; font-weight: bold; padding: 0.75rem; border: none; border-radius: 0.75rem; cursor: pointer; transition: background 0.2s; font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.submit-btn:hover { background: #166534; }
.submit-btn:disabled { background: #64748b; cursor: not-allowed; }

.sticky-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #15803d;
    color: white;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    padding: 0.875rem 1.25rem;
    display: none; 
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    cursor: pointer;
    font-weight: 600;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    animation: slideUp 0.3s ease-out;
    transition: background-color 0.3s ease;
}

.sticky-cart-bar.active { display: flex; }
.sticky-cart-bar.suggest-list { background: #0369a1; }
.sticky-cart-content { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.sticky-cart-action { font-size: 0.85rem; background: rgba(255, 255, 255, 0.2); padding: 0.25rem 0.6rem; border-radius: 0.5rem; }

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media(min-width: 768px) { .sticky-cart-bar { display: none !important; } }

.success-box { text-align: center; padding: 2rem 1rem; display: none; }
.success-box.active { display: block; }

footer { background: white; border-top: 1px solid #f1f5f9; margin-top: 3rem; padding: 1.5rem; text-align: center; font-size: 0.75rem; color: #64748b; }
.hidden { display: none !important; }

@media(max-width: 767px) {
    .header-inner { padding: 0.75rem 1rem; gap: 0.5rem; flex-wrap: wrap; }
    .logo-area { min-width: 0; flex: 1; gap: 0.75rem; }
    .logo-area > div { min-width: 0; }
    .logo-area h1 { font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .logo-img { height: 42px; border-radius: 8px; }
    .cart-btn { padding: 0.5rem 0.875rem; gap: 0.4rem; white-space: nowrap; flex-shrink: 0; }
}

#back-to-top-btn { position: fixed; bottom: 5rem; left: 1.25rem; background: #ffffff; color: #16a34a; border: 2px solid #16a34a; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); z-index: 99; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
#back-to-top-btn.show { opacity: 1; visibility: visible; }
#back-to-top-btn:hover { background: #16a34a; color: #ffffff; }

@media(min-width: 768px) { #back-to-top-btn { bottom: 2rem; } }

.kashrut-link { color: #15803d; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(21, 128, 61, 0.4); text-underline-offset: 3px; transition: text-decoration-color 0.2s, color 0.2s; }
.kashrut-link:hover { color: #16a34a; text-decoration-color: #16a34a; }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.8); display: flex; align-items: center; justify-content: center; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; padding: 1.5rem; backdrop-filter: blur(4px); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: #ffffff; padding: 0.5rem; border-radius: 1rem; position: relative; max-width: 100%; max-height: 90vh; display: flex; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); transform: scale(0.95) translateY(10px); transition: transform 0.3s ease; }
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }
.kashrut-img { max-width: 100%; max-height: calc(90vh - 1rem); object-fit: contain; border-radius: 0.5rem; }

.close-modal-btn { position: absolute; top: -12px; right: -12px; background: #dc2626; color: white; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; font-weight: bold; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.2); z-index: 10; transition: background 0.2s, transform 0.2s; }
.close-modal-btn:hover { background: #b91c1c; transform: scale(1.05); }

.subtitle { display: flex; flex-wrap: wrap; gap: 0.2rem 0.4rem; line-height: 1.3; white-space: normal; }
.announcement-bar { white-space: normal; padding-left: 0.5rem; padding-right: 0.5rem; }

@media (max-width: 767px) {
    footer { padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
    #back-to-top-btn { z-index: 105 !important; bottom: calc(85px + env(safe-area-inset-bottom)) !important; }
}

/* שלב 4: במחשב ובטאבלט החץ עובר לצד ימין, ממורכז מעל כפתור הוואטסאפ, כדי לא לכסות את הסל */
@media (min-width: 768px) {
    #back-to-top-btn { left: auto; right: calc(25px + 7.5px); bottom: calc(25px + 55px + 12px) !important; }
}

@media (max-width: 767px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.5rem !important; }
    main { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    .product-card { min-width: 0 !important; }
    .product-info { padding: 0.6rem 0.35rem !important; }
    .card-action-row { gap: 0.15rem !important; }
    .qty-btn { width: 40px !important; font-size: 1.35rem !important; }
    .product-input { padding: 0 !important; font-size: 16px !important; /* פחות מ־16 גורם לאייפון להגדיל את המסך בלחיצה */ width: 0 !important; min-width: 0 !important; flex: 1 1 0px !important; }
    .unit-select, .unit-badge { padding: 0 0.15rem !important; font-size: 0.75rem !important; min-width: 0 !important; flex-shrink: 1 !important; }
    .product-name { font-size: 0.9rem !important; word-wrap: break-word !important; white-space: normal !important; word-break: break-word !important; }
    .product-price { white-space: normal !important; word-break: break-word !important; }
    .quantity-control { width: 100% !important; min-width: 0 !important; }
    main > div { min-width: 0 !important; }
}

.product-card.in-cart { border: 2px solid #16a34a; background-color: #f0fdf4; box-shadow: 0 4px 10px rgba(22, 163, 74, 0.15); transform: translateY(-2px); }
.product-card.in-cart .product-img-container { background-color: #dcfce7; }
.product-card.in-cart .quantity-control { border-color: #16a34a; box-shadow: 0 0 0 1px #16a34a; }
.product-card.in-cart .qty-btn { background-color: #dcfce7; color: #15803d; }
.product-card.in-cart .qty-btn:hover { background-color: #bbf7d0; }

.price-disclaimer { background-color: #f1f5f9; color: #475569; font-size: 0.75rem; line-height: 1.4; padding: 0.75rem; border-radius: 0.5rem; border-right: 3px solid #94a3b8; margin-bottom: 0.75rem; }
.price-disclaimer strong { color: #334155; display: inline-block; margin-bottom: 0.2rem; }

.whatsapp-float { position: fixed; bottom: 25px; right: 25px; width: 55px; height: 55px; background-color: #25d366; border-radius: 50px; display: flex; align-items: center; justify-content: center; box-shadow: 0px 4px 10px rgba(0,0,0,0.15); z-index: 90; transition: transform 0.2s, box-shadow 0.2s; }
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0px 6px 14px rgba(0,0,0,0.2); }
.whatsapp-icon { width: 35px; height: 35px; }

@media (max-width: 767px) {
    .whatsapp-float { bottom: 85px; right: 15px; width: 45px; height: 45px; }
    .whatsapp-icon { width: 28px; height: 28px; }
}

.delivery-method-selector { display: flex; background: #e2e8f0; border-radius: 0.75rem; padding: 0.25rem; margin-bottom: 1rem; gap: 0; }
.method-btn { flex: 1; padding: 0.5rem; border: none; background: transparent; color: #64748b; font-weight: 600; font-size: 0.875rem; border-radius: 0.5rem; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.method-btn.active { background: #ffffff; color: #15803d; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.delivery-cost { font-size: 0.7rem; font-weight: normal; opacity: 0.8; margin-top: 0.1rem; }

/* הגדרת כפתורי הרשימה - תמיד עמודה אנכית כדי למנוע דחיסות */
.fixed-list-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.load-list-wrapper { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    width: 100%;
}

.list-btn { flex: 1; padding: 0.65rem; border: none; border-radius: 0.5rem; font-size: 0.75rem; font-weight: bold; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; gap: 0.25rem; }
.save-list-btn { background: transparent; border: 1px solid #b45309; color: #b45309; }
.save-list-btn:hover { background: #fffbeb; }
.load-list-btn { background: transparent; border: 1px solid #0369a1; color: #0369a1; width: 100%; }
.load-list-btn:hover { background: #f0f9ff; }
.load-list-btn:disabled { background: #e2e8f0; color: #64748b; border-color: #cbd5e1; cursor: wait; }

.delete-list-btn { background: #f1f5f9; border: none; border-radius: 0.5rem; padding: 0.65rem 0.75rem; cursor: pointer; transition: all 0.2s; font-size: 0.85rem; font-weight: bold; color: #64748b; display: flex; align-items: center; justify-content: center; width: 100%; }
.delete-list-btn:hover { background: #fee2e2; color: #ef4444; }

/* ==========================================
   שלב 3: הודעות בתוך הדף, חיפוש, נגישות
   ========================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* טבלת פוקוס נראית למקלדת */
:focus-visible { outline: 3px solid #0369a1; outline-offset: 2px; }
.form-group input:focus-visible, .form-group textarea:focus-visible,
.search-container input:focus-visible, .unit-select:focus-visible { outline: 3px solid #0369a1; outline-offset: 1px; }
.quantity-control:focus-within { outline: 2px solid #0369a1; outline-offset: 1px; }

.grid-note { grid-column: 1 / -1; text-align: center; padding: 2rem; color: #64748b; }

/* חלון הודעות */
.dialog-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.6); display: none; align-items: center; justify-content: center; z-index: 3000; padding: 1.25rem; backdrop-filter: blur(2px); }
.dialog-overlay.active { display: flex; animation: dialogFade 0.15s ease-out; }
.dialog-box { background: #ffffff; border-radius: 1rem; padding: 1.25rem; max-width: 420px; width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35); text-align: right; }
.dialog-title { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin-bottom: 0.5rem; }
.dialog-title:empty { display: none; }
.dialog-message { font-size: 0.95rem; line-height: 1.55; color: #334155; white-space: pre-line; }
.dialog-actions { display: flex; gap: 0.5rem; margin-top: 1.1rem; flex-wrap: wrap; }
.dialog-btn { flex: 1 1 120px; padding: 0.7rem 1rem; border-radius: 0.75rem; border: 1px solid transparent; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.dialog-btn-primary { background: #15803d; color: #ffffff; }
.dialog-btn-primary:hover { background: #166534; }
.dialog-btn-secondary { background: #ffffff; color: #334155; border-color: #cbd5e1; }
.dialog-btn-secondary:hover { background: #f1f5f9; }
.dialog-btn-danger { background: #b91c1c; color: #ffffff; }
.dialog-btn-danger:hover { background: #991b1b; }
@keyframes dialogFade { from { opacity: 0; } to { opacity: 1; } }

/* הודעה קצרה שנעלמת */
.toast { position: fixed; bottom: calc(5.5rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%) translateY(10px); background: #0f172a; color: #ffffff; padding: 0.7rem 1.1rem; border-radius: 0.75rem; font-size: 0.9rem; font-weight: 600; max-width: 90vw; text-align: center; z-index: 3100; opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 768px) { .toast { bottom: 2rem; } }

/* שגיאות בשדות */
.field-error { color: #b91c1c; font-size: 0.8rem; font-weight: 600; margin-top: 0.3rem; line-height: 1.3; }
.field-error:empty { display: none; }
.form-group input.input-error, .form-group textarea.input-error { border-color: #b91c1c; background: #fef2f2; }

/* שגיאת טעינה ואין תוצאות */
.load-error, .no-results { grid-column: 1 / -1; text-align: center; padding: 2rem 1rem; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 1rem; color: #475569; }
.load-error-title, .no-results-title { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin-bottom: 0.4rem; }
.load-error p, .no-results p { font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; }
.load-error-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.load-error-btn { background: #15803d; color: #ffffff; border: none; border-radius: 0.75rem; padding: 0.65rem 1.4rem; font-size: 0.95rem; font-weight: 700; cursor: pointer; }
.load-error-btn:hover { background: #166534; }
.load-error-link, .no-results-link { display: inline-block; background: #ffffff; color: #15803d; border: 1px solid #15803d; border-radius: 0.75rem; padding: 0.6rem 1.2rem; font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.load-error-link:hover, .no-results-link:hover { background: #f0fdf4; }

/* מוצר שאזל (מופיע רק בחיפוש) */
.unavailable-heading { grid-column: 1 / -1; font-size: 0.9rem; font-weight: 700; color: #475569; margin-top: 0.5rem; }
.product-card.unavailable-card { background: #f1f5f9; }
.product-card.unavailable-card:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.product-card.unavailable-card:hover .product-img { transform: none; }
.product-card.unavailable-card img { filter: grayscale(100%); }
.unavailable-label { color: #b91c1c; font-weight: 700; font-size: 0.875rem; margin-top: 0.15rem; }

/* פס לקוח חוזר: מובייל בלבד */
.top-list-banner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; border-radius: 0.75rem; padding: 0.55rem 0.85rem; margin-bottom: 1rem; font-size: 0.9rem; font-weight: 600; }
.top-list-banner-btn { background: #0369a1; color: #ffffff; border: none; border-radius: 0.5rem; padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.top-list-banner-btn:hover { background: #075985; }
.top-list-banner-btn:disabled { background: #64748b; cursor: wait; }
@media (min-width: 1024px) { .top-list-banner { display: none !important; } }

/* מסך הצלחה */
.success-order-number { font-size: 1.15rem; font-weight: 800; color: #0f172a; margin: 0.5rem 0 0.6rem; }
.success-order-summary { max-width: 420px; margin: 1rem auto 0; text-align: right; }
.success-items-title { font-size: 0.85rem; font-weight: 700; color: #334155; margin-bottom: 0.35rem; }
.success-order-items { list-style: none; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 0.35rem 0.9rem; font-size: 0.875rem; color: #334155; }
.success-order-items li { padding: 0.35rem 0; border-bottom: 1px solid #e2e8f0; }
.success-order-items li:last-child { border-bottom: none; }

/* כבוד להעדפת "הפחת תנועה" של המערכת */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
/* ==========================================
   שלב 4: בחירת יחידה בכפתורים, וכפתורי כמות גדולים במובייל
   ========================================== */

.unit-toggle {
    display: inline-flex;
    flex-shrink: 0;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #f1f5f9;
    padding: 2px;
    gap: 2px;
}
.unit-toggle-btn {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    min-width: 32px;
    transition: background 0.15s, color 0.15s;
}
.unit-toggle-btn:hover:not(.active) { background: #e2e8f0; color: #0f172a; }
/* היחידה הנבחרת: לבן עם טקסט ירוק. ירוק מלא רק בכרטיס שכבר בסל */
.unit-toggle { background: #ffffff; }
.unit-toggle-btn { color: #64748b; font-weight: 600; }
.unit-toggle-btn.active { background: #dcfce7; color: #14532d; font-weight: 800; box-shadow: inset 0 0 0 1.5px #16a34a; }
.product-card.in-cart .unit-toggle-btn.active { background: #15803d; color: #ffffff; }
.product-card.in-cart .unit-toggle { border-color: #86efac; }

/* כרטיס צר (מובייל וטאבלט): היחידה עוברת לשורה משלה מעל הכמות, בכל הכרטיסים, כדי שהשורות יהיו מיושרות */
@media (max-width: 1023px) {
    .card-action-row { flex-wrap: wrap; row-gap: 0.4rem !important; }
    .card-action-row .unit-toggle { order: -1; width: 100%; }
    .card-action-row .unit-toggle-btn { flex: 1 1 0; }
    .card-action-row .unit-badge { order: -1; width: 100%; height: 36px !important; flex-shrink: 0 !important; background: #f8fafc; }
    .card-action-row .quantity-control { flex: 1 1 100%; }
}

/* שורת משלוח / איסוף בעמודה הצדדית הצרה */
@media (min-width: 1024px) {
    .side-info-panel .method-btn { font-size: 0.8rem; }
}

@media (max-width: 767px) {
    .unit-toggle { height: 36px !important; }
    .unit-toggle-btn { font-size: 0.85rem; }
    .quick-qty-row { gap: 0.3rem; margin-bottom: 0.4rem; }
    .quick-qty-btn { flex: 0 0 auto; min-height: 30px; font-size: 0.75rem; padding: 0.2rem 0.6rem; background: #ffffff; border-color: #e2e8f0; color: #475569; } /* קיצורי דרך קטנים ועדינים, כמו במחשב */
}

/* חץ "חזרה למעלה": חץ ירוק במקום אימוג׳י */
#back-to-top-btn svg { width: 20px; height: 20px; display: block; }

/* כותרת בטלפון: לוגו מלא, כפתור סל קומפקטי (עגלה ומספר), וסלוגן שמתחלק יפה לשתי שורות */
@media (max-width: 767px) {
    .cart-btn { padding: 0.5rem 0.75rem; }
    .cart-btn > span[aria-hidden="true"] { font-size: 1.15rem; line-height: 1; }
    .cart-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; } /* מוסתר בעין, נשאר לקוראי מסך */
    .subtitle-sep { display: none; }
    .subtitle .tagline { flex-basis: 100%; text-wrap: balance; }
}

/* טלפונים צרים במיוחד (פחות מ־360 פיקסלים): לוגו ושם קטנים מעט, כדי שהשם לא ייחתך */
@media (max-width: 359px) {
    .logo-img { height: 34px; }
    .logo-area { gap: 0.5rem !important; }
    .logo-area h1 { font-size: 1.1rem; }
    .header-inner { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
}

/* הודעה מחוץ לשעות ההזמנה */
.order-hours-notice { background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; border-radius: 0.75rem; padding: 0.65rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; font-weight: 600; line-height: 1.45; }
.order-hours-notice.compact { margin-bottom: 0; font-size: 0.8rem; padding: 0.55rem 0.75rem; }

/* הודעה על מחירים, משקל ויחידות (בעמודה הצדדית, מתחת לשעות) */
.price-note-card { background: #f8fafc; border: 1px solid #e2e8f0; border-right: 3px solid #94a3b8; color: #475569; font-size: 0.75rem; line-height: 1.5; padding: 0.85rem 1rem; }
.price-note-card strong { color: #334155; }

/* שורת הקטגוריות נשארת מוצמדת מתחת לכותרת בזמן גלילה.
   הגובה המדויק של הכותרת נמדד בקוד (משתנה בין טלפון למחשב) */
.categories-bar {
    position: sticky;
    top: var(--header-h, 93px);
    z-index: 40;
    background: #f8fafc;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
    transition: box-shadow 0.2s;
}
.categories-bar.stuck { box-shadow: 0 6px 8px -6px rgba(15, 23, 42, 0.18); }
@media (max-width: 767px) {
    /* ברוחב מלא, כדי שכרטיסים לא יבצבצו בצדדים מתחת לשורה */
    .categories-bar { margin-left: -0.5rem; margin-right: -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
}
/* טקסט "אודות" מתחת לקטלוג (חשוב לגוגל) */
.about-section { margin-top: 2rem; background: #ffffff; border: 1px solid #f1f5f9; border-radius: 1rem; padding: 1.25rem; color: #475569; font-size: 0.9rem; line-height: 1.6; }
.about-section h2 { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin-bottom: 0.5rem; }
.about-section p + p { margin-top: 0.5rem; }
.about-section a { color: #15803d; font-weight: 600; }


/* הפס הירוק העליון: כל חלק נשאר שלם, ואם אין מקום הם נשברים בדיוק ביניהם */
.announcement-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 0.6rem; row-gap: 0.1rem; }
.ann-item { white-space: nowrap; }
@media (max-width: 480px) {
    .announcement-bar { font-size: 0.8rem; padding-top: 0.4rem; padding-bottom: 0.4rem; letter-spacing: 0; }
    .ann-long { display: none; } /* בטלפון: "הזמנות עד 17:00" במקום הנוסח הארוך */
}
@media (max-width: 340px) {
    .ann-sep { display: none; } /* בטלפונים צרים מאוד: שתי שורות מסודרות, בלי הקו המפריד */
}

/* תוויות על תמונת המוצר: "מבצע" באדום, "חדש" בכתום. המסגרת הלבנה מפרידה אותן מכל תמונה */
.product-badges { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; pointer-events: none; }
.product-badge { font-size: 0.75rem; font-weight: 800; line-height: 1.2; padding: 0.2rem 0.65rem; border: 2px solid #ffffff; border-radius: 9999px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); white-space: nowrap; }
.new-badge { background: #f59e0b; color: #451a03; }
.sale-badge { background: #dc2626; color: #ffffff; }
@media (min-width: 768px) {
    .product-badges { top: 0.6rem; right: 0.6rem; }
    .product-badge { font-size: 0.85rem; padding: 0.25rem 0.8rem; }
}

/* כותרת בטלפון: אזור הטקסט מתפרס על כל הרוחב הפנוי בין הלוגו לסל, כדי שהסלוגן לא יידחס לטור צר ליד הלוגו */
@media (max-width: 767px) {
    .logo-area > div { flex: 1 1 auto; }
    .header-inner { gap: 0.75rem; }
}
@media (max-width: 430px) {
    .tag-long { display: none; } /* בטלפון: "ירקות טריים עד הבית" בשורה אחת, במקום סלוגן שנשבר לשתיים */
    .subtitle .tagline { white-space: nowrap; }
}

/* כותרת בטלפון: השם, הסלוגן והכשרות ממורכזים ברווח שבין הלוגו לסל */
@media (max-width: 767px) {
    .logo-area > div { text-align: center; }
    .header-inner .subtitle { justify-content: center; }
}

/* טופס ההזמנה: מה שהלקוח צריך לדעת ממש לפני השליחה */
.checkout-price-note { font-size: 0.75rem; line-height: 1.5; color: #475569; background: #ffffff; border: 1px solid #e2e8f0; border-right: 3px solid #94a3b8; padding: 0.55rem 0.75rem; }
.checkout-hours-line { text-align: center; font-size: 0.72rem; color: #64748b; margin-top: 0.5rem; }
@media (max-width: 1023px) {
    .price-note-card { display: none; } /* בטלפון ובטאבלט ההודעה מופיעה בתוך טופס ההזמנה, כדי שלא תופיע פעמיים */
}

/* שמירת רשימה קבועה: קישור קטן בסיכום ההזמנה, וכפתור במסך ההצלחה */
.cart-tools-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.cart-tools-row .clear-cart-btn { margin-inline-start: auto; }
.cart-save-list-btn { background: none; border: none; color: #b45309; font-size: 0.75rem; font-weight: 600; cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 0.25rem; margin-bottom: 0.25rem; transition: background 0.2s; }
.cart-save-list-btn:hover { background: #fffbeb; }
.success-save-list-btn { display: block; width: 100%; max-width: 320px; margin: 1.25rem auto 0; background: #ffffff; border: 1.5px solid #b45309; color: #b45309; font-size: 0.95rem; font-weight: 700; padding: 0.7rem 1rem; border-radius: 0.75rem; cursor: pointer; transition: background 0.2s; }
.success-save-list-btn:hover { background: #fffbeb; }
.success-save-list-btn.saved { background: #f0fdf4; border-color: #16a34a; color: #15803d; cursor: default; }
/* כמויות בתוך הסל: פלוס ומינוס סביב תג הכמות */
.cart-item { gap: 0.5rem; padding: 0.5rem 0.6rem; }
.cart-item-name { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.cart-item-img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cart-item-title { font-weight: 500; color: #1e293b; line-height: 1.25; overflow-wrap: anywhere; }
.cart-qty { display: inline-flex; align-items: center; flex-shrink: 0; background: #dcfce7; border-radius: 0.5rem; overflow: hidden; }
/* touch-action: לחיצות מהירות על פלוס לא יגרמו לטלפון לעשות זום */
.cart-qty-btn { width: 28px; height: 28px; border: none; background: transparent; color: #15803d; font-size: 1.05rem; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; user-select: none; touch-action: manipulation; transition: background 0.15s; }
.cart-qty-btn:hover { background: #bbf7d0; }
.cart-qty-btn:active { background: #86efac; }
.cart-qty-val { min-width: 3.4rem; text-align: center; color: #15803d; font-size: 0.75rem; font-weight: bold; white-space: nowrap; }
.cart-item .remove-btn { flex-shrink: 0; touch-action: manipulation; }

/* טלפון וטאבלט: כפתורים גדולים יותר ללחיצה באצבע */
@media (max-width: 1023px) {
    .cart-item { padding: 0.55rem 0.65rem; }
    .cart-qty-btn { width: 36px; height: 36px; font-size: 1.25rem; }
    .cart-qty-val { font-size: 0.8rem; min-width: 3.6rem; }
    .cart-item .remove-btn { padding: 0.4rem; }
}