/* === Trade-in wrapper === */
.trad_form {
    max-width: 1100px;
    margin: 15px auto 15px;
    padding: 25px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f3f3;
}

/* כותרת */
.trad_form h2 {
    text-align: center;
    font-size: 28px;
    margin: 0 0 24px;
    font-weight: 700;
    color: #222222;
}

/* === טופס הבחירה === */
form#tradeinForm {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 14px;
}

/* עטיפה כללית לסלקט – אם תרצי בהמשך להוסיף label */
form#tradeinForm select {
    min-width: 190px;
    padding: 9px 38px 9px 16px;
    border-radius: 999px;
    border: 1px solid #dddddd;
    background: #f8f8f8;
    color: #222222;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.12s ease;
}

/* חץ קטן לסלקט (RTL זה עדיין נראה טוב) */
form#tradeinForm select {
    background-image: linear-gradient(45deg, transparent 50%, #222222 50%),
                      linear-gradient(135deg, #222222 50%, transparent 50%);
    background-position: calc(15% - 18px) 55%, calc(15% - 13px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* מצב hover / focus */
form#tradeinForm select:hover {
    background-color: #ffffff;
    border-color: #98d855;
    box-shadow: 0 0 0 2px rgba(152, 216, 85, 0.25);
    transform: translateY(-1px);
}

form#tradeinForm select:focus {
    border-color: #ba1593;
    box-shadow: 0 0 0 2px rgba(186, 21, 147, 0.25);
}

/* === תוצאות הקרדיט === */
#results {
    margin-top: 28px;
}

.res_container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.res_single_box {
    min-width: 260px;
    max-width: 360px;
    padding: 18px 26px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 17px 65px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.res_label {
    font-size: 14px;
    color: #222222;
}

.res_amount {
    font-size: 30px;
    font-weight: 800;
    color: #111;
    line-height: 1.2;
}

.res_note {
    font-size: 14px;
    color: #555;
    margin-top: 4px;
}

@media (max-width: 786px) {
    .res_single_box {
        width: 100%;
        max-width: 100%;
        padding: 16px 18px;
        border-radius: 16px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    }

    .res_amount {
        font-size: 26px;
    }

    .res_note {
        font-size: 13px;
    }
}


/* "כפתור" מצב מכשיר */
.res_item {
    padding: 16px 26px;
    min-width: 170px;
    text-align: center;
    border-radius: 18px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(0);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
    border: 2px solid rgba(255, 255, 255, 0.35);
}


/* === טקסט טרייד-אין בדף מוצר === */
.trade_text {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(152, 216, 85, 0.09);
    border: 1px dashed rgba(152, 216, 85, 0.6);
}

.trade_text p {
    margin: 0 0 4px !important;
    font-weight: 500;
    color: #222222;
}

.trade_text a {
    color: #ba1593 !important;
    text-decoration: underline !important;
    font-weight: 600;
}

/* === מובייל === */
@media (max-width: 786px) {
    .trad_form {
        padding: 20px 16px 26px;
        margin: 30px 10px 40px;
    }

    .trad_form h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    form#tradeinForm {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    form#tradeinForm select {
        width: 100%;
        min-width: 0;
    }

    .res_container {
        gap: 12px;
    }

    .res_item {
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
        font-size: 17px;
    }
}

.tradein-bottom-wrap {
    position: relative;
    z-index: 10;
}

.trade_text {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(186, 21, 147, 0.06);
    border: 1px solid rgba(186, 21, 147, 0.18);
    backdrop-filter: blur(10px);
}

.trade_text p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #222;
}

.trade_text a {
    font-size: 15px;
    font-weight: 700;
    color: #ba1593;
    text-decoration: none;
    position: relative;
}

.trade_text a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #98d855, #ba1593);
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: center;
    transition: opacity .2s ease, transform .2s ease;
}

.trade_text a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.tradein-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(152, 216, 85, 0.24), transparent 55%), rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
    z-index: 9997;
}

.tradein-bottom-sheet {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: -100%;
    width: 100%;
    max-width: 1180px;
    height: min(82vh, 650px);
    max-height: 88vh;
    padding: 40px 46px 34px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 248, 255, 0.96));
    border-radius: 32px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(22px);
    overflow-y: auto;
    transition: bottom .35s cubic-bezier(0.23, 1, 0.32, 1), transform .35s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 9998;
}

.tradein-bottom-wrap.tradein-open .tradein-overlay {
    opacity: 1;
    visibility: visible;
}

.tradein-bottom-wrap.tradein-open .tradein-bottom-sheet {
    bottom: 32px;
    transform: translateX(-50%) translateY(0);
}

.tradein-bottom-sheet h2 {
    font-size: 34px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 10px;
    letter-spacing: -0.03em;
    color: #111;
}

.tradein-bottom-sheet > p {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
    font-size: 17px;
    line-height: 1.6;
    color: #444;
}

.tradein-close {
    position: absolute;
    top: 18px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    z-index: 1;
}

.tradein-close:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
    background: #ffffff;
}

/* מובייל */
@media (max-width: 768px) {
    .trade_text {
        width: 100%;
        border-radius: 18px;
        justify-content: space-between;
        flex-wrap: wrap;
        row-gap: 0;
        padding: 12px 12px;
    }

    .trade_text p {
        font-size: 14px;
    }

    .trade_text a {
        font-size: 14px;
    }

    .tradein-bottom-sheet {
        left: 0;
        transform: translateX(0);
        bottom: -100%;
        width: 100%;
        max-width: 100%;
        height: 92vh;
        max-height: 85vh;
        border-radius: 26px 26px 0 0;
        padding: 26px 16px 26px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
    }

    .tradein-bottom-wrap.tradein-open .tradein-bottom-sheet {
        bottom: 0;
        transform: translateX(0) translateY(0);
    }

    .tradein-bottom-sheet h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .tradein-bottom-sheet > p {
        font-size: 15px;
        margin-bottom: 22px;
        padding: 0 4px;
    }

    .tradein-close {
        top: 14px;
        left: 12px;
        width: 34px;
        height: 34px;
        font-size: 22px;
    }
}

