/* =========================================================
   ÜRÜN GÖRSEL OLUŞTURMA — FRONTEND (kompakt düzen)
========================================================= */

#mockup-creator-frontend {
    width: 100%;
}

/* GRID: ortalanmış, dar kolon */
.mockup-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* HER SEÇİCİ SATIRI = kompakt kart */
.mockup-preview-wrapper {
    width: 100%;
    border: 1px solid #e4e4e7;
    background: #fafafa;
    border-radius: 14px;
    padding: 12px 16px;
    box-sizing: border-box;
}

.mockup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

/* SOL: etiket + dropdown */
.mockup-left {
    flex: 1 1 auto;
    min-width: 0;
}

.mockup-left > label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}

/* SAĞ: küçük önizleme */
.mockup-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}

/* DROPDOWN + OK BUTONLARI */
.mockup-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.mockup-input-group select {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    padding: 11px 14px;
    border-radius: 9px;
    border: 1px solid #c9c9c9;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
    height: auto;
}

.frontend-nav-btn {
    background: #1e3a61;
    color: #fff;
    border-radius: 9px;
    padding: 8px 11px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}

.frontend-nav-btn:hover {
    background: #305789;
}

/* BÜYÜK ÖNİZLEME KUTUSU */
.mockup-preview-box {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

.preview-img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: auto !important;
}

.preview-placeholder {
    opacity: 0.5;
    font-size: 13px;
}

/* "ÜRÜN GÖRSELİ OLUŞTUR" BUTONU */
.generate-row {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.generate-btn {
    background: #d32238 !important;
    padding: 13px 30px;
    border-radius: 12px;
    font-size: 17px !important;
    color: #fff !important;
    border: none;
    cursor: pointer;
}

.generate-btn:hover {
    background: #a91026 !important;
}

/* ÖN İZLEME ALANI */
.frontend-preview-area {
    max-width: 100%;
    margin: 18px auto 0;
}

.frontend-preview-area h3 {
    text-align: center;
    margin: 0 0 10px;
    font-size: 18px;
}

#frontend-preview-container {
    width: 100% !important;
    padding: 18px !important;
    background: #f6f6f6;
    border: 1px solid #ececec;
    border-radius: 14px;
    box-sizing: border-box;
    text-align: center;
}

#frontend-preview-placeholder {
    opacity: 0.55;
    font-size: 14px;
}

#frontend-preview-image {
    max-width: 620px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ÇIKTI BUTONLARI (İndir / Link / Ürün Oluştur) */
.frontend-output-controls {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.frontend-output-controls .button,
.frontend-output-controls .frontend-action {
    padding: 11px 22px;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: 0.2s ease;
    font-weight: 600;
}

#frontend-download { background: #d32238 !important; color: #fff !important; }
#frontend-download:hover { background: #a91026 !important; }

#frontend-copy-link { background: #111 !important; color: #fff !important; }
#frontend-copy-link:hover { background: #000 !important; }

.frontend-action.success { background: #27ae60 !important; color: #fff !important; }
.frontend-action.success:hover { background: #2ecc71 !important; }

#frontend-create-product.loading {
    opacity: 0.6;
    pointer-events: none;
}
#frontend-create-product.loading::after {
    content: " ...";
    animation: dots 1s infinite;
}
@keyframes dots {
    0%   { content: " ..."; }
    33%  { content: " ....."; }
    66%  { content: " ......"; }
    100% { content: " ..."; }
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .mockup-row {
        flex-direction: column;
        align-items: stretch;
    }
    .mockup-right {
        justify-content: flex-start;
    }
}

/* --------------------------------------
   RESİMLİ ÖZEL DROPDOWN (sadece Ürün)
-------------------------------------- */
select.pig-dd-native {
    display: none !important;
}

.pig-dd {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    vertical-align: middle;
    font-size: 14px;
}

.pig-dd-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 9px;
    cursor: pointer;
}

.pig-dd-thumb {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 4px;
    background: #f1f1f1;
}

.pig-dd-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pig-dd-caret {
    flex: 0 0 auto;
    margin-left: 4px;
    color: #888;
}

.pig-dd-list {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    z-index: 9999;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 9px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
    display: none;
}

.pig-dd.open .pig-dd-list {
    display: block;
}

.pig-dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.pig-dd-item:hover {
    background: #eef3ff;
}
