/**
 * Qtees Catalog Builder Styles
 * File: assets/css/catalog-builder.css
 */

/* Main Container */
.qtees-catalog-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* Progress Bar */
.qtees-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

.qtees-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.qtees-progress-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.qtees-progress-step.active .qtees-progress-circle {
    background: #3b82f6;
    color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.qtees-progress-step.completed .qtees-progress-circle {
    background: #10b981;
    color: white;
}

.qtees-progress-step span {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.qtees-progress-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 10px;
    align-self: flex-start;
    margin-top: 25px;
}

/* Steps */
.qtees-step {
    display: none;
}

.qtees-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.qtees-step-header {
    text-align: center;
    margin-bottom: 40px;
}

.qtees-step-header h2 {
    font-size: 32px;
    color: #1f2937;
    margin-bottom: 10px;
    font-weight: 700;
}

.qtees-step-header p {
    font-size: 16px;
    color: #6b7280;
}

/* Step 1: Product Selection */
.qtees-search-filters {
    margin-bottom: 30px;
}

.qtees-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.qtees-search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.qtees-search-box input:focus {
    outline: none;
    border-color: #3b82f6;
}

.qtees-search-btn {
    padding: 12px 30px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.qtees-search-btn:hover {
    background: #2563eb;
}

.qtees-category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.qtees-category-filter label {
    font-weight: 600;
    color: #374151;
    margin-right: 10px;
}

.qtees-cat-btn {
    padding: 8px 20px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.qtees-cat-btn:hover {
    background: #e5e7eb;
}

.qtees-cat-btn.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.qtees-selected-count {
    padding: 15px;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qtees-selected-count span {
    font-size: 15px;
    color: #1e40af;
}

.qtees-selected-count strong {
    font-size: 18px;
    font-weight: 700;
}

.qtees-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.qtees-product-item {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: white;
}

.qtees-product-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.qtees-product-item.selected {
    border-color: #10b981;
    background: #f0fdf4;
}

.qtees-product-image {
    width: 100%;
    height: 180px;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qtees-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qtees-product-image .no-image {
    color: #9ca3af;
    font-size: 14px;
}

.qtees-product-info h4 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.4;
}

.qtees-product-sku {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 3px;
}

.qtees-product-category {
    font-size: 12px;
    color: #3b82f6;
    font-weight: 500;
}

.qtees-product-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qtees-product-item.selected .qtees-product-checkbox {
    background: #10b981;
    border-color: #10b981;
}

.qtees-product-item.selected .qtees-product-checkbox .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.qtees-loading,
.qtees-no-products,
.qtees-error {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* Step 2: Logo Upload */
.qtees-logo-upload-area {
    max-width: 600px;
    margin: 0 auto 40px;
}

.qtees-dropzone {
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: #fafafa;
}

.qtees-dropzone:hover,
.qtees-dropzone.dragover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.qtees-dropzone .dashicons {
    font-size: 60px;
    color: #9ca3af;
    margin-bottom: 15px;
}

.qtees-dropzone p {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 20px;
}

.qtees-btn-browse {
    padding: 12px 30px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.qtees-btn-browse:hover {
    background: #2563eb;
}

.qtees-logo-preview {
    text-align: center;
    padding: 30px;
}

.qtees-logo-preview img {
    max-width: 300px;
    max-height: 200px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qtees-btn-remove-logo {
    padding: 10px 25px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.qtees-btn-remove-logo:hover {
    background: #dc2626;
}

/* Step 3: Theme Colors */
.qtees-theme-colors {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.qtees-color-option {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.qtees-color-option:hover {
    transform: scale(1.1);
}

.qtees-color-option.selected .qtees-color-circle {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
    transform: scale(1.15);
}

.qtees-color-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 10px;
    transition: all 0.3s;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qtees-color-option span {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

/* Step 4: Contact Form */
.qtees-contact-form {
    max-width: 600px;
    margin: 0 auto 40px;
}

.qtees-form-row {
    margin-bottom: 20px;
}

.qtees-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.qtees-form-row input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.qtees-form-row input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Step 5: Thank You */
.qtees-success-message {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.qtees-success-icon {
    width: 100px;
    height: 100px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.qtees-success-icon .dashicons {
    font-size: 60px;
    color: white;
}

.qtees-success-message h3 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 15px;
}

.qtees-success-message p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 30px;
}

.qtees-download-section {
    margin-bottom: 30px;
}

.qtees-btn-download {
    display: inline-block;
    padding: 15px 40px;
    background: #10b981;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
}

.qtees-btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.qtees-create-another {
    margin-top: 20px;
}

/* Navigation Buttons */
.qtees-step-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.qtees-btn {
    padding: 14px 35px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.qtees-btn-next,
.qtees-btn-generate {
    background: #3b82f6;
    color: white;
}

.qtees-btn-next:hover,
.qtees-btn-generate:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.qtees-btn-prev {
    background: #f3f4f6;
    color: #374151;
}

.qtees-btn-prev:hover {
    background: #e5e7eb;
}

.qtees-btn-secondary {
    background: #6b7280;
    color: white;
}

.qtees-btn-secondary:hover {
    background: #4b5563;
}

/* Loading Overlay */
#qtees-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.qtees-loader {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.qtees-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.qtees-loader p {
    font-size: 16px;
    color: #374151;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .qtees-catalog-wrapper {
        padding: 20px;
        margin: 20px;
    }
    
    .qtees-progress-bar {
        overflow-x: auto;
    }
    
    .qtees-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .qtees-step-header h2 {
        font-size: 24px;
    }
    
    .qtees-theme-colors {
        gap: 20px;
    }
    
    .qtees-color-circle {
        width: 60px;
        height: 60px;
    }
}