/* Genel tipografi ve gövde */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar.fixed-top {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

main {
    padding-top: 4.5rem; /* sabit navbar için boşluk */
}

/* Sidebar */
.my-4 {
    margin-top: 1.5rem !important;
    margin-bottom: 1rem !important;
}

.list-group-item {
    padding: .5rem .75rem;
}

    .list-group-item.active {
        background-color: #0d6efd; /* Bootstrap 5 primary */
        border-color: #0d6efd;
        color: #fff;
    }

/* Ürün kartları */
.card.h-100 {
    border: 1px solid #eee;
    transition: transform .1s ease-in-out;
}

    .card.h-100:hover {
        transform: translateY(-2px);
    }

.card-img-top {
    width: 100%;
    height: 200px; /* sabit yükseklik */
    object-fit: cover; /* oran bozulmadan kırp */
    object-position: center;
}

.card-body {
    padding: .75rem;
}

.card-title {
    font-size: 1rem;
    margin-bottom: .5rem;
    min-height: 2.4rem; /* 2 satır için sabit alan */
    overflow: hidden;
}

.card-body h5, .card-text.fw-bold {
    color: #198754; /* Bootstrap 5 success */
    font-weight: bold;
}

.card-footer {
    background: #fff;
    border-top: none;
    padding: .75rem;
}

/* Arama/filtre formu */
.row.g-3 .form-floating label {
    font-size: .875rem;
}

.row.g-3 .form-floating .form-control {
    height: calc(3rem + 2px);
    padding: 1rem .75rem .25rem .75rem;
}

/* Sayfalama */
.pagination .page-item .page-link {
    color: #0d6efd;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* Footer */
footer {
    margin-top: 2rem;
}

    footer p {
        margin: 0;
    }

/* Kart içindeki resim alanı sabit */
.product-image {
    width: 100%;
    height: 220px; /* tüm kartlarda aynı yükseklik */
    object-fit: contain; /* resmi kırpmadan gösterir */
    background-color: #fff; /* boşluk varsa beyaz arka plan */
    display: block;
    margin: 0 auto;
    padding: 5px;
}

/* Kart gövdesi sabit hizalı */
.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Kart içeriği sabit yükseklik */
.card-body {
    flex: 1; /* içerik alanı esner */
    display: flex;
    flex-direction: column;
}


/* Ürün adı 2 satırdan fazla olmasın */
.product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* en fazla 2 satır */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3rem; /* kart hizası bozulmasın */
    font-size: 0.95rem;
    font-weight: 600;
}

/* Kartların mobilde tam genişlikte görünmesi */
@media (max-width: 576px) {
    .product-image {
        height: 180px; /* mobilde biraz daha küçük */
    }

    .product-name {
        font-size: 0.9rem;
    }
}
html, body {
    overflow-x: hidden; /* Yatay scroll barı engeller */
}
