/* OTIMIZAÇÕES NATIVAS APP */
html { 
    font-size: 100%; /* ESCALA ORIGINAL PARA A INTERFACE */
}

html, body { 
    height: 100dvh; width: 100vw; overflow: hidden; position: fixed; 
    background-color: #f3f4f6; font-family: 'Inter', sans-serif; touch-action: none;
}

/* Safe area (iPad landscape / PWA) — valores reais via JS; fallback env() */
html.stoffus-compact-header {
    --stoffus-safe-top: env(safe-area-inset-top, 0px);
    --stoffus-safe-right: env(safe-area-inset-right, 0px);
    --stoffus-safe-bottom: env(safe-area-inset-bottom, 0px);
    --stoffus-safe-left: env(safe-area-inset-left, 0px);
}
#stoffus-safe-probe {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    visibility: hidden;
    pointer-events: none;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    box-sizing: content-box;
}
#canvas-container {
    width: 100%;
    height: 100dvh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}
#canvas-container canvas {
    display: block;
    pointer-events: auto;
    touch-action: none;
}

/* Botão «Centrar» — acima da gaveta no tablet (z-index > #main-sidebar) */
#btn-recenter,
#btn-recenter.stoffus-recenter-btn {
    position: fixed;
    left: auto;
    right: calc(14px + var(--stoffus-safe-right, 0px));
    bottom: calc(18px + var(--stoffus-safe-bottom, 0px));
    transform: none;
    z-index: 220;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.94);
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    transition: opacity 0.22s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
#btn-recenter i {
    font-size: 0.8rem;
    color: #e84c26;
    opacity: 0.95;
}
#btn-recenter:not(.hidden):hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    border-color: #d1d5db;
}
#btn-recenter:not(.hidden):active {
    transform: scale(0.97);
}
#btn-recenter.hidden {
    display: none !important;
    pointer-events: none;
    opacity: 0;
}
#btn-recenter:not(.hidden) {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}
/* Tablet: por cima da gaveta inferior (~85px visíveis); JS pode afinar via --stoffus-recenter-bottom */
html.stoffus-tablet-ui #btn-recenter {
    bottom: var(--stoffus-recenter-bottom, calc(108px + var(--stoffus-safe-bottom, 0px)));
    right: calc(18px + var(--stoffus-safe-right, 0px));
    min-height: 44px;
    padding: 0.55rem 0.95rem;
    font-size: 0.8125rem;
}
@media (max-width: 768px) {
    html.stoffus-tablet-ui #btn-recenter {
        bottom: var(--stoffus-recenter-bottom, calc(112px + var(--stoffus-safe-bottom, 0px)));
    }
}
@media (min-width: 769px) {
    html.stoffus-compact-header #btn-recenter {
        bottom: calc(22px + var(--stoffus-safe-bottom, 0px));
    }
}

