/* Frontend Configurator Styles - Klinker Tuğla Teması */

:root {
    --klinker-primary: #D84315;
    --klinker-primary-dark: #BF360C;
    --klinker-primary-light: #FF6E40;
    --klinker-secondary: #FF9800;
    --klinker-secondary-light: #FFB74D;
    --klinker-accent: #795548;
    --klinker-bg-light: #FFF3E0;
    --klinker-border: #EFEBE9;
    --klinker-text: #3E2723;
    --klinker-text-light: #6D4C41;
}

.klinker-configurator-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.klinker-configurator {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 30px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(216, 67, 21, 0.12);
    border: 2px solid var(--klinker-border);
}

/* Options Panel */
.klinker-options-panel {
    background: linear-gradient(to bottom, var(--klinker-bg-light) 0%, #FFF8E1 100%);
    padding: 35px;
    overflow-y: auto;
    max-height: 900px;
}

.klinker-options-panel::-webkit-scrollbar {
    width: 8px;
}

.klinker-options-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.klinker-options-panel::-webkit-scrollbar-thumb {
    background: var(--klinker-primary);
    border-radius: 10px;
}

.klinker-panel-title {
    margin: 0 0 35px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--klinker-text);
    padding-bottom: 18px;
    border-bottom: 3px solid var(--klinker-primary);
    background: linear-gradient(135deg, var(--klinker-primary) 0%, var(--klinker-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Step */
.klinker-step {
    margin-bottom: 35px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.klinker-step-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px 0;
    font-size: 19px;
    font-weight: 600;
    color: var(--klinker-text);
}

.step-number {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--klinker-primary) 0%, var(--klinker-secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(216, 67, 21, 0.3);
}

/* Option Cards */
.klinker-brick-types,
.klinker-brick-colors,
.klinker-building-templates {
    display: grid;
    gap: 16px;
}

.klinker-option-card,
.klinker-building-card {
    background: white;
    border: 2px solid var(--klinker-border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.klinker-option-card::before,
.klinker-building-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--klinker-primary) 0%, var(--klinker-secondary) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.klinker-option-card:hover,
.klinker-building-card:hover {
    border-color: var(--klinker-primary);
    box-shadow: 0 6px 20px rgba(216, 67, 21, 0.15);
    transform: translateY(-3px);
}

.klinker-option-card:hover::before,
.klinker-building-card:hover::before {
    transform: scaleX(1);
}

.klinker-option-card.selected,
.klinker-building-card.selected {
    border-color: var(--klinker-primary);
    background: linear-gradient(135deg, rgba(216, 67, 21, 0.08) 0%, rgba(255, 152, 0, 0.08) 100%);
    box-shadow: 0 6px 20px rgba(216, 67, 21, 0.2);
}

.klinker-option-card.selected::before,
.klinker-building-card.selected::before {
    transform: scaleX(1);
}

.klinker-option-card img,
.klinker-building-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--klinker-border);
}

.klinker-option-card h4,
.klinker-building-card h4 {
    margin: 0 0 10px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--klinker-text);
}

.klinker-option-card p {
    margin: 0;
    font-size: 13px;
    color: var(--klinker-text-light);
    line-height: 1.5;
}

/* Color Card */
.klinker-color-card {
    background: white;
    border: 2px solid var(--klinker-border);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.klinker-color-card:hover {
    border-color: var(--klinker-primary);
    box-shadow: 0 4px 16px rgba(216, 67, 21, 0.15);
    transform: translateX(4px);
}

.klinker-color-card.selected {
    border-color: var(--klinker-primary);
    background: linear-gradient(135deg, rgba(216, 67, 21, 0.08) 0%, rgba(255, 152, 0, 0.08) 100%);
    box-shadow: 0 4px 16px rgba(216, 67, 21, 0.2);
}

.color-swatch {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    border: 2px solid var(--klinker-border);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--klinker-text);
}

.color-texture {
    width: 100%;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid var(--klinker-border);
}

/* Preview Panel */
.klinker-preview-panel {
    padding: 35px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
}

.klinker-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--klinker-bg-light);
}

