/* --- Designer Icon --- */
.ags-designer-icon {
    position: absolute;
    bottom: 8px;
    left: 48px;
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dnd-image-wrapper:hover .ags-designer-icon {
    opacity: 1;
}

.ags-designer-icon:hover {
    background-color: #0073aa;
}

.ags-designer-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* --- Lightbox Genel --- */
.ags-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.95);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.ags-lightbox-container {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    position: relative;
    max-width: 1200px;
    width: 100%;
    cursor: default;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.ags-lightbox-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 10;
}

.ags-lightbox-close:hover {
    color: #333;
}

/* --- Lightbox İçerik --- */
.ags-lightbox-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    flex-shrink: 0;
}

.ags-lightbox-header h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
}

.ags-lightbox-header p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.ags-mockup-grid {
    display: grid;
    /* DEĞİŞİKLİK: Masaüstü için varsayılan tekrar 3 sütun yapıldı. */
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 25px;
    overflow-y: auto;
    padding: 5px;
}

.ags-mockup-item {
    text-align: center;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
}

.ags-mockup-watermark {
    margin-bottom: 10px;
}

.ags-mockup-watermark p {
    font-weight: bold;
    margin: 0;
    font-size: 14px;
}

.ags-mockup-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 4px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.ags-mockup-bg,
.ags-user-design {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ags-user-design {
    box-sizing: border-box;
    /* Pozisyonlama artık inline style ile yapılıyor */
}


/* --- Renk Seçimi --- */
.ags-color-selector {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
    flex-shrink: 0;
}

.ags-color-selector p {
    text-align: center;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.ags-color-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.ags-color-swatches {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ags-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ags-color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #0073aa;
}

.ags-custom-color {
    position: relative;
    width: 34px;
    height: 34px;
}

#ags-color-picker {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    background: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#ags-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

#ags-color-picker::-webkit-color-swatch {
    border: 2px solid #ddd;
    border-radius: 50%;
}

#ags-color-picker::-moz-color-swatch {
    border: 2px solid #ddd;
    border-radius: 50%;
}

/* --- Responsive --- */
/* DEĞİŞİKLİK: 992px altında 2 sütuna düşürülüyor. */
@media (max-width: 992px) {
    .ags-mockup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ags-lightbox-container {
        padding: 15px;
    }

    .ags-mockup-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Mobil için 2 sütun */
    }

    .ags-color-controls {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .ags-designer-icon {
        opacity: 1;
    }
}

/* --- Custom Color Picker Icon --- */
.ags-custom-color {
    position: relative;
    width: 34px;
    height: 34px;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ags-custom-color:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #0073aa;
}

#ags-color-picker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* Hide the native color input */
    cursor: pointer;
}