/**
 * WooCommerce Product Editor CSS
 * File: assets/css/product-editor.css
 */

/* Reset és alap stílusok */
.product-editor-container * {
    box-sizing: border-box;
}

.product-editor-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.product-editor-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.product-editor-container > * {
    position: relative;
    z-index: 1;
}

/* Header */
.editor-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.editor-header h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.editor-header p {
    color: #7f8c8d;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Toolbar 
.editor-toolbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.3);
}*/

.toolbar-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.editor-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.editor-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;
}

.editor-btn:hover::before {
    left: 100%;
}

.editor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.editor-btn:active {
    transform: translateY(0);
}

.editor-btn.secondary {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(168, 237, 234, 0.4);
}

.editor-btn.danger {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
}

/* Main Grid */
.editor-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Canvas Section */
.canvas-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
}

/* View Switcher */
.view-switcher {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.5);
    padding: 8px;
    border-radius: 50px;
    display: inline-flex;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.view-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    color: #7f8c8d;
    position: relative;
}

.view-btn.active {
    background: white;
    color: #2c3e50;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: scale(1.05);
}

.view-btn:not(.active):hover {
    color: #3498db;
    transform: translateY(-1px);
}

/* Product Canvas */
.product-canvas-container {
    position: relative;
    display: inline-block;
    margin: 30px 0;
    
}

.product-image {
    max-width: 450px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.product-canvas-container:hover .product-image {
    transform: scale(1.02);
}

.design-canvas {
    position: absolute;
    border: 2px solid #3498db;
    border-radius: 8px;
    background: rgba(255,255,255,0.95);
    z-index: 10;
    transition: all 0.3s ease;

}

.design-canvas:hover {
    border-color: #2980b9;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

/* Configuration Sections */
.config-section {
    background: rgba(255, 255, 255,0.06);
    backdrop-filter: blur(1px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.config-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.15);
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(0%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Color Palette */
.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 10px;
}

.color-option {
    width: 55px;
    height: 55px;
    border: 4px solid #ecf0f1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.color-option::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-option:hover::before,
.color-option.active::before {
    opacity: 1;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.color-option.active {
    transform: scale(1.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Size Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.size-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 15px;
    background: rgba(255,255,255,0.5);
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.size-option:hover {
    background: rgba(255,255,255,0.8);
    border-color: #3498db;
    transform: translateY(-2px);
}

.size-label {
    font-weight: 700;
    color: #2c3e50;
    font-size: 18px;
    letter-spacing: 1px;
}

.size-input {
    width: 70px;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.size-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: scale(1.05);
}

.size-input.has-value {
    background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
    border-color: #27ae60;
    color: #27ae60;
}

/* Price Display */
.price-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.price-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.price-amount {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: relative;
}

.price-breakdown {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
}

/* Add to Cart Button */
.add-to-cart-custom {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 20px 30px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    position: relative;
    overflow: hidden;
}

.add-to-cart-custom::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;
}

.add-to-cart-custom:hover::before {
    left: 100%;
}

.add-to-cart-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.5);
}

.add-to-cart-custom:active {
    transform: translateY(-1px);
}

/* Text Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.show {
    display: flex;
    opacity: 1;
}

.text-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: none;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 1000;
    min-width: 450px;
    max-width: 90vw;
    display: none;
}

.text-popup.show {
    display: block;
    animation: popupIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupIn {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.7) rotateY(15deg);
    }
    100% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
    }
}

.text-popup h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
}

.popup-row {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
}

.popup-row label {
    min-width: 90px;
    font-weight: 600;
    color: #2c3e50;
}

.popup-row input, 
.popup-row select {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.popup-row input:focus, 
.popup-row select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.popup-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: flex-end;
}

/* Animations */
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.config-section {
    animation: fadeInUp 0.6s ease forwards;
}

.config-section:nth-child(2) { animation-delay: 0.1s; }
.config-section:nth-child(3) { animation-delay: 0.2s; }

/* Responsive Design */
@media (max-width: 768px) {
    .product-editor-container {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .editor-header h3 {
        font-size: 24px;
    }
    
    .editor-toolbar {
        padding: 15px;
        gap: 8px;
    }
    
    .editor-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .canvas-section {
        padding: 25px 15px;
    }
    
    .product-image {
        max-width: 320px;
    }
    
    .design-canvas {
        width: 200px !important;
        height: 200px !important;
    }
    
    .size-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .color-palette {
        gap: 10px;
    }
    
    .color-option {
        width: 45px;
        height: 45px;
    }
    
    .text-popup {
        min-width: 300px;
        padding: 30px 20px;
        margin: 20px;
    }
    
    .popup-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .popup-row label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .size-grid {
        grid-template-columns: 1fr;
    }
    
    .view-switcher {
        flex-direction: column;
        gap: 5px;
    }
    
    .editor-toolbar {
        flex-direction: column;
    }
}