/**
 * Mobile-First Responsive Overrides
 * 80% dos acessos são mobile — este arquivo garante UX mobile adequada.
 * Abordagem: estilos mobile como base, media queries para desktop.
 */

/* ========================================
   HEADER / NAVEGAÇÃO
   ======================================== */

/* Nav Tabs — scroll horizontal no mobile */
.ourofino-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow: visible;
}

.ourofino-header-logo img,
.ourofino-header-logo__image {
    display: block;
    width: auto !important;
    height: 110px !important;
    max-height: 110px !important;
    max-width: none !important;
    object-fit: contain;
    object-position: left center;
}

@media (max-width: 1279px) {
    .ourofino-nav-tabs-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .ourofino-nav-tabs-wrapper::-webkit-scrollbar {
        display: none;
    }
    /* Abas individuais — não quebrar texto */
    [data-bu-tab] {
        min-width: max-content;
        padding-left: 12px !important;
        padding-right: 12px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }
    /* Logo — fix margin negativo */
    header a.flex-shrink-0 {
        margin-left: 0 !important;
    }
    .ourofino-header-logo img,
    .ourofino-header-logo__image {
        height: 72px !important;
        max-height: 72px !important;
    }
    /* Header height menor */
    header .h-24 {
        height: 4rem !important;
    }
}

/* ========================================
   HERO SLIDER
   ======================================== */

@media (max-width: 767px) {
    .hero-slider {
        min-height: 200px !important;
    }
    .hero-slider .relative.h-\[350px\] {
        height: 200px !important;
    }
    /* Slider nav buttons menores */
    .slider-prev, .slider-next {
        padding: 8px !important;
    }
    .slider-prev svg, .slider-next svg {
        width: 18px !important;
        height: 18px !important;
    }
    /* Dots menores */
    .slider-dot {
        width: 8px !important;
        height: 8px !important;
    }
}

/* ========================================
   BREADCRUMB
   ======================================== */

@media (max-width: 767px) {
    section.px-6.py-5 .max-w-7xl {
        flex-wrap: wrap;
    }
    section.px-6.py-5 .flex.items-center.gap-3 {
        font-size: 12px;
        gap: 6px !important;
        flex-wrap: wrap;
    }
}

/* ========================================
   PRODUTOS EM DESTAQUE (bu-page)
   ======================================== */

@media (max-width: 639px) {
    /* Cards de produto — padding menor */
    #produtos .grid {
        gap: 12px !important;
    }
    #produtos .bg-white.rounded-lg {
        border-radius: 12px;
    }
    #produtos .bg-white.rounded-lg .p-3 {
        padding: 8px !important;
    }
    #produtos .bg-white.rounded-lg h3 {
        font-size: 12px !important;
    }
    #produtos .bg-white.rounded-lg p {
        font-size: 11px !important;
    }
    #produtos .bg-white.rounded-lg a.block {
        padding: 6px 0 !important;
        font-size: 11px !important;
    }
    /* CTA button menor */
    #produtos .text-center a {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* ========================================
   SOLUÇÕES
   ======================================== */

@media (max-width: 767px) {
    #solucoes .grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    #solucoes h1 {
        font-size: 24px !important;
    }
}

/* ========================================
   BLOG SECTION (bu-page)
   ======================================== */

@media (max-width: 767px) {
    #blog .grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    #blog h1 {
        font-size: 24px !important;
    }
    #blog .text-center a {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* ========================================
   FAQ
   ======================================== */

@media (max-width: 767px) {
    #faq .bg-white.rounded-2xl {
        padding: 16px !important;
    }
    #faq button span.font-semibold {
        font-size: 14px !important;
    }
    #faq .text-center a {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* ========================================
   CATÁLOGO DE PRODUTOS
   ======================================== */

