/* 
* Main CSS File for the website
* Combined from product.css and index.css
*/

/* ----------- COMMON STYLES ----------- */

/* Container genişlik özelleştirmeleri */
@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 1500px;
    }
}

/* Header height and padding */
header.sticky-top {
    height: 80px;
    padding: 0 !important;
}

.header-compact {
    height: 80px;
    display: flex;
    align-items: center;
}

/* Main styles */
body {
    background: #f8f9fa;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #404040;
    padding-top: 0; /* Boşluğu kaldırdık */
}

/* Corporate color variables */
:root {
    --primary-color: #d71923;    /* Red corporate color */
    --secondary-color: #404040;  /* Dark gray corporate color */
    --primary-hover: #b81520;   /* Slightly darker red for hover states */
    --secondary-hover: #333333; /* Slightly darker gray for hover states */
}

/* Font family overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
}

/* Sticky header styles */
header.sticky-top {
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    background-color: #fff;
    height: 80px;
}

/* Header kompakt tasarım */
.header-compact .logo-wrapper img {
    max-width: 175px;

    transition: all 0.3s ease;
    padding: 10px 0;
}

.header-compact .main-nav {
    height: 100%;
    display: flex;
    align-items: center;
}

.header-compact .main-nav ul {
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.header-compact .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.header-compact .nav-link {
    color: var(--secondary-color);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: rgba(58, 71, 84, 1);
    text-transform: none;
    background: none;
    padding: 10px;
    padding-right: 15px;
    padding-left: 15px;
}

.header-compact .nav-link:hover {
    color: var(--primary-color);
}

/* Scroll edildiğinde header küçültme */
.header-compact.scrolled .logo-wrapper img {
    max-width: 150px;
    max-height: 50px;
    padding: 5px 0;
}

/* Mobil header tasarımı */
.mobile-header {
    padding: 5px 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    position: relative;
    z-index: 1000;
}

.mobile-header .navbar-toggler {
    border: none;
    padding: 8px;
    font-size: 1.5rem;
    color: var(--secondary-color);
    background-color: transparent;
}

.mobile-header .navbar-toggler i {
    font-size: 1.5rem;
}

.mobile-header .nav-link {
    color: var(--secondary-color);
    font-family: 'Inter', sans-serif;
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-header .navbar-collapse {
    background-color: white;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.mobile-header .navbar-nav {
    width: 100%;
}

/* Mobil görünüm için header düzenlemeleri */
@media (max-width: 768px) {
    .header-compact > .container {
        display: none;
    }
    
    .mobile-header {
        display: block !important;
    }
    
    body {
        padding-top: 0 !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
}

/* Button styles */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(215, 25, 35, 0.25);
}

/* Outline button styles */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Other outline button variants */
.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: white;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Text styling */
.text-muted {
    color: #6c757d !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Inter font styles for general text elements */
p, span, div, li, a, input, button, textarea, select, label {
    font-family: 'Inter', sans-serif;
}

/* Font weight utilities */
.font-weight-normal {
    font-weight: 400;
}

.font-weight-medium {
    font-weight: 500;
}

.font-weight-semibold {
    font-weight: 600;
}

.font-weight-bold {
    font-weight: 700;
}

/* ----------- PRODUCT PAGE STYLES ----------- */

/* Product container */
.product-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    margin-bottom: 30px;
    border-top: 3px solid var(--primary-color);
}

/* Product gallery styles */
.product-gallery img {
    border: 3px solid #ddd;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;        
}

.product-gallery img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.thumbnail-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 10px;
}

.thumbnail-images img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Product information styling */
.product-info {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.product-info p {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.product-info strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Section headers */
.section-header {
    background: var(--secondary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin: 25px 0 15px 0;
    box-shadow: 0 4px 15px rgba(64, 64, 64, 0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-family: 'Inter', sans-serif;
}

/* OEM List styling */
.oem-list {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.oem-list .list-group-item {
    border: none;
    background: #f5f5f5;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 8px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.oem-item {
    background: #f5f5f5;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 8px;
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.serial-number {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 5px;
    font-family: 'Inter', sans-serif;
}

.product-description {
    /* Removed max-height limit to allow natural height */
    padding-right: 10px;
}

/* Vehicle table styling */
.vehicle-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.vehicle-table .table {
    margin: 0;
}

.vehicle-table .thead-dark th {
    background: var(--secondary-color);
    border: none;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 10px 6px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
}

.vehicle-table tbody tr:nth-child(even) {
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
}

.vehicle-table tbody tr:hover {
    background: linear-gradient(90deg, #f5f5f5, #e9e9e9);
    border-left: 3px solid var(--primary-color);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

.vehicle-table tbody td {
    padding: 6px 4px;
    font-size: 0.75rem;
    text-align: center;
    border-color: rgba(0,0,0,0.1);
}

/* Back button removed - navigation is now in the header */
@media (max-width: 768px) {
    .vehicle-table tbody td {
        font-size: 0.7rem;
        padding: 6px 3px;
    }
    
    .vehicle-table .thead-dark th {
        font-size: 0.75rem;
        padding: 8px 3px;
    }
    
    .col-md-4 {
        margin-bottom: 20px;
    }
}

/* ----------- INDEX PAGE STYLES ----------- */

/* Bootstrap checkbox override - checkbox'ları görünür yap */
.form-check .form-check-input {
    float: none !important;
    margin-left: 0 !important;
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Filter sections */
.filter-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Kod arama bölümü özel stili */
.code-search-section {
    background: #f5f5f5;
}

.filter-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    padding-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-title .badge {
    font-size: 0.7em;
    padding: 3px 6px;
    background-color: var(--primary-color) !important;
    color: white;
}

.collapse-control {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.collapse-control:hover {
    color: var(--primary-color);
}

.collapse-control i {
    transition: transform 0.3s;
}

.collapse-control[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.filter-collapse {
    display: none;
    padding-top: 5px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.filter-collapse.show {
    display: block;
    max-height: 500px;
    transition: max-height 0.5s ease-in;
    animation: fadeIn 0.3s;
}

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

/* Brand and model groups */
.brand-group {
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px;
    background: white;
}

.brand-header {
    font-weight: 600;
    color: #007bff;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-header .badge {
    background-color: #6c757d;
    color: white;
}

.model-checkbox {
    margin-left: 15px;
    margin-bottom: 5px;
}

/* Product cards */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Product images - both on product page and index */
.product-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Index page specific image styles */
.product-image.index-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-image.index-image:hover {
    transform: scale(1.5);
    z-index: 1000;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.product-image.bg-light {
    min-width: 80px;
    min-height: 80px;
    text-decoration: none;
}

.product-image.bg-light:hover {
    background-color: #e9ecef !important;
    transform: scale(1.1);
}

/* Vehicle list */
.vehicle-list {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    font-size: 0.9em;
    max-height: 200px;
    overflow-y: auto;
}

/* OEM Codes styling */
.oem-codes {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 6px;
    margin-top: 5px;
    font-size: 0.85em;
    color: var(--primary-color);
    border-left: 2px solid var(--primary-color);
}

/* Debug info */
.debug-info {
    background-color: #ffe8e8;
    border: 1px solid #ffcccb;
    padding: 5px;
    font-family: monospace;
    font-size: 12px;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

/* Search input styles */
.search-input {
    margin-bottom: 10px;
    position: relative;
}

.search-input .input-group-text {
    background-color: transparent;
    border-right: none;
}

.search-input .form-control {
    border-left: none;
}

.search-input .clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 5;
    display: none;
}

/* Code search specific styles */
.code-search-group {
    padding-left: 8px;
    background-color: #f5f5f5;
    border-radius: 5px;
    padding: 6px;
    margin-bottom: 8px;
}

.code-search-group .form-label {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.85em;
    font-family: 'Inter', sans-serif;
}

.code-search-group .input-group-text {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.code-search-group .form-control {
    border-color: var(--secondary-color);
}

.code-search-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(215, 25, 35, 0.25);
}

/* Loading state */
.loading {
    text-align: center;
    padding: 20px;
}

/* Badge styles */
.badge-count {
    background: var(--primary-color);
    color: white;
    font-size: 0.8em;
    padding: 3px 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

/* Category, brand, engine checkboxes */
.category-checkbox, .brand-checkbox, .engine-checkbox {
    margin-bottom: 6px;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.1s;
}

.category-checkbox:hover, .brand-checkbox:hover, .engine-checkbox:hover {
    background-color: #f0f0f0;
}

/* Product title */
.product-title {
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.product-title:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Checkbox styles */
.filter-section .form-check {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    padding: 3px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.form-check:hover {
    background-color: #f8f9fa;
}

.form-check-input {
    cursor: pointer;
    margin-right: 6px;
    margin-left: 0 !important;
    margin-top: 0;
    flex-shrink: 0;
    position: static !important;
    float: none !important;
    width: 14px;
    height: 14px;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.form-check-label {
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    user-select: none;
    font-size: 0.85em;
}

.form-check-label .text-truncate {
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-check-label .badge-count {
    background-color: #6c757d;
    color: white;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Filter tags */
.active-filters {
    padding: 10px;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.filter-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 30px;
    background: #e9ecef;
    color: #495057;
    margin: 2px;
    font-size: 0.9em;
}

.filter-tag .remove {
    margin-left: 5px;
    cursor: pointer;
}

/* Sidebar filter styles */
.col-filters {
    position: sticky; /* Sticky yapışkan menü */
    top: 90px; /* 80px header yüksekliği + 10px ekstra boşluk */
    height: calc(100vh - 140px); /* Görünür ekran yüksekliğinden header yüksekliğini çıkarıyoruz */
    overflow-y: auto; /* İçerik aşarsa kaydırma çubuğu olsun */
    z-index: 90; /* Header'ın altında kalmalı (header z-index: 1030) */
    padding: 5px 10px 20px;
    background-color: #f8f9fa; /* Arkaplan rengi ekleyerek daha belirgin olmasını sağlıyoruz */
    border-radius: 10px;
    scrollbar-width: thin; /* Firefox için ince scrollbar */
    transition: top 0.3s ease, all 0.2s ease; /* Yumuşak geçiş efekti - top için ayrı tanımlama */
    margin-bottom: 20px; /* Alt tarafta boşluk ekle */
}

/* Custom scrollbar styles */
.col-filters::-webkit-scrollbar {
    width: 6px;
}

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

.col-filters::-webkit-scrollbar-thumb {
    background: #bbc0c4;
    border-radius: 10px;
}

.col-filters::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Mobile styles */
@media (max-width: 768px) {
    body {
        padding-top: 0 !important; /* Mobilde üstteki boşluğu tamamen kaldır, !important ekledik */
    }
    .container-fluid {
        margin-top: 0 !important; /* Mobilde üst margin'ı sıfırla */
        padding-top: 0 !important; /* Padding'i de tamamen kaldır */
    }
    .col-filters {
        position: relative; /* Mobilde sticky özelliğini kapat */
        top: 0;
        height: auto;
        max-height: none;
        overflow-y: visible;
        order: 1;
        margin-top: 0; /* Mobilde filtreler için üstte boşluk kaldırıldı */
        padding-top: 0; /* Padding de sıfırla */
    }
    .col-products {
        order: 2;
    }
}

/* Checkbox list */
.checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Product image preview and hover effects */
.product-image-preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 10px;
    z-index: 9999;
    display: none;
    pointer-events: none;
}

.product-image-preview img {
    width: 400px;
    height: 400px;
    object-fit: contain;
    border-radius: 6px;
}

.product-image-hover {
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-image-hover:hover {
    transform: scale(1.1);
}

/* Carousel styles */
.product-card-small {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.product-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image-small {
    height: 140px;
    object-fit: contain;
    padding: 10px;
}

/* OEM codes styling for carousel */
.oem-codes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.product-card-small .oem-codes-container .badge {
    font-size: 0.7rem;
    background-color: #f8f9fa !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

/* Carousel controls and animations */
#latestProductsCarousel .carousel-indicators,
#latestProductsCarousel .carousel-control-prev,
#latestProductsCarousel .carousel-control-next {
    display: none !important;
}

#latestProductsCarousel .carousel-item {
    transition: transform 1.2s ease-in-out !important;
}

/* Pagination styling */
.page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.page-link {
    color: var(--secondary-color) !important;
}

.page-link:hover {
    color: var(--primary-color) !important;
}

/* ----------- FOOTER STYLES ----------- */

.footer {
    background-color: #3c4754 !important;
    padding: 40px 0 20px;
}

.footer-title {
    font-family: 'Inter', sans-serif;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-contact {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-contact p {
    margin-bottom: 8px;
}

.footer-contact strong {
    font-weight: 600;
}

.social-icons {
    display: flex;
    align-items: center;
}

.social-icon {
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.social-icon:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: block;
    position: relative;
    padding-left: 15px;
}

.footer-links a:before {
    content: '›';
    font-size: 1.2rem;
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: -2px;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 20px;
}

.newsletter-text {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.newsletter-form .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.newsletter-form .checkbox {
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 10px;
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
}

.certificates a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.certificates a:hover {
    color: var(--primary-color) !important;
}

@media (max-width: 768px) {
    .footer-title {
        margin-top: 20px;
    }
    
    .certificates, .copyright {
        text-align: center;
        margin-bottom: 10px;
    }
}
