#gpv-lib-custom-fields {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #eee;
}

.gpv-lib-upload-section, .gpv-lib-shipping-section {
    margin-bottom: 20px;
}

#gpv-lib-custom-fields label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.gpv-shipping-input-group {
    display: flex;
    gap: 10px;
}

#gpv-lib-zip {
    flex: 1;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
}

#gpv-lib-upload-dropzone {
    border: 2px dashed #2AC8D3;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s;
}

#gpv-lib-upload-dropzone.file-selected {
    border-style: solid;
    background: #e6fffa;
    border-color: #38b2ac;
}

#gpv-lib-upload-feedback {
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
}

/* =========================================================
   PRODUTO.CSS - DESIGN DE ALTA CONVERSÃO (GENIAL PREVIEWS)
   ========================================================= */

/* --- 1. CONFIGURAÇÕES GERAIS E TIPOGRAFIA --- */
.product-main {
    padding-top: 30px;
    font-family: 'Inter', sans-serif; /* Recomendado importar no tema */
}

.product-title {
    font-size: clamp(24px, 4vw, 32px) !important;
    font-weight: 800 !important;
    color: #1a202c !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px !important;
}

/* --- 2. PREÇO E DESTAQUE --- */
.price-wrapper {
    margin: 15px 0;
}

.product-page-price.price {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #2AC8D3 !important; /* Ciano da marca */
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-page-price del {
    font-size: 18px !important;
    color: #a0aec0 !important;
    font-weight: 400;
}

.product-page-price ins {
    text-decoration: none !important;
}

/* --- 3. VARIATIONS (QUANTIDADE DE PEÇAS) --- */
.variations {
    margin-bottom: 25px !important;
    width: 100%;
}

.variations th.label {
    padding-bottom: 10px !important;
    text-align: left;
}

.variations th.label label {
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4a5568;
}

/* Estilo para Swatches (Botões Quadrados) */
.variable-items-wrapper.button-variable-items-wrapper {
    gap: 10px !important;
}

.variable-item.button-variable-item {
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    min-width: 60px;
    height: auto !important;
    transition: all 0.2s ease !important;
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

.variable-item.button-variable-item:hover {
    border-color: #2AC8D3 !important;
}

.variable-item.button-variable-item.selected {
    border-color: #2AC8D3 !important;
    background: #f0fdff !important;
    color: #2AC8D3 !important;
    box-shadow: 0 0 0 2px rgba(42, 200, 211, 0.2) !important;
}

.variable-item-contents span {
    font-weight: 700 !important;
}

/* --- 4. ÁREA DE UPLOAD (O CORAÇÃO DA PÁGINA) --- */
#gpv-lib-custom-fields {
    margin: 30px 0 !important;
    background: #f7fafc;
    border-radius: 20px;
    padding: 20px;
    border: 2px solid #edf2f7;
}

.gpv-lib-upload-section label {
    font-size: 15px !important;
    color: #2d3748 !important;
    margin-bottom: 15px !important;
}

#gpv-lib-upload-dropzone.clean-zone {
    background: #ffffff !important;
    border: 2px dashed #2AC8D3 !important;
    padding: 40px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#gpv-lib-upload-dropzone:hover {
    background: #f0fdff !important;
    border-color: #8882EE !important;
    transform: translateY(-2px);
}

#gpv-upload-text {
    font-weight: 700 !important;
    color: #4a5568 !important;
    margin: 0 !important;
    font-size: 16px;
}

