/* ================================================================
   Index Redesign — page-specific styles
   Works alongside the original style.css (header), search-ui.css
   (header search panel) and overlays.css (off-canvas menu).
   ================================================================ */

/* ================================================================
   Tailwind Utility Shims
   ----------------------------------------------------------------
   מחליפים את Tailwind CDN. זה הסט הקטן של utilities שאנחנו באמת
   משתמשים בהם ב-index.html — מחקה את ה-class names של Tailwind
   כך שלא צריך לשנות את ה-HTML בכלל. שמירה על breakpoints סטנדרטיים:
     sm: 640px, md: 768px, lg: 1024px
   ================================================================ */

/* --- Base Utilities (mobile-first) --- */
.mx-auto      { margin-left: auto; margin-right: auto; }
.max-w-7xl    { max-width: 80rem; }

.flex         { display: flex; }
.grid         { display: grid; }

.justify-between { justify-content: space-between; }
.items-center    { align-items: center; }

.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }

.px-4  { padding-left: 1rem; padding-right: 1rem; }
.pb-2  { padding-bottom: .5rem; }
.pb-16 { padding-bottom: 4rem; }
.pb-20 { padding-bottom: 5rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }

.text-xs   { font-size: .75rem;  line-height: 1rem; }
.text-base { font-size: 1rem;    line-height: 1.5rem; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-gray-800   { color: #1f2937; }
.text-yellow-600 { color: #ca8a04; }

.overflow-x-auto { overflow-x: auto; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --- sm: ≥ 640px --- */
@media (min-width: 640px) {
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- md: ≥ 768px --- */
@media (min-width: 768px) {
    .md\:mt-8        { margin-top: 2rem; }
    .md\:mt-10       { margin-top: 2.5rem; }
    .md\:mb-5        { margin-bottom: 1.25rem; }
    .md\:mb-6        { margin-bottom: 1.5rem; }
    .md\:pb-16       { padding-bottom: 4rem; }
    .md\:px-8        { padding-left: 2rem; padding-right: 2rem; }
    .md\:gap-4       { gap: 1rem; }
    .md\:gap-5       { gap: 1.25rem; }
    .md\:text-sm     { font-size: .875rem; line-height: 1.25rem; }
    .md\:text-xl     { font-size: 1.25rem; line-height: 1.75rem; }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- lg: ≥ 1024px --- */
@media (min-width: 1024px) {
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ----------------------------------------------------------------
   Base — only what the new homepage layout adds on top of style.css
   (style.css already sets body padding-top, font, reset, etc.)
---------------------------------------------------------------- */
body {
    font-family: 'Assistant', 'Segoe UI', sans-serif !important;
    background-color: #ffffff;
}

/* Hide scrollbar (used by the categories strip) */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ----------------------------------------------------------------
   Layout fallbacks — מבטיחים שהפריסה הבסיסית עובדת גם אם Tailwind CDN
   לא נטען (CSP/חיבור איטי). הקלאסים האלה הם ID-ים יציבים בעמוד.
---------------------------------------------------------------- */
#indexCategoriesList {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Sticky categories section - always attached to header */
.categories-sticky-section {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: #1e3a5f;
    margin-left: -1rem;
    margin-right: -1rem;
    margin-top: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
}

@media (min-width: 768px) {
    .categories-sticky-section {
        top: 70px;
        margin-left: -2rem;
        margin-right: -2rem;
        margin-top: -2rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Large screens - fix alignment */
@media (min-width: 1024px) {
    .categories-sticky-section {
        margin-right: 0;
        margin-left: 0;
        padding-left: 0;
        padding-right: 0;
        background: #1e3a5f;
    }
    
    .categories-sticky-section .categories-row-wrapper {
        border-radius: 0;
        max-width: none;
        margin: 0;
    }
}

/* Handle top marquee strip offset */
body.has-top-marquee-strip .categories-sticky-section {
    top: calc(60px + var(--top-marquee-strip-height));
}

@media (min-width: 768px) {
    body.has-top-marquee-strip .categories-sticky-section {
        top: calc(70px + var(--top-marquee-strip-height));
    }
}

#indexProductsGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 640px)  { #indexProductsGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px)  { #indexProductsGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1024px) { #indexProductsGrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ----------------------------------------------------------------
   Product modal — דמטרים/תיאור: הגדלה עדינה של גוף הטקסט
---------------------------------------------------------------- */
#productDetailsModal #modalDims,
#productDetailsModal .mobile-modal-details {
    font-size: 1rem;
    line-height: 1.65;
}

@media (min-width: 768px) {
    #productDetailsModal #modalDims,
    #productDetailsModal .mobile-modal-details {
        font-size: 1.05rem;
        line-height: 1.7;
    }
}

/* ----------------------------------------------------------------
   Total price — מחיר מקורי קווי (היה) לצד מחיר ההנחה הסופי
---------------------------------------------------------------- */
#quantityTotal .total-price {
    color: #1e293b;
    font-weight: 700;
}

#quantityTotal .total-price-old {
    text-decoration: line-through;
    color: #1e293b;
    font-weight: 500;
    margin-inline: 6px;
    opacity: .85;
    font-size: .85em;
}

/* When discount applied - price after discount in red */
#quantityTotal .total-price-old + .total-price {
    color: #dc2626;
}


/* line-clamp polyfill for the product card name */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Inline link-style button (resets default <button> chrome) */
.page-link-btn {
    background: none;
    border: none;
    outline: none;
    padding: 4px 8px;
    cursor: pointer;
    line-height: 1;
    transition: opacity .15s ease;
}

.page-link-btn:hover { opacity: .75; }
.page-link-btn:focus-visible { outline: 2px dashed currentColor; outline-offset: 2px; }

/* ----------------------------------------------------------------
   Page shell — full-width responsive container
---------------------------------------------------------------- */
.page-shell {
    background: transparent;
    width: 100%;
}

@media (min-width: 768px) {
    .page-shell { padding-top: 0; }
}

/* ----------------------------------------------------------------
   Categories text links — scrollable row with separators
---------------------------------------------------------------- */
.category-text-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
    line-height: 1;
}

.category-text-row::-webkit-scrollbar {
    display: none;
}

.category-text-link {
    flex-shrink: 1;
    padding: 4px 10px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.category-text-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
}

.category-text-link:last-child::before {
    display: none;
}

.category-text-link:hover {
    color: #1e3a5f;
}

.category-text-link.active {
    color: #1e3a5f;
    font-weight: 700;
}

/* Active category with subcategories - rounded tab */
.category-text-link.active.has-children {
    background: #1e3a5f;
    color: #fff;
    border-radius: 10px 10px 0 0;
    padding-top: 4px;
    padding-bottom: 4px;
    margin-bottom: -12px;
    position: relative;
    z-index: 2;
}

/* Unified categories wrapper */
.categories-unified-wrapper {
    position: relative;
    line-height: 1;
}

.categories-unified-wrapper.has-subcats {
    margin-bottom: 8px;
}

.categories-unified-wrapper.has-subcats .categories-row-wrapper {
    padding-bottom: 4px;
}

.category-separator {
    display: none; /* מוסתר - לא נדרש כשהקטגוריות ב-2 שורות */
}

@media (min-width: 768px) {
    .category-text-link {
        font-size: 17px;
        padding: 5px 16px;
    }
    
    .category-text-link::before {
        height: 14px;
    }
}

/* Categories row wrapper with edge arrows */
.categories-row-wrapper {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    background: #1e3a5f;
    border-radius: 0;
    margin: 0;
    padding: 2px 8px;
}

/* Main categories text links - white color on blue background */
.categories-row-wrapper .category-text-link {
    color: rgba(255, 255, 255, 0.85);
}

.categories-row-wrapper .category-text-link:hover {
    color: #fff;
}

.categories-row-wrapper .category-text-link.active {
    color: #fff;
}

/* Active category with subcategories on blue background */
.categories-row-wrapper .category-text-link.active.has-children {
    background: #fff;
    color: #1e3a5f;
}

/* Separator color on blue background */
.categories-row-wrapper .category-separator {
    background: rgba(255, 255, 255, 0.3);
}


.cat-edge-arrow {
    display: none; /* מוסתר - הקטגוריות עכשיו מוצגות ב-2 שורות */
}

/* cat-edge-arrow לא בשימוש - נשמר לגיבוי */

.category-text-row {
    flex: 1;
    padding: 0 8px;
}

@media (min-width: 768px) {
    .category-text-row {
        padding: 0 16px;
    }
}

/* Categories scroll indicator (like image dots) */
.categories-scroll-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 5px 14px;
    margin: 0 auto;
    background: rgba(30, 58, 95, 0.12);
    border-radius: 12px;
    width: fit-content;
}

.cat-scroll-arrow {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 7px;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 0;
}

.cat-scroll-arrow:active {
    transform: scale(0.9);
}

.cat-scroll-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cat-scroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(30, 58, 95, 0.3);
}

.cat-flow-chevron {
    color: rgba(30, 58, 95, 0.5);
    transition: color 0.15s ease;
}

.cat-scroll-arrow:hover .cat-flow-chevron {
    color: rgba(30, 58, 95, 0.8);
}

.cat-flow-c1 { opacity: 0.95; }
.cat-flow-c2 { opacity: 0.6; }
.cat-flow-c3 { opacity: 0.3; }

@media (min-width: 768px) {
    .categories-scroll-indicator {
        display: none;
    }
}

/* Legacy pill class - kept for backwards compatibility */
.category-pill {
    flex-shrink: 0;
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-pill:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.category-pill.active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

/* ----------------------------------------------------------------
   Subcategories Row — slides in when parent selected
---------------------------------------------------------------- */
/* Old subcategories row - hidden */
.subcategories-row {
    display: none !important;
}

/* New subcategories panel inside unified wrapper */
.subcategories-panel {
    background: #1e3a5f;
    border-radius: 12px;
    margin-top: -4px;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .subcategories-panel {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        margin-top: -4px;
        border-radius: 0;
    }
}

.subcategories-panel .subcats-row {
    padding: 2px 12px 0px;
    padding-right: 24px;
    padding-left: 24px;
}

/* Subcategory text links - white on dark background */
.subcategory-link {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
}

.subcategory-link:hover {
    color: #fff;
}

.subcategory-link.active {
    color: #fff;
    font-weight: 700;
}

/* Separator in subcategories - lighter */
.subcategories-row .category-separator {
    background: rgba(255, 255, 255, 0.3);
    height: 12px;
}

@media (min-width: 768px) {    
    .subcategory-link {
        font-size: 14px;
    }
}

/* Legacy pill classes - kept for backwards compatibility */
.subcategory-pill {
    flex-shrink: 0;
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.subcategory-pill:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.subcategory-pill.active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

/* Category Group Tabs */
.category-group-tabs-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.category-group-tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.category-group-tab:hover {
    border-color: #1e3a5f;
    color: #1e3a5f;
}

.category-group-tab.active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

@media (min-width: 768px) {
    .category-group-tabs-row {
        gap: 12px;
    }
    .category-group-tab {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Menu Group Tabs (in hamburger menu) */
.menu-group-tabs {
    display: flex;
    gap: 8px;
    padding: 0 0 16px 0;
    margin-bottom: 12px;
}

.menu-group-tab {
    flex: 1;
    padding: 10px 8px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.menu-group-tab:hover {
    border-color: #1e3a5f;
    color: #1e3a5f;
}

.menu-group-tab.active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

/* מפריד בין קטגוריות - מבוטל בגלילה אופקית */
.category-pill::after {
    display: none;
}

.category-pill:focus-visible {
    outline: 2px solid #1e3a5f;
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .category-pill {
        font-size: 16px;
    }
    .category-pill::after {
        margin: 0 2px;
    }
}

/* ----------------------------------------------------------------
   Product cards (grid)
---------------------------------------------------------------- */
.product-card-mini {
    background-color: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.product-card-mini:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.06); }

.product-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #f3f4f6;
    overflow: hidden;
}

/* Fallback for browsers without aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
    .product-card-media { height: 10rem; }
    @media (min-width: 768px) { .product-card-media { height: 12rem; } }
    @media (min-width: 1024px) { .product-card-media { height: 13rem; } }
}

.product-card-media img,
.product-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-fav {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 3;
    padding: .35rem;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(2px);
    border: none;
    outline: none;
    border-radius: 9999px;
    color: #9ca3af;
    transition: color .18s ease, transform .15s ease, background .18s ease;
    line-height: 0;
    cursor: pointer;
}

.product-card-fav:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.product-card-fav svg {
    fill: none;
    transition: fill .18s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
}

.product-card-fav:hover { transform: scale(1.05); }
.product-card-fav:hover svg { fill: rgba(239,68,68,.18); }

.product-card-fav.is-fav {
    color: #ef4444;
    background: #ffffff;
}

.product-card-fav.is-fav svg {
    fill: currentColor;
    transform: scale(1.06);
}

/* Ribbon badge — bulk discount: diagonal corner sash */
.product-card-bulk {
    position: absolute;
    top: 18px;
    right: -36px;
    width: 118px;
    z-index: 2;
    margin: 0;
    padding: 5px 0 6px;
    background: linear-gradient(180deg, #f43f5e 0%, #be123c 48%, #9f1239 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    transform: rotate(42deg);
    transform-origin: center center;
    box-shadow: 0 2px 6px rgba(159, 18, 57, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    opacity: 0.75;
    pointer-events: none;
}

.product-card-minqty {
    position: static;
    align-self: flex-start;
    margin-top: 4px;
    background: none;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    letter-spacing: 0;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-card-minqty::before {
    content: '•';
    color: #475569;
    font-size: 1.4em;
    line-height: 0;
}

.product-card-body {
    padding: .75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
}

.product-card-name {
    font-size: 15.5px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.product-card-price {
    color: #b8963a;
    font-weight: 700;
    font-size: 15.5px;
    line-height: 1.2;
}

.product-card-suitable-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.2;
    margin: 0;
}

.product-card-suitable-text {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.35;
    margin: 2px 0 0 0;
    word-break: break-word;
}

@media (min-width: 768px) {
    .product-card-name  { font-size: 17px; }
    .product-card-price { font-size: 17px; }
    .product-card-suitable-label { font-size: 11.5px; }
    .product-card-suitable-text { font-size: 12.5px; }
}

/* Empty state — span all columns of the grid regardless of breakpoint */
.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.products-empty h3 { font-size: 16px; font-weight: 700; margin: 0 0 .25rem; color: #374151; }
.products-empty p { font-size: 13px; margin: 0; }

/* Skeleton grid: span all columns too */
.products-grid > .skel-card { width: 100%; }

/* ----------------------------------------------------------------
   Bottom policy strip (footer) — נשאר בתחתית בכל המסכים
---------------------------------------------------------------- */
.bottom-policy-strip {
    z-index: 90;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,.06);
    padding: 6px 16px calc(6px + env(safe-area-inset-bottom, 0px));
    text-align: center;
}

.bottom-policy-strip .policy-strip-links {
    gap: 10px;
    margin-bottom: 2px;
    justify-content: center;
}

.bottom-policy-strip .policy-strip-links button {
    font-size: 14.5px;
    font-weight: 500;
    padding: 4px 6px;
    line-height: 1.2;
}

.bottom-policy-strip .policy-strip-links button.policy-strip-link--contact {
    color: #2f9d6f;
    font-weight: 600;
}

.bottom-policy-strip .policy-strip-links button.policy-strip-link--contact:hover {
    color: #3dad7c;
}

.bottom-policy-strip .policy-strip-links span {
    font-size: 10px;
}

.bottom-policy-strip .policy-strip-copyright {
    font-size: 11px;
    line-height: 1.3;
}

/* Footer marquee */
.footer-marquee {
    width: 100%;
    overflow: hidden;
    margin: 4px 0;
}

.footer-marquee-track {
    width: 100%;
    overflow: hidden;
    direction: ltr;
}

.footer-marquee-content {
    display: flex;
    align-items: center;
    width: max-content;
    animation: footerMarqueeScroll 65s linear infinite;
    will-change: transform;
    direction: ltr;
}

.footer-marquee-text {
    white-space: nowrap;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    direction: rtl;
}

.footer-marquee-star {
    color: rgba(255,255,255,0.5);
    margin: 0 12px;
    font-size: 8px;
}

@keyframes footerMarqueeScroll {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

@media (min-width: 768px) {
    .bottom-policy-strip {
        padding: 12px 24px calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .bottom-policy-strip .policy-strip-links {
        gap: 14px;
    }
    .bottom-policy-strip .policy-strip-links button {
        font-size: 15.5px;
    }
    .bottom-policy-strip .policy-strip-links span {
        font-size: 11px;
    }
    .bottom-policy-strip .policy-strip-copyright {
        font-size: 12px;
    }
    .footer-marquee-text {
        font-size: 13px;
    }
    .footer-marquee-star {
        font-size: 9px;
    }
}

/* ----------------------------------------------------------------
   Header — רווח קטן בין כפתורי המועדפים והעגלה
---------------------------------------------------------------- */
.site-header .header-actions {
    gap: 6px;
}

@media (min-width: 768px) {
    .site-header .header-actions {
        gap: 10px;
    }
}

/* ----------------------------------------------------------------
   Header search button — צבע נפרד שמבדיל מהעגלה והמועדפים
---------------------------------------------------------------- */
.site-header .header-search-btn,
.site-header .header-search-btn .fa-search {
    color: #2563eb;
}

.site-header .header-search-btn:hover,
.site-header .header-search-btn:hover .fa-search {
    color: #1d4ed8;
    background: #eff6ff;
}

/* ----------------------------------------------------------------
   Header inline search button — always visible
---------------------------------------------------------------- */
.header-inline-search-btn {
    color: #2563eb;
    width: 44px;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    padding: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.header-inline-search-btn.active {
    color: #1d4ed8;
    background: #eff6ff;
}

.header-inline-search-btn:hover {
    color: #1d4ed8;
    background: #eff6ff;
}

.header-inline-search-btn .fa-search {
    transition: transform 0.2s ease;
}

.header-inline-search-btn:hover .fa-search {
    transform: scale(1.1);
}

/* Homepage search section animation */
.homepage-search-section {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.homepage-search-section.visible {
    max-height: 80px;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 0;
    padding-bottom: 0;
}

.homepage-search-section.fading {
    opacity: 0.5;
}

/* ----------------------------------------------------------------
   Header favorites button — replaces the old WhatsApp button
---------------------------------------------------------------- */
.header-favorites-btn {
    color: #94a3b8;
    transition: color .15s ease, background .15s ease, transform .15s ease;
}

.header-favorites-btn .fa-heart {
    transition: transform .15s ease;
}

.header-favorites-btn:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* יש לפחות מוצר אחד במועדפים — הלב נשאר אדום בכל מצב */
.header-favorites-btn.has-favorites {
    color: #ef4444;
}

/* תצוגת המועדפים פעילה — הוסף רקע ורוד עדין */
.header-favorites-btn.is-active {
    color: #ef4444;
    background: #fef2f2;
}

.header-favorites-btn.is-active .fa-heart,
.header-favorites-btn.has-favorites .fa-heart {
    transform: scale(1.08);
}

/* Heartbeat — שני "דופקים" מהירים אחד אחרי השני */
@keyframes heartbeat-pulse {
    0%   { transform: scale(1); }
    14%  { transform: scale(1.32); }
    28%  { transform: scale(1); }
    42%  { transform: scale(1.32); }
    70%  { transform: scale(1); }
    100% { transform: scale(1); }
}

.header-favorites-btn.is-pulsing {
    color: #ef4444;
}

.header-favorites-btn.is-pulsing .fa-heart {
    animation: heartbeat-pulse .85s ease-in-out;
    transform-origin: center;
    will-change: transform;
}

/* ----------------------------------------------------------------
   Cart drawer
---------------------------------------------------------------- */
@keyframes cartSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,.5);
    z-index: 1099; /* just below the drawer */
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.cart-drawer-overlay.show { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 88%;
    max-width: 420px;
    background-color: #ffffff;
    z-index: 1100; /* above the original site-header (z:1000) and offcanvas (z:1051) */
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -8px 0 30px rgba(0,0,0,.1);
}

@media (min-width: 768px) {
    .cart-drawer { width: 480px; max-width: 90%; }
}

.cart-drawer.show { transform: translateX(0); animation: cartSlideIn .3s ease-out; }

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.cart-drawer-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #1f2937;
}

.cart-drawer-title i { color: #d4af37; }

.cart-header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.cart-clear-btn {
    background-color: #fef2f2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    padding: .375rem .625rem;
    border-radius: .5rem;
    transition: background-color .15s ease;
}

.cart-clear-btn:hover { background-color: #fee2e2; }

.cart-close-btn {
    color: #9ca3af;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    transition: background-color .15s ease, color .15s ease;
}

.cart-close-btn:hover { background-color: #f3f4f6; color: #4b5563; }

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.cart-empty {
    text-align: center;
    color: #9ca3af;
    padding: 3rem 1rem;
}
.cart-empty-icon { font-size: 3rem; line-height: 1; margin-bottom: .5rem; }
.cart-empty p { font-weight: 700; color: #4b5563; margin: 0 0 .25rem; }
.cart-empty span { font-size: 13px; color: #9ca3af; }

/* Cart item rows (markup written by cart.js) */
.cart-item-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: .75rem;
    padding: .75rem;
    background-color: #f9fafb;
    border-radius: .75rem;
    margin-bottom: .75rem;
    align-items: center;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: .5rem;
    object-fit: cover;
    background-color: #f3f4f6;
}

.cart-item-details { min-width: 0; }
.cart-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.cart-option-tag {
    background-color: #fff;
    color: #4b5563;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
}

.cart-item-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-item-unit-price {
    font-size: 12px;
    color: #6b7280;
}

.cart-item-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cart-item-link-btn {
    font-size: 11px;
    color: #2563eb;
    background: none;
    padding: 0;
}
.cart-item-link-btn.cart-item-link-delete { color: #dc2626; }
.cart-item-link-sep { color: #d1d5db; font-size: 11px; }

.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.cart-item-qty-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 2px;
}

.cart-qty-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 9999px !important;
    color: #4b5563 !important;
    font-size: 11px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.cart-qty-btn:hover { background-color: #f3f4f6; }

.cart-qty-input {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    text-align: center !important;
    border: none !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 28px !important;
    display: inline-block !important;
}
.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-total {
    font-size: 13px;
    font-weight: 700;
    color: #b8963a;
}

.cart-drawer-footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    background-color: #ffffff;
}

.cart-totals-section {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    margin-bottom: .75rem;
}

.cart-subtotal-row,
.cart-shipping-row,
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #4b5563;
}

.cart-shipping-row { user-select: none; }

.cart-total-row {
    border-top: 1px dashed #e5e7eb;
    padding-top: .5rem;
    margin-top: .25rem;
    font-size: 15px;
    color: #1f2937;
    font-weight: 700;
}

.cart-subtotal-price,
.cart-shipping-price,
.cart-total-price { font-weight: 700; color: #1f2937; }

.cart-total-discounted {
    color: #dc2626;
    font-weight: 700;
}

.cart-total-original {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.85em;
    font-weight: 400;
    margin-right: 6px;
}

.cart-discount-details {
    display: block;
    font-size: 11px;
    color: #059669;
    margin-top: 4px;
    line-height: 1.4;
}

.cart-checkout-btn {
    width: 100%;
    background-color: #d4af37;
    color: #fff;
    padding: .9rem 1rem;
    border-radius: .75rem;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 4px 14px rgba(212,175,55,.3);
    transition: background-color .2s ease, transform .15s ease;
}
.cart-checkout-btn i { color: #fff; }
.cart-checkout-btn:hover { background-color: #b8963a; }
.cart-checkout-btn:active { transform: translateY(1px); }
.cart-checkout-btn:disabled,
.cart-checkout-btn.disabled {
    background-color: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .8;
}

.cart-checkout-note {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    margin-top: .5rem;
    line-height: 1.4;
    display: block !important;
}

/* Cart drawer RTL fixes and overrides */
.cart-drawer,
.cart-drawer * {
    direction: rtl;
    text-align: right;
}

.cart-drawer-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1rem 1.25rem !important;
    border-bottom: 1px solid #f3f4f6 !important;
    background: #fff !important;
}

.cart-drawer-title {
    margin: 0 !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: .5rem !important;
    color: #1f2937 !important;
}

.cart-drawer-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1rem 1.25rem !important;
    padding-bottom: 80px !important;
    background: #fff !important;
}

#cartItemsContainer {
    padding: 0 !important;
}

.cart-empty {
    text-align: center !important;
    color: #9ca3af !important;
    padding: 3rem 1rem !important;
}

.cart-item-row {
    display: grid !important;
    grid-template-columns: 64px 1fr auto !important;
    gap: .75rem !important;
    padding: .75rem !important;
    background-color: #f9fafb !important;
    border-radius: .75rem !important;
    margin-bottom: .75rem !important;
    align-items: center !important;
}

.cart-item-details {
    min-width: 0 !important;
    text-align: right !important;
}

.cart-item-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
}

.cart-drawer-footer {
    padding: 1rem 1.25rem 1.25rem !important;
    border-top: 1px solid #f3f4f6 !important;
    background-color: #ffffff !important;
}

.cart-subtotal-row,
.cart-shipping-row,
.cart-total-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 14px !important;
    color: #4b5563 !important;
}

.cart-total-row {
    border-top: 1px dashed #e5e7eb !important;
    padding-top: .5rem !important;
    margin-top: .25rem !important;
    font-size: 15px !important;
    color: #1f2937 !important;
    font-weight: 700 !important;
}

.cart-checkout-btn {
    width: 100% !important;
    background-color: #4a9d7c !important;
    color: #fff !important;
    padding: .9rem 1rem !important;
    border-radius: .75rem !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .5rem !important;
    box-shadow: 0 4px 14px rgba(74,157,124,.3) !important;
    transition: background-color .2s ease, transform .15s ease !important;
    border: none !important;
}

.cart-checkout-btn:hover {
    background-color: #3d8466 !important;
}

.cart-checkout-btn i {
    font-size: 1.2rem !important;
    color: #fff !important;
}

/* d-none used by cart.js / popups */
.d-none { display: none !important; }

/* ----------------------------------------------------------------
   Service-worker update banner
---------------------------------------------------------------- */
#sw-update-banner {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,.18);
    padding: .75rem 1rem;
    border: 1px solid #f3f4f6;
    animation: cartSlideIn .3s ease-out;
}

#sw-update-banner .sw-update-inner {
    display: flex;
    align-items: center;
    gap: .75rem;
}

#sw-update-banner .sw-update-icon { font-size: 1.5rem; }
#sw-update-banner .sw-update-text-wrap { display: flex; flex-direction: column; }
#sw-update-banner .sw-update-title { font-weight: 700; color: #1f2937; font-size: 13px; }
#sw-update-banner .sw-update-subtitle { font-size: 11px; color: #6b7280; }

#sw-update-banner .sw-update-btn {
    background-color: #d4af37;
    color: #fff;
    padding: .375rem .75rem;
    border-radius: .5rem;
    font-weight: 700;
    font-size: 12px;
}

/* ----------------------------------------------------------------
   PWA Install Popup — גרסה עדינה + טקסטים גדולים יותר
---------------------------------------------------------------- */
.pwa-install-popup {
    position: fixed;
    inset: 0;
    z-index: 100020;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 32px);
    background: radial-gradient(100% 70% at 50% 15%, rgba(212, 175, 55, 0.07), transparent 55%),
        rgba(42, 40, 48, 0.38);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    backdrop-filter: blur(14px) saturate(120%);
    animation: pwaBackdropIn 0.4s ease;
}

@keyframes pwaBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pwa-install-popup.show {
    display: flex;
}

.pwa-install-panel {
    position: relative;
    width: 100%;
    max-width: min(400px, 100%);
    direction: rtl;
    text-align: center;
    font-family: 'Assistant', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(180deg, #fffcf9 0%, #faf6f1 45%, #f5f0ea 100%);
    border-radius: 24px;
    padding: 2.15rem 1.65rem 1.55rem;
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.14),
        0 16px 48px rgba(60, 52, 44, 0.12),
        0 2px 8px rgba(60, 52, 44, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    animation: pwaPanelIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pwaPanelIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pwa-install-panel::before {
    content: '';
    position: absolute;
    inset-inline: 32px;
    top: 0;
    height: 3px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.55), rgba(232, 207, 106, 0.85), rgba(201, 162, 39, 0.55));
    opacity: 0.85;
}

.pwa-install-close {
    position: absolute;
    inset-inline-start: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(90, 82, 74, 0.06);
    color: rgba(80, 74, 68, 0.45);
    font-size: 1.45rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pwa-install-close:hover {
    background: rgba(90, 82, 74, 0.1);
    color: rgba(60, 54, 48, 0.7);
}

.pwa-install-close:active {
    transform: scale(0.96);
}

.pwa-install-visual {
    position: relative;
    margin: 0 auto 1.2rem;
    width: 96px;
    height: 96px;
}

.pwa-install-visual-glow {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, rgba(232, 212, 160, 0.35), transparent 65%);
    opacity: 0.9;
}

.pwa-install-icon-ring {
    position: absolute;
    inset: 10px;
    border-radius: 24px;
    background: linear-gradient(160deg, #ece6dd 0%, #e0d8cc 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.85),
        0 6px 18px rgba(80, 70, 58, 0.08);
    display: grid;
    place-items: center;
}

.pwa-install-icon-ring .fa-mobile-screen-button {
    font-size: 2rem;
    color: #9a7b38;
}

.pwa-install-title {
    font-size: clamp(1.48rem, 4.8vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #35302c;
    margin: 0 0 0.65rem;
    line-height: 1.22;
}

.pwa-install-lead {
    margin: 0 0 1.2rem;
    font-size: clamp(1.02rem, 3.4vw, 1.12rem);
    line-height: 1.68;
    color: #6a635c;
    font-weight: 500;
}

.pwa-install-benefits {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 0;
    display: grid;
    gap: 11px;
    text-align: start;
}

.pwa-install-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: clamp(0.97rem, 3.1vw, 1.05rem);
    line-height: 1.48;
    color: #524c46;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: 0 1px 2px rgba(60, 52, 44, 0.04);
}

.pwa-install-benefits li .fas {
    margin-top: 3px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-size: 1.02rem;
    color: #a88a3a;
    opacity: 0.92;
}

.pwa-install-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    font-family: inherit;
    font-weight: 700;
    font-size: clamp(1.05rem, 3.5vw, 1.12rem);
    color: #2c2824;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(165deg, #edd78a 0%, #d4af37 38%, #c9a43a 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.45) inset,
        0 8px 20px rgba(180, 145, 55, 0.18);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.pwa-install-btn:hover {
    filter: brightness(1.03);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 10px 26px rgba(180, 145, 55, 0.22);
}

.pwa-install-btn:active {
    transform: translateY(1px);
}

.pwa-install-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(120, 108, 96, 0.1);
}

.pwa-install-later,
.pwa-dont-show {
    font-family: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 7px 10px;
    transition: color 0.18s ease;
}

.pwa-install-later {
    font-size: clamp(0.92rem, 3vw, 1rem);
    color: #6d655c;
}

.pwa-install-later:hover {
    color: #3d3834;
}

.pwa-dont-show {
    font-size: clamp(0.84rem, 2.75vw, 0.92rem);
    color: rgba(100, 92, 84, 0.55);
}

.pwa-dont-show:hover {
    color: rgba(70, 64, 58, 0.8);
}

.pwa-install-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(120, 108, 96, 0.22);
}

@media (max-height: 520px) and (orientation: landscape) {
    .pwa-install-popup {
        align-items: flex-start;
        overflow-y: auto;
    }
    .pwa-install-panel {
        margin: auto 0;
        padding-block: 1.35rem 1.1rem;
        max-height: min(540px, 92vh);
        overflow-y: auto;
    }
    .pwa-install-visual {
        margin-bottom: 0.75rem;
        width: 72px;
        height: 72px;
    }
    .pwa-install-icon-ring .fa-mobile-screen-button {
        font-size: 1.65rem;
    }
    .pwa-install-benefits {
        margin-bottom: 0.95rem;
        gap: 8px;
    }
    .pwa-install-benefits li {
        font-size: 0.92rem;
        padding: 0.55rem 0.75rem;
    }
}

/* ----------------------------------------------------------------
   Toast container
---------------------------------------------------------------- */
.toast-container {
    z-index: 1050;
    pointer-events: none;
}
.toast-container > * { pointer-events: auto; }

/* ----------------------------------------------------------------
   Skeleton (loading placeholders)
---------------------------------------------------------------- */
@keyframes skelPulse {
    0%   { background-color: #eef0f3; }
    50%  { background-color: #e2e6ea; }
    100% { background-color: #eef0f3; }
}

.skel-card {
    background-color: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #f3f4f6;
}
.skel-img { height: 10rem; animation: skelPulse 1.4s ease-in-out infinite; }
.skel-body { padding: .75rem; display: flex; flex-direction: column; gap: 6px; }
.skel-line { height: 12px; border-radius: 4px; animation: skelPulse 1.4s ease-in-out infinite; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-40 { width: 40%; }

.skel-chip {
    width: 5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 9999px;
    animation: skelPulse 1.4s ease-in-out infinite;
    display: none; /* מסתיר את הסקלטון של הקטגוריות */
}

/* ----------------------------------------------------------------
   Empty category modal (קטגוריה ללא מוצרים)
---------------------------------------------------------------- */
body.shop-empty-category-modal-open {
    overflow: hidden;
}

.shop-empty-category-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.shop-empty-category-modal.is-visible {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.shop-empty-category-modal__backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(90% 55% at 50% 20%, rgba(212, 175, 55, 0.06), transparent),
        rgba(54, 48, 44, 0.35);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    backdrop-filter: blur(10px) saturate(115%);
}

.shop-empty-category-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    font-family: 'Assistant', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(180deg, #fffcf9 0%, #faf6f1 55%, #f4efe8 100%);
    border-radius: 22px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.12),
        0 14px 40px rgba(60, 52, 44, 0.1),
        0 2px 8px rgba(60, 52, 44, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    direction: rtl;
    text-align: center;
}

.shop-empty-category-modal__panel::before {
    content: '';
    position: absolute;
    inset-inline: 28px;
    top: 0;
    height: 3px;
    border-radius: 0 0 7px 7px;
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.45), rgba(232, 207, 106, 0.75), rgba(201, 162, 39, 0.45));
    opacity: 0.85;
}

.shop-empty-category-modal__close {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 9999px;
    background: rgba(90, 82, 74, 0.06);
    color: rgba(80, 74, 68, 0.5);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.shop-empty-category-modal__close:hover {
    background: rgba(90, 82, 74, 0.1);
    color: rgba(50, 46, 42, 0.75);
}

.shop-empty-category-modal__close:active {
    transform: scale(0.96);
}

.shop-empty-category-modal__title {
    font-size: clamp(1.14rem, 3.6vw, 1.28rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #35302c;
    margin: 0 0 0.9rem 0;
    line-height: 1.38;
    padding-inline: 0.5rem;
}

.shop-empty-category-modal__message {
    font-size: clamp(1.06rem, 3.5vw, 1.18rem);
    color: #5c564e;
    line-height: 1.65;
    font-weight: 500;
    margin: 0 0 1.35rem 0;
    white-space: pre-line;
}

.shop-empty-category-modal__btn {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.78rem 1.35rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(165deg, #edd78a 0%, #d4af37 40%, #c9a43a 100%);
    color: #2c2824;
    font-size: 1.02rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 6px 18px rgba(180, 145, 55, 0.16);
    transition: filter 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.shop-empty-category-modal__btn:hover {
    filter: brightness(1.03);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.45) inset,
        0 8px 22px rgba(180, 145, 55, 0.2);
}

.shop-empty-category-modal__btn:active {
    transform: scale(0.98);
}
