:root {
    --primary: #34495e;
    --secondary: #e67e22;
    --accent: #1abc9c;
    --text: #2c3e50;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --card-shadow: rgba(0, 0, 0, 0.2) 0px 4px 20px;
    --hover-transform: translateY(-5px);
    --new-product: #ff5733;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--text);
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 600;
    color: var(--primary);
}

.hero-section {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}


.hero-logo {
    max-width: 100%;
    max-height: 100px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 5px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    animation: fadeInDown 0.8s ease;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    text-align: center;
}

/* Animasyon */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.main-content {
    padding-top: 20px;
}

.category-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--card-shadow);
}

.category-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 0.5rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

/* Yeni grid düzeni */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Esnek kolon yapısı */
    gap: 0.8rem; /* 1.5rem yerine 0.8rem yapıldı */
    padding: 0.5rem; /* 1rem yerine 0.5rem yapıldı */
}


.col-lg-4, .col-md-6 {
    width: 100%;
}

.product-card {
    background: white;
    width: 100%;
    height: 100%;
    max-width: 250px; 
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: scale(1.02);
}


.product-image-container {
    position: relative;
    padding-top: 100%; /* 1:1 aspect ratio */
    width: 100%;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Fiyat Etiketi */
.price-tag {
    position: absolute;
    top: 5px; /* Üstte biraz daha yukarı alındı */
    right: 8px;
    background: var(--secondary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.7rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 22px;
}

/* Badgeleri fiyat etiketinin altına koyup boşluk ekleyelim */
.badge-container {
    position: absolute;
    top: 32px; /* Fiyat etiketinin hemen altına biraz boşluk bırakıldı */
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px; /* Badgeler arasındaki mesafeyi artırdık */
    max-width: 80px;
}

/* Badgeler için stil (fiyat etiketi ile aynı boyutta) */
.badge {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 12px;
    font-weight: bold;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 22px;
}



/* Özel badgeler */
.recommended-badge {
    background-color: var(--accent);
    color: white;
}

.new-badge {
    background-color: var(--new-product);
    color: white;
}

.vegan-badge {
    background-color: #28a745;
    color: white;
}



/* Mobilde 2 Ürün Yan Yana */
@media (max-width: 576px) {
    .row {
        grid-template-columns: repeat(2, 1fr); /* Mobilde 2 sütun */
        gap: 0.5rem;
    }

    .product-card {
        max-width: 100%;
        margin: 0 auto;
    }

    .product-info {
        padding: 0.5rem;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .product-description {
        font-size: 0.75rem;
    }

    .price-tag {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .badge-container {
        top: 30px; /* Mobilde fiyat etiketiyle badgeler arasındaki mesafeyi azalt */
        gap: 3px;
    }
}



.product-info {
    padding: 1rem;
    background: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.product-description {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0;
    line-height: 1.3;
}


/* Footer stilleri */
.footer {
    background-color: #222; /* Arka plan koyu gri */
    color: #fff; /* Yazı rengini beyaz yap */
    padding: 2rem 0; /* Yukarı ve aşağı boşluk */

}

.footer .row {
    display: flex; /* Flexbox etkinleştir */
    justify-content: space-between; /* Sütunlar arasında eşit boşluk */
    align-items: center; /* Dikeyde ortala */
    text-align: left; /* İçeriği sola hizala */
    gap: 2rem; /* Sütunlar arası boşluk */
    flex-wrap: wrap; /* Mobil uyumluluk için satır kaydır */
}

.footer .col-md-6 {
    flex: 1; /* Sütunlar eşit genişlikte olsun */
    max-width: 45%; /* Maksimum genişlik ayarı */
    min-width: 300px; /* Minimum genişlik, küçük ekranlar için */
    text-align: left; /* İçeriği sola hizala */
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e67e22;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center; /* İkon ve metni hizala */
    color: #ddd; /* Yazılar için açık gri */
}

.footer-contact i {
    color: #e67e22;
    margin-right: 10px;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa; /* Daha soluk bir beyaz */

}
.copyright a {
    text-decoration: none; /* Linkin altını çizme */
    color: inherit; /* Rengi, mevcut yazı rengiyle aynı yap */
}

.copyright a:hover {
    color: inherit; /* Hover durumunda da aynı renk olsun */
}

.kategori-liste-link {
    text-decoration: none;
    color: inherit; 
}
.kategori-liste-link:hover {
    color: var(--secondary); 
}

/* Mobil uyumluluk */
@media (max-width: 768px) {
    .footer .row {
        flex-direction: column; /* Sütunları dikey hizala */
        gap: 1.5rem; /* Daha az boşluk */
    }

    .footer .col-md-6 {
        max-width: 100%; /* Tam genişlik */
        text-align: center; /* Mobilde içeriği ortala */
    }

    .footer-contact li {
        justify-content: center; /* Mobilde ikon ve metni ortala */
    }


}


/* Responsive tasarım */
@media (max-width: 1200px) {
    .row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem; /* Daha küçük boşluk */
    }

    .product-card {
        max-width: 90%; /* Kart genişliğini %90 yap */
        margin: 0 auto; /* Ortala */
    }

    .product-info {
        padding: 0.5rem; /* Daha az padding */
    }

    .product-title {
        font-size: 0.85rem; /* Başlık boyutunu küçült */
    }

    .product-description {
        font-size: 0.65rem; /* Açıklama boyutunu küçült */
    }

    .price-tag {
        padding: 0.2rem 0.5rem; /* Daha az padding */
        font-size: 0.7rem; /* Fiyat etiketini küçült */
    }

    .category-container {
        padding: 0.5rem; /* Daha az padding */
    }

    .category-title {
        font-size: 1.2rem; /* Kategori başlığını küçült */
    }

    .hero-title {
        font-size: 1.3rem; /* Hero başlığını küçült */
    }

    .hero-subtitle {
        font-size: 0.9rem; /* Hero alt başlığını küçült */
    }


    .recommended-badge, .new-badge {

        padding: 2px 4px;
        font-size: 0.6rem;
    }

    .price-tag {

        padding: 0.2rem 0.5rem;

        font-weight: 400;
        font-size: 0.6rem;

    }
}



.category-menu {
    background: #2c3e50;
    padding: 10px 0;
}

.category-menu .nav-link {
    color: #ecf0f1;
    padding: 8px 15px;
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 0 5px;
}

.category-menu .nav-link:hover {
    background: #34495e;
    color: #fff;
}

.category-menu .nav-link.active {
    background: #e74c3c;
    color: #fff;
}

@media (max-width: 768px) {
    .category-menu {
        padding: 5px;
    }

    .category-menu .navbar-nav {
        max-height: 300px;
        overflow-y: auto;
    }

    .category-menu .nav-link {
        margin: 5px 0;
    }
}

.navbar-toggler {
    background-color: #ecf0f1;
}




/* index */

.categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    justify-content: center;
}

.category-box {
    width: calc(25% - 15px); /* 4 kutu yan yana */
    height: 150px;
    background-color: var(--light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    font-weight: 500;
    font-size: 1rem;
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    background-color: var(--secondary);
    color: white;
}

.category-name {
    text-align: center;
    padding: 10px;
}

@media (max-width: 768px) {
    .category-box {
        width: calc(50% - 15px); /* Mobilde 2 kutu yan yana */
    }
}



.recommended-products-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}
.products-carousel {
    display: flex;
    gap: 10px; 
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.products-carousel::-webkit-scrollbar {
    display: none;
}

/* Ana Sayfa Ürün Kartı */
.product-card-home {
    flex: 0 0 auto;
    width: 150px;
    max-width: 150px;
    margin: 0 5px;
    border-radius: 12px;
    background: white;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card-home:hover {
    transform: scale(1.05);
}

.product-card-home .product-image-container {
    position: relative;
    padding-top: 100%;
    width: 100%;
    overflow: hidden;
}

.product-card-home .product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card-home:hover .product-image {
    transform: scale(1.1);
}


@media (max-width: 768px) {
    .products-carousel {
        gap: 5px;
        padding-bottom: 5px;
    }

    .product-card-home {
        width: 130px; /* Mobilde kartları biraz küçült */
        max-width: 130px;
    }
}

@media (max-width: 480px) {
    .product-card-home {
        width: 110px;
        max-width: 110px;
    }
}



/* Modal içindeki öğeleri hizalama */
.modal-body {
    text-align: center;
    padding: 20px;
}

/* Resim genişliği */
.modal-body img {
    width: 100%;
    max-width: 350px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Ürün adı */
#modalProductName {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Fiyat metni */
.modal-price {
    font-size: 1.3rem; /* Daha büyük font */
    font-weight: bold; /* Kalın yazı */
    color: var(--primary); /* Ana renk (isteğe göre değiştirebilirsin) */
    padding: 10px 15px; /* İç boşluk eklendi */
    border-radius: 8px; /* Hafif yuvarlatılmış görünüm */
    display: inline-block; /* Blok gibi görünmesini sağlar */
    margin: 10px 0; /* Üst ve alt boşluk */
}


/* Açıklama metni */
#modalProductDescription {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Kapat butonu */
.modal-footer .btn {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
}

