/* ===============================================
   N360 Properties Catalog - COMPLETE VERSION
   כל התיקונים כלולים
   =============================================== */

:root {
    /* צבעים מהמוצרים הדומים */
    --n360-primary: #1e3c72;
    --n360-primary-2: #2a5298;
    --n360-gold: #f2b300;
    --n360-gold-accent: #ffd700;
    --n360-text: #2b2f36;
    --n360-muted: #6b7280;
    --n360-bg: #f8f9fa;
    --n360-border: #e9ecef;
    --n360-white: #ffffff;
    --n360-green: #20c463;
    
    /* צללים */
    --n360-shadow: 0 8px 30px rgba(0,0,0,.08);
    --n360-shadow-hover: 0 12px 40px rgba(0,0,0,.12);
    
    /* רדיוס */
    --n360-radius: 12px;
    --n360-radius-large: 16px;
}

/* ===== מעטפת ראשית ===== */
.n360-catalog-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
    font-family: 'Heebo', system-ui, sans-serif;
}

/* ===== פילטרים ===== */
.n360-filters-wrapper {
    background: var(--n360-white);
    border: 1px solid var(--n360-border);
    border-radius: var(--n360-radius-large);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--n360-shadow);
}

/* ✅ תיקון 4: גריד מאוזן - תמיד 3 בשורה */
.n360-filters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.n360-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.n360-filter-group label {
    font-weight: 700;
    color: var(--n360-primary);
    font-size: 14px;
}

.n360-filter-group select {
    padding: 10px 14px;
    border: 1px solid var(--n360-border);
    border-radius: 8px;
    background: var(--n360-white);
    color: var(--n360-text);
    font-size: 14px;
    font-family: 'Heebo', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.n360-filter-group select:hover {
    border-color: var(--n360-gold);
}

.n360-filter-group select:focus {
    outline: none;
    border-color: var(--n360-gold);
    box-shadow: 0 0 0 3px rgba(242, 179, 0, 0.1);
}

.n360-filter-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.n360-filter-btn {
    background: var(--n360-primary);
    color: var(--n360-white);
    padding: 12px 28px;
    border: none;
    border-radius: 999px;
    font-weight: 800;
    font-size: 16px;
    font-family: 'Heebo', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.n360-filter-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.n360-filter-btn-reset {
    background: var(--n360-bg);
    color: var(--n360-primary);
    padding: 12px 28px;
    border: 1px solid var(--n360-border);
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    font-family: 'Heebo', system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.n360-filter-btn-reset:hover {
    background: var(--n360-white);
    border-color: var(--n360-primary);
}

/* ===== כותרת תוצאות ===== */
.n360-results-header {
    margin-bottom: 28px;
}

.n360-results-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--n360-primary);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Heebo', system-ui, sans-serif;
}

.n360-results-line {
    height: 2px;
    background: linear-gradient(90deg, var(--n360-gold-accent) 0%, #ffe48c 100%);
    border-radius: 2px;
}

/* ===== גריד נכסים ===== */
.n360-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* ===== כרטיס נכס - עיצוב מעודכן ===== */
.n360-property-card {
    background: var(--n360-white);
    border: 1px solid var(--n360-border);
    border-radius: var(--n360-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--n360-shadow);
    position: relative;
}

.n360-property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--n360-shadow-hover);
}

/* ✅ תיקון 2: סטייל נמכר */
.n360-property-card.n360-sold {
    opacity: 0.85;
}

.n360-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* תמונה */
.n360-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--n360-bg);
}

.n360-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.n360-property-card:hover .n360-card-image img {
    transform: scale(1.05);
}

/* ✅ תיקון 3: Badges - ימין ושמאל */
.n360-card-badge {
    position: absolute;
    top: 12px;
    background: rgba(255, 215, 0, 0.95);
    color: var(--n360-primary);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

.n360-badge-right {
    right: 12px;
}

.n360-badge-left {
    left: 12px;
    background: rgba(30, 60, 114, 0.95);
    color: var(--n360-white);
}

/* ✅ תיקון 2: סטריפ "נמכר" ירוק אלכסוני במרכז - רוחב מצומצם! */
.n360-sold-ribbon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: var(--n360-green);
    color: var(--n360-white);
    padding: 20px 60px;  /* שמרתי גובה 20px, הקטנתי רוחב ל-60px */
    font-weight: 800;
    font-size: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 3;
    text-align: center;
    white-space: nowrap;
}

.n360-sold-ribbon span {
    display: block;
    letter-spacing: 2px;
}

