/* Simulador de Personalização */

.simulator-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.simulator-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Controles */
.simulator-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 100px;
}

.control-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Seletor de Produto */
.product-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.product-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: #64748b;
}

.product-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.product-btn.active {
    background: #eff6ff;
    border-color: var(--primary);
    color: var(--primary);
}

.product-btn svg {
    color: currentColor;
}

/* Seletor de Cor */
.color-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.color-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

/* Seletor de Posição */
.position-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.position-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.position-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.position-btn.active {
    background: #eff6ff;
    border-color: var(--primary);
    color: var(--primary);
}

/* Área de Upload */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    background: #f8fafc;
}

.upload-area:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: #64748b;
}

.upload-label svg {
    color: var(--primary);
}

.upload-label span {
    font-weight: 600;
    color: #0f172a;
}

.upload-label small {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Controles de Arte */
.control-group {
    margin-bottom: 1.25rem;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #475569;
    font-size: 0.875rem;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-group span {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.control-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Preview */
.simulator-preview {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 100px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.preview-header h3 {
    font-size: 1.5rem;
    color: #0f172a;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem;
}

.view-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.view-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.preview-canvas {
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.product-mockup {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.product-base {
    width: 100%;
    position: relative;
}

.tshirt-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
    transition: all 0.3s;
}

/* Área de Arte */
.art-container {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: move;
    user-select: none;
    z-index: 10;
}

.art-container.dragging {
    cursor: grabbing;
}

#artImage {
    max-width: 200px;
    max-height: 200px;
    pointer-events: none;
    transition: all 0.1s;
}

.art-handles {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    pointer-events: none;
}

.handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: all;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.handle-nw {
    top: 0;
    left: 0;
    cursor: nw-resize;
}

.handle-ne {
    top: 0;
    right: 0;
    cursor: ne-resize;
}

.handle-sw {
    bottom: 0;
    left: 0;
    cursor: sw-resize;
}

.handle-se {
    bottom: 0;
    right: 0;
    cursor: se-resize;
}

.preview-info {
    margin-top: 2rem;
    text-align: center;
}

.preview-info p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Dicas */
.preview-tips {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #eff6ff;
    border-radius: 0.75rem;
    border-left: 4px solid var(--primary);
}

.preview-tips h4 {
    margin-bottom: 0.75rem;
    color: #0f172a;
}

.preview-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preview-tips li {
    padding: 0.5rem 0;
    color: #475569;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-tips li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    background: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
}

.info-card svg {
    color: var(--primary);
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #0f172a;
}

.info-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .simulator-grid {
        grid-template-columns: 1fr;
    }

    .simulator-controls {
        position: static;
    }

    .simulator-preview {
        position: static;
    }
}

@media (max-width: 768px) {
    .simulator-section {
        padding: 2rem 0;
    }

    .control-card {
        padding: 1rem;
    }

    .product-selector {
        grid-template-columns: 1fr;
    }

    .preview-canvas {
        min-height: 400px;
        padding: 1rem;
    }

    .product-mockup {
        max-width: 300px;
    }

    #artImage {
        max-width: 150px;
        max-height: 150px;
    }

    .view-controls {
        flex-direction: column;
        width: 100%;
    }

    .view-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animações */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.upload-area.uploading {
    animation: pulse 1.5s ease-in-out infinite;
}

.art-container.active {
    outline: 2px dashed var(--primary);
    outline-offset: 10px;
}