/* ===== hgmm5sm1.ejs için özel stiller ===== */

/* Genel kapsayıcı */
#food-calculator-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f3f6fb;
    padding: 24px 20px 28px;
    border-radius: 16px;
}

/* Başlık */
#food-calculator-container h2 {
    font-weight: 600;
    color: #1f2933;
}

/* ===== Arama Alanı ===== */

#search-container {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
}

#search-container .input-group {
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

#foodSearchInput {
    border: none;
    padding: 12px 18px;
    font-size: 1rem;
    background-color: #f8fafc;
    width: 100%;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

#foodSearchInput::placeholder {
    color: #9ca3af;
}

#foodSearchInput:focus {
    outline: none;
    background-color: #ffffff;
    transform: translateY(-1px);
    border: none !important;
    box-shadow: 0 0 0 2px #4a90e2 inset !important;
}

/* ===== Breadcrumb ===== */

.breadcrumb-container {
    margin: 0 auto 20px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #e6edf9, #f3f6fb);
    border-radius: 999px;
    max-width: 780px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.breadcrumb {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    list-style: none;
}

.breadcrumb-item {
    font-size: 0.9rem;
    white-space: nowrap;
}

.breadcrumb-item a {
    color: #1f6fe5;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #34495e;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    padding: 0 6px;
}

/* ===== Kategori Başlığı ===== */

#food-content > h3 {
    max-width: 380px;
    margin: 0 auto 18px;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e3f2ff, #f5fbff);
    border: 1px solid #b6d2ff;
    color: #145399;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 20px rgba(46, 124, 213, 0.35);
}

/* Detay kartındaki h3 doğal kalsın */
#food-content .card.shadow-sm h3 {
    background: none;
    border: none;
    box-shadow: none;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1f2933;
}

/* ===== Kart Grid ===== */

#food-content {
    margin-top: 10px;
    padding-bottom: 20px;
}

#food-content > .row.row-cols-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 22px;
    max-width: 1150px;
    margin: 0 auto 24px;
}

#food-content > .row.row-cols-2 > .col {
    display: flex;
    justify-content: center;
    padding: 0;
}

/* ===== Kart tasarımı ===== */

.category-card,
.food-card {
    border-radius: 20px;
    padding: 20px 16px 18px;
    background: linear-gradient(145deg, #ffffff, #f2f5fb);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid #d4dce9;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.16),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    cursor: pointer;
    transition: 0.2s ease;
}

.category-card:hover,
.food-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25),
                0 0 0 1px rgba(205, 222, 255, 0.9) inset;
    background: linear-gradient(145deg, #fdfefe, #edf4ff);
}

.card-img-top {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.28);
}

/* Kart başlığı */
.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #184d88;
}

/* ==================================================== */
/*           🔥 DETAY SAYFASINI PANEL YAPISI           */
/* ==================================================== */

#food-content .card.shadow-sm {
    max-width: 900px;
    margin: 0 auto 24px;
    border-radius: 18px;
    border: 1px solid #d3dde9;
    background: linear-gradient(145deg, #ffffff, #f3f6fb);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
}

/* Detay iç düzen: solda resim, sağda bilgiler */
#food-content .card.shadow-sm .card-body {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: flex-start;
    text-align: left;
}

/* Sol resim */
#food-content .card.shadow-sm .card-body img.img-fluid {
    width: 160px;
    height: 160px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

/* Başlık */
#food-detail-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 4px;
    color: #1f2933;
}

/* Gram ayarlama alanı */
#food-content .card.shadow-sm .input-group {
    max-width: 260px;
    margin: 10px 0 14px;
}

/* Liste görünümü */
#food-content .list-group-item {
    border: none;
    border-bottom: 1px solid #e1e6f0;
    background: transparent;
    padding: 10px 0;
}

#food-content .list-group-item:last-child {
    border-bottom: none;
}

/* Mobil düzen */
@media (max-width: 768px) {
    #food-content .card.shadow-sm .card-body {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #food-content .card.shadow-sm .card-body img.img-fluid {
        margin: 0 auto;
    }

    #food-content .list-group-item {
        text-align: left;
    }
}
/* === Besin detay paneli – düzenli 2 sütunlu layout === */

#food-content .card.shadow-sm {
    max-width: 1000px;
    margin: 0 auto 24px;
    border-radius: 18px;
    border: 1px solid #d3dde9;
    background: linear-gradient(145deg, #ffffff, #f3f6fb);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
}

/* Kart içi: sol sütun (resim+başlık+gram), sağ sütun (liste) */
#food-content .card.shadow-sm .card-body {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    grid-auto-rows: auto;
    column-gap: 28px;
    row-gap: 8px;
    align-items: flex-start;
    text-align: left;
}

/* Resim */
#food-content .card.shadow-sm .card-body img {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    width: 180px;
    height: 180px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
    justify-self: center;
}

/* Başlık */
#food-content .card.shadow-sm h3 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    margin: 8px 0 4px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* Gram ayar alanı */
#food-content .card.shadow-sm .input-group {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    justify-self: center;
    max-width: 220px;
    margin: 6px 0 0;
}

/* Besin değerleri listesi */
#food-content .card.shadow-sm .list-group {
    grid-column: 2 / 3;
    grid-row: 1 / 4;
    margin-top: 0;
}

/* Liste satırları */
#food-content .card.shadow-sm .list-group-item {
    border: none;
    border-bottom: 1px solid #e1e6f0;
    padding: 10px 0;
    background: transparent;
}

#food-content .card.shadow-sm .list-group-item:last-child {
    border-bottom: none;
}

/* Mobil düzen: tek sütun, üstte resim+başlık+gram, altta liste */
@media (max-width: 768px) {
    #food-content .card.shadow-sm .card-body {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #food-content .card.shadow-sm .card-body img {
        grid-column: 1 / 2;
        grid-row: auto;
        margin-bottom: 8px;
    }

    #food-content .card.shadow-sm h3 {
        grid-column: 1 / 2;
        grid-row: auto;
    }

    #food-content .card.shadow-sm .input-group {
        grid-column: 1 / 2;
        grid-row: auto;
        margin-bottom: 12px;
    }

    #food-content .card.shadow-sm .list-group {
        grid-column: 1 / 2;
        grid-row: auto;
        text-align: left;
    }
}
