/* Modern Product Detail Page Styles */
.product-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 10px;
    background: #fff;

}

.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.product-gallery {
    flex: 0 0 800px;
    /* Fixed width, no grow, no shrink */
    min-width: 500px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image {
    width: 100%;
    max-width: 800px;
    height: 550px;
    /* Capped height */
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 24px;
    cursor: pointer;
    position: relative;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.thumbnail-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.thumbnail {
    width: 64px;
    height: 64px;
    background: #f8f9fa;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
    position: relative;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail.active {
    border-color: #0d6efd;
}

.product-infox {

    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-infox h3 {
    font-size: 16px;
    font-weight: 500;
}

.product-info h1 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #212529;
    line-height: 1.2;
}

.product-brand {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 4px;
}

.product-category {
    display: inline-block;
    background: #e9ecef;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 8px;
    text-decoration: none;
}

.product-price {
    margin: 8px 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.price-current {
    font-size: 2rem;
    font-weight: 700;
    color: #0d6efd;
}

.price-original {
    font-size: 17px;
    color: #adb5bd;
    text-decoration: line-through;
}

.discount-badge {
    display: none !important;
}

.product-stock {
    font-size: 1rem;
    margin-bottom: 8px;
}

.in-stock {
    color: #198754;
    font-weight: 600;
}

.out-stock {
    color: #dc3545;
    font-weight: 600;
}

.product-description {
    margin: 8px 0;
    line-height: 1.6;
    color: #495057;
    font-size: 13px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 45px;
    border: none;
    background: #f8f9fa;
    color: #495057;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e9ecef;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.btn {
    flex: 1;
    padding: 14px 0;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: #0d6efd;
    color: #fff;
}

.btn-primary:hover {
    background: #0b5ed7;
}

.btn-favorite {
    flex: 0 0 auto;
    width: 48px;
    padding: 0;
    background: #f8f9fa;
    color: #dc3545;
}

.btn-favorite.active {
    background: #dc3545;
    color: #fff;
}

/* Amazon Style Product Lightbox */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.image-lightbox.active {
    display: flex;
    opacity: 1;
}

.image-lightbox.closing {
    opacity: 0;
}

/* Main Modal Container */
.lightbox-modal {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Modal Header */
.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    gap: 20px;
}

.lightbox-header-left {
    display: flex;
    gap: 12px;
}

.lightbox-zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: 1px solid #d5d5d5;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.lightbox-zoom-btn:hover {
    background: #e8e8e8;
    border-color: #bbb;
}

.lightbox-zoom-btn.active {
    background: #232f3e;
    border-color: #232f3e;
    color: #fff;
}

.lightbox-product-info {
    flex: 1;
    min-width: 0;
}

.lightbox-product-title {
    font-size: 0.95rem;
    font-weight: 400;
    color: #0066c0;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lightbox-product-size {
    font-size: 0.85rem;
    color: #565959;
}

.lightbox-thumbnails-top {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lightbox-thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
    background: #fff;
    flex-shrink: 0;
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-thumb:hover {
    border-color: #e77600;
}

.lightbox-thumb.active {
    border-color: #e77600;
    box-shadow: 0 0 0 1px #e77600;
}

.lightbox-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #555;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 10px;
}

.lightbox-close:hover {
    color: #000;
}

/* Modal Body - Image Area */
.lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    min-height: 400px;
    overflow: hidden;
    background: #fff;
}

.lightbox-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-height: 60vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
}

.lightbox-image.zoomed {
    cursor: zoom-out;
    transform: scale(2);
}

.lightbox-image.loading {
    opacity: 0.5;
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    left: 15px;
    right: 15px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.lightbox-nav button {
    width: 44px;
    height: 44px;
    border: 1px solid #d5d5d5;
    background: #fff;
    color: #555;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.lightbox-nav button:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.lightbox-nav button:active {
    transform: scale(0.95);
}

.lightbox-nav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Counter */
.lightbox-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Hide old elements */
.lightbox-info,
.zoom-hint,
.swipe-indicator,
.lightbox-thumbnails {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lightbox-modal {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .lightbox-header {
        flex-wrap: wrap;
        padding: 12px 15px;
        gap: 12px;
    }

    .lightbox-header-left {
        order: 1;
    }

    .lightbox-product-info {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    .lightbox-thumbnails-top {
        order: 2;
        flex: 1;
        justify-content: flex-end;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .lightbox-close {
        order: 2;
    }

    .lightbox-thumb {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .lightbox-body {
        padding: 20px 15px;
        min-height: 300px;
    }

    .lightbox-image {
        max-height: 50vh;
    }

    .lightbox-image-wrapper {
        max-height: 50vh;
    }

    .lightbox-nav button {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .lightbox-product-title {
        font-size: 0.9rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .lightbox-nav button:hover {
        background: #fff;
        border-color: #d5d5d5;
    }

    .lightbox-thumb:hover {
        border-color: transparent;
    }

    .lightbox-thumb.active:hover {
        border-color: #e77600;
    }
}

.related-section {
    margin-top: 48px;
}

.related-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.related-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.product-card {
    text-decoration: none;
    color: inherit;
    display: block;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 0px;
    transition: transform 0.2s;
    max-width: 220px;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-card-image {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1/1;
    margin-bottom: 12px;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.product-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d6efd;
}

@media (max-width: 900px) {
    .product-container {
        flex-direction: column;
        gap: 32px;
    }

    .product-gallery {
        flex: 0 0 auto;
        /* Auto width on mobile */
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .product-info {
        min-width: 0;
        width: 100%;
    }

    .main-image {
        max-width: 100%;
    }
}

/* Tahmini Kargo Teslimi - Kompakt */
.estimated-delivery-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 12px !important;
    color: #166534;
}

.estimated-delivery-box i.fa-truck {
    color: #22c55e;
    font-size: 14px;
}

.estimated-delivery-box strong {
    color: #15803d;
    font-weight: 600;
}

.estimated-delivery-box .fast-badge {
    background: #f97316;
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
}

.estimated-delivery-box .fast-badge i {
    font-size: 10px;
}

/* =========================================
   Product Detail Badges (Vitrin Seçenekleri)
   ========================================= */
.product-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.product-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Yeni Badge */
.badge-new {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.badge-new svg {
    stroke: #2e7d32;
}

/* Öne Çıkan Badge */
.badge-featured {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    border: 1px solid #ffcc80;
}

.badge-featured svg {
    fill: #e65100;
}

/* İndirim Badge */
.badge-sale {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.badge-sale svg {
    stroke: #c62828;
}

/* Ücretsiz Kargo Badge */
.badge-free-cargo {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    border: 1px solid #90caf9;
}

.badge-free-cargo svg {
    stroke: #1565c0;
}

/* Hızlı Teslimat Badge */
.badge-fast-delivery {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.badge-fast-delivery svg {
    stroke: #7b1fa2;
}

/* Çok Satan Badge */
.badge-bestseller {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #ff8f00;
    border: 1px solid #ffd54f;
}

.badge-bestseller svg {
    fill: #ff8f00;
}

/* Mobile */
@media (max-width: 480px) {
    .estimated-delivery-box {
        font-size: 12px;
        padding: 8px 12px;
        flex-wrap: wrap;
    }
}