/*
Custom Css
*/

/* Ana navbar için geçiş efekti */
header .navbar.navbar-expand-lg,
nav.navbar.navbar-expand-lg.navbar-light.shadow {
    transition: all 0.3s ease;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

header .navbar.navbar-expand-lg.scrolled,
nav.navbar.navbar-expand-lg.navbar-light.shadow.scrolled {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
}

/* Top nav'in etkilenmemesini sağlamak için */
#templatemo_nav_top {
    padding: 0.5rem 0;
}

.input-group-text.btn-success {
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.input-group-text.btn-success:hover {
    background-color: #4cae4f; /* Hover rengi */
    transform: scale(1.05); /* Hover sırasında butonu büyütme */
}

.input-group-text.btn-success:active {
    transform: scale(0.95); /* Tıklama sırasında butonu küçültme */
}
.hover-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
    transition: all 0.3s ease;
}
#product-detail {
    transition: opacity 0.3s ease;
}

/* Dropdown menü hover efekti */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    margin-top: 0;
    border-radius: 0;
    border: none;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
}

.dropdown-item {
    padding: .5rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #72607A;
    color: white !important;
}

.nav-item.dropdown > .nav-link {
    cursor: pointer;
}

/* Dropdown ok işareti */
.nav-item.dropdown > .nav-link:after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.small-images {
    order: 2;
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1024px) {
    .small-images {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        max-width: 100%;
        padding: 0.5rem 0;
        justify-content: flex-start;
        gap: 0.3rem;
    }
    
    .small-images .card {
        flex: 0 0 auto;
        width: 60px;
        height: 60px;
        margin-right: 0.3rem;
    }
    
    .small-images .card img {
        height: 100%;
        object-fit: contain;
        padding: 0.2rem;
    }
}

@media (max-width: 576px) {
    .small-images {
        gap: 0.2rem;
    }
    
    .small-images .card {
        width: 50px;
        height: 50px;
        margin-right: 0.2rem;
    }
}

#product-detail {
    order: 1;
}

/* UV Lamba sayfası için özel stiller */
.card-img {
    width: 100%;
    transition: opacity 0.3s ease;
}

.border {
    transition: all 0.3s ease;
}

.small-images .card {
    cursor: pointer;
}

/* Görsel geçiş efekti */
#product-detail {
    transition: opacity 0.3s ease;
}

/* Thumbnail container için stil */
#thumbnailContainer {
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 992px) {
    #thumbnailContainer {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding: 0.5rem 0;
        justify-content: flex-start;
        gap: 0.3rem;
        flex-wrap: nowrap;
    }
    
    #thumbnailContainer .card {
        flex: 0 0 auto;
        width: 60px;
        height: 60px;
        min-width: auto;
        margin-right: 0.3rem;
        padding: 0;
    }
    
    #thumbnailContainer .card img {
        height: 100%;
        object-fit: contain;
        padding: 0.2rem;
    }
}

@media (max-width: 576px) {
    #thumbnailContainer {
        gap: 0.2rem;
    }
    
    #thumbnailContainer .card {
        width: 50px;
        height: 50px;
        margin-right: 0.2rem;
    }
}