/* ========== Interface tablet / iPad (detecção JS: html.stoffus-tablet-ui) ========== */
html.stoffus-tablet-ui .stoffus-header-options-btn {
    display: inline-flex !important;
}
html:not(.stoffus-tablet-ui) .stoffus-header-options-btn {
    display: none !important;
}
html.stoffus-tablet-ui #stoffus-header-desktop-promo {
    display: none !important;
}
html.stoffus-tablet-ui #mobile-options-container.stoffus-panel-closed {
    display: none !important;
}
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem !important;
    gap: 0.5rem !important;
}
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) #stoffus-header-sales-group {
    flex-direction: column !important;
    width: 100% !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 0.25rem !important;
}
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) .stoffus-header-sales-field {
    width: 100% !important;
    min-height: 2.75rem !important;
    justify-content: space-between !important;
}
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) .stoffus-btn-promo,
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) .stoffus-btn-extras,
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) > .relative,
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) > .flex.items-center.bg-white.border {
    width: 100% !important;
    min-height: 2.75rem !important;
}
html:not(.stoffus-tablet-ui) #mobile-options-container.stoffus-header-options-panel {
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0.5rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
html:not(.stoffus-tablet-ui) #stoffus-mobile-sales-slot {
    display: none !important;
}
html.stoffus-tablet-ui #mobile-options-container.stoffus-header-options-panel:not(.hidden) {
    display: flex !important;
}
html.stoffus-tablet-ui #mobile-options-container.stoffus-header-options-panel.hidden {
    display: none !important;
}
html.stoffus-tablet-ui #main-top-header > div {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 56px;
}
html.stoffus-tablet-ui #stoffus-header-main-tools {
    flex: 1 1 auto;
    flex-wrap: nowrap !important;
    min-width: 0;
    overflow: visible;
}
html.stoffus-tablet-ui #stoffus-header-profile {
    width: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    min-width: 8.25rem;
    position: relative;
    z-index: 210;
    gap: 0.35rem;
}
html.stoffus-tablet-ui #stoffus-header-main-tools {
    max-width: calc(100% - 10.5rem);
}
/* iPad 7 / cabeçalho apertado: versão no menu, não ao lado do botão */
@media (min-width: 768px) and (max-width: 1080px) {
    html.stoffus-tablet-ui #stoffus-header-profile .stoffus-tablet-build {
        display: none !important;
    }
    html.stoffus-tablet-ui #stoffus-header-main-tools {
        max-width: calc(100% - 8.5rem);
    }
}
html.stoffus-tablet-ui #profile-menu-btn.stoffus-area-cliente-trigger,
html.stoffus-tablet-ui .stoffus-area-cliente-trigger {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 7.5rem !important;
    max-width: none !important;
    min-height: 2.75rem !important;
    padding: 8px 12px !important;
    box-sizing: border-box;
}
html.stoffus-tablet-ui .stoffus-version-desktop {
    display: none !important;
}
html.stoffus-tablet-ui .stoffus-header-options-wrap {
    margin-left: auto;
    flex-shrink: 0;
}

/* Tablet/iPad: cabeçalho fixo; cena 3D só abaixo (o canvas já não tapa Promo/Ponto/Desc.) */
html.stoffus-compact-header #main-top-header,
html.stoffus-tablet-ui #main-top-header {
    position: fixed;
    top: var(--stoffus-safe-top, 0px);
    left: var(--stoffus-safe-left, 0px);
    right: var(--stoffus-safe-right, 0px);
    width: auto;
    z-index: 200;
    touch-action: auto;
    box-sizing: border-box;
}
html.stoffus-compact-header #canvas-container {
    position: fixed !important;
    top: calc(var(--stoffus-header-h, 88px) + var(--stoffus-safe-top, 0px));
    left: var(--stoffus-safe-left, 0px);
    right: var(--stoffus-safe-right, 0px);
    bottom: 0 !important;
    width: auto;
    height: auto !important;
    min-height: 0;
    pointer-events: none;
}
/* PWA / atalho iOS: 100dvh < altura real — esticar entre cabeçalho e fundo do ecrã */
html.stoffus-pwa-standalone.stoffus-compact-header,
html.stoffus-pwa-standalone.stoffus-compact-header body {
    height: 100%;
    height: -webkit-fill-available;
    min-height: 100%;
    background-color: #ffffff;
}
html.stoffus-pwa-standalone.stoffus-compact-header #canvas-container {
    top: var(--stoffus-canvas-top, calc(var(--stoffus-header-h, 88px) + var(--stoffus-safe-top, 0px)));
}
html.stoffus-compact-header #canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    pointer-events: auto;
}
html.stoffus-compact-header #main-sidebar {
    top: calc(var(--stoffus-header-h, 88px) + var(--stoffus-safe-top, 0px));
    bottom: env(safe-area-inset-bottom, 0px);
}
html.stoffus-compact-header #top-selectors-container {
    top: calc(var(--stoffus-header-h, 88px) + var(--stoffus-safe-top, 0px) + 8px);
}
html.stoffus-compact-header #header-options-backdrop {
    top: calc(var(--stoffus-header-h, 88px) + var(--stoffus-safe-top, 0px));
    bottom: 0;
    height: auto;
}
html.stoffus-compact-header #feedback-message {
    top: calc(var(--stoffus-header-h, 88px) + var(--stoffus-safe-top, 0px) + 12px);
}