.klinker-preview-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--klinker-text);
}

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

.klinker-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: 2px solid var(--klinker-primary);
    border-radius: 8px;
    background: white;
    color: var(--klinker-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.klinker-btn:hover {
    background: linear-gradient(135deg, var(--klinker-primary) 0%, var(--klinker-secondary) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(216, 67, 21, 0.3);
}

.klinker-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.klinker-preview-container {
    position: relative;
    background: linear-gradient(135deg, var(--klinker-bg-light) 0%, #FFF8E1 100%);
    border-radius: 12px;
    overflow: hidden;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--klinker-border);
}

.klinker-preview-placeholder {
    text-align: center;
    color: var(--klinker-text-light);
    padding: 50px;
}

.klinker-preview-placeholder .dashicons {
    font-size: 90px;
    width: 90px;
    height: 90px;
    opacity: 0.2;
    margin-bottom: 25px;
    color: var(--klinker-primary);
}

.klinker-preview-placeholder p {
    font-size: 17px;
    margin: 0;
    font-weight: 500;
}

#klinker-preview-canvas {
    display: none;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

#klinker-preview-canvas.active {
    display: block;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Selection Summary */
.klinker-selection-summary {
    background: white;
    border: 2px solid var(--klinker-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.klinker-selection-summary h4 {
    margin: 0 0 18px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--klinker-text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--klinker-bg-light);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--klinker-border);
    transition: all 0.2s ease;
}

.summary-item:hover {
    background: var(--klinker-bg-light);
    margin: 0 -12px;
    padding: 12px;
    border-radius: 6px;
}

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

.summary-item strong {
    color: var(--klinker-text-light);
    font-size: 14px;
    font-weight: 500;
}

.summary-item span {
    color: var(--klinker-primary);
    font-size: 14px;
    font-weight: 600;
}

/* Empty Message */
.klinker-empty-message {
    text-align: center;
    color: var(--klinker-text-light);
    padding: 35px;
    font-style: italic;
    background: var(--klinker-bg-light);
    border-radius: 8px;
}

/* Dark Theme */
.klinker-configurator-wrapper[data-theme="dark"] {
    background: #1a1a1a;
}

.klinker-configurator-wrapper[data-theme="dark"] .klinker-configurator {
    background: #2a2a2a;
    border-color: #444;
}

.klinker-configurator-wrapper[data-theme="dark"] .klinker-options-panel {
    background: linear-gradient(to bottom, #1f1f1f 0%, #252525 100%);
}

.klinker-configurator-wrapper[data-theme="dark"] .klinker-panel-title,
.klinker-configurator-wrapper[data-theme="dark"] .klinker-step-title {
    color: #fff;
}

.klinker-configurator-wrapper[data-theme="dark"] .klinker-option-card,
.klinker-configurator-wrapper[data-theme="dark"] .klinker-building-card,
.klinker-configurator-wrapper[data-theme="dark"] .klinker-color-card {
    background: #333;
    border-color: #444;
}

.klinker-configurator-wrapper[data-theme="dark"] .klinker-option-card h4,
.klinker-configurator-wrapper[data-theme="dark"] .klinker-building-card h4,
.klinker-configurator-wrapper[data-theme="dark"] .color-info h4 {
    color: #fff;
}

.klinker-configurator-wrapper[data-theme="dark"] .klinker-preview-panel {
    background: #2a2a2a;
}

/* Loading Animation */
.klinker-loading {
    position: relative;
}

.klinker-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--klinker-bg-light);
    border-top-color: var(--klinker-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .klinker-configurator {
        grid-template-columns: 1fr;
    }
    
    .klinker-options-panel {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .klinker-configurator-wrapper {
        padding: 25px 15px;
    }
    
    .klinker-options-panel,
    .klinker-preview-panel {
        padding: 25px;
    }
    
    .klinker-panel-title {
        font-size: 24px;
    }
    
    .klinker-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .klinker-preview-controls {
        width: 100%;
    }
    
    .klinker-btn {
        flex: 1;
        justify-content: center;
    }
}
