/**
 * Virtual Try-On Styles
 */
 
/* Try-On Modal */
.tryon-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.tryon-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tryon-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

.tryon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.tryon-header h2 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.tryon-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.tryon-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Upload Section */
.tryon-upload {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
}

.upload-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.upload-btn, .camera-btn {
    padding: 15px 25px;
    border: 2px dashed #667eea;
    background: #f7f9fc;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-btn:hover, .camera-btn:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.camera-preview {
    display: none;
    position: relative;
    margin-top: 20px;
}

.camera-preview.active {
    display: block;
}

.camera-preview video {
    width: 100%;
    border-radius: 12px;
}

.capture-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.capture-btn:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Canvas Section */
.tryon-canvas-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: none;
}

.tryon-canvas-wrapper.active {
    display: block;
}

#tryonCanvas {
    max-width: 100%;
    border-radius: 12px;
    cursor: move;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Controls */
.tryon-controls {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    display: none;
}

.tryon-controls.active {
    display: block;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.control-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-reset, .btn-download {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reset {
    background: #f0f0f0;
    color: #333;
}

.btn-reset:hover {
    background: #e0e0e0;
}

.btn-download {
    background: #667eea;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-download:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tryon-container {
        padding: 20px;
        width: 95%;
    }
    
    .tryon-header h2 {
        font-size: 22px;
    }
    
    .upload-buttons {
        grid-template-columns: 1fr;
    }
}
