/**
 * Hassoylar Concept – Ürün detay
 * Mağaza ve ana sayfa ile uyumlu, mobilya sektörüne uygun tasarım
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

body.product-detail-page {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

/* -------------------------------------------------------------------------
   Ana ürün alanı
------------------------------------------------------------------------- */
#selected-product-section {
    padding: 2.5rem 1.5rem 3.5rem;
}

.product-detail-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1240px;
    margin: 0 auto;
}

#selected-product-image {
    flex: 1 1 48%;
    min-width: 280px;
}

/* Ürün galerisi */
.product-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--color-bg-alt);
    border-radius: 12px;
    overflow: hidden;
}

.product-gallery-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

.product-gallery-hero.is-loading { opacity: 0.65; }

.product-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(var(--color-antrasit-rgb), 0.1);
}

.product-gallery-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-alt);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.product-gallery-thumb:hover { border-color: rgba(var(--color-antrasit-rgb), 0.35); }

.product-gallery-thumb.is-active {
    border-color: var(--color-sari);
    box-shadow: 0 0 0 1px var(--color-sari);
}

.product-gallery-thumb:focus { outline: none; }

.product-gallery-thumb:focus-visible {
    outline: 2px solid var(--color-sari);
    outline-offset: 2px;
}

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

/* Lightbox Modal */
.product-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.product-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.product-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.product-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.product-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.product-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.product-lightbox-prev {
    left: 20px;
}

.product-lightbox-next {
    right: 20px;
}

.product-lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

@media screen and (max-width: 768px) {
    .product-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .product-lightbox-prev {
        left: 10px;
    }
    
    .product-lightbox-next {
        right: 10px;
    }
    
    .product-lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .product-lightbox-counter {
        bottom: 20px;
    }
}

#selected-product-desc {
    flex: 1 1 48%;
    min-width: 280px;
}

/* Breadcrumb */
.product-breadcrumb {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin: 0 0 1rem 0;
}

.product-breadcrumb a {
    color: var(--color-text-light);
    text-decoration: none;
}

.product-breadcrumb a:hover { color: var(--color-yesil-koyu); }

.product-breadcrumb .sep { margin: 0 0.35rem; }

.product-breadcrumb .current { color: var(--color-antrasit); }

/* Başlık */
#selectedProduct-title {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 600;
    color: var(--color-antrasit);
    margin: 0 0 1.25rem 0;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

/* Açıklama */
#selectedProduct-description {
    margin-bottom: 1.5rem;
}

#selectedProduct-description p {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    margin: 0;
}

/* Aksiyonlar: WhatsApp + Favori */
#selectedProduct-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.whatsapp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-yesil-koyu);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--color-yesil-koyu);
}

.whatsapp-cta-btn:hover {
    background: var(--color-yesil);
    border-color: var(--color-yesil);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--color-yesil-rgb), 0.25);
}

.favori-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--color-sari);
    color: var(--color-antrasit);
    background: transparent;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.favori-detail-btn:hover {
    background: var(--color-sari);
    color: var(--color-beyaz);
    border-color: var(--color-sari);
}

/* Ek bilgi & Uzman */
#selectedProducts-extras {
    margin-bottom: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(var(--color-antrasit-rgb), 0.1);
}

.product-tags {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

#askExpertSection {
    padding: 1rem 1.25rem;
    background: var(--color-bg-alt);
    border-radius: 10px;
}

#askExpertSection p {
    margin: 0;
    font-size: 0.95rem;
    color: #1a1a1a;
}

#askExpertSection a {
    color: var(--color-yesil-koyu);
    text-decoration: none;
    font-weight: 600;
}

#askExpertSection a:hover { 
    color: var(--color-yesil);
    transform: translateX(4px);
    text-decoration: none !important;
}

/* -------------------------------------------------------------------------
   Benzer ürünler
------------------------------------------------------------------------- */
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

#similar-products {
    padding: 3.5rem 1.5rem;
    background: var(--color-bg);
}

#similar-title h1 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-antrasit);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-sari);
    display: inline-block;
}

#similar-contents {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.similar-cardDescription {
    flex: 1 1 calc(20% - 1.2rem);
    min-width: 180px;
    max-width: 260px;
    background: var(--color-beyaz);
    border: 1px solid rgba(var(--color-antrasit-rgb), 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.similar-cardDescription:hover {
    box-shadow: 0 10px 32px rgba(var(--color-antrasit-rgb), 0.1);
    border-color: rgba(var(--color-antrasit-rgb), 0.12);
}

.similar-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: var(--color-bg-alt);
}

.similar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.similar-cardDescription:hover .similar-image { transform: scale(1.04); }

/* WhatsApp overlay butonu benzer ürünlerden kaldırıldı */


.similar-card-body {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid rgba(var(--color-antrasit-rgb), 0.06);
}

.similar-card-body h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.similar-card-body h5:hover { color: var(--color-yesil-koyu); }

/* -------------------------------------------------------------------------
   Responsive
------------------------------------------------------------------------- */
@media screen and (max-width: 992px) {
    .product-detail-inner { flex-direction: column; gap: 2rem; }
    #selected-product-image,
    #selected-product-desc { flex: 1 1 100%; min-width: 0; }
    .product-gallery-main { max-height: 480px; aspect-ratio: 4/3; }
    .product-gallery-thumb { width: 64px; height: 64px; }
    #similar-contents .similar-cardDescription { flex: 1 1 calc(33.333% - 1rem); max-width: none; }
}

@media screen and (max-width: 600px) {
    #selected-product-section { padding: 1.5rem 1rem 2.5rem; }
    #selectedProduct-actions { flex-direction: column; }
    .whatsapp-cta-btn, .favori-detail-btn { justify-content: center; }
    .product-gallery-thumbs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .product-gallery-thumb { width: 56px; height: 56px; flex-shrink: 0; }
    #similar-products { padding: 2.5rem 1rem; }
    #similar-contents .similar-cardDescription {
        flex: 1 1 100%;
        max-width: 280px;
        margin: 0 auto;
    }
}