/* Shop.html için CSS Kodları */
.shop-page .card {
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    height: 220px; /* Sabit kart yüksekliği */
}
.shop-page .product-card {
    display: flex;
    align-items: center;
    padding: 15px;
    height: 100%;
}
.shop-page .card-body {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.shop-page .card-body h3 {
    font-size: 1.3rem;
    line-height: 1.2;
    margin-bottom: 10px;
    max-height: 3.1em; /* Maksimum 2 satır için */
    overflow: hidden;
}
.shop-page .product-description {
    position: relative;
    flex: 1;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.5;
    color: #6c757d;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.shop-page .product-image {
    height: 200px;
    width: 100%;
    object-fit: contain;
    padding: 10px;
}

/* Responsive düzenlemeler */
@media (max-width: 768px) {
    .shop-page .card {
        height: auto;
        min-height: 220px;
    }
    /* Diğer mobil stiller... */
}

/* Yardımcı Parçalar sayfası için özel stiller */
.supporting-parts-page .product-image {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 5px;
    background: white;
    width: 100%;
    height: 300px; /* Sabit yükseklik */
    object-fit: contain;
}

.supporting-parts-page .card .row {
    min-height: 300px; /* Minimum kart yüksekliği */
}

.supporting-parts-page .card-body {
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Ürün detay sayfaları için ortak stiller */
.product-detail-page .card {
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
}

.product-detail-page .card-img {
    width: 100%;
    transition: opacity 0.3s ease;
}

.product-detail-page .border {
    transition: all 0.3s ease;
}

.product-detail-page .small-images .card {
    cursor: pointer;
}

/* Görsel geçiş efekti */
.product-detail-page #product-detail {
    transition: opacity 0.3s ease;
}

/* Ürün sayfası thumbnail container için stil */
.product-detail-page #thumbnailContainer {
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 992px) {
    .product-detail-page #thumbnailContainer {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding: 0.5rem 0;
        justify-content: flex-start;
        gap: 0.3rem;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .product-detail-page #thumbnailContainer .card {
        flex: 0 0 auto;
        width: 60px;
        height: 60px;
        min-width: auto;
        margin-right: 0.3rem;
        padding: 0;
    }
    
    .product-detail-page #thumbnailContainer .card img {
        height: 100%;
        width: 100%;
        object-fit: contain;
        padding: 0.2rem;
    }
}

@media (max-width: 576px) {
    .product-detail-page #thumbnailContainer {
        gap: 0.2rem;
    }
    
    .product-detail-page #thumbnailContainer .card {
        width: 50px;
        height: 50px;
        margin-right: 0.2rem;
    }
}

/* Contact sayfası için özel stiller */
.contact-page iframe {
    border: 0;
    border-radius: 10px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.contact-page form {
    background-color: #fff;
}

/* Zoom Efekti İçin Gerekli CSS Kodları */
.product-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.zoom-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.zoom-lens {
    position: absolute;
    border: 1px solid #d4d4d4;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: none;
    display: none;
    pointer-events: none;
}

/* Hover yerine mouseover/mousemove event'leri kullanıldığında bu stil uygulanacak */
.zoom-active .zoom-image {
    transform: scale(2.5);
    transform-origin: var(--x) var(--y);
}

/* Responsive ayarlamalar */
@media (max-width: 768px) {
    .zoom-active .zoom-image {
        transform: scale(1.8);
    }
}

@media (max-width: 576px) {
    .zoom-active .zoom-image {
        transform: scale(1.5);
    }
}

/* ===============================================
   WhatsApp Widget Stilleri - Güncel Versiyon
   =============================================== */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* WhatsApp Butonu */
.whatsapp-button {
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.whatsapp-button svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Nabız Efekti */
.whatsapp-button::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #25D366;
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0.5;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Sohbet Penceresi */
.whatsapp-chat {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: none;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    max-height: 500px;
}

.whatsapp-chat.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sohbet Başlığı */
.whatsapp-chat .chat-header {
    background: #095E54;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
}

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.agent-info h4 {
    margin: 0;
    font-size: 16px;
}

.agent-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-chat:hover {
    opacity: 0.8;
}

/* Sohbet İçeriği */
.whatsapp-chat .chat-body {
    padding: 20px;
    background: #f0f0f0;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.welcome-message {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.welcome-message::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.welcome-message p {
    margin: 0 0 10px 0;
}

.welcome-message p:last-child {
    margin-bottom: 0;
}

/* Mesaj Giriş Alanı */
.whatsapp-chat .chat-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.whatsapp-chat .input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end; /* Alt hizalama için */
}

/* Textarea Stilleri - GÜNCEL */
.message-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    resize: none; /* Kullanıcının manuel boyutlandırmasını engelle */
    min-height: 40px;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.4;
    transition: height 0.1s ease, border-color 0.3s ease;
}

.message-input:focus {
    border-color: #25D366;
}

/* Scrollbar stilleri */
.message-input::-webkit-scrollbar {
    width: 6px;
}

.message-input::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.message-input::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.message-input::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Gönder Butonu */
.send-button {
    background: #25D366;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    font-size: 14px;
    min-height: 40px;
    align-self: flex-end; /* Kendini alta hizala */
}

