/* --- 1. SARI BOŞLUK VE GENEL SAYFA DÜZENİ --- */
body.pricelist-page section#product-detail-container {
    padding-top: 10px;
    margin-top: 0;
}

.product-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 10px;
    align-items: start;
}

/* Kategori Menüsü Hover Efektleri */
.sidebar-menu .category-menu a:hover {
    color: #a72f3d !important;
    padding-left: 20px !important;
}

/* --- 2. ANA ÜRÜN KARTI VE GÖRSEL --- */
.product-main-flex {
    display: flex;
    gap: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.product-gallery { 
    flex: 1; 
    min-width: 350px; 
    max-width: 450px; 
}

.main-image-wrapper {
    width: 100%; 
    height: 400px;
    overflow: hidden; 
    border: 1px solid #eee; 
    border-radius: 8px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: zoom-in;
    background: #fff;
    position: relative;
    padding: 10px;
}

.main-image-wrapper img { 
    width: 100% !important; 
    height: 100% !important;
    object-fit: contain; 
    transition: transform 0.2s ease-out; 
    display: block;
}

/* Galeri Küçük Resimleri */
.thumbnails-row { 
    display: flex; 
    gap: 10px; 
    margin-top: 15px; 
    flex-wrap: wrap; 
}
.thumb-img { 
    width: 70px; 
    height: 70px; 
    object-fit: contain; 
    border: 2px solid #eee; 
    cursor: pointer; 
    border-radius: 6px; 
    background: #fff;
    padding: 5px;
    transition: all 0.3s;
}
.thumb-img:hover { border-color: #a72f3d; }

/* Tablo Tasarımı (Eski inline style buraya taşındı) */
.product-tabs-section {
    margin-top: 40px;
}
.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.spec-table th, .spec-table td {
    padding: 12px 15px;
    border: 1px solid #eee;
    text-align: left;
}
.spec-table th {
    background-color: #fafafa;
    font-weight: 700;
    width: 35%;
    color: #333;
}
.spec-table tr:nth-child(even) { background-color: #fcfcfc; }
.spec-table tr:hover { background-color: #f5f5f5; }

/* --- 3. MODERN BUTONLAR (MADDE 2 ÇÖZÜMÜ) --- */
.custom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}
.btn-whatsapp:hover {
    background-color: #1ebe57;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.btn-offer {
    background-color: #444;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.btn-offer:hover {
    background-color: #a72f3d; /* Hoverda kurumsal renge döner */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(167, 47, 61, 0.3);
    color: #fff;
}

/* --- 4. BENZER ÜRÜNLER KART DÜZENLEMESİ (MADDE 7 ÇÖZÜMÜ) --- */
.pricelist-page #related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px;
    margin-top: 20px;
}

.pricelist-page #related-grid .product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%; /* Kartları eşit boyda tutar */
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricelist-page #related-grid .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* Fotoğraf Alanını Sabitliyoruz */
.related-img-container {
    height: 160px; /* Net bir yükseklik verildi, fotoğraflar kaymaz */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding: 10px;
}

.related-img-container img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}

/* Alt Bilgi Alanını Esnek Yapıyoruz */
.pricelist-page #related-grid .product-info {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    text-align: center;
}

.pricelist-page #related-grid .product-info h4 {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Sadece 2 satıra izin verir */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px; /* Başlıklar kısa olsa da yeri sabit kalır */
}

.pricelist-page #related-grid .product-info .price {
    font-weight: bold;
    color: #a72f3d;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* İncele Butonunu Daima En Alta İter */
.pricelist-page #related-grid .product-card .view-detail {
    background-color: #444;
    color: #ffffff;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: auto; /* Sihirli kod: üstü boş olsa da butonu tabana yapıştırır */
    font-weight: 500;
    transition: background 0.3s;
}

.pricelist-page #related-grid .product-card .view-detail:hover {
    background-color: #a72f3d;
}

/* Teklif İste Butonu (Daha yüksek spesifiklik ile) */
body.pricelist-page .product-main-content .action-buttons a.btn-offer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 12px 25px;
    
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

body.pricelist-page .product-main-content .action-buttons a.btn-offer:hover {
    background-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(167, 47, 61, 0.3);
}

/* Benzer Ürünler - İncele Butonu (Daha yüksek spesifiklik ile) */
body.pricelist-page section#product-detail-container #related-grid .product-card .product-info a.view-detail {
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 50px; /* Bize ulaşın butonu gibi oval */
    padding: 10px 20px;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: auto;
    border: none;
}

body.pricelist-page section#product-detail-container #related-grid .product-card .product-info a.view-detail:hover {
    background-color: #dc3545;
    transform: scale(1.05);
}

/* --- 5. MOBİL UYUMLULUK --- */
@media (max-width: 1100px) {
    .pricelist-page #related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .product-page-layout { grid-template-columns: 1fr; }
    .product-main-flex { flex-direction: column; }
    .product-gallery { max-width: 100%; }
    .pricelist-page #related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .pricelist-page #related-grid { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; width: 100%; }
    .action-buttons .custom-btn { width: 100%; }
}