

.loonari-configurator-section {
    background: #f8f9fa;
    padding: 60px 0;
    margin: 40px 0;
}

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

.loonari-configurator-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.loonari-configurator-header p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

.loonari-configurator-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}


.loonari-configurator-form {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.loonari-config-group {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.loonari-config-group:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
}

.loonari-group-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.loonari-group-header .required {
    color: #e74c3c;
    margin-left: 4px;
}

.loonari-group-description {
    color: #666;
    font-size: 0.95rem;
    margin: 0 0 20px 0;
}


.loonari-config-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.loonari-config-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.loonari-config-select:hover {
    border-color: #667eea;
}


.loonari-radio-group {
    display: grid;
    gap: 15px;
}

.loonari-radio-option {
    position: relative;
}

.loonari-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.loonari-radio-label {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.loonari-radio-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.loonari-radio-option input:checked + .loonari-radio-label {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.loonari-option-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.loonari-option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loonari-option-content {
    flex: 1;
}

.loonari-option-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.loonari-option-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.loonari-option-price {
    font-weight: 600;
    color: #27ae60;
}

.loonari-radio-option input:checked + .loonari-radio-label .loonari-option-price {
    color: #a8e6cf;
}


.loonari-checkbox-group {
    display: grid;
    gap: 12px;
}

.loonari-checkbox-option {
    position: relative;
}

.loonari-checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.loonari-checkbox-label {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.loonari-checkbox-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.loonari-checkbox-option input:checked + .loonari-checkbox-label {
    border-color: #667eea;
    background: #f8f9ff;
}

.loonari-checkbox-label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 15px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.loonari-checkbox-option input:checked + .loonari-checkbox-label::before {
    background: #667eea;
    border-color: #667eea;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
}


.loonari-color-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.loonari-color-option {
    position: relative;
}

.loonari-color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.loonari-color-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

.loonari-color-label:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.loonari-color-option input:checked + .loonari-color-label {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.loonari-color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background-size: cover;
    background-position: center;
}

.loonari-color-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.loonari-color-price {
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: 600;
}


.loonari-configurator-actions {
    display: flex;
    gap: 15px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.loonari-btn {
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.loonari-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
    justify-content: center;
}

.loonari-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.loonari-btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e8ed;
}

.loonari-btn-secondary:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.btn-price {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}


.loonari-configuration-summary {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.loonari-summary-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.loonari-summary-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.loonari-summary-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.loonari-summary-card h4:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}


.loonari-selected-options {
    margin-bottom: 25px;
}

.loonari-no-selection {
    text-align: center;
    color: #999;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.loonari-selected-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.loonari-selected-option:last-child {
    border-bottom: none;
}

.loonari-option-group {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.loonari-option-selection {
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
}

.loonari-option-price-change {
    font-size: 0.9rem;
    color: #27ae60;
    font-weight: 600;
}

.loonari-option-price-change.negative {
    color: #e74c3c;
}


.loonari-specification-table {
    margin-bottom: 25px;
}

.loonari-spec-grid {
    display: grid;
    gap: 12px;
}

.loonari-spec-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

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

.loonari-spec-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.loonari-spec-value {
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    text-align: right;
}

.loonari-spec-item.static .loonari-spec-label {
    color: #333;
}

.loonari-spec-item.dynamic .loonari-spec-label {
    color: #667eea;
}

.loonari-spec-item.dynamic .loonari-spec-value {
    color: #667eea;
    position: relative;
}

.loonari-spec-item.dynamic .loonari-spec-value::before {
    content: '●';
    margin-right: 6px;
    color: #27ae60;
}


.loonari-price-breakdown {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.loonari-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.95rem;
}

.loonari-price-item.base-price {
    color: #666;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e8ed;
    margin-bottom: 8px;
}

.loonari-price-item.total-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
    padding-top: 12px;
    border-top: 2px solid #667eea;
    margin-top: 8px;
}

.loonari-price-modifier {
    color: #27ae60;
    font-weight: 600;
}

.loonari-price-modifier.negative {
    color: #e74c3c;
}


.loonari-config-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.loonari-radio-option.excluded,
.loonari-checkbox-option.excluded,
.loonari-color-option.excluded {
    opacity: 0.3;
    pointer-events: none;
}

.loonari-radio-option.excluded .loonari-radio-label,
.loonari-checkbox-option.excluded .loonari-checkbox-label,
.loonari-color-option.excluded .loonari-color-label {
    background: #f5f5f5;
    border-color: #ddd;
    cursor: not-allowed;
}

/* Style dla ukrytych opcji - klasa excluded-option */
.loonari-option.excluded-option {
    display: none !important;
}

/* Ukryj wykluczone opcje w selectach */
select option.excluded-option {
    display: none !important;
}


.loonari-configurator-loading {
    position: relative;
}

.loonari-configurator-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 10;
    border-radius: inherit;
}

.loonari-configurator-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: loonari-spin 1s linear infinite;
    z-index: 11;
}

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


.loonari-spec-item.dynamic {
    animation: loonari-slide-in 0.3s ease;
}

@keyframes loonari-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.loonari-selected-option {
    animation: loonari-fade-in 0.3s ease;
}

@keyframes loonari-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.loonari-config-group.error .loonari-group-header h3 {
    color: #e74c3c;
}

.loonari-config-group.error .loonari-config-select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.loonari-error-message {
    background: #fdf2f2;
    color: #e74c3c;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 10px;
    border-left: 4px solid #e74c3c;
}


@media (max-width: 1200px) {
    .loonari-configurator-content {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }
}

@media (max-width: 968px) {
    .loonari-configurator-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .loonari-configuration-summary {
        position: static;
        order: -1;
    }
    
    .loonari-summary-card {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .loonari-configurator-section {
        padding: 40px 0;
    }
    
    .loonari-configurator-header h2 {
        font-size: 2rem;
    }
    
    .loonari-configurator-form {
        padding: 25px;
    }
    
    .loonari-config-group {
        margin-bottom: 30px;
    }
    
    .loonari-color-group {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .loonari-configurator-actions {
        flex-direction: column;
    }
    
    .loonari-btn {
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .loonari-configurator-header h2 {
        font-size: 1.8rem;
    }
    
    .loonari-configurator-form {
        padding: 20px;
    }
    
    .loonari-summary-card {
        padding: 20px;
    }
    
    .loonari-radio-label {
        padding: 15px;
    }
    
    .loonari-option-image {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    
    .loonari-color-group {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .loonari-color-swatch {
        width: 40px;
        height: 40px;
    }
    
    .loonari-spec-item {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: left;
    }
    
    .loonari-spec-value {
        text-align: left !important;
        font-weight: 500;
    }
}

.loonari-advanced-configurator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}


.loonari-config-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.loonari-config-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header-info h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.header-info p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}


.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 64px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(32px);
    background: #10b981;
}

.toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: white;
}


.loonari-config-content {
    background: white;
    min-height: 600px;
}


.config-tabs {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.tab-nav {
    display: flex;
    padding: 0 32px;
    gap: 4px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: none;
    border: none;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    color: #667eea;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.tab-btn .dashicons {
    font-size: 16px;
}


.tab-content {
    display: none;
    padding: 32px;
    min-height: 500px;
}

.tab-content.active {
    display: block;
}


.groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.groups-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}


.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    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 ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: #334155;
}

.btn-icon.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon.btn-danger:hover {
    background: #fecaca;
    color: #b91c1c;
}


.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: #fafbfc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon .dashicons {
    font-size: 36px;
    color: white;
}

.empty-state h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 24px 0;
}


