@import url("https://fonts.googleapis.com/css2?family=Heebo:wght@400;600;800&display=swap");

:root {
    --blue: #1e3a8a;
    /* כחול כהה יותר למחיר */
    --blue-light: #2563eb;
    --blue-dark: #1e40af;
    --text: #141823;
    --muted: #6b7280;
    --muted-dark: #4b5563;
    --star: #fbbf24;
    --border: #e5e7eb;
    --bg: #f7f7fb;
    --btn-gray: #f3f4f6;
    --icon-gray: #9aa0a6;
}

body {
    margin: 0;
    background: var(--bg);
    font-family: "Heebo", sans-serif;
    color: var(--text);
}

.wrapper {
    padding: 28px;
}

.card {
    max-width: 900px;
    margin: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
    padding: 26px;
    margin-bottom: 34px;
    /* רווח של 20 פיקסלים מתחת לכל כרטיס */

}

/* מבנה */
.header {
    display: flex;
    flex-direction: row;
    /* תמונה תמיד מימין */
    gap: 46px;
    align-items: flex-start;
}

.avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #d1d5db;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.title {
    margin: 0 0 6px;
    color: #142669;
    /* כהה יותר */
    font-size: clamp(22px, 3.2vw, 30px);
    font-weight: 800;
}

.subtitle {
    margin: 6px 0 14px;
    font-size: 17px;
    color: var(--muted-dark);
}

.meta-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--muted-dark);
}

.meta svg {
    width: 18px;
    height: 18px;
}

.rating .score {
    color: #d97706;
    font-weight: 700;
}


/* מחיר */
.price-wrap {
    display: flex;
    align-items: center;
    margin: 6px 0 2px;
    color: var(--blue);
}

.amount {
    font-size: 26px;
    font-weight: 800;
}

.ils-icon {
    width: 34px;
    height: 34px;
    fill: currentColor;
}

.per {
    color: var(--muted-dark);
    margin-top: 2px;
}

/* פחות רווח */

.actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 400;
    /* לא bold */
    font-size: 15px;
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: .2s;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

.btn-whatsapp {
    color: #fff;
    border: none;
    background: linear-gradient(90deg, var(--blue-dark) 0%, var(--blue-light) 100%);
}

.btn-whatsapp svg {
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

.btn-soft {
    background: var(--btn-gray);
    border: 1px solid var(--border);
    color: #0f172a;
}

.btn-soft svg {
    fill: none;
    stroke: var(--icon-gray);
    stroke-width: 2;
}


.star {
    fill: gold;
}

.star.dim {
    fill: #ccc;
}

.star.half {
    fill: gold;
    clip-path: inset(0 50% 0 0);
    /* חצי כוכב */
}

.currency {
    font-weight: bold;
    margin-right: 4px;
}


/* ===== TOP CARDS (1–3) ===== */
.card {
    position: relative;
    overflow: visible;
}

.card--top {
    border: 3px solid #f59e0b !important;
    /* צהוב ברור, לא תלוי ב-:root */
    box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
}

/* התג בפינה שמאלית-עליונה */
.top-badge {
    position: absolute;
    top: -14px;
    /* יוצא קצת מעל הכרטיס */
    left: 16px;
    /* שמאל */
    z-index: 10;
    background: #f59e0b;
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid #fff;
    /* טבעת לבנה עדינה */
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    white-space: nowrap;
    pointer-events: none;
    /* שלא יחסום לחיצות בכרטיס */
}

.top-badge svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

/* למסכים קטנים – להצמיד קצת יותר */
@media (max-width: 560px) {
    .top-badge {
        left: 12px;
        top: -12px;
    }
}

.page-title {
    text-align: center;
    margin: 30px 0 12px;
    font-weight: 800;
    font-size: clamp(22px, 4vw, 32px);
    color: #1e40af;
    /* כחול כהה; אפשר לשנות או להסיר */
}

/* ======== MOBILE (כרטיסים ותוכן) ======== */

/* טאבלט ומטה */
@media (max-width: 768px) {
    .wrapper {
        padding: 18px;
    }

    .card {
        padding: 20px;
        margin-bottom: 22px;
        border-radius: 16px;
    }

    .header {
        gap: 24px;
    }

    .title {
        font-size: clamp(20px, 4.5vw, 26px);
    }

    .subtitle {
        font-size: 15px;
    }

    .amount {
        font-size: 22px;
    }

    .actions {
        gap: 10px;
    }
}

/* טלפונים */
@media (max-width: 560px) {
    .page-title {
        margin: 14px 0 6px;
        font-size: clamp(20px, 6vw, 26px);
    }

    /* מבנה הכרטיס לטלפון: תמונה מעל תוכן, מרכז */
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .avatar {
        width: 96px;
        height: 96px;
        border-width: 3px;
    }

    .meta-row {
        justify-content: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    .price-wrap,
    .per {
        justify-content: center;
        text-align: center;
    }

    /* כפתורים: שתי עמודות, נופל לעמודה אחת במסכים ממש קטנים */
    .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        margin-top: 14px;
    }

    .actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 14px;
        /* שטח לחיצה נוח */
        font-size: 14px;
        min-height: 44px;
    }

    /* אם יש רק שני כפתורים – עדיין ייראו טוב */
    .actions .btn:nth-last-child(1):first-child {
        grid-column: 1 / -1;
    }

    /* תג "מדורג עליון" – קרוב יותר לפינה */
    .top-badge {
        top: -10px;
        left: 12px;
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* מסכים ממש קטנים (320–360) – כפתורים בטור אחד */
@media (max-width: 360px) {
    .actions {
        grid-template-columns: 1fr;
    }
}

/* ===== מובייל: כפתורי הכרטיס אחד מעל השני ===== */
@media (max-width: 560px) {
    .actions {
        display: flex;
        /* ידרוס כל grid קודם */
        flex-direction: column;
        /* טור אחד */
        gap: 10px;
        width: 100%;
        margin-top: 14px;
    }

    .actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 14px;
        font-size: 15px;
        min-height: 44px;
        /* שטח לחיצה מומלץ למובייל */
        border-radius: 12px;
    }
}

/* ==== FIX: אין גלילה אופקית במובייל, padding לא “שובר” את המסך ==== */
html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* מבטל את הרצועה הלבנה בצד ימין */
}

/* ה־wrapper לא יחרוג מהרוחב במובייל */
.wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: min(28px, 5vw);
    /* במובייל מצטמצם */
}

/* ליתר ביטחון: הכרטיס תמיד בתוך המסך */
.card {
    width: 100%;
    max-width: 900px;
    margin-inline: auto;
}