/* Product Preview Modal */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.preview-overlay.active {
    display: flex;
}

.preview-modal {
    background: #fff;
    border-radius: 6px;
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.preview-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
    margin-right: 16px;
}

.preview-modal-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-modal-title .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-modal-title .author-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(102, 102, 234, 0.25);
}

.preview-modal-title span {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s;
}

.preview-modal-title span:hover {
    color: #10b981;
}

/* Header Actions Buttons */
.btn-like-header,
.close-preview {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-like-header:hover,
.close-preview:hover {
    background: #e5e7eb;
    color: #111827;
}

.btn-like-header.active,
.btn-like-header.liked {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

.btn-like-header.active:hover,
.btn-like-header.liked:hover {
    background: #fecaca;
    color: #dc2626;
}

.btn-like-header.liked i {
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.35);
    }

    100% {
        transform: scale(1);
    }
}

.preview-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    flex: 1;
    overflow: hidden;
}

.preview-left-section {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    position: relative;
    overflow: hidden;
}

.preview-left-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../../images/arkaplan/lazer-desen-arka-plan.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.preview-left-section>* {
    position: relative;
    z-index: 1;
}

.preview-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-main {
    position: relative;
    aspect-ratio: 16/10;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.gallery-main img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
}

.gallery-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 14px;
    transition: all 0.2s;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-btn:hover {
    background: #10b981;
    color: #fff;
    transform: scale(1.1);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    border-color: #10b981;
}

.gallery-thumb.active {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.preview-description {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.preview-description p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

.preview-description .description-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.preview-description .description-text.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

.btn-read-more {
    background: none;
    border: none;
    color: #10b981;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-read-more:hover {
    color: #059669;
}

.btn-read-more i {
    transition: transform 0.3s;
}

.btn-read-more.expanded i {
    transform: rotate(180deg);
}

/* Modern Preview Info Panel */
.preview-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Fiyat ve Satış Üst Bölümü */
.preview-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-display .current-price {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
}

.price-display .old-price {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.sales-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(247, 147, 30, 0.3);
}

.sales-badge i {
    font-size: 10px;
}

/* Açıklama Kutusu */
.preview-desc-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.preview-desc-box .description-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #4b5563;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-desc-box .description-text.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

.preview-desc-box .btn-read-more {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0 0 0;
    display: none;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.preview-desc-box .btn-read-more:hover {
    color: #4f46e5;
}

/* İstatistikler Satırı */
.preview-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 0;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.stat-item i {
    font-size: 12px;
    color: #9ca3af;
}

.stat-item span {
    color: #374151;
    font-weight: 600;
}

.stat-divider {
    width: 1px;
    height: 16px;
    background: #e5e7eb;
}

/* Meta Bilgiler Satırı */
.preview-meta-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Kategori Link */
.category-link {
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.category-link:hover {
    color: #6366f1;
    text-decoration: underline;
}

.stat-category {
    cursor: pointer;
}

.stat-category:hover {
    color: #6366f1;
}

.stat-category:hover i {
    color: #6366f1;
}

.preview-meta-row .meta-label {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-badges span {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-tags span,
.meta-tags .keyword-tag {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.meta-tags span:hover,
.meta-tags .keyword-tag:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Aksiyon Butonları */
.preview-actions-fixed {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn-action-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-action-secondary {
    height: 48px;
    /* Fixed height for alignment */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 20px;
    /* Add horizontal padding */
    gap: 8px;
    /* Gap between icon and text */
    min-width: 100px;
}

.btn-action-secondary:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

/* Paylaşım Alanı */
.preview-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
}

.preview-share>span {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-2px);
}

.preview-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.author-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.author-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.author-info p {
    color: #6b7280;
    font-size: 13px;
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.btn-preview-action {
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    color: #374151;
}

.btn-preview-action:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.btn-preview-action.primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.btn-preview-action.primary:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

@media (max-width: 1024px) {
    .preview-modal {
        width: 95%;
        max-width: 900px;
    }

    .preview-content {
        grid-template-columns: 1fr;
    }

    .preview-left-section {
        padding: 24px;
        max-height: 50vh;
    }

    .preview-image {
        min-height: 250px;
    }

    .preview-image img {
        max-height: 400px;
    }

    .preview-info {
        padding: 24px;
        max-height: 50vh;
    }

    /* Missing lines from previous snippet added in media query */
    .preview-info h2 {
        font-size: 18px !important;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .author-info h3 {
        font-size: 14px !important;
    }

    .close-preview {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
        font-size: 16px;
        position: fixed;
    }

    .preview-actions {
        gap: 8px;
        position: sticky;
        bottom: 0;
        background: #fafafa;
        padding: 16px 0;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
        border-top: 1px solid #e5e7eb;
    }

    .btn-preview-action {
        padding: 12px 16px;
        font-size: 13px;
    }

    .preview-meta-list {
        gap: 12px;
        padding: 16px 0;
    }

    .meta-row {
        flex-wrap: wrap;
    }

    .meta-row .meta-label {
        font-size: 10px;
    }

    .meta-row .meta-value {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .preview-modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .preview-content {
        grid-template-columns: 1fr;
        max-height: 100vh;
        overflow-y: auto;
    }

    .preview-left-section {
        padding: 16px;
        max-height: none;
        overflow-y: visible;
    }

    .preview-image {
        min-height: 200px;
        padding: 12px;
    }

    .preview-image img {
        max-height: 300px;
    }

    .preview-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .preview-thumb {
        height: 50px;
    }

    .preview-info {
        padding: 16px;
        max-height: none;
        overflow-y: visible;
    }
}

/* New Product Info Section Styles (Matching Product Detail Page) */
.product-info-section {
    margin-bottom: 20px;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-item {
    padding: 0;
}

.info-label {
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-label i {
    font-size: 10px;
    color: #10b981;
}

.category-badge,
a.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ecfdf5;
    color: #059669;
    padding: 7px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    width: fit-content;
}

.category-badge:hover,
a.category-badge:hover {
    background: #10b981;
    color: #fff;
}

.format-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.format-badge,
.meta-badges span {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag,
.meta-tags span,
.meta-tags .keyword-tag {
    background: #f3f4f6;
    color: #6b7280;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.tag:hover,
.meta-tags span:hover,
.meta-tags .keyword-tag:hover {
    background: #e5e7eb;
    color: #374151;
}