.tradein-page {
    padding: 30px 0 60px;
    background: #fff;
    min-height: 80vh;
}

.tradein-layout {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 30px;
    align-items: start;
}

/* Steps indicator */
.tradein-steps {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    max-width: 550px;
}

.tradein-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #EAEAEA;
    color: #B8B1A3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.tradein-step.active .step-num {
    background: #0F3B2E;
    color: #fff;
}

.tradein-step.completed .step-num {
    background: #0F3B2E;
    color: #fff;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
}

.tradein-step.active .step-label {
    color: #0F3B2E;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e9ecef;
    margin: 0 15px;
}

/* Wizard panels */
.wizard-panel {

}

/* Device type cards */
.device-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.device-type-card {
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #F7F7F5;
}

.device-type-card:hover {
    border-color: #0F3B2E;
}

div#step-2 {
    background: #F7F7F5;
    padding: 24px;
    border-radius: 16px;
    margin-top: 20px;
}

.device-type-card.showroom-only {
    opacity: 0.8;
}

.device-type-icon {
    margin-bottom: 8px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-type-name-icon {
    font-size: 18px;
    font-weight: 600;
}

.device-type-label {
    font-size: 14px;
    font-weight: 500;
    color: #0F3B2E;
}

.showroom-badge {
    font-size: 12px;
    background: #B8B1A3;
    padding: 2px 4px;
    border-radius: 2px;
    white-space: nowrap;
    color: #0A0A0A;
    margin-top: 4px;
}

.device-type-card.showroom-only .device-type-label {
    color: #B8B1A3;
}

.section-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #0A0A0A;
}

div#storage-section {
    margin-bottom: 24px;
}

div#sim-section {
    margin-bottom: 24px;
}

.model-dropdown {
    margin-bottom: 15px;
}

.model-dropdown select,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    appearance: auto;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.model-card {
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    padding: 6px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #FFFFFF;
}

.model-card:hover {
    border-color: #0F3B2E;
}

.model-card.selected {
    border-color: #0F3B2E;
}

.model-card-img {
    width: 96px;
    height: 96px;
    margin: 0 auto 8px;
}

.model-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.model-card-name {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: #0A0A0A;
}

.model-card-hidden {
    display: none;
}

.model-show-all {
    text-align: center;
    padding: 10px;
    color: #0F3B2E;
    font-weight: 500;
    cursor: pointer;
}

.model-show-all:hover {
    text-decoration: underline;
}

/* Chip groups */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 8px;
    border: 1px solid #B8B1A3;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    color: #0A0A0A;
}

.chip:hover {
    border-color: #0F3B2E;
}

.chip.selected {
    background: #0F3B2E29;
    border-color: #0F3B2E;
}

.color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

/* Condition groups */
.condition-group {
    margin-bottom: 20px;
}

.condition-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Proposal panel (right side) */
.tradein-proposal {
    position: relative;
}

.proposal-sticky {
    position: sticky;
    top: 20px;
}

.proposal-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.proposal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.tradein-beta-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #0F3B2E;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.price-not-buying {
    color: #B42318 !important;
    font-size: 13px !important;
    letter-spacing: 0.02em;
}

.btn-tradein.is-disabled,
.btn-tradein:disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.proposal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.proposal-tab {
    padding: 6px 16px;
    border: 1px solid #B8B1A3;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    color: #0A0A0A;
    background: #fff;
}

.proposal-tab.active {
    background: #0F3B2E29;
    color: #0a0a0a;
    border-color: #0F3B2E;
}

/* Placeholder */
.proposal-placeholder {
    text-align: left;
    padding: 16px 24px;
    background: #F7F7F5;
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.placeholder-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0px;
}

.proposal-placeholder p {
    font-size: 16px;
    line-height: 21px;
    font-weight: 400;
    color: #0A0A0A;
    margin-left: 10px;
    margin-bottom: 0;
}

/* Device cards */
.device-card {
    background: #fff;
    border: 1px solid #EAEAEA;
    border-radius: 10px;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}

.device-card.your-device {
    background: #fff;
}

.device-card.new-device {
    background: #fff;
}

.device-card-img {
    width: 120px;
    height: 140px;
    flex-shrink: 0;
    position: relative;
    text-align: center;
}

