#apple_tradein_calc {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}
.block-row { width: 100%; display: block; }
.float-left { float: left; }
.float-center { margin: 0 auto; text-align: center; }
.block-1080 { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.size-28 { font-size: 28px; }
.size-20 { font-size: 20px; }
.boldtext { font-weight: 700; }
.lighttext { font-weight: 400; }
.black-text { color: #1d1d1f; }
.line-height-110 { line-height: 1.1; }
.margin-bottom-10 { margin-bottom: 10px; }
.margin-bottom-5 { margin-bottom: 5px; }
.margin-top-30 { margin-top: 30px; }
.margin-bottom-30 { margin-bottom: 30px; }

/* Category Grid - 7 per row desktop */
.product-options {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
    padding: 0 20px;
}
.product-options button, .product-options a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1d1d1f;
    background: white;
    min-width: 0;
}
.product-options button:hover, .product-options a:hover {
    border-color: #007aff;
    background: #f5f9ff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,122,255,0.15);
}
.product_name {
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}
.category-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 4px;
}
.hidden { display: none; }
.device-search-block { background: #fff; padding: 30px 20px; border-radius: 20px; margin: 20px; }
select#deviceList {
    width: 100%;
    max-width: 400px;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    background: white;
}
.form-wrapper-main { background: #fff; padding: 20px; margin: 20px; border-radius: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.grading-form fieldset { border: none; margin-bottom: 25px; padding: 0; }
.grading-question { font-size: 18px; font-weight: 600; margin-bottom: 15px; color: #1d1d1f; }
.grading-form label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #f9f9fb;
    cursor: pointer;
    transition: all 0.2s;
}
.grading-form label:hover { background: #f0f0f5; }
.grading-form input[type="radio"] { margin-top: 2px; width: 18px; height: 18px; cursor: pointer; }
.grading-form .bold_text { font-weight: 600; min-width: 100px; }
.support-wrapper { background: #f8f9fe; padding: 15px; border-radius: 12px; margin-bottom: 15px; }
.support-heading { font-weight: 600; margin-bottom: 8px; display: block; }
.support-messages { margin: 5px 0 0 20px; font-size: 13px; color: #666; }
.important-message-wrapper { margin-top: 15px; padding: 12px; background: #fff3e0; border-radius: 10px; font-size: 13px; }
.submit-wrapper { text-align: center; margin-top: 25px; }
.action-get-price, .send-estiamte, #trade-locked-in {
    background: #007aff;
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.3s;
}
.action-get-price:hover, .send-estiamte:hover { background: #005fc1; }
.action-get-price:disabled, .send-estiamte:disabled { background: #ccc; cursor: not-allowed; }
#result { padding: 20px; background: #e8f5e9; margin: 20px; border-radius: 16px; }
.success-message { display: block; font-size: 20px; font-weight: 600; margin-bottom: 15px; color: #2e7d32; }
.device-estimate { display: flex; align-items: center; gap: 20px; justify-content: center; flex-wrap: wrap; }
.estimated-price strong { font-size: 28px; color: #007aff; }
.tradein-action-wrapper { display: flex; gap: 15px; justify-content: center; margin-top: 20px; }
.email-estimate-form-wrapper { background: #fff; padding: 25px; margin: 20px; border-radius: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.customer-data-input .input-wrapper { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 15px; }
.customer-data-input label { display: flex; flex-direction: column; flex: 1; gap: 5px; }
.customer-data-input input { padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.input-helper { font-size: 12px; color: #888; margin-top: -10px; display: block; }
.trade-in-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9999; justify-content: center; align-items: center; }
.trade-in-spinner { width: 50px; height: 50px; border: 5px solid #f3f3f3; border-top: 5px solid #007aff; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Mobile: horizontal scroll, 3 items visible */
@media (max-width: 768px) {
    .product-options {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding: 10px 16px;
        -webkit-overflow-scrolling: touch;
    }
    .product-options button, .product-options a {
        flex: 0 0 calc(33.33% - 12px);
        min-width: 110px;
        scroll-snap-align: start;
        padding: 12px 8px;
    }
    .size-28 { font-size: 22px; }
    .customer-data-input .input-wrapper { flex-direction: column; }
    .category-image { width: 50px; height: 50px; }
}
@media (max-width: 480px) {
    .product-options button, .product-options a { flex: 0 0 calc(50% - 12px); }
}