/* General Styles */
body {
    font-family: 'Barlow', sans-serif;
    color: #333;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Container for the entire layout */
.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Left Models Sidebar */
.models-sidebar {
    width: 360px;
    background-color: #fff;
    border-right: 1px solid #eee;
    height: 100vh;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.models-sidebar h3 {
    margin: 0 0 20px 0;
    color: #40948e;
    font-size: 1.2em;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 2px solid #eeeeee;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #40948e;
    box-shadow: 0 0 0 2px rgba(64, 148, 142, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #656565;
    pointer-events: none;
}

.models-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
	background-color:#fff;
}

.model-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 3px;
    padding-bottom: 15px;
    background: #ffffff;
    border: 2px solid #eeeeee;
    box-sizing: border-box;
}

.model-item:hover {
    border-color: #40948e;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.model-item i {
    color: #40948e;
    margin-right: 12px;
}

.model-item.active {
    border-color: #40948e;
    background-color: rgba(64, 148, 142, 0.1);
}

.model-item.active .model-name {
    color: #40948e;
}

.model-info {
    display: flex;
    flex-direction: column;
}

.model-name {
    font-size: 0.75em;
    color: #333;
    text-align: center;
    margin-top: 2px;
    font-weight: 600;
    width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
    padding: 0 4px;
    box-sizing: border-box;
}

.model-size {
    font-size: 0.8em;
    color: #666;
    margin-top: 4px;
}

.error {
    text-align: center;
    padding: 20px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    line-height: 1.5;
}

.error i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.no-results-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 20px 0;
}

.no-results-message i {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
    color: #40948e;
}

.no-results-message p {
    margin: 0;
    font-size: 16px;
}

.no-models {
    text-align: center;
    padding: 20px;
    color: #666;
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
}

/* Estilizar a scrollbar da barra lateral */
.models-sidebar::-webkit-scrollbar {
    width: 5px;
}

.models-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.models-sidebar::-webkit-scrollbar-thumb {
    background: #b1b1b1;
    border-radius: 4px;
}

.models-sidebar::-webkit-scrollbar-thumb:hover {
    background: #797979;
}

/* Main Content Area */
.content-wrapper {
    flex: 1;
    position: relative;
    height: 100vh;
    background: white;
    min-width: 0; /* Prevents flex item from overflowing */
    display: flex;
    flex-direction: column;
}

/* Right Side Content */
.page-content {
    display: flex;
    height: 100vh;
    background-color: #fff;
    flex: 1;
}

/* Mobile Hamburger Button - Hidden on desktop */
.mobile-menu-toggle {
    display: none;
}

/* Mobile Close Button - Hidden on desktop */
.mobile-menu-close {
    display: none !important;
}

/* Mobile Panel Close Button - Hidden on desktop */
.mobile-panel-close {
    display: none !important;
}

/* Right Content Column */
.content-pills {
    position: relative;
    width: 400px;
    height: 100vh;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border-left: 1px solid #d4d4d4;
    will-change: transform;
    flex-shrink: 0;
    overflow: hidden;
}

/* Add to style.css */
.pill.dynamic-print {
    background-color: #6c757d;
}

.pill.dynamic-print.active {
    background-color: #fff;
    color: #6c757d;
}

.pill.dynamic-print i {
    color: #fff;
}

.pill.dynamic-print.active i {
    color: #6c757d;
}

/* Pills Navigation (Horizontal Tabs - Square Pills) */
.pills-column.glass {
    background-color: #fff;
    box-sizing: border-box;
    width: auto;
    display: grid;
    gap: 20px;
    align-content: center;
}

.pills {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin-top: -20px;
    padding: 20px;
    flex-wrap: nowrap;
    width: auto;
    justify-content: center;
}

.pill {
    background-color: #40948e;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 5px;
    padding-bottom: 10px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease;
    width: 90px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #eeeeee;
    color: #fff;
    flex-shrink: 0;
}

/* Ajuste automático da largura quando há 3 pills */
.pills:has(.pill:nth-child(3):last-child) .pill {
    width: calc((100% - 10px) / 3);
    margin-right: 0;
}

/* Ajuste automático da largura quando há 2 pills */
.pills:has(.pill:nth-child(2):last-child) .pill {
    width: calc((100% - 10px) / 2);
    margin-right: 0;
}

/* Ajuste automático da largura quando há 1 pill */
.pills:has(.pill:nth-child(1):last-child) .pill {
    width: calc(100% - 10px);
    margin-right: 0;
}

/* Estilo específico para a pill Color dinâmica */
.pill[data-tab="variants"] {
    background-color: #40948e;
}

.pill[data-tab="variants"].active {
    background-color: #fefefe;
    color: #40948e;
    border: 2px solid #40948e;
}

.pill[data-tab="variants"] i {
    color: white;
}

.pill[data-tab="variants"].active i {
    color: #40948e;
}

@media screen and (max-width: 840px) {
    .pill[data-tab="variants"] {
        background-color: transparent;
    }

    .pill[data-tab="variants"].active {
        background-color: transparent;
        color: #fff;
        border: none;
    }

    .pill[data-tab="variants"] i {
        display: none;
    }

    .pill[data-tab="variants"].active i {
        display: none;
    }
}

/* Desktop styles for pills */
.pill i {
    font-size: 24px;
    color: white;
    transition: color 0.3s ease;
    margin-bottom: 8px;
}

.pill h3 {
    font-size: 12px;
    margin: 0;
    text-transform: uppercase;
}

/* Change icon color when pill is active */
.pill.active i {
    color: #40948e;
}

.pill.active h3 {
    color: #333;
}

.pill.active {
    background-color: #fefefe;
    color: #40948e;
    border: 2px solid #40948e;
}

@media screen and (max-width: 840px) {
    .pill h3 {
        font-size: 15px;
        color: #fff;
        font-weight: 500;
    }

    .pill.active h3 {
        color: #fff;
    }

    .pill.active {
        background-color: transparent;
        color: #fff;
        border: none;
    }

    .pill.active::after {
        content: '';
        position: absolute;
        bottom: 20%;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        height: 4px;
        background: #fff;
        /* border-radius: 5px; */
    }

    /* Ocultar ícones apenas no mobile */
    .pill i {
        display: none;
    }

    .pill.active i {
        display: none;
    }
}

/* Pill Content */
.pill-content {
    display: none;
    padding-bottom:20px;
    height: calc(100vh - 200px);
}

.pill-content.active {
    display: block;
}

.model-viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

/* Garantir que o container não bloqueie eventos quando tem vidro */
.model-viewer-container.has-glass-material {
    pointer-events: none !important;
}

