﻿/* ===== ÜRÜN DETAY SAYFASI ===== */
.product-detail-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 15px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ANA İÇERİK ALANI ===== */
.product-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
    background: var(--neutral-white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
}

@media (min-width: 992px) {
    .product-content {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        padding: 40px;
        margin-bottom: 80px;
    }
}

/* ===== GALERİ BÖLÜMÜ ===== */
.product-gallery {
    position: relative;
    height: fit-content;
}

@media (min-width: 992px) {
    .product-gallery {
        position: sticky;
        top: 20px;
    }
}

/* Ana Görsel */
.main-image-container {
    position: relative;
    background: var(--neutral-light);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    transition: all 0.3s ease;
}

    .main-image-container:hover {
        box-shadow: var(--shadow-lg);
    }

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.main-image-container:hover .main-image {
    transform: scale(1.05);
}

/* Thumbnail Slider */
.thumb-slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-soft) var(--neutral-light);
    -webkit-overflow-scrolling: touch;
}

    .thumb-slider::-webkit-scrollbar {
        height: 4px;
    }

    .thumb-slider::-webkit-scrollbar-track {
        background: var(--neutral-light);
        border-radius: 3px;
    }

    .thumb-slider::-webkit-scrollbar-thumb {
        background: var(--primary-soft);
        border-radius: 3px;
    }

.thumb-item {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0.7;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .thumb-item {
        width: 80px;
        height: 80px;
    }
}

.thumb-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.thumb-item.active {
    opacity: 1;
    border-color: var(--primary-main);
    box-shadow: 0 0 0 3px rgba(124, 92, 196, 0.2);
}

/* ===== ÜRÜN BİLGİLERİ ===== */
.product-info {
    padding-top: 0;
}

/* Başlık */
.detail-product-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: var(--neutral-black);
    margin-bottom: 10px;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .detail-product-title {
        font-size: 2rem;
        margin-bottom: 12px;
    }
}

/* Meta Bilgi */
.product-meta {
    color: var(--neutral-dark);
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--neutral-gray);
    font-weight: 500;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .product-meta {
        margin-bottom: 30px;
        padding-bottom: 20px;
        font-size: 0.95rem;
    }
}

/* ===== BEDEN SEÇİMİ ===== */
.detail-size-selection {
    margin-bottom: 25px;
}

.detail-size-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .detail-size-title span {
        font-family: 'Montserrat', sans-serif;
        font-size: 1rem;
        font-weight: 600;
        color: var(--neutral-black);
    }

.detail-size-guide-link {
    color: var(--primary-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

    .detail-size-guide-link:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

    .detail-size-guide-link::before {
        content: '📏';
    }

.detail-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-size-option {
    min-width: 40px;
    padding: 10px 15px;
    border: 2px solid var(--primary-soft);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    background: var(--neutral-white);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .detail-size-option {
        min-width: 50px;
        padding: 12px 18px;
        font-size: 1rem;
    }
}

.detail-size-option:hover:not(.out-of-stock) {
    border-color: var(--primary-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.detail-size-option.selected {
    background: linear-gradient(135deg, var(--primary-soft), var(--primary-main));
    color: var(--neutral-white);
    border-color: var(--primary-main);
    box-shadow: var(--shadow-md);
}

.detail-size-option.low-stock::after {
    content: 'Son!';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-red);
    color: var(--neutral-white);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

.detail-size-option.out-of-stock {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--neutral-gray);
    text-decoration: line-through;
}

.stock-message {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
}

@media (min-width: 768px) {
    .stock-message {
        font-size: 0.9rem;
        gap: 8px;
        min-height: 25px;
    }
}

.stock-message.in-stock {
    color: #28a745;
}

.stock-message.low-stock {
    color: #ff6b6b;
}

/* ===== RENK SEÇİMİ ===== */
.color-selection {
    margin-bottom: 25px;
}

.color-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-black);
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .color-title {
        font-size: 1.1rem;
        margin-bottom: 18px;
    }
}

.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: 2px solid var(--neutral-white);
    overflow: hidden;
}

@media (min-width: 768px) {
    .color-option {
        width: 44px;
        height: 44px;
        border-width: 3px;
    }
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.color-option.selected {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

    .color-option.selected::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-weight: bold;
        text-shadow: 0 0 3px rgba(0,0,0,0.5);
    }

.color-images-container {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.color-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--neutral-gray);
}

@media (min-width: 768px) {
    .color-image {
        width: 60px;
        height: 60px;
    }
}

.color-image:hover {
    transform: scale(1.1);
    border-color: var(--primary-soft);
}

/* ===== FAVORİ BÖLÜMÜ ===== */
.favorite-section {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--neutral-gray);
    border-bottom: 1px solid var(--neutral-gray);
}

    #favoriteToggle, .favorite-section .btn {
        background: transparent;
        border: 2px solid var(--primary-soft);
        color: var(--primary-main);
        padding: 12px 24px;
        border-radius: 50px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        position: relative;
        overflow: hidden;
        width: 100%;
        justify-content: center;
    }

@media (min-width: 576px) {
    #favoriteToggle, .favorite-section .btn {
        width: auto;
        padding: 14px 28px;
        font-size: 1rem;
    }
}

#favoriteToggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-soft), var(--primary-main));
    transition: left 0.4s ease;
    z-index: -1;
}

#favoriteToggle:hover::before {
    left: 0;
}

#favoriteToggle:hover {
    color: var(--neutral-white);
    border-color: var(--primary-main);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#favoriteToggle.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-color: #ee5a24;
}

#favoriteToggle i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