.device-card-img img {
    width: 100%;
    height: 110px;
    object-fit: contain;
}

.device-badge {
    position: relative;
    font-size: 12px;
    background: #8DAA91;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    color: #0A0A0A;
}

.device-badge.badge-new {
    background: #6c757d;
}

.device-card-info {
    flex: 1;
}

.device-card-name {
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 3px;
    color: #0A0A0A;
}

.device-card-specs {
    font-size: 16px;
    color: #0A0A0A;
    font-weight: 600;
}

.device-card-price {
    background: #0F3B2E1F;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 100px;
    align-self: stretch;
    border-radius: 8px;
    max-width: 100px;
}

.price-label {
    font-size: 14px;
    color: #0A0A0A;
    margin-bottom: 4px;
}

.price-value {
    font-size: 16px;
    font-weight: 700;
    color: #0F3B2E;
    white-space: nowrap;
}

.price-surcharge {
    color: #0F3B2E;
}

.price-full {
    font-size: 12px;
    color: #6c757d;
    text-decoration: line-through;
    margin-top: 4px;
}

/* Disclaimer */
.proposal-disclaimer {
    font-size: 14px;
    color: #0A0A0A;
    line-height: 21px;
    font-weight: 400;
    padding: 12px 0;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.disclaimer-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.disclaimer-icon img {
    width: 100%;
    height: 100%;
}

.devices-section {
    background: #F7F7F5;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
}

/* New device form */

.new-device-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.new-device-form .form-select {
    margin-bottom: 10px;
}

.new-device-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
}

.new-device-filters select:first-child {
    grid-column: 1 / -1;
}

.btn-tradein-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

/* Sell block */
.sell-price-block {
    text-align: center;
    padding: 30px;
    background: #f0f7f3;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sell-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.sell-price {
    font-size: 28px;
    font-weight: 700;
    color: #0F3B2E;
}

/* Buttons */
.btn-tradein {
    padding: 10px 24px;
    background: #0F3B2E;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
}

.btn-tradein:hover {
    background: #145228;
}

.btn-sell {
    background: #495057;
}

.btn-sell:hover {
    background: #343a40;
}

.tradein-modal-content .btn-tradein-wrap {
    display: flex;
    justify-content: flex-end;
}

/* Validation error */
.tradein-validation-error {
    background: #dc3545;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* Modal */
.tradein-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tradein-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.tradein-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    width: 560px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
}

.tradein-modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.modal-contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.tradein-modal-content .form-group {
    margin-bottom: 0;
}

.tradein-modal-content .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    font-size: 14px;
}

.modal-devices {
    margin-bottom: 16px;
}

.modal-disclaimer {
    font-size: 14px;
    color: #0A0A0A;
    line-height: 21px;
    font-weight: 400;
    padding: 12px 0;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tradein-page {
    height: 100%;
}

.tradein-proposal {
    height: 100%;
}

div#step-3 {
    background: #F7F7F5;
    padding: 24px;
    border-radius: 16px;
    margin-top: 20px;
}

div#tab-exchange {
    background: #F7F7F5;
    padding: 24px;
    border-radius: 16px;
}

.your-device-section {
    background: #F7F7F5;
    border: 1px solid #F7F7F5;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.tradein-bg {
    background-image: url('/icons/trade_in-bg.jpg');
    background-size: cover;
    height: 400px;
    position: relative;
    background-position: center;
}

.tradein-bg-content {
    width: 360px;
    position: absolute;
    right: 0;
    bottom: 50px;
    background: #131313;
    padding: 16px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border: 1px solid rgb(141 170 145 / 30%);
    border-right: 0;
}

.tradein-bg-content p {
    font-size: 14px;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 10px;
}

.tradein-bg a.btn-tradein {
    color: #8DAA91;
    background: transparent;
    display: inline-block;
    padding: 0;
    text-decoration: underline;
}








/* Info section */
.tradein-info {
    padding: 60px 0;
    background: #fff;
}

.tradein-info-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #0A0A0A;
}

.tradein-steps-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.tradein-step-card {
    background: #F7F7F5;
    border-radius: 16px;
    overflow: hidden;
}