.model-viewer-container.has-glass-material model-viewer {
    pointer-events: auto !important;
    touch-action: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

model-viewer {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    pointer-events: auto !important;
    touch-action: auto !important;
}

/* Hide AR button on desktop */
.mobile-ar-button {
    display: none;
}

/* UV Template Positioning */
.uv-template {
    position: absolute;
    top: 50%;
    left: 50%;
    overflow: hidden;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    border: 2px solid #ff4444;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    z-index: 50;
    max-width: 90vw;
    max-height: 90vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: min(800px, 90vw);
    height: min(800px, 90vh);
}

/* Snap Guides */
.snap-guide {
    position: absolute;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.snap-guide.vertical {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.snap-guide.horizontal {
    height: 2px;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* UV Controls */
.uv-controls {
    position: absolute;
    top: calc(15% + 20px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 11;
    display: none;
    margin-top:-70px;
}

.uv-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-btn {
    background: #4CAF50;
    color: white;
}

button.uv-button.cancel-btn {
    display: none;
}

.reset-btn {
    background: #f44336;
    color: white;
}

.reset-btn:hover {
    background: #d32f2f;
}

/* Editable Image */
.editable-image {
    position: absolute;
    border: 1px dashed #40948e;
    background: #40948e2b;
    cursor: move;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform-origin: center center;
    transition: background-image 0.3s ease;
    margin-top: -1px;
    margin-left: -2px;
	mix-blend-mode: multiply;
}

/* Add to style.css */
.handle {
    position: absolute;
    z-index: 20 !important;
    background-color: #40948e !important;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.rotate-handle {
    background-color: #40948e !important;
    width: 16px;
    height: 16px;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-sizing: border-box;
}

.rotate-handle::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-image: url('./assets/img/icons/rotate.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);
}

.handle.top-left { 
    top: 0;
    left: 0;
    cursor: nwse-resize;
    transform: translate(-50%, -50%);
}

.handle.top-right { 
    top: 0;
    right: 0;
    cursor: nesw-resize;
    transform: translate(50%, -50%);
}

.handle.bottom-left { 
    bottom: 0;
    left: 0;
    cursor: nesw-resize;
    transform: translate(-50%, 50%);
}

.handle.bottom-right { 
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
    transform: translate(50%, 50%);
}

/* Logo Container */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.logo-container img {
    max-height: 64px;
    height: auto;
}

/* Heading */
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Upload Container */
.upload-container {
    position: relative;
    width: 100%;
}

#textureUpload {
    display: none;
}

.custom-file-upload {
    padding: 10px;
    background: #40948e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 500;
    line-height: 1.5;
    width: 365px;
    text-align: center;
    display: block;
    box-sizing: border-box;
    margin: 5px 0;
    font-family: "Barlow", sans-serif;
    font-size: 16px;
    text-transform: uppercase;
}

.custom-file-upload:hover {
    background-color: #267973;
}

/* Clear Upload Button */
#clearUpload {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #ff4444;
    display: none;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
}

#clearUpload:hover {
    background: rgba(255, 68, 68, 0.2);
}

/* Hidden Class */
.hidden {
    display: none !important; /* Ensure it overrides other styles */
}

    .page-content{
	display:flex;
    }

    @media screen and (max-width: 840px) {
        .page-content {
            height: 100vh;
            flex-direction: column;
            overflow: hidden;
        }
    }

.variant {
    padding: 8px;
    margin: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.variant:hover {
    background: rgba(255, 255, 255, 0.2);
}

.swatches {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    /* padding: 10px; */
    flex-wrap: wrap;
    justify-content: flex-start;
}

.swatch-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #eeeeee;
    text-align: center;
    transition: all 0.3s ease, box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 142px;
    height: 80px;
    flex-shrink: 0;
    box-shadow: none;
}

/* Ajuste automático da largura quando há 3 swatches */
.swatches:has(.swatch-box:nth-child(3):last-child) .swatch-box {
    width: calc((73% - 10px) / 3);
    margin-right: 0;
}

/* Ajuste automático da largura quando há 2 swatches */
.swatches:has(.swatch-box:nth-child(2):last-child) .swatch-box {
    width: calc((80% - 10px) / 2);
    margin-right: 0;
}

/* Ajuste automático da largura quando há 1 swatch */
.swatches:has(.swatch-box:nth-child(1):last-child) .swatch-box {
    width: calc(100% - 10px);
    margin-right: 0;
}

/* Garantir que no desktop o width de 142px seja respeitado */
@media screen and (min-width: 841px) {
    .swatch-box {
        width: 142px !important;
    }
    
    /* Sobrescrever regras condicionais no desktop */
    .swatches:has(.swatch-box:nth-child(3):last-child) .swatch-box,
    .swatches:has(.swatch-box:nth-child(2):last-child) .swatch-box,
    .swatches:has(.swatch-box:nth-child(1):last-child) .swatch-box {
        width: 142px !important;
    }
}

.swatch-box:hover {
    border-color: #40948e;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.swatch-box.selected {
    border-color: #40948e;
    background-color: rgba(64, 148, 142, 0.1);
}

.swatch {
    width: 40px;
    height: 40px;
    cursor: pointer;
    border: 2px solid transparent;
}

.swatch.selected {
    border-color: black;
}

.swatch-label {
    margin-top: 5px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.swatch-container {
    width: 64px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.swatch-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.swatch-container svg {
    width: 64px;
    height: 64px;
    position: absolute;
    top: 0;
    left: 0;
}

.swatch h3 {
    text-align: center;
    text-transform:uppercase
}

.controls.glass {
    background-color: #fff;
    height: 100vh;
    overflow-y: scroll!important;
    overflow-x: hidden;
    padding: 20px;
    box-sizing: border-box;
    width: 200px;
}

/* Estilizar a scrollbar para melhor aparência */
.controls.glass::-webkit-scrollbar {
    width: 5px;
}

.controls.glass::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.controls.glass::-webkit-scrollbar-thumb {
    background: #b1b1b1;
    border-radius: 4px;
}

.controls.glass::-webkit-scrollbar-thumb:hover {
    background: #797979;
}

/* Estilizar a scrollbar para melhor aparência */
.pills-column.glass::-webkit-scrollbar {
    width: 5px;
}

.pills-column.glass::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.pills-column.glass::-webkit-scrollbar-thumb {
    background: #b1b1b1;
    border-radius: 2px;
}

.pills-column.glass::-webkit-scrollbar-thumb:hover {
    background: #797979;
}

/* Loading Animation */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.loading-container lottie-player {
    width: 200px !important;
    height: 200px !important;
}

.loading-container.hidden {
    opacity: 0;
    visibility: hidden;
}

#lottie-container {
    width: 400px !important;
    height: 400px !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Hide default model-viewer progress bar */
model-viewer::part(default-progress-bar) {
    display: none;
}

/* Hide AR button on desktop only - using shadow DOM selector */
@media screen and (min-width: 841px) {
    model-viewer::part(default-ar-button) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* Watermark */
.watermark {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999; /* Increased z-index to ensure visibility */
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    display: none; /* Hide by default */
}

.watermark img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); /* Add subtle shadow for better visibility */
}

/* Make sure watermark doesn't interfere with UV editor */
.uv-template:not(.hidden) ~ .watermark {
    display: none;
}

/* Show watermark only when taking screenshot */
.watermark.show-for-screenshot {
    display: block !important; /* Force display with !important */
    opacity: 0.8;
}

/* QR Code Container */
.qr-container {
    position: relative; /* Crucial for absolute positioning */
    min-height: 300px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
}

#qr-code {
    position: absolute;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Offset to truly center */
    width: 200px; /* Adjust size as needed */
    height: 200px; /* Adjust size as needed */
    z-index: 2; /* Ensure QR appears OVER animation */
}
  
#qr-lottie-container {
    position: absolute;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, calc(-50% + 20px)); /* Move 20px lower */
    width: 125px; /* Adjust size as needed */
    height: 125px; /* Adjust size as needed */
    z-index: 1; /* Ensure it's below the QR code */
}