/* Cabeçalho: toques fiáveis no iPad (body tem touch-action:none para a cena 3D) */
#main-top-header,
#main-top-header *,
#mobile-options-container,
#mobile-options-container *,
.stoffus-header-sales-field,
.stoffus-header-num-input,
#btn-recenter,
.custom-modal,
.custom-modal * {
    touch-action: manipulation;
    pointer-events: auto;
}

/* V. Ponto / desconto — área de toque maior no tablet */
.stoffus-header-sales-in-menu .stoffus-header-sales-field {
    width: 100%;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
}

html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) .stoffus-header-num-input {
    min-height: 2.75rem;
    min-width: 2.75rem;
    font-size: 16px;
    padding: 0.35rem 0.25rem;
}
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) .stoffus-btn-promo,
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) .stoffus-btn-extras {
    -webkit-tap-highlight-color: rgba(232, 76, 38, 0.2);
}

.stoffus-header-options-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 3rem;
    min-height: 3rem;
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    background: #1f2937;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1.2;
    border: 2px solid #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(232, 76, 38, 0.25);
    user-select: none;
    position: relative;
    z-index: 85;
}
.stoffus-header-options-btn:active {
    background: #111827;
    transform: scale(0.97);
}
.stoffus-header-options-btn[aria-expanded='true'] {
    background: #e84c26;
    border-color: #c73d1f;
}

/* AJUSTE ESPECÍFICO PARA O LOGÓTIPO (+15%) */
#app-loader img {
    height: 4.025rem !important; /* Original h-14 (3.5rem) * 1.15 */
}
@media (min-width: 768px) {
    #app-loader img {
        height: 5.75rem !important; /* Original h-20 (5rem) * 1.15 */
    }
}

#main-top-header img[src*="stoffus3d.png"] {
    height: 2.3rem !important; /* Original h-8 (2rem) * 1.15 */
}
@media (min-width: 768px) {
    #main-top-header img[src*="stoffus3d.png"] {
        height: 2.875rem !important; /* Original h-10 (2.5rem) * 1.15 */
    }
}

.ui-panel { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); }

/* Botão «Área Cliente» (perfil) — texto no próprio botão (Safari/iOS) */
.stoffus-area-cliente-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 6px 12px;
    border: 1px solid rgba(232, 76, 38, 0.22);
    border-radius: 9999px;
    background: linear-gradient(90deg, #e84c26 0%, #f06b3b 100%);
    cursor: pointer;
    box-shadow: 0 14px 28px -22px rgba(232, 76, 38, 0.55);
    transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.25;
    white-space: nowrap;
    overflow: visible;
    -webkit-appearance: none;
    appearance: none;
}

/* Garantir prioridade no header (evitar overrides do Tailwind / herança text-gray-500) */
#profile-menu-btn.stoffus-area-cliente-trigger {
    background: linear-gradient(90deg, #e84c26 0%, #f06b3b 100%) !important;
    border: 1px solid rgba(232, 76, 38, 0.22) !important;
    box-shadow: 0 18px 35px -22px rgba(232, 76, 38, 0.60) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
#profile-menu-btn.stoffus-area-cliente-trigger:hover {
    filter: brightness(1.03) saturate(1.05) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 22px 45px -26px rgba(232, 76, 38, 0.78) !important;
}
.stoffus-area-cliente-trigger:hover {
    transform: translateY(-1px);
    filter: brightness(1.03) saturate(1.05);
    box-shadow: 0 22px 45px -26px rgba(232, 76, 38, 0.78);
}
.stoffus-area-cliente-trigger:active {
    transform: translateY(0);
    filter: brightness(0.99);
    box-shadow: 0 16px 32px -22px rgba(232, 76, 38, 0.55);
}
.stoffus-area-cliente-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.70), 0 0 0 6px rgba(232, 76, 38, 0.35), 0 18px 35px -22px rgba(232, 76, 38, 0.60);
    border-color: rgba(255, 255, 255, 0.35);
}
@media (min-width: 768px) {
    .stoffus-area-cliente-trigger {
        padding: 7px 14px;
        font-size: 11px;
    }
}
html.stoffus-tablet-ui #profile-menu-btn.stoffus-area-cliente-trigger {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
}

