/* ============================================
   Try-On Page Specific Styles
   ============================================ */

.tryon-page {
    min-height: 100vh;
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 60px;
    background: var(--gradient-hero);
}

.tryon-header {
    text-align: center;
    margin-bottom: 50px;
}

.tryon-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.tryon-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Steps Interface */
.tryon-interface {
    display: grid;
    gap: 30px;
    margin-bottom: 60px;
}

.tryon-step {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.tryon-step:hover {
    box-shadow: var(--shadow-lg);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed var(--border);
    border-radius: var(--radius);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(255, 107, 157, 0.05);
}

.upload-content {
    text-align: center;
    padding: 40px;
}

.upload-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.7;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.upload-preview {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.remove-photo {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.remove-photo:hover {
    transform: scale(1.1);
}

/* Clothing Grid */
.clothing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.clothing-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid transparent;
    position: relative;
}

.clothing-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.clothing-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

.clothing-item.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.clothing-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.clothing-item-info {
    padding: 12px;
    text-align: center;
}

.clothing-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clothing-item-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

/* Result Zone */
.result-zone {
    min-height: 350px;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.result-placeholder,
.result-loading {
    text-align: center;
    padding: 60px 20px;
}

.result-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.5;
}

.result-placeholder p,
.result-loading p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Loading Spinner */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    margin-top: 10px;
}

/* Result Output */
.result-output {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.result-output img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Generate Button */
.btn-generate {
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
}

.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

/* Info Cards */
.tryon-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    border: 1px solid var(--border);
}

.info-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer Mini */
.footer-mini {
    background: var(--bg-secondary);
    padding: 25px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .tryon-title {
        font-size: 2rem;
    }

    .tryon-info {
        grid-template-columns: 1fr;
    }

    .clothing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-actions {
        flex-direction: column;
        width: 100%;
    }

    .result-actions .btn {
        width: 100%;
    }
}