div#qr-lottie-container {
    top: 22%!important;
}
  
  .qr-container p {
        margin-top: 210px;
        text-align: center;
    }

#qr-code.visible {
    display: block;
}

#qr-lottie-container.visible {
    display: block;
}

.loading {
    display:none;
}

/* Estilos para categorias */
.category-container {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 15px;
    color: #656565;
    cursor: pointer;
    font-family: "Barlow", sans-serif;
    font-weight: 600;
    user-select: none;
    border-bottom: 1px solid #cfcfcf;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.category-header:hover {
    color: #40948e;
    border-bottom-color: #40948e;
}

.category-header i {
    margin-left: auto;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #656565;
    display: inline-block;
}

.category-header:hover i,
.category-container.expanded .category-header i {
    color: #40948e;
}

.category-header .fa-minus.plus {
    transform: none;
}

.category-header .fa-chevron-down {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.category-header .fa-chevron-down.rotated {
    transform: rotate(-180deg);
}

.category-header .fa-chevron-right {
    transition: transform 0.3s ease;
    transform-origin: center;
    transform: rotate(0deg);
}

.category-container.expanded .category-header .fa-chevron-right {
    transform: rotate(90deg);
}

.category-models {
    display: grid;
    grid-template-columns: repeat(2, 150px);
    gap: 5px;
    justify-content: center;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(-20px);
    padding: 0;
}

.category-container.expanded .category-models {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
    padding: 10px;
}

/* Animações */
.category-container {
    transition: margin 0.3s ease;
	background-color:#fff;
}

.category-models {
    transition: all 0.3s ease;
}

/* Estilos para os itens de modelo */
.model-item:hover {
    background: #fff;
    transform: translateY(-2px);
}

.model-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.thumbnail-container {
    width: 138px;
    height: 138px;
    padding-bottom: initial;
    position: relative;
    margin-bottom: 6px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 4px;
}

.thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background-color: #ffffff;
    padding: 4px;
    box-sizing: border-box;
}

.model-item:hover .thumbnail-container img {
    transform: scale(1.05);
}

.model-item.active {
    background: #e8f5f4;
    border: 2px solid #40948e;
}

.model-item.active .model-name {
    color: #40948e;
}

/* Ajustes para quando a coluna de categorias estiver oculta */
#models-list-container:not([style*="display: none"]) + .main-content {
    margin-left: 300px;
}

#models-list-container[style*="display: none"] + .main-content {
    margin-left: 0;
    width: 100%;
}

.category-container.expanded .category-header {
    color: #40948e;
    border-bottom-color: #40948e;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-logo img {
    max-width: 180px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.sidebar-logo img:hover {
    opacity: 1;
}

/* Desktop Subpills Grid Layout */
.subpills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
    width: 100%;
}

.subpill {
    background: #ffffff;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 60px;
    border: 2px solid #eeeeee;
}

.subpill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #40948e;
}

.subpill.active {
    background: rgba(64, 148, 142, 0.1);
    border-color: #40948e;
    box-shadow: 0 4px 12px rgba(64, 148, 142, 0.15);
}

.subpill i {
    font-size: 24px;
    color: #40948e;
    margin-right: 15px;
}

.subpill h3 {
    margin: 0;
    font-size: 14px;
    color: #333;
    text-align: center!important;
    font-weight: 500;
    text-transform: uppercase;
}

h3{
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    font-family: "Barlow", sans-serif;
}

.subpill[data-print-section="true"] {
    background: #fff;
}

.subpill[data-print-section="true"]:hover {
    background: #f0f7ff;
}

.subpill[data-print-section="true"].active {
    background: #e6f0ff;
}

.upload-container {
    position: relative;
    width: 363px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: column;
}