@media (min-width: 576px) {
    #favoriteToggle i {
        font-size: 1.2rem;
    }
}

#favoriteToggle:hover i {
    transform: scale(1.2);
}

/* ===== ÜRÜN AÇIKLAMASI ===== */
/* ===== ÜRÜN AÇIKLAMASI DÜZENLEMESİ ===== */
.product-description {
    margin-top: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

    .product-description p {
        font-size: 0.95rem;
        line-height: 1.7;
        color: var(--neutral-dark);
        margin-bottom: 1em;
        max-width: 100%;
        word-break: break-word; /* Uzun kelimeleri böler */
        overflow: hidden; /* Taşmayı engeller */
    }

@media (min-width: 768px) {
    .product-description p {
        font-size: 1rem;
        line-height: 1.8;
    }
}

/* ===== MODAL STİLLERİ ===== */
#imageModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    animation: fadeIn 0.3s ease-out;
}

#modalImg {
    display: block;
    max-width: 90%;
    max-height: 80vh;
    margin: 5% auto;
    animation: zoomIn 0.3s ease-out;
}

#modalClose {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--neutral-white);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

    #modalClose:hover {
        color: var(--accent-gold);
        transform: scale(1.2);
    }

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== RENK RESİMLERİ İÇİN DÜZENLEME ===== */
.color-images-container {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.color-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--neutral-gray);
}

    .color-image:hover {
        transform: scale(1.1);
        border-color: var(--primary-soft);
    }

@media (min-width: 768px) {
    .color-image {
        width: 60px;
        height: 60px;
    }
}

/* ===== MOBILE İÇİN EK DÜZENLEMELER ===== */
@media (max-width: 576px) {
    #modalImg {
        max-width: 95%;
        max-height: 70vh;
    }

    #modalClose {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .product-description p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* ===== PERFORMANS İYİLEŞTİRMELERİ ===== */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== BENZER ÜRÜNLER CARD TASARIMI ===== */




/* Ekstra düzenlemeler */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Modal temel stil */
.image-modal {
    display: none; /* Başlangıçta kapalı */
    position: fixed;
    z-index: 999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

    .image-modal .modal-content {
        margin: auto;
        display: block;
        max-width: 80%;
        max-height: 80%;
        animation: zoomIn 0.4s ease;
    }

    .image-modal .close {
        position: absolute;
        top: 20px;
        right: 35px;
        color: #fff;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
    }

/* Animasyon */
@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


.product-comments-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.product-comments-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.product-comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-comment-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.product-comment-user {
    font-weight: 600;
    color: #333;
}

.product-comment-rating {
    color: #ffc107;
}

.product-comment-date {
    color: #6c757d;
    font-size: 0.85rem;
    margin-left: auto;
}

.product-comment-content {
    color: #495057;
    line-height: 1.6;
}

.product-no-comments {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.product-add-comment {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-comment-form {
    margin-top: 1rem;
}

.product-form-group {
    margin-bottom: 1.5rem;
}

.product-rating-stars {
    display: flex;
    gap: 0.3rem;
    margin: 0.5rem 0;
}

    .product-rating-stars i {
        color: #ffc107;
        cursor: pointer;
        font-size: 1.25rem;
        transition: all 0.2s;
    }

.product-comment-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-height: 120px;
    resize: vertical;
}

    .product-comment-textarea:focus {
        outline: none;
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
    }

.product-comment-submit-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

    .product-comment-submit-btn:hover {
        background-color: #218838;
    }

.product-comment-login {
    text-align: center;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .product-comment-login a {
        color: #007bff;
        text-decoration: none;
    }

        .product-comment-login a:hover {
            text-decoration: underline;
        }




/* DETAILS SAYFASI ÖZEL STİLLERİ */
.product-detail-page {
    /* Ana container */
}

/* BENZER ÜRÜNLER BÖLÜMÜ */

/* ==== Benzer Ürünler Genel ==== */
.related-products-section {
    margin-top: 2rem;
}

.related-products-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ==== Kart Container ==== */
.related-products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* ==== Kart ==== */
.related-product-card {
    background: #fff;
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

    .related-product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
        border-color: rgba(124, 92, 196, 0.2) !important;
    }

/* ==== Görsel ==== */
.related-product-image {
    position: relative;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5.2; /* Sabit oran */
    overflow: hidden;
}

    .related-product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Taşsa bile kırp, boşluk bırakma */
        transition: transform 0.4s ease;
    }

.related-product-card:hover .related-product-image img {
    transform: scale(1.05);
}

/* ==== Bilgi Alanı ==== */
.related-product-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem;
    flex-grow: 1;
}

/* ==== Başlık ==== */
.related-product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    min-height: 2.6em; /* 2 satır sabit yükseklik */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 satır */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

    .related-product-name:hover {
        color: #7c5cc4;
    }

/* ==== Detay Butonu ==== */
.related-product-link {
    display: inline-block;
    text-align: center;
    border: 2px solid #7c5cc4;
    color: #7c5cc4;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    margin-top: auto;
}

    .related-product-link:hover {
        background: #7c5cc4;
        color: #fff;
    }


/* Detay sayfası başlık ayarı */
.product-detail-page .product-title {
    font-size: 1.5rem; /* Başlığı büyüttük */
    font-weight: 700;
    color: #2a2a2a;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* Ürün meta bilgileri */
.product-detail-page .product-meta {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 16px;
}

/* Ürün açıklaması metin ayarı */
.product-detail-page .product-description p {
    font-size: 1rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Modal stilleri */
.product-detail-page #imageModal {
    z-index: 9999;
}