#ecc-container {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    font-family: 'Cairo', sans-serif;
    color: #2d3436;
}

.ecc-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 800;
}

.ecc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.ecc-card-item {
    cursor: pointer;
    border: 4px solid transparent;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #f8f9fa;
}

.ecc-card-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.ecc-card-item.selected {
    border-color: #d4af37;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
}

.ecc-card-item img {
    width: 100%;
    display: block;
    height: auto;
}

.ecc-preview-container {
    text-align: center;
    margin-bottom: 30px;
    background: #fdfdfd;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid #f1f1f1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    pointer-events: none; /* Prevent container from blocking clicks below it */
}

#ecc-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    pointer-events: auto; /* Re-enable for the canvas itself if needed */
}

.ecc-controls {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    position: relative !important;
    z-index: 9999 !important; /* Extremely high to beat any theme overlays */
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.ecc-option {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    position: relative !important;
    z-index: 10000 !important;
    pointer-events: auto !important;
}

.ecc-option label, 
.ecc-option input, 
.ecc-option select {
    cursor: pointer !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent !important;
}

.ecc-option input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 34px !important; /* Large touch target */
    height: 34px !important;
    background: #d4af37 !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    margin-top: -12px !important; 
    border: 4px solid #fff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    position: relative !important;
    z-index: 10001 !important;
}

.ecc-option input[type="color"] {
    min-height: 50px !important;
    display: block !important;
    border: 2px solid #edf2f7 !important;
}

.ecc-actions {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

#ecc-download-btn, 
#ecc-back-btn {
    flex: 1;
    padding: 15px;
    font-size: 18px;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
    font-family: 'Cairo', sans-serif;
    -webkit-appearance: none;
}

#ecc-download-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

#ecc-download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.3);
}

#ecc-back-btn {
    background: #f1f5f9;
    color: #475569;
}

#ecc-back-btn:hover {
    background: #e2e8f0;
}

@media (max-width: 768px) {
    .ecc-customization-options {
        grid-template-columns: 1fr;
    }
    .ecc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
