/* ============ RESPONSIVIDADE ============ */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        gap: 30px;
    }
    
    .config-section {
        max-width: 100%;
    }
    
    .preview-section {
        flex: none;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .phone-mockup {
        width: 340px;
        height: 680px;
    }
}

@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .container,
    .container.preview-hidden {
        display: block;
        width: 100%;
        min-width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        gap: 0;
    }

    :where(img, video, canvas, svg, iframe) {
        max-width: 100%;
        height: auto;
    }

    :where(input, select, textarea, button) {
        max-width: 100%;
    }

    :where(.container, .section-header, .section-actions, .save-store-container, .save-store-actions, .input-row, .address-grid, .upload-area, .link-type-buttons) > * {
        min-width: 0;
    }

    body:not(:has(.landing-wrapper)) {
        padding: 0;
        background: #ffffff;
    }

    :where(.config-section, .preview-section, .section-content, .save-store-container, .save-store-actions) {
        max-width: 100%;
    }

    .config-section {
        width: 100%;
        max-width: none;
        min-width: 100%;
        padding: 14px 12px 18px;
        border-radius: 0;
        box-shadow: none;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 18px;
    }

    .panel-title-logo {
        width: 110px;
        margin-top: 0;
        margin-bottom: 10px;
    }

    .panel-title-name {
        font-size: 1.45rem;
        line-height: 1.1;
    }

    .upload-area {
        grid-template-columns: 1fr;
    }
    
    .phone-mockup {
        width: min(100vw - 20px, 360px);
        height: 640px;
        padding: 14px;
        border-radius: 30px;
        box-shadow:
            0 18px 44px rgba(0, 0, 0, 0.22),
            0 0 0 3px #333,
            0 0 0 7px #222;
    }

    .phone-screen {
        border-radius: 22px;
    }
    
    .section-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .btn-small {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    
    .link-type-buttons {
        grid-template-columns: 1fr;
    }

    .input-row,
    .address-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    .save-store-container {
        flex-direction: column;
        text-align: center;
    }
    .save-store-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    .btn-save-store, .btn-export, .btn-save-gear, .btn-account-settings {
        width: 100%;
        justify-content: center;
    }

    .collapsible-section,
    .section-content,
    .input-box,
    .input-field,
    .form-control {
        min-width: 0;
    }

    .form-control,
    .input-wrapper input,
    .input-wrapper select,
    .input-wrapper textarea {
        min-width: 0;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container,
    .container.preview-hidden {
        width: 100%;
        min-width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        gap: 0;
    }

    body:not(:has(.landing-wrapper)) {
        padding: 0;
    }

    .config-section {
        width: 100%;
        max-width: none;
        min-width: 100%;
        padding: 12px 10px 18px;
        border-radius: 0;
        box-shadow: none;
    }

    .panel-title-name {
        font-size: 1.25rem;
    }

    .panel-title-greeting {
        font-size: 0.72rem;
    }

    .header-btn-grid {
        grid-template-columns: 1fr;
    }

    .header-btn-grid .btn-danger {
        grid-column: auto;
    }

    .preview-section {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
    }

    .phone-mockup {
        width: min(100vw - 12px, 348px);
        height: 620px;
        padding: 12px;
        border-radius: 26px;
        box-shadow:
            0 16px 38px rgba(0, 0, 0, 0.2),
            0 0 0 2px #333,
            0 0 0 5px #222;
    }

    .config-section {
        overflow-x: hidden;
    }

    .btn-small {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 12px;
    }
}
