/* ================================================================
   MOBILE.CSS — VISUAL MODERNO (Cor Suave Azul‑Cinzento)
   Regras aplicadas apenas em ecrãs < 700px
================================================================ */

@media (max-width: 700px) {

    /* GLOBAL */
    body {
        background: #f6f9fc;
        padding: 0;
        margin: 0;
    }

    @media (max-width: 700px) {

        /* Mostrar Hamburger */
        .hamburger {
            display: block !important;
        }

        /* Esconder botões da NAVBAR no mobile */
        .navbar .right {
            display: none !important;
        }
    }

    /* NAVBAR */
    .navbar {
        height: 54px;
        padding: 0 10px;
    }

    .search input {
        width: 120px;
    }

    /* FILTER BAR — versão correta */
    .filter-bar {
        flex-wrap: nowrap !important;
        overflow: hidden;
        padding: 8px 6px;
        gap: 6px;
    }

    .filter-bar .dd {
        flex: 1 1 auto;
        min-width: 0;
    }

    .dropBtn {
        width: 100%;
        padding: 6px 4px;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    /* BANNER */
    #banner img {
        max-height: 240px;
        border-radius: 6px;
    }

    #banner figcaption {
        font-size: 13px;
        margin-bottom: 4px;
    }

    /* GALLERY */
    .masonry {
        padding: 10px;
        gap: 10px;
    }

    .column {
        gap: 10px;
    }

    .thumb {
        border-radius: 6px;
    }

    /* LOAD MORE */
    .load-btn {
        margin: 12px auto 18px auto;
        padding: 8px 16px;
        font-size: 15px;
        border-radius: 6px;
    }

    /* ZOOM */
    #zoomImg {
        max-width: 90%;
        max-height: 90%;
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    .close {
        top: 14px;
        right: 18px;
        font-size: 30px;
    }

    /* LOGIN MODAL */
    #loginModal .modal-box {
        width: 90%;
        padding: 18px;
    }

    #loginModal input {
        padding: 8px;
    }

    /* FOOTER */
    .footer {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 10px;
        font-size: 13px;
    }

    /* ============================================================
     MOBILE SIDE MENU (Drawer)
  ============================================================ */

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 200;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 72%;
        max-width: 280px;
        height: 100%;
        background: #ffffff;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.25);
        z-index: 210;
        padding: 18px;
        display: flex;
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    .mobile-menu.show {
        transform: translateX(0);
    }

    .closeMenuBtn {
        background: none;
        border: none;
        font-size: 26px;
        align-self: flex-end;
        cursor: pointer;
        color: #4C7DA6;
    }

    .mobile-menu-items {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .mobile-menu-item {
        background: #4C7DA6;
        color: white;
        padding: 12px;
        border-radius: 6px;
        border: none;
        text-align: left;
        width: 100%;
        font-size: 16px;
        cursor: pointer;
        transition: background .2s ease;
    }

    .mobile-menu-item:hover {
        background: #6FA3C5;
    }
}

@media (max-width: 700px) {

    .dropdown {
        position: absolute;
        display: none;
        /* estado inicial */
        width: auto;
        /* ou 100% se preferires */
        min-width: 160px;
        z-index: 9999 !important;
    }

    .dropdown:not(.hidden) {
        display: block !important;
        /* força visualização */
    }

}

@media (max-width: 700px) {

    /* A dropdown precisa sair "para fora" da filter-bar */
    .filter-bar {
        overflow: visible !important;
        /* <-- retirar o "tampa" que escondia a lista */
    }

    /* Garante que o "ancorador" permite exceder a área */
    .filter-bar .dd {
        position: relative;
        overflow: visible;
        z-index: 21;
        /* acima da navbar? normalmente 19/20 */
    }

    /* A própria dropdown: acima da UI e sempre visível quando não .hidden */
    .dropdown {
        position: absolute;
        left: 0;
        top: 38px;
        /* ajusta se precisares mais abaixo */
        min-width: 160px;
        display: none;
        /* estado base */
        z-index: 9999 !important;
        /* acima de tudo */
    }

    .dropdown:not(.hidden) {
        display: block !important;
    }
}