/* Product Customizer Styles */

/* Reset e base */
* {
    box-sizing: border-box;
}

#product-customizer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Layout principal */
.customizer-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .customizer-layout {
        grid-template-columns: 1fr 350px;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .customizer-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #product-customizer-container {
        padding: 15px;
    }
}

/* Seção da imagem do produto */
.product-image-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.product-image-section:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.image-container {
    text-align: center;
}

#product-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

#product-image-wrapper:hover {
    transform: translateY(-5px);
}

#product-image {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

#clickable-areas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Áreas clicáveis */
.clickable-area {
    position: absolute;
    border: 2px solid transparent;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    backdrop-filter: blur(1px);
}

.clickable-area:hover {
    border-color: #007cba;
    background: rgba(0, 124, 186, 0.15);
    box-shadow: 0 0 20px rgba(0, 124, 186, 0.4);
    transform: scale(1.02);
}

.clickable-area.selected {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.25);
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.5);
    transform: scale(1.05);
}

.clickable-area::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clickable-area:hover::before,
.clickable-area.selected::before {
    opacity: 1;
}

/* Controles da imagem */
.image-controls {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Painel de personalização */
.customization-panel {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.panel-header {
    margin-bottom: 30px;
    text-align: center;
}

.panel-header h2 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #7f8c8d;
    margin: 0;
    font-size: 15px;
    font-weight: 400;
}

/* Seções do painel */
.color-selection-section,
.product-info-section,
.order-summary {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f8f9fa;
}

.color-selection-section:last-child,
.product-info-section:last-child,
.order-summary:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

h3 {
    margin: 0 0 20px 0;
    color: #34495e;
    font-size: 20px;
    font-weight: 600;
    position: relative;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
}

/* Paleta de cores */
.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.color-option {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 3px solid #ecf0f1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.color-option:hover {
    transform: scale(1.15) translateY(-2px);
    border-color: #bdc3c7;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: #3498db;
    transform: scale(1.2) translateY(-3px);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.3), 0 8px 25px rgba(0, 0, 0, 0.2);
}

.color-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.color-option.selected::after {
    opacity: 1;
}

/* Informações da área selecionada */
.selected-area-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.selected-area-info.active {
    border-color: #3498db;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafbfc;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* Resumo do pedido */
.order-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e9ecef !important;
    margin-bottom: 0 !important;
}

.order-summary h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

#customization-summary {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.customization-list {
    margin-bottom: 15px;
}

.customization-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.customization-item:hover {
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 6px;
    padding-left: 8px;
    padding-right: 8px;
}

.customization-item:last-child {
    border-bottom: none;
}

.area-name {
    font-weight: 600;
    color: #2c3e50;
}

.color-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
}

.color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.customer-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    line-height: 1.5;
}

.customer-info p {
    margin: 8px 0;
    color: #5a6c7d;
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    padding: 15px 0;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.price-value {
    color: #27ae60;
    font-size: 24px;
}

/* Botões */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e 0%, #0d6b5c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
    transform: scale(1.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.modal-actions .btn {
    flex: 1;
}

/* Animações */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Estados de loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsividade adicional */
@media (max-width: 480px) {
    .customization-panel {
        padding: 20px;
    }
    
    .panel-header h2 {
        font-size: 24px;
    }
    
    .color-palette {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 8px;
    }
    
    .color-option {
        width: 45px;
        height: 45px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .action-buttons {
        gap: 10px;
    }
}

/* Melhorias de acessibilidade */
.btn:focus,
.color-option:focus,
.clickable-area:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Transições suaves para mudanças de tema */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Efeitos hover para mobile */
@media (hover: none) {
    .clickable-area:hover,
    .color-option:hover,
    .btn:hover {
        transform: none;
    }
}