/* Cabeçalho em tablet (iPad): IVA / entrega não ficam por baixo de «Área Cliente» */
html.stoffus-tablet-ui #mobile-options-container {
    right: 0;
    left: auto;
    max-height: min(75vh, 480px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
html.stoffus-tablet-ui #header-options-backdrop:not(.hidden) {
    display: block !important;
}

/* Backdrop/Opções: abaixo dos modais (z-[70]) */
html.stoffus-tablet-ui #header-options-backdrop.stoffus-backdrop-open {
    z-index: 65 !important;
}
html.stoffus-tablet-ui #mobile-options-container:not(.stoffus-panel-closed) {
    z-index: 66 !important;
}

@media (max-width: 767px) {
    html:not(.stoffus-tablet-ui) #stoffus-header-profile {
        width: 100%;
        justify-content: flex-end;
        padding-top: 6px;
        margin-top: 4px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }
}

.editor-panel-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.editor-panel-scroll::-webkit-scrollbar { width: 6px; }
.editor-panel-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.module-btn { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; transition: all 0.2s; min-width: 80px; max-width: 90px; flex-shrink: 0; cursor: pointer; }
.module-btn:hover { border-color: #e84c26; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); }
.module-btn img { width: 28px; height: 28px; object-fit: contain; opacity: 0.86; transition: all 0.2s; margin-bottom: 2px; filter: drop-shadow(0 0 0.8px rgba(0,0,0,0.45)) drop-shadow(0 0 0.8px rgba(0,0,0,0.45)); }
.module-btn:hover img { opacity: 1; scale: 1.1; }
.module-btn span { font-size: 9px; font-weight: 600; text-align: center; line-height: 1.15; color: #4b5563; white-space: normal; overflow-wrap: break-word; width: 100%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Ícones de módulos (lista) — reforçar legibilidade em ecrãs claros. */
#module-list img {
    filter: drop-shadow(0 0 0.8px rgba(0,0,0,0.45)) drop-shadow(0 0 0.8px rgba(0,0,0,0.45));
}

#feedback-message { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 999999; padding: 8px 16px; border-radius: 20px; color: white; font-weight: bold; opacity: 0; transition: opacity 0.3s; pointer-events: none; display: flex; align-items: center; gap: 8px; width: max-content; max-width: 90%; justify-content: center; font-size: 12px; }
.show-feedback { opacity: 1 !important; }
.trigger-pill-btn { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); padding: 10px 24px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.5); box-shadow: 0 8px 20px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; color: #6b7280; font-size: 16px; }
.pill-value { font-size: 14px; font-weight: 800; color: #1f2937; }

/* REGRA CRUCIAL: Mantém o menu "Opções Venda" invisível a não ser que tenha a class "mobile-menu-open" */
#mobile-options-dropdown { display: none !important; }
#mobile-options-dropdown.mobile-menu-open { display: flex !important; }

@media (max-width: 768px) { 
    .trigger-pill-btn { min-width: 0; width: 100%; padding: 6px 8px; } .pill-label { display: none; } 
    
    /* GAVETA INFERIOR (BOTTOM SHEET) - MOBILE */
    #main-sidebar {
        position: fixed; bottom: 0; left: 0; right: 0; width: 100%;
        height: 80dvh; 
        background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(12px);
        border-radius: 28px 28px 0 0;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
        transform: translateY(calc(100% - 85px)); 
        transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
        z-index: 50; display: flex; flex-direction: column;
    }
    #main-sidebar.expanded { transform: translateY(0); }
    #main-sidebar.dragging { transition: none; }
    #drawer-header { touch-action: none; padding: 12px 20px 16px 20px; border-bottom: 1px solid rgba(0,0,0,0.05); }
    #drawer-handle-bar { width: 40px; height: 5px; background: #d1d5db; border-radius: 10px; margin: 0 auto 12px auto; }
    #drawer-scrollable-content { overflow-y: auto; flex: 1; padding-bottom: max(20px, env(safe-area-inset-bottom)); touch-action: pan-y; }
}