.upload-box {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-box:hover {
    border-color: #40948e;
    background: #f8fbff;
    box-shadow: 0 4px 12px rgba(64, 148, 142, 0.1);
}

.upload-box.drag-over {
    border-color: #40948e;
    background: #f0f7ff;
    box-shadow: 0 4px 12px rgba(64, 148, 142, 0.15);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transition: all 0.3s ease;
    z-index: 1;
}

.upload-box.has-file .upload-content {
    display: none;
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.upload-box:hover .upload-icon {
    opacity: 1;
}

.upload-text {
    margin: 0;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

.browse-text {
    color: #0066ff;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.browse-text:hover {
    color: #0052cc;
}

.upload-subtext {
    margin: 8px 0 0;
    color: #666;
    font-size: 13px;
}

.file-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    padding: 10px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 0;
}

.upload-box.has-file .file-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-box.has-file:hover {
    border-color: #40948e;
    box-shadow: 0 4px 12px rgba(64, 148, 142, 0.1);
}

.file-preview-image {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

.file-preview img {
    max-width: 100%;
    max-height: 140px;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 5px;
    display: block;
}

.file-preview .file-name {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    word-break: break-all;
}

.file-preview .replace-text {
    margin-top: 8px;
    font-size: 12px;
    color: #0066ff;
    font-style: italic;
}

.layout-buttons {
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 20px; /* Space between subpills and buttons */
}

.layout-buttons.active {
    display: flex; /* Show when a subpill is selected */
}

/* Buttons Style */
.layout-buttons .upload-container,
.layout-buttons .custom-file-upload {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.layout-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    align-items: center;
}

.subpills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    padding: 10px 0;
    justify-content: center;
    width:100%;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-content > div {
    display: none;
}

.main-content > div.active {
    display: block;
}

.buttons-container {
    margin-top: 20px;
}

/* Toggle Button */
.toggle-button {
    position: absolute;
    right: 400px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 60px;
    background-color: #fff;
    border: none;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    z-index: 101;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When column is hidden */
.content-pills.hidden {
    transform: translateX(400px);
}

.content-pills.hidden ~ .toggle-button {
    right: 0;
}

/* Arrow animation */
.toggle-button .arrow {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #656565;
}

.toggle-button .arrow::before {
    content: '\f053';
}

.content-pills.hidden ~ .toggle-button .arrow {
    transform: rotate(180deg);
}

/* Right Column Content */
.right-column-content {
    padding: 20px;
    height: 100%;
    background-color: #fff;
    box-sizing: border-box;
    box-shadow: 0 2px 20px rgb(137 137 137 / 50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-pills.hidden .right-column-content {
    transform: translateX(400px);
}

/* Surface Indicator */
.surface-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid #40948e;
    border-radius: 50%;
    background: rgba(64, 148, 142, 0.1);
    display: none;
    z-index: 9999; /* Increased z-index to ensure visibility */
    pointer-events: none;
}

.surface-indicator.active {
    display: block !important;
}

.surface-indicator-close {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 30px;
    height: 30px;
    background: #40948e;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: background-color 0.3s ease;
    z-index: 10000; /* Increased z-index to ensure visibility */
}

.surface-indicator-close:hover {
    background: #2d6a66;
}

/* Responsive Styles */
@media screen and (max-width: 1350px) and (min-width: 841px) {
    .models-sidebar {
        width: 300px;
    }

    .toggle-button {
        right: 400px;
    }

    .content-pills.hidden {
        transform: translateX(400px);
    }
}

@media screen and (max-width: 1024px) and (min-width: 841px) {
    .models-sidebar {
        width: 250px;
    }

    .toggle-button {
        right: 400px;
    }

    .content-pills.hidden {
        transform: translateX(400px);
    }
}

@media screen and (max-width: 768px) and (min-width: 841px) {
    .models-sidebar {
        width: 200px;
    }

    .toggle-button {
        right: 400px;
    }

    .content-pills.hidden {
        transform: translateX(400px);
    }
}

/* Iframe specific styles */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
}

/* Adjust UV template for smaller screens */
.uv-template {
    max-width: 90vw;
    max-height: 90vh;
    width: min(800px, 90vw);
    height: min(800px, 90vh);
}

/* Mobile Menu Styles - Consolidado */
@media screen and (max-width: 840px) {
    .container {
        flex-direction: column;
    }

    .models-sidebar {
        width: 100%;
        height: auto;
        max-height: 60px;
        padding: 10px;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .models-sidebar.expanded {
        max-height: 100vh;
    }

    .content-wrapper {
        height: 100vh;
        position: relative;
        overflow: hidden;
    }

    .model-viewer-container {
        height: 100%;
        width: 100%;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
        overflow: hidden;
        pointer-events: auto !important;
    }
    
    .model-viewer-container model-viewer {
        pointer-events: auto !important;
        touch-action: auto !important;
    }
    
    /* Mobile AR Button - Only visible on mobile */
    .mobile-ar-button {
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: #40948e;
        color: white;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
        font-size: 12px;
        gap: 2px;
    }
    
    .mobile-ar-button i {
        font-size: 24px;
    }
    
    .mobile-ar-button:hover,
    .mobile-ar-button:active {
        background-color: #2d6b66;
        transform: scale(1.1);
    }

    .content-pills {
        display: none !important; /* Hide desktop menu on mobile */
    }
    
    /* Mobile Hamburger Button - Hidden on mobile */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Mobile Close Button - Hidden on mobile */
    .mobile-menu-close {
        display: none !important;
    }

    /* Mobile Bottom Menu Bar */
    .mobile-bottom-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 70px;
        background-color: #40948e;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
        padding: 0 10px;
        box-sizing: border-box;
    }

    .mobile-pill {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 5px;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        border-radius: 8px;
        margin: 0 5px;
    }

    .mobile-pill i {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .mobile-pill span {
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
    }

    .mobile-pill.active {
        background-color: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }

    .mobile-pill:active {
        transform: scale(0.95);
    }

    /* Mobile Content Panel (slides up from bottom, above the menu bar) */
    .mobile-content-panel {
        position: fixed;
        bottom: 70px; /* Start above the menu bar (70px height) */
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 70px); /* Full height minus menu bar */
        background-color: #e7e7e7;
        z-index: 999; /* Below menu bar (1000) but above content */
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .mobile-content-panel.open {
        transform: translateY(0);
    }

    .mobile-panel-close {
        display: none !important; /* Remove close button since content doesn't cover menu */
    }

    .mobile-panel-content {
        flex: 1;
        overflow-y: auto;
       /* padding: 20px; */
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }

    /* Ajustes para conteúdo dentro do painel mobile */
    .mobile-panel-content > * {
        width: 100%;
    }

    .mobile-panel-content .layout-section {
        display: flex;
        flex-direction: column;
        gap: 0;
        height: auto;
        min-height: auto;
    }

    .mobile-panel-content .subpills-container {
        position: relative;
        top: 0;
        margin-bottom: 10px;
    }

    .mobile-panel-content .main-content {
        flex: 1;
        overflow-y: visible;
        padding: 0;
    }

    /* Remove apenas o título principal (h3 direto dentro de pill-content), não os das subpills */
    .mobile-panel-content > h3,
    .mobile-panel-content > .pill-content > h3 {
        display: none !important;
    }
    
    /* Manter títulos das subpills visíveis */
    .mobile-panel-content .subpill h3 {
        display: block !important;
    }

    /* Hide swatch arrows in mobile panel */
    .mobile-panel-content .swatch-arrows,
    .mobile-panel-content .swatch-arrow {
        display: none !important;
    }

    /* Swatches styling in mobile panel */
    .mobile-panel-content .swatches {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 35px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #40948e rgba(0, 0, 0, 0.1);
        padding: 20px 10px 20px 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Alinhamento condicional baseado no número de swatches */
    /* 7 ou menos swatches: alinhamento ao centro */
    .mobile-panel-content .swatches:has(.swatch-box:nth-child(1):last-child),
    .mobile-panel-content .swatches:has(.swatch-box:nth-child(2):last-child),
    .mobile-panel-content .swatches:has(.swatch-box:nth-child(3):last-child),
    .mobile-panel-content .swatches:has(.swatch-box:nth-child(4):last-child),
    .mobile-panel-content .swatches:has(.swatch-box:nth-child(5):last-child),
    .mobile-panel-content .swatches:has(.swatch-box:nth-child(6):last-child),
    .mobile-panel-content .swatches:has(.swatch-box:nth-child(7):last-child) {
        justify-content: center;
    }
    
    /* Mais de 7 swatches: alinhamento à esquerda */
    .mobile-panel-content .swatches:has(.swatch-box:nth-child(8)) {
        justify-content: flex-start;
    }
    
    /* Estilizar scrollbar dos swatches no mobile */
    .mobile-panel-content .swatches::-webkit-scrollbar {
        height: 6px;
    }
    
    .mobile-panel-content .swatches::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 3px;
    }
    
    .mobile-panel-content .swatches::-webkit-scrollbar-thumb {
        background: #40948e;
        border-radius: 3px;
    }
    
    .mobile-panel-content .swatches::-webkit-scrollbar-thumb:hover {
        background: #2d6b66;
    }
    
    /* Remover padding do mobile-panel-content quando contém swatches 
    .mobile-panel-content:has(.swatches) {
        padding: 0 20px 20px 20px;
    }*/

    .mobile-panel-content .swatch-box {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0 !important;
        margin: 0 !important;
        background: transparent;
    }

    /* Aplicar box-shadow apenas em swatch-containers dentro de swatch-box dentro de swatches */
    .mobile-panel-content .swatches .swatch-box .swatch-container {
        width: 100% !important;
        height: 100% !important;
        border-radius: 50%;
        overflow: hidden;
        box-shadow: 0 0 0 3px #dbdbdb;
        cursor: pointer;
        transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .mobile-panel-content .swatches .swatch-box.selected {
        box-shadow: 0 0 0 3px #40948e, 0 0 0 6px rgba(64, 148, 142, 0.2);
    }
    
    .mobile-panel-content .swatches .swatch-box.selected .swatch-container {
        box-shadow: 0 0 0 3px #40948e, 0 0 0 6px rgba(64, 148, 142, 0.3);
    }

    .mobile-panel-content .swatches .swatch-box .swatch,
    .mobile-panel-content .swatches .swatch-box .swatch-container {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
    }

    .mobile-panel-content .swatches .swatch-box .swatch-container img,
    .mobile-panel-content .swatches .swatch-box .swatch-container svg {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    .mobile-panel-content .swatch-label {
        display: none !important;
    }

    /* Esconder nome da imagem no mobile */
    .mobile-panel-content .file-name,
    .file-preview .file-name {
        display: none !important;
    }

    /* Alinhar imagem à esquerda no mobile com 5px de margem */
    .mobile-panel-content .file-preview-image {
        margin: 0 !important;
        margin-left: 5px !important;
        margin-right: auto !important;
    }

    .mobile-panel-content .file-preview {
        align-items: flex-start !important;
    }

    /* Centralizar texto replace no mobile */
    .mobile-panel-content .replace-text {
        text-align: center !important;
        width: 100% !important;
        margin: 0 !important;
        
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .toggle-button {
        display: none;
    }

    /* Layout em duas colunas para subpills e conteúdo */
    .layout-section {
        display: flex;
        flex-direction: column;
        gap: 0;
        height: 100%;
        align-items: center;
        overflow: hidden;
        flex-wrap: nowrap;
    }

    .main-content {
        flex: 1;
        height: auto;
        overflow-y: visible;
        padding: 20px;
        order: 3;
        width: 100%;
        max-height: none;
    }

    .main-content > div {
        display: none;
    }

    .main-content > div.active {
        display: flex;
        flex-direction: column;
        align-content: center;
        align-items: center;
    }

    /* Garantir que apenas o conteúdo da subpill ativa seja exibido no mobile */
    .print-content {
        display: none;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: opacity 0.5s ease-in, transform 0.5s ease-in, visibility 0s 0.5s;
    }

    .print-content.active {
        display: flex;
        flex-direction: column;
        gap: 15px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: opacity 0.5s ease-in, transform 0.5s ease-in, visibility 0s 0s;
    }
    
    /* Estrutura reorganizada para mobile */
    .mobile-layout-content {
        display: flex;
        flex-direction: column;
        /*gap: 15px;*/
        width: 100%;
    }
    
    .mobile-layout-buttons {
        display: none; /* Escondido por padrão */
    }
    
    /* Mostrar apenas se tiver conteúdo */
    .mobile-layout-buttons:not(:empty) {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }
    
    /* FORÇAR ordem visual dentro do mobile-layout-content */
    /* Ordem: UV editor primeiro, depois botões, depois subpills, depois upload */
    .mobile-layout-content {
        display: flex;
        flex-direction: column;
        /*gap: 15px;*/
    }
    
    /* UV editor aparece primeiro (movido para fora do main-content) */
    .mobile-layout-content > .uv-editor-mobile-container {
        order: -2 !important; /* Primeiro - UV editor */
        overflow: visible !important; /* Permitir handlers fora da caixa */
    }
    
    /* Botões aparecem logo após o UV editor */
    .mobile-layout-content > .mobile-layout-buttons {
        order: -1 !important; /* Logo após o UV editor */
        margin-top: 0;
        padding-top: 15px;
        border-top: none;
        border-bottom: 1px solid #eee;
        margin-bottom: 15px;
    }
    
    /* Subpills aparecem depois dos botões */
    .mobile-layout-content > .subpills-container {
        order: 0 !important; /* Depois dos botões */
        position: relative;
        z-index: 1; /* Abaixo do upload box */
    }
    
    /* Main-content (que contém upload) aparece depois das subpills */
    .mobile-layout-content > .main-content {
        order: -2 !important; /* ANTES das subpills para aparecer por cima */
        display: flex !important;
        flex-direction: column;
        position: relative;
        z-index: 10; /* Acima das subpills */
        background-color: #e7e7e7;
        padding: 20px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-20px);
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: 0;
        padding-bottom: 0;
        height: auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Quando uma subpill é clicada, mostrar o main-content com slide-in */
    .mobile-layout-content > .main-content.upload-visible {
        max-height: none; /* Remover limite de altura */
        opacity: 1;
        transform: translateY(0);
        padding-top: 20px;
        padding-bottom: 20px;
        overflow: visible; /* Permitir que o conteúdo seja visível sem scroll interno */
    }
    
    /* Garantir que o print-content dentro do main-content não cause overflow */
    .mobile-layout-content > .main-content .print-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }
    
    /* Upload container não deve extrapolar */
    .mobile-layout-content > .main-content .upload-container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Upload box não deve extrapolar */
    .mobile-layout-content > .main-content .upload-box {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Dentro do print-content, UV editor primeiro */
    .print-content.active > .uv-editor-mobile-container {
        order: -1 !important;
    }
    
    .print-content.active > .subpills-container {
        order: 0 !important;
    }
    
    .print-content.active > .upload-container {
        order: 1 !important;
        padding: 0 25px;
    }
    
    /* Ordem dos elementos no print-content mobile */
    .print-content .upload-container {
        order: 3;
    }
    
    .print-content .custom-file-upload {
        order: 4;
    }
    
    /* Estilo apenas para o botão Edit Layout no mobile */
    .print-content button[id^="editLayoutButton-"] {
        background: rgba(64, 148, 142, 0.1);
        border: 1px solid #40948e;
        border-color: #40948e;
        color: #333;
        display: none !important; /* Escondido por padrão no mobile */
    }
    
    /* Mostrar Edit Layout apenas quando houver imagem enviada (upload-box com has-file) */
    .print-content .upload-container .upload-box.has-file ~ * button[id^="editLayoutButton-"],
    .print-content:has(.upload-box.has-file) button[id^="editLayoutButton-"] {
        display: block !important;
    }
    
    /* Mobile: controlar visibilidade dos botões */
    /* Confirm Changes SEMPRE escondido por padrão - só aparece quando UV editor está aberto */
    .mobile-layout-buttons button[id^="confirmLayoutButton-"] {
        display: none !important;
    }
    
    /* Confirm Changes só aparece quando tem a classe mobile-active (UV editor aberto) */
    .mobile-layout-buttons button[id^="confirmLayoutButton-"].mobile-active {
        display: block !important;
    }
    
    /* Quando Confirm Changes está visível (mobile-active), esconder Edit Layout */
    .mobile-layout-buttons button[id^="confirmLayoutButton-"].mobile-active ~ button[id^="editLayoutButton-"],
    .mobile-layout-buttons:has(button[id^="confirmLayoutButton-"].mobile-active) button[id^="editLayoutButton-"] {
        display: none !important;
    }
    
    /* Reset Image button - mostrar abaixo do Edit Layout no mobile */
    .print-content button[id^="resetImageButton-"] {
        display: none !important; /* Escondido por padrão */
        margin-top: 10px !important;
    }
    
    /* Mostrar Reset Image quando há imagem enviada (mesma lógica do Edit Layout) */
    .print-content .upload-container .upload-box.has-file ~ * button[id^="resetImageButton-"],
    .print-content:has(.upload-box.has-file) button[id^="resetImageButton-"] {
        display: block !important;
    }
    
    /* Garantir ordem: Edit Layout primeiro, depois Reset Image */
    .print-content button[id^="editLayoutButton-"] {
        order: 1;
    }
    
    .print-content button[id^="resetImageButton-"] {
        order: 2;
    }
    
    /* Edit Layout visível por padrão quando há imagem carregada */
    .mobile-layout-buttons button[id^="editLayoutButton-"] {
        display: block !important;
    }
    
    /* Edit Layout escondido quando Confirm Changes está ativo */
    .mobile-layout-buttons:has(button[id^="confirmLayoutButton-"].mobile-active) button[id^="editLayoutButton-"] {
        display: none !important;
    }

    .subpills-container {
        width: 100%;
        height: auto;
        overflow-x: hidden;
        border-bottom: 1px solid #eee;
        background: #e7e7e7;
        padding: 10px;
        flex-shrink: 0;
        order: 2 !important; /* Abaixo do UV editor (order: 1) */
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        position: relative !important; /* Remover sticky para não ficar no topo */
        top: auto !important;
        z-index: 1 !important; /* Menor que o UV editor */
        scrollbar-width: none;
        -ms-overflow-style: none;
        box-sizing: border-box;
    }



    .subpills-container::-webkit-scrollbar {
        display: none;
    }

    /* Tabs organizadoras - 2 por linha */
    .subpills-container > .subpill {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 30px;
        flex: 0 0 calc(50% - 4px);
        box-sizing: border-box;
        border: 1px solid #eee;
        background: #ffffff;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        min-height: 40px;
        max-height: 45px;
        margin: 0;
        overflow: hidden;
    }

    .subpills-container > .subpill.active {
        background: rgba(64, 148, 142, 0.1);
        border-color: #40948e;
    }

    .subpills-container > .subpill h3 {
        font-size: 11px;
        margin: 0;
        color: #333;
        font-weight: 500;
        text-transform: uppercase;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .subpill i {
        margin-right: 10px;
        font-size: 20px;
        display: block;
    }

    .subpill h3 {
        font-size: 14px;
        margin: 0;
        text-align: center;
        color: #333;
        font-weight: 500;
        text-transform: uppercase;
    }

    .subpill.active {
        background: rgba(64, 148, 142, 0.1);
        border-color: #40948e;
        transform: none;
        box-shadow: none;
    }

    .subpill:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-color: #40948e;
    }

    .subpill[data-print-section="true"] {
        background: #fff;
        display: flex;
        justify-content: center;
    }

    .subpill[data-print-section="true"].active {
        background: #e6f0ff;
        display: flex;
        justify-content: center;
        transform: none;
        box-shadow: none;
    }

    /* Subpills organizadas por tabs */
    .subpills {
        display: none;
    }

    .subpills.active {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
        width: 100%;
    }

    /* Subpills do layout - lado a lado */
    .layout-section .subpills {
        display: none;
    }

    .layout-section .subpills.active {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
        width: 100%;
    }

    .layout-section .subpill {
        width: 100%;
        height: 30px;
        padding: 30px;
        margin-bottom: 0;
        flex-direction: row;
        justify-content: center;
        border: 1px solid #eee;
        background: #ffffff;
        display: flex;
    }

    .layout-section .subpill.active {
        background: rgba(64, 148, 142, 0.1);
        border-color: #40948e;
        transform: none;
        box-shadow: none;
    }

    .layout-section .subpill:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-color: #40948e;
    }

    .layout-section .subpill i {
        display: none;
    }

    .upload-box {
        min-height: 20px;
        background: #e7e7e7;
    }

    .upload-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        transition: all 0.3s ease;
        z-index: 1;
    }

    .upload-subtext {
        display: none;
    }

    .file-preview {
        top: auto;
        left: auto;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 0px auto;
        overflow: hidden;
        border-radius: 8px;
    }

    .file-preview-image {
        width: 30px;
        height: 30px;
    }

    .upload-box.has-file .file-preview {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .swatch-box.selected {
        background-color: transparent;
    }

    /* Remover border do swatch-box no mobile */
    .swatch-box {
        border: none !important;
    }

    /* Sobrescrever regras desktop para pills no mobile */
    .pills:has(.pill:nth-child(3):last-child) .pill,
    .pills:has(.pill:nth-child(2):last-child) .pill,
    .pills:has(.pill:nth-child(1):last-child) .pill {
        width: auto !important;
        margin-right: 0 !important;
}

    /* Custom buttons container (for products with tabs like 3oz jar, 4oz jar, etc.) */
    .custom-buttons-container {
        width: 100%;
        padding: 10px 15px;
        background: #f8f9fa;
        border-bottom: 1px solid #eee;

        display: flex;
        flex-wrap: nowrap;
        gap: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .custom-buttons-container::-webkit-scrollbar {
        display: none;
    }

    .custom-buttons-container .custom-direct-print,
    .custom-buttons-container .custom-label-print,
    .custom-buttons-container .custom-box-layout,
    .custom-buttons-container .custom-booklet-layout,
    .custom-buttons-container .custom-tray,
    .custom-buttons-container .custom-magnetic-lid,
    .custom-buttons-container .custom-box,
    .custom-buttons-container .custom-cone-pack,
    .custom-buttons-container .custom-tip {
        padding: 12px 20px;
        margin: 0 5px 0 0;
        border: none;
        background: transparent;
        color: #333;
        font-weight: 500;
        text-transform: uppercase;
        font-size: 13px;
        letter-spacing: 0.5px;
        border-radius: 0;
        position: relative;
        flex-shrink: 0;
        transition: all 0.3s ease;
    }
    
    /* Criar ::after para todos os botões (mesmo sem active) para permitir animação de saída */
    .custom-buttons-container .custom-direct-print::after,
    .custom-buttons-container .custom-label-print::after,
    .custom-buttons-container .custom-box-layout::after,
    .custom-buttons-container .custom-booklet-layout::after,
    .custom-buttons-container .custom-tray::after,
    .custom-buttons-container .custom-magnetic-lid::after,
    .custom-buttons-container .custom-box::after,
    .custom-buttons-container .custom-cone-pack::after,
    .custom-buttons-container .custom-tip::after {
        content: '' !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 50% !important;
        width: 0 !important;
        height: 3px !important;
        background: #40948e !important;
        border-radius: 2px !important;
        transform: translateX(-50%) scaleX(0) !important;
        transform-origin: center !important;
        transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .custom-buttons-container .custom-direct-print:hover,
    .custom-buttons-container .custom-label-print:hover,
    .custom-buttons-container .custom-box-layout:hover,
    .custom-buttons-container .custom-booklet-layout:hover,
    .custom-buttons-container .custom-tray:hover,
    .custom-buttons-container .custom-magnetic-lid:hover,
    .custom-buttons-container .custom-box:hover,
    .custom-buttons-container .custom-cone-pack:hover,
    .custom-buttons-container .custom-tip:hover {
        background: rgba(64, 148, 142, 0.1);
        color: #40948e;
    }

    .custom-buttons-container .custom-direct-print.active,
    .custom-buttons-container .custom-label-print.active,
    .custom-buttons-container .custom-box-layout.active,
    .custom-buttons-container .custom-booklet-layout.active,
    .custom-buttons-container .custom-tray.active,
    .custom-buttons-container .custom-magnetic-lid.active,
    .custom-buttons-container .custom-box.active,
    .custom-buttons-container .custom-cone-pack.active,
    .custom-buttons-container .custom-tip.active {
        color: #40948e;
        background: transparent;
    }

    /* Quando active, a borda cresce do centro */
    .custom-buttons-container .custom-direct-print.active::after,
    .custom-buttons-container .custom-label-print.active::after,
    .custom-buttons-container .custom-box-layout.active::after,
    .custom-buttons-container .custom-booklet-layout.active::after,
    .custom-buttons-container .custom-tray.active::after,
    .custom-buttons-container .custom-magnetic-lid.active::after,
    .custom-buttons-container .custom-box.active::after,
    .custom-buttons-container .custom-cone-pack.active::after,
    .custom-buttons-container .custom-tip.active::after {
        width: 100% !important;
        transform: translateX(-50%) scaleX(1) !important;
    }

    .pill-content {
        height: 100%;
        max-height: none;
        width: 100%;
        padding: 0;
        display: none;
        flex-direction: column;
        flex: 1;
    }

    .pill-content.active {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .uv-template {
        width: 90vw;
        height: 90vw;
    }
    
    /* UV Editor dentro da coluna no mobile */
    .uv-editor-mobile-container {
        width: 80%;
        max-width: 100%;
        margin: 0 auto; /* Centralizado horizontalmente */
        padding: 0;
        display: flex; /* Sempre flex para permitir transição */
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        order: 1 !important; /* Acima das subpills (order: 2) e upload (order: 3) */
        min-height: 0;
        max-height: 0; /* Começa com altura 0 para não ocupar espaço */
        overflow: hidden; /* Esconder conteúdo quando altura é 0 */
        -webkit-overflow-scrolling: touch;
        position: relative;
        z-index: 2 !important; /* Maior que subpills para garantir que fique no topo */
        transform: translateY(100%); /* Começa fora da tela (embaixo) */
        opacity: 0;
        transition: transform 0.3s ease-out, opacity 0.3s ease-out, max-height 0.3s ease-out, padding 0.3s ease-out, margin 0.3s ease-out;
    }
    
    /* Estado visível - slide-in de baixo para cima */
    .uv-editor-mobile-container.uv-editor-visible {
        transform: translateY(0); /* Posição normal */
        opacity: 1;
        max-height: 600px; /* Altura máxima quando visível */
        min-height: 400px;
        padding: 10px;
        margin: 20px auto;
        overflow: hidden !important; /* Esconder overflow para evitar scroll quando imagem rotacionada */
        overflow-x: hidden !important;
        overflow-y: hidden !important;
    }
    
    /* Quando UV editor está visível, fazer o panel ocupar 100% da altura */
    .mobile-content-panel:has(.uv-editor-mobile-container.uv-editor-visible) {
        top: 0;
        height: calc(100vh - 70px);
    }
    
    /* Estado escondido */
    .uv-editor-mobile-container.uv-editor-hidden {
        transform: translateY(100%); /* Fora da tela (embaixo) */
        opacity: 0;
        max-height: 0; /* Altura 0 para não ocupar espaço */
        min-height: 0;
        padding: 0;
        margin: 0 auto;
        overflow: hidden;
    }
    
    /* UV Template dentro do container mobile */
    .uv-editor-mobile-container .uv-template {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 300px;
        max-height: 500px;
        aspect-ratio: 1;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        margin: 0 auto; /* Centralizado */
        overflow: hidden !important; /* Esconder overflow para evitar scroll quando imagem rotacionada */
    }

    .uv-template {
        border: 2px solid #40948e;
    }
    
    /* UV Controls dentro do container mobile */
    .uv-editor-mobile-container .uv-controls {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin-top: 10px;
        margin-bottom: 10px;
        display: flex;
        justify-content: center;
        gap: 10px;
    }
    
    /* Editable Image dentro do container mobile */
    .uv-editor-mobile-container .editable-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    /* Quando o UV template está dentro da coluna mobile */
    .content-pills .uv-template {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        border: 2px solid #40948e;
        background: rgba(255, 255, 255, 0.9);
        display: block;
        z-index: auto;
        margin: 0 auto;
        overflow: hidden !important; /* Esconder overflow para evitar scroll quando imagem rotacionada */
    }
    
    .content-pills .uv-controls {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        display: flex;
        gap: 10px;
        justify-content: center;
        margin-top: 10px;
        z-index: auto;
    }
    
    .content-pills .editable-image {
        position: absolute;
    }

    .right-column-content {
        padding: 0;
        height: 100%;
        display: flex;
        overflow-y: auto;
        flex-direction: column;
        box-sizing: border-box;
        background-color: #fff;
        overflow-x: hidden;
    }

    .pills {
        display: flex;
        flex-direction: row;
        gap: 5px;
        /* margin-top: -20px; */
        padding: 10px;
        flex-wrap: nowrap;
        /* width: 100%; */
        /* height: 48px; */
        justify-content: space-around;
        overflow: hidden;
        background-color: #40948e;
    }


    .pill {
        background-color: transparent;
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 5px;
        padding-bottom: 10px;
        cursor: pointer;
        text-align: center;
        transition: all 0.3s ease;
        width: auto;
        height: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: none;
        color: #fff;
        flex-shrink: 0;
        border-radius: 5px;
        position: relative;
    }

    /* Pill específica para "add your artwork" - largura maior */
    .pill[data-tab="artwork"] {
        width: 120px;
    }

    .pill[data-tab="artwork"] h3 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
    }

    .swatches-wrapper {
        position: relative;
        width: 100%;
        margin-bottom:-20px;
    }

    .swatches {
        display: flex;
        gap: 15px;
        width: 100%;
        padding: 15px 10px 15px 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    /* Setas fixas fora do container de scroll */
    .swatch-arrows {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        z-index: 10;
    }

    .swatch-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        transition: all 0.3s ease;
        pointer-events: auto;
    }

    .swatch-arrow-left {
        left: 5px;
    }

    .swatch-arrow-right {
        right: 5px;
    }

    .swatches::-webkit-scrollbar {
        display: none;
    }

    .swatch-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px;
        border: 2px solid #eeeeee;
        text-align: center;
        transition: all 0.2s ease;
        width: 70px;
        height: 90px;
        flex-shrink: 0;
        border-radius: 50%;
        background: #fff;
    }

    .swatch-box .swatch {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 2px solid transparent;
        margin-bottom: 5px;
    }

    .swatch-box .swatch.selected {
        border-color: #40948e;
    }

    .swatch-box.selected {
        border-color: transparent !important;
        border: none !important;
    }

    .swatch-container {
        width: 64px;
        height: 64px;
        border: 1px solid #777777;
        border-radius: 40px;
        overflow: hidden;
        position: relative;
    }

    .swatch-box.selected .swatch-container {
        border: 2px solid #595959;
    }

    /* Forçar remoção da borda do swatch-box no mobile */
    .swatch-box.selected,
    .swatch-box.selected:hover,
    .swatch-box.selected:active,
    .swatch-box.selected:focus {
        border: none !important;
        border-color: transparent !important;
        outline: none !important;
    }

    .swatch-label {
        margin-top: 5px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        color: #333;
        line-height: 1.2;
    }

    .swatches:has(.swatch-box:nth-child(2):last-child) .swatch-box {
        width: calc((40% - 10px) / 2);
        margin-right: 0;
    }

    .pills-column.glass {
        background-color: #fff;
        box-sizing: border-box;
        width: 100%;
        display: grid;
        gap: 20px;
        height: 70px;
        align-content: center;
        z-index: 999;
        position: fixed;
        order: 1;
    }

    /* Melhorias para touch nos handles do UV editor */
    .handle {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        touch-action: none;
    }
    
    .rotate-handle {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        top: -50px !important;
        touch-action: none;
    }
    
    .editable-image {
        touch-action: none;
    }
}

.rotation-speed-control {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translate3d(-50%, -60px, 0px);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 50;
    margin-top: -50px;
}

.rotation-speed-control input[type="range"] {
    flex-grow: 1;
    min-width: 150px;
}

#rotationSpeedValue {
    min-width: 40px;
    text-align: center;
}

.model-viewer-only {
    display: none;
}

body[data-page="model-viewer"] .model-viewer-only {
    display: block;
}

.warning-label-control {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.warning-label-control:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Estilos para os botões personalizados do modelo 3oz-hemp-plastic-jar */
.custom-buttons-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    width: 100%;
    gap: 5px;
    padding:5px;
}

.custom-buttons-container .subpill {
    width: 140px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #eeeeee;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-buttons-container .subpill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #40948e;
}

.custom-buttons-container .subpill.active {
    background: rgba(64, 148, 142, 0.1);
    border-color: #40948e;
}

.custom-direct-print,
.custom-label-print,
.custom-box-layout,
.custom-booklet-layout,
.custom-tray,
.custom-magnetic-lid,
.custom-box,
.custom-cone-pack,
.custom-tip {
    width: 50%;
    border: none;
    border-bottom: 2px solid #eeeeee;
    background-color: #fff;
    color: #333333;
    transition: border-color 0.3s ease;
    position: relative;
}

/* Criar ::after para todos os botões (mesmo sem active) para permitir animação de saída (desktop) */
.custom-direct-print::after,
.custom-label-print::after,
.custom-box-layout::after,
.custom-booklet-layout::after,
.custom-tray::after,
.custom-magnetic-lid::after,
.custom-box::after,
.custom-cone-pack::after,
.custom-tip::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background: #40948e !important;
    transform: translateX(-50%) scaleX(0) !important;
    transform-origin: center !important;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Ajuste específico para 3 botões (3-cone-pack) */
.custom-buttons-container:has(.custom-box) .custom-box,
.custom-buttons-container:has(.custom-cone-pack) .custom-cone-pack,
.custom-buttons-container:has(.custom-tip) .custom-tip {
    width: 33.33%;
}

.custom-direct-print:hover,
.custom-label-print:hover,
.custom-box-layout:hover,
.custom-booklet-layout:hover,
.custom-tray:hover,
.custom-magnetic-lid:hover,
.custom-box:hover,
.custom-cone-pack:hover,
.custom-tip:hover{
    border-color: #40948e;
}

.custom-direct-print.active,
.custom-label-print.active,
.custom-box-layout.active,
.custom-booklet-layout.active,
.custom-tray.active,
.custom-magnetic-lid.active,
.custom-box.active,
.custom-cone-pack.active,
.custom-tip.active {
    border-bottom: 2px solid #40948e;
    color: #40948e;
}

/* Quando active, a borda cresce do centro (desktop) */
.custom-direct-print.active::after,
.custom-label-print.active::after,
.custom-box-layout.active::after,
.custom-booklet-layout.active::after,
.custom-tray.active::after,
.custom-magnetic-lid.active::after,
.custom-box.active::after,
.custom-cone-pack.active::after,
.custom-tip.active::after {
    width: 100% !important;
    transform: translateX(-50%) scaleX(1) !important;
}

/* Estilos para o controle de toggle da tampa */
.lid-toggle-control {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.lid-toggle-control:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.lid-toggle-control input[type="checkbox"] {
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lid-toggle-control input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background: white;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lid-toggle-control input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.lid-toggle-control input[type="checkbox"]:checked {
    background: #4CAF50;
}

/* Desktop: garantir que o botão Edit Layout seja visível quando houver imagem enviada */
@media screen and (min-width: 841px) {
    .print-content button[id^="editLayoutButton-"] {
        display: block !important;
        background: rgba(64, 148, 142, 0.1) !important;
        border: 1px solid #40948e !important;
        border-color: #40948e !important;
        color: #333 !important;
    }
    
    /* Esconder Edit Layout apenas quando não há imagem enviada */
    .print-content:not(:has(.upload-box.has-file)) button[id^="editLayoutButton-"] {
        display: none !important;
    }
}

.lid-toggle-control input[type="checkbox"]:not(:checked) {
    background: #ccc;
}





