/* out/css/nafis-app.css */
.nafis-app-wrapper {
    font-family: "narkisblock-regular_mfw", sans-serif;
    background-color: #142533; /* כחול נאפיס */
    color: #ffffff; /* כיתוב לבן ברירת מחדל */
    max-width: 768px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Header & Search */
.nafis-top-bar {
    padding: 15px;
    background-color: #142533; 
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #1F434B; /* פס הפרדה ירוק עדין במקום חום */
}
.nafis-back-btn {
    background: none;
    border: none;
    color: #ffffff; /* לבן */
    font-size: 16px;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    border-radius: 25px;
    gap: 5px;
    font-family: inherit;
    transition: color 0.3s ease;
}
.nafis-back-btn:hover, .nafis-back-btn:active, .nafis-back-btn:focus {
    background: none;
    background-color: none;
    color: #ebc7bc; /* הופך לוורוד נאפיס */
}
.nafis-search-wrapper {
    flex: 1;
    position: relative;
}
.nafis-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #142533; /* אייקון כחול */
    opacity: 0.7;
}

/* שורת החיפוש החדשה */
#nafisSearchInput {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border-radius: 25px; /* רדיוס עגול כמו הכפתור */
    border: none; /* ללא מסגרת */
    background: #ffffff; /* רקע לבן */
    color: #142533; /* כיתוב כחול נאפיס */
    font-size: 16px;
    box-sizing: border-box;
    font-family: inherit;
    transition: box-shadow 0.3s ease;
}
#nafisSearchInput::placeholder {
    color: rgba(20, 37, 51, 0.6); /* פלייסחולדר תואם */
}
#nafisSearchInput:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(235, 199, 188, 0.5); /* הילה ורודה עדינה בלחיצה */
}

/* כפתור שפות */
.nafis-lang-btn {
    background-color: #1F434B; /* רקע ירוק נאפיס */
    color: #ffffff; /* כיתוב לבן */
    border: none; /* ללא מסגרת חומה */
    border-radius: 25px; /* אליפסה (זהה לחיפוש) */
    padding: 8px 16px; 
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.nafis-lang-btn:hover, .nafis-lang-btn:active, .nafis-lang-btn:focus {
    color: #ebc7bc; /* הופך לוורוד נאפיס */
    background-color: #19363d; /* מתכהה מעט */
}

/* Grid View (קוביות) */
.nafis-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
}
.nafis-grid-item {
    position: relative;
    height: 160px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: #1F434B; 
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    border: none; /* ללא מסגרת */
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.2s;
}
.nafis-grid-item:active { transform: scale(0.96); }
.nafis-grid-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(20, 37, 51, 0.9) 0%, rgba(20, 37, 51, 0.1) 70%);
}
.nafis-grid-title {
    position: relative;
    z-index: 2;
    color: #ffffff; /* לבן */
    font-size: 20px;
    margin: 0 0 15px 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
    text-align: center;
    width: 100%;
    transition: color 0.3s ease;
}
.nafis-grid-item:hover .nafis-grid-title {
    color: #ebc7bc; /* ורוד בהובר */
}

/* Sticky Nav for List View */
.nafis-sticky-nav {
    position: sticky;
    top: 78px;
    background: #142533; 
    z-index: 100;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 15px;
    border-bottom: 1px solid #1F434B;
    scrollbar-width: none;
}
.nafis-sticky-nav::-webkit-scrollbar { display: none; }
.nafis-nav-link {
    color: #ffffff; /* לבן */
    text-decoration: none;
    padding: 8px 18px;
    margin-left: 10px;
    border-radius: 25px;
    font-size: 16px;
    background: #1F434B;
    transition: all 0.3s ease;
    border: none;
}
.nafis-nav-link:hover {
    color: #ebc7bc; /* ורוד במעבר עכבר */
}
.nafis-nav-link.active {
    background: #ebc7bc; /* הופך לוורוד כשהוא פעיל */
    color: #142533; /* טקסט כחול כשהוא פעיל */
    font-weight: bold;
}

/* Product List */
.nafis-category-section {
    padding: 20px 15px;
}
.nafis-cat-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ffffff; /* לבן */
    text-align: right;
    border-bottom: 1px dashed #1F434B;
    padding-bottom: 5px;
}
.nafis-product-card {
    display: flex;
    justify-content: space-between;
    background: #1F434B; 
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: none; /* ללא מסגרת חומה */
    transition: background 0.2s;
}
.nafis-product-card:active { 
    background: #19363d; 
}
.nafis-prod-info {
    padding: 15px;
    flex: 1;
    text-align: right;
}
.nafis-prod-title {
    font-size: 18px;
    margin: 0 0 8px;
    color: #ffffff; /* לבן */
    transition: color 0.3s ease;
}
.nafis-prod-desc-preview {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7); /* לבן שקוף מעט */
    margin: 0 0 12px;
    line-height: 1.4;
}
.nafis-prod-price {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff; /* לבן */
    transition: color 0.3s ease;
}
/* הובר על הכרטיסייה משנה את הטקסטים לוורוד */
.nafis-product-card:hover .nafis-prod-title,
.nafis-product-card:hover .nafis-prod-price {
    color: #ebc7bc; 
}
.nafis-prod-img {
    width: 130px;
    background-size: cover;
    background-position: center;
    border-right: 2px solid #142533; 
}

/* Modal (Popup) */
.nafis-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(20, 37, 51, 0.85); 
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nafis-modal.show {
    opacity: 1;
}
.nafis-modal-content {
    background-color: #1F434B; 
    margin: 15% auto;
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: none; /* ללא מסגרת חומה */
}
.nafis-modal.show .nafis-modal-content {
    transform: translateY(0);
}
.nafis-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 32px; height: 32px;
    background: #142533; 
    color: #ffffff; /* לבן */
    border: none;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}
.nafis-close:hover {
    color: #ebc7bc; /* ורוד */
}
.nafis-modal-image {
    width: 100%; height: 220px;
    background-size: cover;
    background-position: center;
    border-bottom: none;
}
.nafis-modal-body {
    padding: 20px;
    text-align: right;
}
#modalTitle { margin: 0 0 10px 0; color: #ffffff; font-size: 24px; }
#modalDesc { color: rgba(255, 255, 255, 0.8); line-height: 1.5; font-size: 16px; }
#modalPrice { margin-top: 15px; font-size: 22px; font-weight: bold; color: #ffffff; }

/* --- התאמות לאנגלית LTR --- */
.nafis-app-wrapper[dir="ltr"] .nafis-cat-title,
.nafis-app-wrapper[dir="ltr"] .nafis-prod-info {
    text-align: left;
}
.nafis-app-wrapper[dir="ltr"] .nafis-search-icon {
    right: auto;
    left: 15px;
}
.nafis-app-wrapper[dir="ltr"] #nafisSearchInput {
    padding: 12px 15px 12px 40px;
}
.nafis-app-wrapper[dir="ltr"] .nafis-back-btn span:first-child {
    transform: rotate(180deg);
}
.nafis-app-wrapper[dir="ltr"] .nafis-nav-link {
    margin-left: 0;
    margin-right: 10px;
}
.nafis-modal[dir="ltr"] .nafis-modal-body {
    text-align: left;
}
.nafis-modal[dir="ltr"] .nafis-close {
    left: auto;
    right: 15px;
}
.nafis-app-wrapper[dir="ltr"] .nafis-prod-img {
    border-right: none;
    border-left: 2px solid #142533;
}