/**
 * Kategori ve Görsel Yönetimi CSS
 */

/* Ürün Detay Sayfası Görsel Galerisi */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.main-image img:hover {
    transform: scale(1.03);
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail.active {
    border-color: #ff4747;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ürün Kategorileri */
.product-category {
    margin-bottom: 10px;
    font-size: 14px;
}

.product-category span {
    font-weight: 600;
    color: #666;
}

.product-category a {
    color: #ff4747;
    text-decoration: none;
    transition: color 0.2s;
}

.product-category a:hover {
    color: #e03131;
    text-decoration: underline;
}

/* Admin Kategori Yönetimi */
.category-management {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0;
}

.category-form-container {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-list-container {
    flex: 2;
    min-width: 400px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-form h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary {
    background: #ff4747;
    color: white;
}

.btn-primary:hover {
    background: #e03131;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.category-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-tree li {
    margin-bottom: 5px;
}

.category-tree .level-0 {
    font-weight: 600;
}

.category-tree .level-1 {
    margin-left: 20px;
}

.category-tree .level-2 {
    margin-left: 40px;
}

.category-tree .level-3 {
    margin-left: 60px;
}

.category-actions {
    display: inline-block;
    margin-left: 10px;
}

.category-actions a {
    color: #666;
    margin-left: 5px;
    font-size: 14px;
    text-decoration: none;
}

.category-actions a:hover {
    color: #ff4747;
}

/* Admin Filigran Yönetimi */
.watermark-management {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0;
}

.watermark-form-container {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.watermark-preview-container {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watermark-image {
    position: absolute;
    max-width: 50%;
    max-height: 50%;
}

.position-top-left .watermark-image {
    top: 10px;
    left: 10px;
}

.position-top-center .watermark-image {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.position-top-right .watermark-image {
    top: 10px;
    right: 10px;
}

.position-center-left .watermark-image {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.position-center .watermark-image {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.position-center-right .watermark-image {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.position-bottom-left .watermark-image {
    bottom: 10px;
    left: 10px;
}

.position-bottom-center .watermark-image {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.position-bottom-right .watermark-image {
    bottom: 10px;
    right: 10px;
}

/* Admin Çoklu Görsel Yönetimi */
.product-images-management {
    margin: 20px 0;
}

.drop-zone {
    width: 100%;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 20px;
}

.drop-zone:hover, .drop-zone.highlight {
    border-color: #ff4747;
}

.drop-zone-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.drop-zone-button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.drop-zone-button:hover {
    background: #eee;
}

.product-images-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: move;
}

.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: space-between;
    padding: 5px;
}

.image-actions button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 12px;
    padding: 3px 6px;
}

.image-actions button:hover {
    color: #ff4747;
}

.main-image-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4747;
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 3px;
}

.upload-status {
    padding: 10px;
    margin: 10px 0;
    background: #f8f9fa;
    border-left: 3px solid #17a2b8;
    color: #333;
}

.upload-status.error {
    border-left-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}