/* Responsive foundations shared by the public site, login and operations. */
html{width:100%;scrollbar-gutter:stable}body{min-width:0}*,*:before,*:after{box-sizing:border-box}img,svg,video{max-width:100%}input,select,textarea,button{max-width:100%}input,select,textarea{min-width:0}a,p,h1,h2,h3,h4,td,th,label{overflow-wrap:anywhere}.admin-main,.admin-content,.panel,.panel-body,.form-row>*,.operations-grid>*,.request-grid>*,.tracking-grid>*,.product-grid>*,.area-grid>*,.about-grid>*,.brand-hero-grid>*,.contact-grid>*,.footer-grid>*{min-width:0}.admin-content{width:100%}.panel-body>form,.panel-body>details{max-width:100%}.table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}.panel>table{display:block;max-width:100%;overflow-x:auto}.panel .table-wrap table{min-width:600px;width:100%}.business-line{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px 0;border-bottom:1px solid #e1e9e4;margin-bottom:14px;align-items:end}.business-line label{margin-bottom:0}.business-line .button{align-self:end;justify-self:start}.quote-line{grid-template-columns:minmax(0,2fr) minmax(70px,1fr) minmax(100px,1fr)}.admin-content .button{white-space:normal;text-align:center}.admin-heading,.panel-head{flex-wrap:wrap}.sidebar{height:100dvh}.sidebar nav{flex:1;align-content:start;overflow-y:auto}.sidebar nav>a{font-size:12px;padding:10px}.sidebar-bottom{flex-shrink:0}.user-menu{min-width:0}.user-menu strong{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.login-card{max-width:100%;min-width:0}.site-body .catalog-filter{display:flex;flex-wrap:wrap}.site-body .catalog-filter .search-field{min-width:180px;flex:1 1 380px}.site-body .catalog-filter select{flex:0 1 230px}.site-body .catalog-meta{flex-wrap:wrap;gap:12px}.site-body .product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.site-body .hero-actions{flex-wrap:wrap}.tracking-card .table-wrap table{min-width:490px}.site-body .care-distribution{background:var(--dark,#104038)}
@media(min-width:1600px){.admin-content{max-width:1640px;padding:40px 48px}.site-body .container{width:min(1320px,calc(100% - 120px))}}
@media(min-width:1025px) and (max-width:1350px){.admin-content{padding:28px 24px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.site-body .site-header .logo{width:210px}.site-body .site-header nav{gap:16px}.site-body .site-header .button.small{padding:12px 16px}.operations-grid{grid-template-columns:1fr}.site-body .area-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1024px){.admin-main{margin-left:0}.admin-topbar{position:sticky;top:0;z-index:45;height:70px;padding:0 22px}.admin-mobile{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px}.admin-body .sidebar{display:none;top:70px;bottom:0;height:calc(100dvh - 70px);width:min(290px,85vw);padding:20px 16px;box-shadow:18px 0 36px #10403826;z-index:44}.admin-body .sidebar.open{display:flex}.admin-topbar>span{display:none}.admin-content{padding:26px 22px}.operations-grid,.admin-grid,.split-form{grid-template-columns:1fr}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.site-body .site-header .header-inner{height:80px}.site-body .site-header .mobile-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px}.site-body .site-header nav{display:none;position:absolute;top:80px;left:0;right:0;padding:16px 24px;background:white;box-shadow:0 15px 25px #10403814}.site-body .site-header nav.open{display:flex;flex-direction:column;gap:0;align-items:stretch;max-height:calc(100dvh - 80px);overflow-y:auto}.site-body .site-header nav>a:not(.button){padding:14px 0}.site-body .site-header nav>a:not(.button):after{display:none}.site-body .site-header nav>.button{margin-top:10px;align-self:start}.site-body .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.site-body .section-heading{gap:22px;flex-wrap:wrap}.site-body .area-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.permissions-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.site-body .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.request-grid,.tracking-grid,.contact-grid,.about-grid,.faq-grid,.care-distribution-grid{grid-template-columns:1fr!important}.site-body .about-brand-visual,.site-body .distribution-brand-visual{max-width:390px;justify-self:center;width:100%}.site-body .hero-slider .brand-hero-grid{grid-template-columns:1fr;padding-top:35px;gap:26px}.site-body .hero-slider .brand-hero-copy>p{min-height:0;max-width:560px}.site-body .hero-slider .hero-slide-title{min-height:2.5em;font-size:clamp(32px,6.5vw,44px)}.site-body .hero-slider .hero-gallery{justify-self:center;max-width:380px;padding-inline:5px}.site-body .hero-slider .hero-actions{min-height:100px}.site-body .section-heading{align-items:flex-start;flex-direction:column}.login-body{grid-template-columns:1fr}.login-brand{display:none}.login-box{min-height:100dvh;padding:32px 24px}.business-line,.quote-line{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-filter .button{min-height:44px}}
@media(max-width:600px){.site-body .container{width:calc(100% - 36px)}.site-body .site-header .logo{width:min(210px,64vw)}.site-body .site-header .header-inner{height:76px}.site-body .site-header nav{top:76px}.site-body .area-grid{grid-template-columns:1fr}.site-body .form-row,.admin-body .form-row{grid-template-columns:1fr;gap:0}.site-body .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px}.site-body .footer-grid>div:first-child{grid-column:1/-1}.site-body .catalog-filter .search-field{flex-basis:100%;width:100%}.site-body .catalog-filter select{flex:1 1 100%;width:100%}.site-body .catalog-meta{flex-direction:column;align-items:flex-start}.site-body .product-info h3{min-height:0}.site-body .product-art.has-product-photo{height:210px}.site-body .contact-form{padding:24px 18px}.admin-content{padding:23px 15px}.admin-topbar{padding:0 15px}.user-menu strong{max-width:155px}.admin-content input,.admin-content select,.admin-content textarea,.login-card input{font-size:16px}.admin-heading h1{font-size:clamp(23px,6.5vw,30px)}.panel-head,.panel-body{padding:18px}.stat-card strong{font-size:24px;overflow-wrap:anywhere}.stat-card{padding:16px}.quick-actions,.permissions-grid{grid-template-columns:1fr}.panel-head h2{line-height:1.6}.dispatch-row{grid-template-columns:minmax(0,1fr) 70px 32px}.admin-content .button{min-height:42px}.business-line,.quote-line{grid-template-columns:1fr}.business-line .button{justify-self:stretch}.tracking-card{padding:20px}.tracking-card h2{font-size:26px}.customer-chat{bottom:max(16px,env(safe-area-inset-bottom));right:14px}.chat-panel{max-height:calc(100dvh - 110px)}.site-body .page-banner{padding:42px 0}.site-body .page-banner h1{font-size:32px}}
@media(max-width:380px){.site-body .product-grid{grid-template-columns:1fr}.stat-grid{grid-template-columns:1fr}.site-body .product-grid .product-art.has-product-photo{height:280px}.site-body .area-card{grid-template-columns:70px minmax(0,1fr);gap:12px}.site-body .area-card .area-icon-stage,.site-body .area-card .area-top svg.area-icon-3d{width:68px;height:74px}.user-menu .avatar{display:none}.site-body .hero-slider .hero-slide-title{font-size:30px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important}}

/* =========================================================
   OTIMIZAÇÕES RESPONSIVAS E COMPATIBILIDADE IPHONE / SAFARI
   ========================================================= */
.site-icon,
svg.site-icon,
button svg,
a svg,
.contact-info-icon svg,
.chat-launcher svg,
.contact-map-controls svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    shape-rendering: geometricPrecision;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.header-actions-mobile {
    display: none;
}

.nav-mobile-logout {
    display: none;
}

@media(max-width: 1024px) {
    .header-actions-mobile {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .site-body .site-header .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        border-radius: 50%;
        background: transparent;
        border: none;
        color: #193d38;
        cursor: pointer;
        padding: 0;
        transition: background-color 0.2s, color 0.2s;
    }

    .site-body .site-header .mobile-toggle:hover {
        background-color: #f0f7f3;
        color: var(--green, #008773);
    }

    .site-body .site-header .mobile-toggle svg {
        width: 26px;
        height: 26px;
    }

    .site-body .site-header nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 16px 32px rgba(16, 64, 56, 0.12);
        padding: 12px 24px 20px;
        z-index: 100;
        border-bottom: 2px solid var(--green, #008773);
        gap: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        font-size: 15px !important;
    }

    .site-body .site-header nav.open {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        align-items: stretch !important;
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
    }

    .site-body .site-header nav > a:not(.button) {
        display: flex;
        align-items: center;
        padding: 14px 4px;
        font-size: 15px;
        font-weight: 600;
        color: var(--ink, #193d38);
        border-bottom: 1px solid #edf1ee;
        text-decoration: none;
        white-space: normal;
    }

    .site-body .site-header nav > a:not(.button):after {
        display: none !important;
        content: none !important;
    }

    .site-body .site-header nav > a.active {
        color: var(--green, #008773);
        font-weight: 700;
    }

    .site-body .site-header nav .nav-header-actions {
        display: none !important;
    }

    /* Topbar oculta no mobile — as ações (Minha conta / Sair) estão nos ícones do header */
    .site-body .topbar {
        display: none !important;
    }

    /* Botão Sair dentro do menu gaveta mobile */
    .nav-mobile-logout {
        display: block;
        padding: 14px 4px;
        border-top: 1px solid #edf1ee;
        margin-top: 4px;
    }

    .nav-mobile-logout form {
        display: block;
    }

    .nav-mobile-logout button {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 10px 0;
        background: none;
        border: none;
        font: inherit;
        font-size: 14px;
        font-weight: 600;
        color: #a14135;
        cursor: pointer;
    }

    .nav-mobile-logout button:hover {
        color: #7c302a;
    }
}

@media(max-width: 600px) {
    .site-body .site-header .logo {
        width: clamp(140px, 44vw, 195px);
        height: auto;
    }
}

@media(max-width: 768px) {
    /* Previne auto-zoom indesejado no iOS Safari ao focar inputs */
    input, select, textarea, .site-body input, .site-body select, .site-body textarea {
        font-size: 16px !important;
    }

    /* Ajuste para safe areas do iPhone */
    .site-body {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .shop-cart-drawer {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}