.step-card-img {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.step-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-card-content {
    padding: 20px;
    position: relative;
}

.step-card-num {
    font-weight: 700;
    color: #B8B1A3;
    line-height: 1;
    font-size: 100px;
    margin-bottom: 10px;
    display: block;
}

.step-card-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0A0A0A;
}

.step-card-content p {
    font-size: 14px;
    line-height: 1.5;
    color: #0A0A0A;
}

/* About section */
.tradein-info .tradein-about {
    display: grid;
    grid-template-columns: 1fr 550px;
    gap: 30px;
    border-top: none;
    padding: 40px;
    background: #F7F7F5;
    border-radius: 16px;
}

.tradein-info .tradein-about > * {
    min-width: 0;
}

.tradein-about-main h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0A0A0A;
}

.tradein-about-main h4 {
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 8px;
    color: #0A0A0A;
}

.tradein-about-sidebar p {
    font-weight: 600;
    font-size: 14px;
}

.tradein-about-main p,
.tradein-about-sidebar p {
    font-size: 14px;
    line-height: 1.6;
    color: #0A0A0A;
    margin-bottom: 8px;
}

.tradein-about-lead {
    margin-bottom: 16px;
}

.tradein-about-main ul,
.tradein-about-sidebar ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.tradein-about-main ul li,
.tradein-about-sidebar ul li {
    font-size: 14px;
    line-height: 1.6;
    color: #0A0A0A;
    margin-bottom: 4px;
}

.tradein-about-sidebar {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px 40px;
    align-self: start;
    margin-top: 70px;
}

.tradein-about-sidebar h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0A0A0A;
}

.tradein-about-sidebar h4:not(:first-child) {
    margin-top: 20px;
}

.tradein-cta {
    display: inline-block;
    margin-top: 24px;
    width: auto;
}

/* Responsive */
@media (max-width: 992px) {
    .tradein-layout {
        grid-template-columns: 1fr;
    }

    .proposal-sticky {
        position: static;
    }

    .model-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .device-types {
        grid-template-columns: repeat(2, 1fr);
    }

    .devices-section {
        padding: 16px;
    }
    
    .device-card {
        flex-wrap: wrap;
        padding: 8px 10px;
    }

    div#step-2 {
        padding: 16px;
    }
    
    .device-card-price {
        width: 100%;
        max-width: 100%;
        padding: 8px 16px;
        display: flex;
        flex-wrap: nowrap;
        flex-direction: row;
        justify-content: space-between;
    }
    
    div#tab-exchange {
        padding: 16px;
    }

    .tradein-steps {
        white-space: nowrap;
        margin: 0;
        padding-top: 0;
        overflow-x: scroll;
    }
    
    .tradein-steps-container {
        width: 100%;
        overflow-x: scroll;
    }
    
    .tradein-wizard {
        display: contents;
    }
    
    div#step-2 {
        margin-top: 0px;
    }
    
    div#step-3 {
        margin-top: 0;
        padding: 16px;
    }

    .tradein-steps-cards {
        grid-template-columns: 1fr;
    }

    .tradein-info .tradein-about {
        grid-template-columns: 1fr;
    }

    .tradein-info .tradein-about {
        padding: 16px;
    }
    
    .tradein-about-sidebar {
        padding: 16px;
        margin-top: 20px;
    }

    .tradein-steps-cards {
        margin-bottom: 30px;
    }

    .tradein-info {
        padding-top: 0;
    }

    .tradein-info .tradein-about {
        padding: 16px;
    }
    
    .tradein-about-sidebar {
        padding: 16px;
        margin-top: 20px;
    }
    
    .tradein-steps-cards {
        margin-bottom: 30px;
    }
    
    .tradein-info {
        padding-top: 0;
    }
    
    .tradein-bg {
        height: 300px;
    }
    
    .tradein-bg-content {
        left: 0;
        border-right: 1px solid rgb(141 170 145 / 30%);
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-left: 0;
    }
}

@media (max-width: 576px) {
    .model-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tradein-steps {
        /* flex-wrap: wrap; */
        gap: 5px;
    }

    /* .step-line {
        display: none;
    } */

    .new-device-filters {
        grid-template-columns: 1fr;
    }
}