.groups-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.group-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.group-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.group-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.group-drag-handle {
    cursor: move;
    color: #94a3b8;
    padding: 4px;
}

.group-drag-handle:hover {
    color: #64748b;
}

.group-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.group-type-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.group-type-badge.type-radio {
    background: #ddd6fe;
    color: #7c3aed;
}

.group-type-badge.type-select {
    background: #bfdbfe;
    color: #2563eb;
}

.group-type-badge.type-checkbox {
    background: #bbf7d0;
    color: #059669;
}

.group-type-badge.type-color {
    background: #fed7d7;
    color: #dc2626;
}

.group-type-badge.type-image {
    background: #fef3c7;
    color: #d97706;
}

.required-badge {
    padding: 2px 8px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.group-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


.group-card-content {
    padding: 24px;
}

.group-basic-settings {
    margin-bottom: 32px;
}


.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}


.price-input {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
}


.group-variations {
    margin-bottom: 32px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.group-variations h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.group-variations > p {
    color: #64748b;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.variation-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.variation-item:hover {
    border-color: #cbd5e1;
}

.variation-item.select-all {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.variation-item.select-all .variation-label {
    color: white;
}

.variation-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    color: #374151;
}

.variation-label input[type="checkbox"] {
    display: none;
}

.variation-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.variation-info img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.variation-details strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.variation-details span {
    font-size: 12px;
    color: #64748b;
}

.variation-item.select-all .variation-details span {
    color: rgba(255, 255, 255, 0.8);
}


.group-options {
    margin-top: 32px;
}

.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.options-header h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.empty-options {
    text-align: center;
    padding: 40px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    color: #64748b;
}


.options-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option-card {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.option-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.option-drag-handle {
    cursor: move;
    color: #94a3b8;
    margin-right: 12px;
}

.option-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.price-modifier {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.price-modifier.positive {
    background: #dcfce7;
    color: #16a34a;
}

.price-modifier.negative {
    background: #fee2e2;
    color: #dc2626;
}

.option-content {
    padding: 20px;
}


.image-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
}

.image-placeholder .dashicons {
    font-size: 32px;
    margin-bottom: 8px;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


.option-advanced {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.option-advanced h6 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
}


.dependencies-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dependency-selector select {
    width: 100%;
    height: 120px;
}

.help-text {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0 0 0;
}


.spec-changes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-change-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.add-spec-change {
    align-self: flex-start;
}


.specs-header {
    margin-bottom: 32px;
}

.specs-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.specs-header p {
    color: #64748b;
    margin: 0 0 20px 0;
}

.specs-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spec-row {
    display: grid;
    grid-template-columns: auto 1fr 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.spec-drag-handle {
    cursor: move;
    color: #94a3b8;
}

.spec-content {
    display: contents;
}

.spec-label,
.spec-value {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}


.preview-header {
    margin-bottom: 32px;
}

.preview-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.preview-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}


@media (max-width: 1200px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dependencies-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .loonari-config-header {
        padding: 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .groups-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .variations-grid {
        grid-template-columns: 1fr;
    }
    
    .group-card-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .option-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .spec-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .spec-drag-handle {
        display: none;
    }
}


.group-card.collapsed .group-card-content {
    display: none;
}

.group-toggle.collapsed {
    transform: rotate(180deg);
}


.sortable-ghost {
    opacity: 0.5;
}

.sortable-chosen {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}


.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
   
.loonari-configurator-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}


.loonari-config-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.loonari-config-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 100 100\'%3E%3Cdefs%3E%3Cpattern id=\'grain\' width=\'100\' height=\'100\' patternUnits=\'userSpaceOnUse\'%3E%3Ccircle cx=\'50\' cy=\'50\' r=\'1\' fill=\'%23ffffff\' opacity=\'0.1\'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width=\'100\' height=\'100\' fill=\'url(%23grain)\'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header-info h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-info p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}


.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 64px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(32px);
    background: #10b981;
}

.toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: white;
}


.no-variations-notice {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    margin: 20px;
}

.notice-icon {
    width: 60px;
    height: 60px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notice-icon .dashicons {
    color: white;
    font-size: 24px;
}

.notice-content h3 {
    margin: 0 0 12px 0;
    color: #92400e;
}

.notice-content p {
    margin: 0 0 8px 0;
    color: #a16207;
}

.notice-content ol {
    margin: 12px 0;
    padding-left: 20px;
    color: #a16207;
}


.variant-selector-container {
    padding: 32px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.variant-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.variant-selector-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.variant-actions {
    display: flex;
    gap: 12px;
}

.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.variant-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.variant-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.variant-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.variant-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 16px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.variant-image-placeholder {
    color: #94a3b8;
}

.variant-image-placeholder .dashicons {
    font-size: 32px;
}

.variant-info {
    text-align: center;
    margin-bottom: 16px;
}

.variant-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: inherit;
}

.variant-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.attribute-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.variant-card.active .attribute-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.variant-status {
    text-align: center;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-indicator.configured {
    background: #dcfce7;
    color: #16a34a;
}

.status-indicator.empty {
    background: #fee2e2;
    color: #dc2626;
}

.variant-card.active .status-indicator {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.variant-actions-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.variant-card:hover .variant-actions-overlay {
    opacity: 1;
}


.variant-config-container {
    background: white;
    min-height: 400px;
}

.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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


.config-tabs {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.tab-nav {
    display: flex;
    padding: 0 32px;
    gap: 4px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: none;
    border: none;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    color: #667eea;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.tab-counter {
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    min-width: 18px;
    text-align: center;
}

.tab-btn.active .tab-counter {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
    padding: 32px;
}

.tab-content.active {
    display: block;
}


.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    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 ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: #334155;
}

.btn-icon.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon.btn-danger:hover {
    background: #fecaca;
    color: #b91c1c;
}


.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: #fafbfc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon .dashicons {
    font-size: 36px;
    color: white;
}

.empty-state h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 24px 0;
}


.group-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.group-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}

.group-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.group-drag-handle {
    cursor: move;
    color: #94a3b8;
    padding: 4px;
}

.group-drag-handle:hover {
    color: #64748b;
}

.group-details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.group-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.group-type-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.group-type-badge.type-radio {
    background: #ddd6fe;
    color: #7c3aed;
}

.group-type-badge.type-select {
    background: #bfdbfe;
    color: #2563eb;
}

.group-type-badge.type-checkbox {
    background: #bbf7d0;
    color: #059669;
}

.group-type-badge.type-color {
    background: #fed7d7;
    color: #dc2626;
}

.group-type-badge.type-image {
    background: #fef3c7;
    color: #d97706;
}

.required-badge {
    padding: 2px 8px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.options-count {
    padding: 2px 8px;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.group-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.collapse-toggle {
    transition: transform 0.2s ease;
}

.collapse-toggle.collapsed {
    transform: rotate(180deg);
}


.group-card-content {
    padding: 24px;
}


.form-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.form-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}


.price-input {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
}


.option-card {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.option-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.option-card.collapsed .option-content {
    display: none;
}

.option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}

.option-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.option-drag-handle {
    cursor: move;
    color: #94a3b8;
}

.option-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #1e293b;
}

.price-modifier {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.price-modifier.positive {
    background: #dcfce7;
    color: #16a34a;
}

.price-modifier.negative {
    background: #fee2e2;
    color: #dc2626;
}

.option-actions {
    display: flex;
    gap: 8px;
}

.option-toggle {
    transition: transform 0.2s ease;
}

.option-card.collapsed .option-toggle {
    transform: rotate(-90deg);
}

.option-content {
    padding: 20px;
}


.image-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
}

.image-placeholder .dashicons {
    font-size: 32px;
    margin-bottom: 8px;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


.option-advanced {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.option-advanced h6 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
}

.advanced-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dependencies-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dependency-select {
    width: 100%;
    min-height: 80px;
}

.help-text {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0 0 0;
}


.spec-changes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-change-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}


.spec-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.spec-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.spec-drag-handle {
    cursor: move;
    color: #94a3b8;
}

.spec-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.spec-main-info {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
}

.spec-field input,
.spec-field select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.spec-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.spec-category-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.spec-category-badge.category-general {
    background: #f1f5f9;
    color: #475569;
}

.spec-category-badge.category-technical {
    background: #ddd6fe;
    color: #7c3aed;
}

.spec-category-badge.category-physical {
    background: #fef3c7;
    color: #d97706;
}

.spec-actions {
    display: flex;
    gap: 8px;
}


.preview-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.preview-title h3 {
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-title p {
    margin: 0;
    color: #64748b;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.preview-empty {
    text-align: center;
    padding: 80px 40px;
    color: #64748b;
}

.preview-content {
    padding: 24px;
}

.preview-product-info {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.product-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.no-image-placeholder .dashicons {
    font-size: 48px;
}

.product-details h4 {
    margin: 0 0 16px 0;
    font-size: 24px;
    color: #1e293b;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.base-price {
    color: #64748b;
    text-decoration: line-through;
}

.calculated-price {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}


@media (max-width: 1200px) {
    .form-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    
    .advanced-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .loonari-config-header {
        padding: 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .variant-selector-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .variants-grid {
        grid-template-columns: 1fr;
    }
    
    .group-card-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .option-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .spec-main-info {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .preview-product-info {
        flex-direction: column;
        text-align: center;
    }
    
    .product-image {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
}


.sortable-ghost {
    opacity: 0.5;
}

.sortable-chosen {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}


.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}