@media (max-width: 767px) {
    /* Filtros — pills com scroll horizontal */
    #catalogo .flex.flex-wrap.gap-2 {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    #catalogo .flex.flex-wrap.gap-2::-webkit-scrollbar {
        display: none;
    }
    #catalogo .flex.flex-wrap.gap-2 a {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 13px !important;
        padding: 8px 14px !important;
    }
    /* Grid 2 colunas no mobile */
    #produtos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    /* Cards menores */
    #produtos-grid .p-4 {
        padding: 10px !important;
    }
    #produtos-grid h3 {
        font-size: 13px !important;
        min-height: auto !important;
    }
    #produtos-grid p {
        font-size: 11px !important;
        min-height: auto !important;
        -webkit-line-clamp: 2 !important;
    }
    #produtos-grid .space-y-2 a {
        padding: 8px 0 !important;
        font-size: 12px !important;
    }
}

/* ========================================
   BLOG PAGE
   ======================================== */

@media (max-width: 767px) {
    /* Filter bar — stack vertical */
    .bg-white.rounded-2xl.lg\:rounded-full .flex.items-center.gap-2 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        scrollbar-width: none;
    }
    .bg-white.rounded-2xl.lg\:rounded-full .flex.items-center.gap-2::-webkit-scrollbar {
        display: none;
    }
    .bg-white.rounded-2xl.lg\:rounded-full .flex.items-center.gap-2 a {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
}

/* ========================================
   SINGLE PRODUTO
   ======================================== */

@media (max-width: 767px) {
    .ourofino-produto-single section.px-6 {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .ourofino-produto-single h1 {
        font-size: 28px !important;
    }
    .ourofino-produto-single .flex.flex-col.sm\:flex-row.gap-4 a {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    /* CTA Final — stack vertical */
    .ourofino-produto-single .grid.grid-cols-1.lg\:grid-cols-2 {
        gap: 16px !important;
    }
}

/* ========================================
   NEWSLETTER
   ======================================== */

@media (max-width: 639px) {
    /* Container menor */
    .bg-\[\#E0E1E2\].rounded-2xl {
        padding: 24px 16px !important;
    }
    .bg-\[\#E0E1E2\].rounded-2xl h2 {
        font-size: 22px !important;
    }
    .bg-\[\#E0E1E2\].rounded-2xl p {
        font-size: 14px !important;
    }
}

/* ========================================
   PÁGINAS LEGAIS
   ======================================== */

@media (max-width: 767px) {
    .ourofino-legal-hero {
        padding: 40px 16px !important;
    }
    .ourofino-legal-hero h1 {
        font-size: 28px !important;
    }
    .ourofino-legal-content {
        padding: 24px 16px 40px !important;
    }
}

/* ========================================
   TIPOGRAFIA RESPONSIVA GLOBAL
   ======================================== */

@media (max-width: 767px) {
    h1 {
        font-size: 26px !important;
    }
    h2 {
        font-size: 20px !important;
    }
    h3 {
        font-size: 16px !important;
    }
}

/* ========================================
   CARD WRAPPER (px-4 pt-4)
   ======================================== */

@media (max-width: 767px) {
    .px-4.pt-4.rounded-b-\[24px\] {
        padding: 8px !important;
        padding-top: 8px !important;
    }
    .max-w-\[1440px\].mx-auto.bg-white.rounded-\[24px\] {
        border-radius: 16px !important;
    }
}

/* ========================================
   LOGO OVERFLOW (vaza levemente abaixo do header como no Figma)
   ======================================== */

.ourofino-header-logo {
    overflow: visible !important;
}

/* Garante que o wrapper do header não corte o logo */
.max-w-\[1440px\].mx-auto.bg-white.rounded-\[24px\],
.rounded-t-\[24px\] {
    overflow: visible !important;
}

/* ========================================
   MOBILE MENU HAMBURGER (complemento)
   ======================================== */

#mobile-menu-toggle {
    display: none;
}

@media (max-width: 1023px) {
    #mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        cursor: pointer;
        flex-shrink: 0;
    }
}

/* ========================================
   ONDE ENCONTRAR (iframe)
   ======================================== */

@media (max-width: 767px) {
    #gofind-iframe {
        min-height: 70vh !important;
    }
}

/* ========================================
   TOUCH TARGETS — mínimo 44px (WCAG)
   Apenas para elementos de ação isolados, não links inline
   ======================================== */

@media (max-width: 1023px) {
    #mobile-menu-toggle,
    #mobile-menu-close,
    .slider-prev,
    .slider-next {
        min-height: 44px;
        min-width: 44px;
    }
}