.send-button:hover {
    background: #128C7E;
}

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

/* Bildirim Balonu */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3838;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: shake 2s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-5deg); }
    20%, 40% { transform: rotate(5deg); }
}

/* Yüzen Mesaj Balonu */
.floating-message {
    position: fixed;
    bottom: 90px;
    right: 90px;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9997;
    font-size: 14px;
    max-width: 200px;
    animation: fadeIn 0.5s ease;
    cursor: pointer;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Responsive - Mobil */
@media (max-width: 480px) {
    .whatsapp-chat {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
        bottom: 80px;
        max-height: 450px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-button svg {
        width: 30px;
        height: 30px;
    }
    
    .whatsapp-chat .chat-body {
        max-height: 250px;
        padding: 15px;
    }
    
    .whatsapp-chat .chat-header {
        padding: 15px;
    }
    
    .agent-info h4 {
        font-size: 14px;
    }
    
    .message-input {
        font-size: 16px; /* iOS zoom engellemek için */
    }
    
    .floating-message {
        right: 70px;
        bottom: 80px;
        max-width: 180px;
        font-size: 13px;
    }
}

/* Tablet */
@media (max-width: 768px) and (min-width: 481px) {
    .whatsapp-chat {
        width: 340px;
    }
}

/* Karanlık Tema Desteği */
@media (prefers-color-scheme: dark) {
    .whatsapp-chat {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .whatsapp-chat .chat-body {
        background: #2a2a2a;
    }
    
    .welcome-message {
        background: #333;
        color: #e0e0e0;
    }
    
    .welcome-message::before {
        border-color: transparent #333 transparent transparent;
    }
    
    .whatsapp-chat .chat-input {
        background: #1e1e1e;
        border-top-color: #444;
    }
    
    .message-input {
        background: #333;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .message-input:focus {
        border-color: #25D366;
    }
    
    .message-input::-webkit-scrollbar-track {
        background: #2a2a2a;
    }
    
    .message-input::-webkit-scrollbar-thumb {
        background: #555;
    }
    
    .message-input::-webkit-scrollbar-thumb:hover {
        background: #666;
    }
}

/* Animasyon Performansı */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-button::before,
    .notification-badge,
    .whatsapp-chat,
    .floating-message {
        animation: none;
    }
    
    .whatsapp-button,
    .send-button,
    .message-input {
        transition: none;
    }
}

/* Varsayılan olarak gizle */
.lang-specific-pl {
    display: none !important;
}

/* Lehçe seçildiğinde göster */
html[lang="pl"] .lang-specific-pl {
    display: block !important;
}

.sectors-page .card {
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    height: 220px;
}
.sectors-page .product-card {
    display: flex;
    align-items: center;
    padding: 15px;
    height: 100%;
}

/* Sector Detail Page Styles */
.sector-detail-page .hero-section {
    background: linear-gradient(135deg, #a53fbf 0%, #72607A 100%);
    color: white;
}

.sector-detail-page .article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.sector-detail-page .article-content h2 {
    color: #333;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.sector-detail-page .article-content h3 {
    color: #72607A;
}

.sector-detail-page .card {
    transition: transform 0.3s;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sector-detail-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Sector Detail Page - Hero Images */
.sector-detail-page .hero-image-container {
    width: 100%;
    height: 300px; /* Sabit yükseklik */
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}


.sector-detail-page .hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: transform 0.3s ease;
}

.sector-detail-page .hero-image:hover {
    transform: scale(1.05);
}

/* Mobil için responsive ayarlar */
@media (max-width: 768px) {
    .sector-detail-page .hero-image-container {
        height: 200px; /* Mobilde daha küçük */
    }
}

@media (min-width: 1200px) {
    .sector-detail-page .hero-image-container {
        height: 350px; /* Büyük ekranlarda biraz daha büyük */
    }
}

/* Alternatif: Aspect ratio kullanarak */
.sector-detail-page .hero-image-container-ratio {
    width: 100%;
    aspect-ratio: 16/9; /* 16:9 oranında */
    overflow: hidden;
    border-radius: 8px;
}