/* GAVETA LATERAL & TOPO - DESKTOP */
@media (min-width: 769px) {
    #main-sidebar {
        position: absolute; top: 61px; bottom: 0; left: 0; width: 300px; 
        background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px);
        border-right: 1px solid #e5e7eb; display: flex; flex-direction: column;
        transform: none !important; border-radius: 0; box-shadow: 2px 0 20px rgba(0,0,0,0.05); z-index: 30;
    }
    #drawer-handle-bar { display: none; }
    #drawer-header { 
        order: 2; padding: 16px 20px 24px 20px; 
        border-top: 1px solid #e5e7eb; border-bottom: none; 
        background: white; cursor: default;
    }
    #drawer-scrollable-content { 
        order: 1; flex: 1; overflow-y: auto; padding: 20px; 
    }
}

/* iPad em landscape (largura ≥769px): barra lateral abaixo do cabeçalho + safe area */
html.stoffus-compact-header #main-sidebar {
    top: calc(var(--stoffus-header-h, 88px) + var(--stoffus-safe-top, 0px)) !important;
    bottom: env(safe-area-inset-bottom, 0px) !important;
}

body.guest-mode .ui-price-element { display: none !important; }
body.guest-mode .guest-hidden { display: none !important; }
body:not(.guest-mode) .guest-only { display: none !important; }
body:not(.showroom-mode) .showroom-only { display: none !important; }
.leg-btn.active-leg { border-color: #e84c26 !important; transform: scale(1.15); box-shadow: 0 0 0 2px rgba(232, 76, 38, 0.3); z-index: 10; }
.floor-btn.active-floor { border-color: #e84c26 !important; transform: scale(1.15); box-shadow: 0 0 0 2px rgba(232, 76, 38, 0.3); z-index: 10; }

#app-loader { position: fixed; inset: 0; background: white; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.5s; }
.loader-bar { width: 200px; height: 4px; background: #eee; border-radius: 2px; overflow: hidden; margin-top: 15px; }
.loader-progress { width: 0%; height: 100%; background: #e84c26; transition: width 0.22s ease-out; }
.model-photos-dock {
    position: relative;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: auto;
}
.model-photos-dock.hidden { display: none !important; }
.model-photos-dock-toggle.is-active {
    border-color: #e84c26 !important;
    color: #e84c26 !important;
    background: #fff7ed !important;
}
.model-photos-dock-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(300px, calc(100vw - 24px));
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 35;
}
.model-photos-dock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.model-photos-dock-title { font-size: 14px; font-weight: 800; color: #1f2937; }
.model-photos-dock-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
}
.model-photos-dock-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.model-photos-dock-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    cursor: zoom-in;
    pointer-events: auto;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.model-photos-dock-thumb:hover {
    border-color: #e84c26;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(232, 76, 38, 0.15);
}
.model-photos-dock-thumb img {
    display: block;
    width: 100%;
    height: 96px;
    object-fit: cover;
    pointer-events: none;
}
.model-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: auto;
}
.model-photo-lightbox:not(.hidden) { display: flex !important; }
.model-photo-lightbox.hidden { display: none !important; }
body.model-photo-lightbox-open { overflow: hidden; }
.model-photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    cursor: zoom-out;
}
.model-photo-lightbox-figure {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: min(1100px, 96vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.model-photo-lightbox-figure img {
    max-width: 100%;
    max-height: calc(90vh - 48px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    background: #111;
}
.model-photo-lightbox-caption {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.model-photo-lightbox-close,
.model-photo-lightbox-nav {
    position: absolute;
    z-index: 2;
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    transition: background 0.15s ease;
}
.model-photo-lightbox-close:hover,
.model-photo-lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
.model-photo-lightbox-close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 18px;
}
.model-photo-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    font-size: 16px;
}
.model-photo-lightbox-prev { left: 16px; }
.model-photo-lightbox-next { right: 16px; }
@media (max-width: 640px) {
    .model-photos-dock-thumb img { height: 88px; }
    .model-photo-lightbox { padding: 12px; }
    .model-photo-lightbox-nav { width: 40px; height: 40px; }
    .model-photo-lightbox-prev { left: 8px; }
    .model-photo-lightbox-next { right: 8px; }
}
.model-photos-dock.is-collapsed .model-photos-dock-panel { display: none; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 10px; }
.model-card { background: #ffffff; border: 2px solid #e5e7eb; border-radius: 16px; padding: 12px; cursor: pointer; text-align: center; transition: all 0.2s ease; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; height: 100%; }
.model-card:hover { border-color: #e84c26; background: #fff7ed; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(232, 76, 38, 0.1); }
.model-card.active { border-color: #e84c26; background: white; box-shadow: 0 0 0 2px rgba(232, 76, 38, 0.2); }
.model-card-img { width: 100%; height: 90px; object-fit: contain; margin-bottom: 10px; border-radius: 8px; background-color: #f3f4f6; }
.model-card.active .model-card-img { background-color: #fff; }
.model-card-name { font-weight: 800; font-size: 13px; color: #1f2937; margin-bottom: 6px; width: 100%; }
.model-badge { display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; }
.model-card-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: auto; }
.model-badge-new { position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 3px 8px; border-radius: 8px; background: #e84c26; color: #fff; box-shadow: 0 2px 6px rgba(232, 76, 38, 0.35); z-index: 2; letter-spacing: 0.03em; }
.badge-new { background: #ffedd5; color: #c2410c; }
.badge-relax { background: #dbeafe; color: #1e40af; }
.badge-slide { background: #f3e8ff; color: #6b21a8; }
.badge-fixed { background: #f3f4f6; color: #4b5563; }
.badge-pendular { background: #e0f2fe; color: #0369a1; }
.badge-sofabed { background: #ffedd5; color: #c2410c; }
.badge-armchair { background: #fce7f3; color: #be185d; } 
.badge-banqueta { background: #fdf4ff; color: #7e22ce; } 
.custom-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 60; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); opacity: 0; transition: opacity 220ms ease; }
.custom-modal.modal-open { display: flex !important; opacity: 1; }
.modal-content { background: white; padding: 30px; border-radius: 20px; text-align: left; max-width: 800px; width: 90%; max-height: 80vh; overflow-y: auto; transform: translateY(10px) scale(0.985); opacity: 0.98; transition: transform 220ms ease, opacity 220ms ease; will-change: transform, opacity; }
.custom-modal.modal-open .modal-content { transform: translateY(0) scale(1); opacity: 1; }
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: #e84c26; cursor: pointer; margin-top: -6px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: #e5e7eb; border-radius: 2px; }
#fabric-modal-content-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 20px; padding: 10px; justify-content: center; }
.dock-item { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; transition: transform 0.2s; width: 100%; }
.dock-item:hover { transform: translateY(-4px); }
.dock-circle { width: 70px; height: 70px; border-radius: 50%; border: 2px solid #e5e7eb; background-size: cover; background-position: center; box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: all 0.2s; flex-shrink: 0; }
.dock-item.active .dock-circle { border-color: #e84c26; box-shadow: 0 0 0 4px rgba(232, 76, 38, 0.2); transform: scale(1.05); }
.fabric-modal-traits { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; max-width: 100%; }
.fabric-modal-filters { border-bottom: 1px solid #f3f4f6; padding-bottom: 12px; }
.fabric-trait-filter-btn { display: inline-flex !important; align-items: center !important; gap: 8px !important; white-space: nowrap; vertical-align: middle; }
.fabric-trait-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  line-height: 0;
}
.fabric-trait-icon-wrap img.fabric-trait-icon {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.fabric-trait-icon-wrap .fabric-trait-icon-fa {
  display: block;
  line-height: 1;
  text-align: center;
  color: #4b5563;
}
.fabric-trait-filter-btn .fabric-trait-icon-wrap { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
.fabric-trait-filter-btn .fabric-trait-icon-fa { font-size: 18px; }
.fabric-trait-header { padding: 6px 10px !important; gap: 8px !important; align-items: center !important; }
.fabric-trait-header .fabric-trait-icon-wrap { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
.fabric-trait-header .fabric-trait-icon-fa { font-size: 18px; }
.fabric-trait-badge:not(.fabric-trait-compact) .fabric-trait-icon-wrap { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
.fabric-trait-badge:not(.fabric-trait-compact) .fabric-trait-icon-fa { font-size: 18px; }
.fabric-trait-compact .fabric-trait-icon-wrap { width: 24px; height: 24px; min-width: 24px; min-height: 24px; }
.fabric-trait-compact .fabric-trait-icon-fa { font-size: 14px; }
.fabric-trait-filter-btn--active { border-color: #e84c26 !important; color: #e84c26 !important; background: #fff7f4 !important; box-shadow: 0 0 0 2px rgba(232, 76, 38, 0.15); }
.fabric-modal-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2.5rem 1rem; color: #6b7280; font-size: 13px; font-weight: 600; }
.sales-assistant-suggestion { width: 100%; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.sales-assistant-suggestion:hover { border-color: #8b5cf6; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.12); }
.sales-assistant-empty { text-align: center; padding: 1.25rem 0.5rem; color: #6b7280; font-size: 13px; font-weight: 600; }
.dock-label { font-size: 11px; font-weight: 700; color: #4b5563; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1.2; }

#module-hover-menu { position: absolute; pointer-events: auto; z-index: 50; transform: translate(-50%, -100%); opacity: 0; transition: opacity 0.2s, transform 0.2s; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; background: rgba(255, 255, 255, 0.95); border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.8); }
#module-hover-menu.visible { opacity: 1; transform: translate(-50%, -120%); }
.hover-actions-row { display: flex; gap: 8px; }
.hover-sizes-row { display: flex; gap: 4px; margin-bottom: 2px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 150px; }
.hover-btn { background: white; color: #4b5563; border: 1px solid #e5e7eb; padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: bold; box-shadow: 0 2px 4px rgba(0,0,0,0.05); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.btn-relax.active, .btn-bed.active, .btn-storage.active { background: #e84c26; color: white; border-color: #e84c26; }
.hover-btn:hover { border-color: #e84c26; color: #e84c26; }
.btn-free-relax.active { background: #10b981; color: white; border-color: #10b981; }
.btn-free-relax:hover { border-color: #10b981; color: #10b981; }

/* Códigos de tamanho (S/M/L/XL/XXL) — não traduzir em browsers estrangeiros */
#size-selector-container,
#size-preview,
#module-sizes-row,
.size-btn,
.stoffus-size-code {
    translate: no;
}
.size-btn { width: 24px; height: 24px; border-radius: 50%; background: white; border: 1px solid #e5e7eb; font-size: 10px; font-weight: bold; color: #4b5563; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.size-btn:hover { border-color: #e84c26; color: #e84c26; transform: scale(1.1); }
.size-btn.active { background: #e84c26; color: white; border-color: #e84c26; box-shadow: 0 2px 5px rgba(232, 76, 38, 0.3); }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

#order-deposit-section { display: none !important; }
body[data-doctype="order"] #order-deposit-section { display: flex !important; flex-direction: column !important; }