/* תוכן הכרטיס */
.n360-card-content {
    padding: 20px;
}

/* כותרת */
.n360-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--n360-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
    font-family: 'Heebo', system-ui, sans-serif;
    text-align: center;
}

/* Subtitle */
.n360-card-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--n360-muted);
    margin: 0 0 12px 0;
    line-height: 1.4;
    text-align: center;
    font-family: 'Heebo', system-ui, sans-serif;
}

/* ✅ תיקון 1: מחיר - סימן שקל אחרי! */
.n360-card-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--n360-gold);
    text-align: center;
    margin: 12px 0 16px 0;
    font-family: 'Heebo', system-ui, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.n360-price-amount {
    font-size: 20px;
    font-weight: 800;
}

.n360-price-currency {
    font-size: 18px;
    font-weight: 800;
}

/* כרטיס פרטים */
.n360-detail-card {
    background: var(--n360-bg);
    border: 1px solid var(--n360-border);
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
}

.n360-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--n360-border);
}

.n360-detail-item:last-child {
    border-bottom: none;
}

.n360-detail-label {
    font-weight: 700;
    color: var(--n360-primary);
    font-size: 13px;
}

.n360-detail-value {
    font-weight: 600;
    color: var(--n360-text);
    font-size: 13px;
}

/* קישור לפרטים עם חץ זהוב */
.n360-card-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--n360-border);
}

.n360-card-cta {
    color: var(--n360-primary);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.n360-property-card:hover .n360-card-cta {
    color: var(--n360-gold);
}

/* חץ זהוב */
.n360-arrow {
    color: var(--n360-gold);
    font-size: 16px;
    font-weight: 800;
    transition: transform 0.2s ease;
}

.n360-property-card:hover .n360-arrow {
    transform: translateX(-4px);
}

/* ===== הודעת אין תוצאות ===== */
.n360-no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--n360-white);
    border-radius: var(--n360-radius);
    border: 1px solid var(--n360-border);
}

.n360-no-results p {
    font-size: 18px;
    color: var(--n360-muted);
    margin-bottom: 20px;
}

.n360-reset-btn {
    display: inline-block;
    background: var(--n360-gold);
    color: var(--n360-primary);
    padding: 12px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.2s ease;
}

.n360-reset-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* ===== עימוד ===== */
.n360-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.n360-pagination a,
.n360-pagination span {
    padding: 10px 16px;
    border: 1px solid var(--n360-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--n360-primary);
    font-weight: 700;
    transition: all 0.2s ease;
}

.n360-pagination a:hover {
    background: var(--n360-gold);
    color: var(--n360-white);
    border-color: var(--n360-gold);
}

.n360-pagination .current {
    background: var(--n360-primary);
    color: var(--n360-white);
    border-color: var(--n360-primary);
}

/* ===== אנימציית טעינה ===== */
.n360-loading {
    text-align: center;
    padding: 40px;
}

.n360-spinner {
    border: 4px solid var(--n360-border);
    border-top: 4px solid var(--n360-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== רספונסיביות ===== */

/* טאבלטים גדולים: 2 בשורה בפילטרים */
@media (max-width: 980px) {
    .n360-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .n360-properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* טאבלטים קטנים ומובייל גדול: 1 בשורה בפילטרים */
@media (max-width: 768px) {
    .n360-catalog-wrapper {
        padding: 12px;
    }
    
    .n360-filters-wrapper {
        padding: 16px;
    }
    
    .n360-filters-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .n360-filter-actions {
        flex-direction: column;
    }
    
    .n360-filter-btn,
    .n360-filter-btn-reset {
        width: 100%;
        text-align: center;
    }
    
    .n360-results-title {
        font-size: 22px;
    }
    
    .n360-properties-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .n360-card-image {
        height: 200px;
    }
    
    /* התאמת הסטריפ למובייל */
    .n360-sold-ribbon {
        padding: 18px 50px;
        font-size: 28px;
    }
}

/* מובייל קטן */
@media (max-width: 480px) {
    .n360-card-title {
        font-size: 16px;
    }
    
    .n360-card-price {
        font-size: 18px;
    }
    
    .n360-price-amount {
        font-size: 18px;
    }
    
    .n360-price-currency {
        font-size: 16px;
    }
    
    .n360-detail-label,
    .n360-detail-value {
        font-size: 12px;
    }
    
    .n360-sold-ribbon {
        padding: 16px 40px;
        font-size: 24px;
    }
}

/* ===== שגיאות ===== */
.n360-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: var(--n360-radius);
    padding: 20px;
    color: #c33;
    text-align: center;
}