/* --- 5. BOTÃO ADICIONAR AO CARRINHO E QUANTIDADE --- */
.variations_button {
    display: flex !important;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.ux-quantity.quantity {
    background: #f7fafc !important;
    border-radius: 50px !important;
    padding: 5px !important;
    border: 1px solid #e2e8f0 !important;
    width: fit-content !important;
}

.quantity input.qty {
    background: transparent !important;
    font-weight: 800 !important;
    font-size: 18px !important;
}

.single_add_to_cart_button.button {
    flex: 1;
    min-width: 200px;
    height: 55px !important;
    border-radius: 50px !important;
    background: linear-gradient(90deg, #2AC8D3 0%, #8882EE 100%) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 20px rgba(42, 200, 211, 0.3) !important;
}

.single_add_to_cart_button.button:hover:not(:disabled) {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 30px rgba(42, 200, 211, 0.4) !important;
}

.single_add_to_cart_button.button:disabled {
    background: #cbd5e0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

/* --- 6. SHIPPING SIMULATOR (FRETE) --- */
#wc-shipping-sim {
    margin-top: 30px !important;
    padding: 20px;
    border-top: 1px solid #edf2f7;
}

#wc-shipping-sim-form-fields {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.input-text.input-postcode {
    border-radius: 10px !important;
    height: 45px !important;
    border: 1px solid #e2e8f0 !important;
}

.button.submit {
    border-radius: 10px !important;
    background-color: #4a5568 !important;
    font-weight: 700 !important;
}

/* --- 7. TABS (DESCRIÇÃO) --- */
.product-tabs {
    margin-top: 50px !important;
}

.nav-line.nav-left > li > a {
    font-weight: 800 !important;
    font-size: 16px !important;
    color: #718096 !important;
}

.nav-line > li.active > a {
    color: #2AC8D3 !important;
}

.tab-panels {
    border: none !important;
    padding: 30px 0 !important;
    line-height: 1.8;
    color: #4a5568;
    font-size: 16px;
}

/* --- 8. RELATED PRODUCTS --- */
.related-products-wrapper {
    padding: 50px 0 !important;
}

.product-small .box-text {
    padding: 15px 10px !important;
}

.product-small .name {
    font-weight: 700 !important;
    font-size: 15px !important;
}

/* --- 9. MOBILE ADAPTATIONS --- */
@media (max-width: 849px) {
    .product-info {
        padding: 20px !important;
    }
    
    .single_add_to_cart_button.button {
        width: 100% !important;
        order: 2;
    }
    
    .ux-quantity.quantity {
        width: 100% !important;
        justify-content: center;
        order: 1;
    }

    #wc-shipping-sim-form-fields {
        flex-direction: column;
    }
    
    .vertical-thumbnails {
        display: none; /* Thumbnails laterais em mobile costumam poluir */
    }
}

/* --- 10. ESTADOS DE FEEDBACK (JS) --- */
.gpv-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(42, 200, 211, 0.3);
    border-radius: 50%;
    border-top-color: #2AC8D3;
    animation: gpv-spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes gpv-spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   CONTAINER PRINCIPAL & STEPS
   ========================================= */
#gpv-wrapper.gpv-lib-wrapper {
    max-width: 100%;
    margin: 0 auto 20px;
    position: relative;
    font-family: inherit; /* Herda do tema */
}

/* Utilitário para esconder etapas (controlado pelo JS) */
.gpv-hidden {
    display: none !important;
}

/* =========================================
   STEP 0: CAIXA DE UPLOAD
   ========================================= */
.gpv-upload-box {
    border: 2px dashed #2AC8D3; /* Cor destaque do tema */
    background-color: #f9f9f9;
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.gpv-upload-box:hover {
    border-color: #1b8e96;
    background-color: #f0fdfd;
}

.gpv-upload-box p {
    margin-bottom: 15px;
    font-weight: 700;
    color: #333;
    font-size: 1.1em;
}

/* Input de Arquivo Customizado (opcional, para ficar mais bonito que o padrão) */
input[type="file"]#gpv-user-image {
    display: block;
    margin: 0 auto 15px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
}

/* Campos de Nome/Whatsapp (se visíveis) */
.gpv-user-inputs {
    margin-top: 15px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.gpv-user-inputs input {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Botão de Enviar */
#gpv-start-btn {
    width: 100%;
    max-width: 300px;
    margin-top: 15px;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    /* As cores button.primary geralmente vêm do Flatsome, 
       mas podemos forçar se necessário: */
    /* background-color: #2AC8D3; 
       color: #fff; */
}

/* =========================================
   STEP 1: LOADING
   ========================================= */
.loading-wrapper {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
}

.gpv-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #2AC8D3;
    animation: gpv-spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes gpv-spin {
    to { transform: rotate(360deg); }
}

.loading-wrapper p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* =========================================
   STEP 2: GALERIA / RESULTADO
   ========================================= */
#gpv-gallery-block {
    margin-bottom: 20px;
}

/* Ajuste para o botão Add to Cart quando movido */
#gpv-add-to-cart-btn {
    width: 100%;
    margin-top: 15px;
    display: block;
}

/* Ajustes Intl Tel Input (se usado) */
.iti { width: 100%; }