/**
 * Custom CSS Styles
 * Satis Test - B2B Ürün Yönetim ve Satış Sistemi
 */

/* Genel Stiller */
:root {
    --primary-color: #800000;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}
.burgundy-color{
    color:#800000 !important;
}
.burgundy-background{
    background:#800000 !important;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Kategori Kartları */
.category-cards-section {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.category-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.category-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.category-card-inner {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    min-height: 70px;
}

/* Cins Resmi */
.category-image {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    color: #6c757d;
    font-size: 1.5rem;
}

.category-card:hover .category-image {
    transform: scale(1.02);
}

.category-card:hover .category-img {
    transform: scale(1.05);
}

.category-card:hover .category-placeholder {
    background: #f1f3f4;
    color: #5f6368;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.2rem 0;
    color: var(--dark-color);
    line-height: 1.3;
}

.product-count {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 400;
}

.cins-description {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 400;
    line-height: 1.2;
}



/* Responsive Tasarım */
@media (max-width: 768px) {
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .category-card-inner {
        padding: 0.75rem;
        gap: 0.5rem;
        min-height: 60px;
    }
    
    .category-image {
        width: 40px;
        height: 40px;
    }
    
    .category-name {
        font-size: 0.8rem;
    }
    
    .product-count, .cins-description {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .category-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card-inner {
        flex-direction: row;
        text-align: left;
    }
}

/* Navbar Özelleştirmeleri */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 4rem 0;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Slider Stilleri */
.carousel-item {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.carousel-caption {
    z-index: 2;
    bottom: 50%;
    transform: translateY(50%);
}

.carousel-caption h5 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Kayan Markalar */
.brands-slider {
    overflow: hidden;
    white-space: nowrap;
    background: #ffffff;
    padding: 2rem 0;
}

.brands-track {
    display: inline-block;
    animation: scroll 30s linear infinite;
}

.brand-item {
    display: inline-block;
    margin: 0 2rem;
    opacity: 1;
}

.brand-item:hover {
    opacity: 1;
}

.brand-item img {
    height: 60px;
    width: auto;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Ürün Kartları */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: var(--transition);
    height: 100%;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img,
.product-image-sizer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    text-decoration: none;
}

.product-title:hover {
    color: var(--primary-color);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price .old-price {
    font-size: 1rem;
    color: var(--secondary-color);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-rating {
    color: #ffc107;
    margin-bottom: 0.5rem;
}

/* Section Başlıkları */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Butonlar */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Form Stilleri */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Alert Stilleri */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    transition: var(--transition);
}

.page-link:hover {
    color: #0056b3;
    background-color: var(--light-color);
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--dark-color) !important;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .carousel-caption h5 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .brands-track {
        animation-duration: 20s;
    }
    
    /* Ürün kartları mobil düzenlemeleri */
    .product-card .card-body {
        padding: 0.75rem;
    }
    
    .product-card .card-title {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .product-card .card-text {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    /* Mobilde badge'lerin boyutunu küçült */
    .product-card .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
    
    /* Mobilde fiyat alanını düzenle */
    .product-card .price {
        margin-bottom: 0.5rem;
    }
    
    .product-card .price .h5 {
        font-size: 1rem;
    }
    
    .product-card .price small {
        font-size: 0.75rem;
    }
    
    /* Mobilde ürün bilgilerini düzenle */
    .product-card .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-card .d-flex.justify-content-between .price {
        order: 1;
    }
    
    .product-card .d-flex.justify-content-between small {
        order: 2;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .carousel-item {
        height: 300px;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    /* Çok küçük ekranlar için ek düzenlemeler */
    .product-card .card-title {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .product-card .card-text {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-card .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.3rem;
    }
    
    .product-card .price .h5 {
        font-size: 0.9rem;
    }
    
    .product-card .price small {
        font-size: 0.7rem;
    }
    
    /* Mobilde stok bilgisini daha iyi yerleştir */
    .product-card .position-absolute.top-0.end-0 {
        top: 0.5rem !important;
        right: 0.5rem !important;
    }
    
    /* Mobilde kategori ve marka bilgilerini küçült */
    .product-card .mb-2 small {
        font-size: 0.7rem;
    }
}

/* Özel Animasyonlar */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Hover Efektleri */
.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-shadow {
    transition: var(--transition);
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.rounded-custom {
    border-radius: var(--border-radius) !important;
}

.shadow-custom {
    box-shadow: var(--box-shadow) !important;
}

.transition-custom {
    transition: var(--transition) !important;
}

/* Eski toplam fiyat gösterimini gizle */
.total-price {
    display: none !important;
}

/* Yeni toplam fiyat gösterimi */
.total-price-display .alert {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.total-price-display .total-amount {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.product-image-sizer {
    width: 100%;
    height: 400px;
    object-fit: contain;
}

/* ===========================
   MARKALAR SLIDER
   =========================== */
.brands-slider {
    overflow: hidden;
    background: #ffffff;
    padding: 40px 0;
    position: relative;
    width: 100%;
}

.brands-slider .container {
    overflow: hidden;
    position: relative;
    max-width: 100%;
    padding: 0;
    isolation: isolate;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.brands-slider .container-fluid {
    overflow: hidden;
    position: relative;
    max-width: 100%;
    padding: 0;
    isolation: isolate;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

/* Başlık stili */
.brands-slider .section-title h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.brands-slider .section-title h3:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* Markalar track container */
.brands-track {
    display: flex;
    width: max-content;
    animation: scrollBrands 25s linear infinite; /* Hız artırıldı */
    will-change: transform; /* GPU acceleration için */
    backface-visibility: hidden; /* Rendering optimize */
}

/* Animasyon hiç durmuyor - sürekli akışkan */
/* Linklerin doğal davranışı için hover efektleri kaldırıldı */

/* Animasyon - Başlangıçta ortadan başlar */
@keyframes scrollBrands {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Her marka item */
.brand-item {
    flex: 0 0 auto;
    padding: 12px 16px; /* Daha da büyütüldü */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px; /* Daha büyük */
    margin: 0 6px; /* Daha fazla boşluk */
    cursor: pointer; /* Tıklanabilir cursor */
    user-select: none; /* Seçimi engelle */
}

/* Hover efektleri - yumuşak geçişler */
.brand-item:hover .brand-logo,
.brand-item.force-hover .brand-logo {
    filter: grayscale(0%); /* Renkli yap */
    transform: scale(1.03); /* Daha az büyütme */
    transition: all 0.2s ease; /* Hızlı geçiş */
}

.brand-item:hover .brand-placeholder,
.brand-item.force-hover .brand-placeholder {
    background: #f8f9fa !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    transition: all 0.2s ease; /* Hızlı geçiş */
}

/* Zorla hover için pointer cursor */
.brand-item.force-hover {
    cursor: pointer;
}

/* Tüm brand-item'lara geçiş efekti */
.brand-item {
    transition: all 0.2s ease;
}

/* Click efekti */
.brand-item:active {
    transform: scale(0.95);
}

/* Focus için outline kaldır */
.brand-item:focus {
    outline: none;
}





/* Marka logosu */
.brand-logo {
    max-height: 65px; /* Daha da büyük */
    max-width: 130px; /* Daha da büyük */
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(20%);
    transition: all 0.3s ease;
    display: block;
}

/* Brand logo hover efektleri kaldırıldı - doğal davranış için */

/* Marka placeholder (logo yoksa) */
.brand-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 120px !important; /* Daha da büyük */
    height: 55px !important; /* Daha da büyük */
    background: #fff !important;
    border: 1px solid #dee2e6 !important; /* İnce border */
    border-radius: 6px !important;
    transition: all 0.3s ease;
    font-size: 11px; /* Küçük font */
    color: #495057;
}

/* Brand placeholder hover efektleri kaldırıldı - doğal davranış için */

/* Hover'da animasyon DEVAM EDER - Durdurmayız */
/* .brands-slider:hover .brands-track {
    animation-play-state: paused;
} KALDIRILDI */

/* Responsive ayarlar */
@media (max-width: 768px) {
    .brands-track {
        animation-duration: 30s; /* Mobilde de yavaş */
    }
    
    .brand-item {
        padding: 8px 20px; /* Mobilde de büyük */
        min-width: 140px; /* Büyütüldü */
    }
    
    .brand-logo {
        max-height: 60px; /* Büyütüldü */
        max-width: 130px; /* Büyütüldü */
    }
    
    .brand-placeholder {
        width: 100px !important;
        height: 50px !important;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .brands-track {
        animation-duration: 20s; /* Mobilde hızlı */
    }
    
    .brand-item {
        padding: 6px 10px; /* Mobilde de büyük */
        min-width: 100px; /* Büyütüldü */
        margin: 0 3px;
    }
    
    .brand-logo {
        max-height: 45px; /* Büyütüldü */
        max-width: 100px; /* Büyütüldü */
    }
}