/* ============================================================
   BESİN DEĞERİ — Ana Stil Dosyası
   Modern & Colorful Theme
   ============================================================ */

:root {
    --bd-green:       #2ecc71;
    --bd-green-dark:  #27ae60;
    --bd-blue:        #3498db;
    --bd-orange:      #f39c12;
    --bd-red:         #e74c3c;
    --bd-purple:      #9b59b6;
    --bd-teal:        #1abc9c;
    --bd-dark:        #1a2332;
    --bd-dark-2:      #243447;
    --bd-light:       #f0f9f4;
    --bd-gray:        #6c757d;
    --bd-border:      #e2e8f0;
    --bd-radius:      12px;
    --bd-radius-lg:   20px;
    --bd-shadow:      0 4px 20px rgba(0,0,0,.08);
    --bd-shadow-hover:0 8px 32px rgba(0,0,0,.14);
    --font-main:      'Inter', sans-serif;
    --font-display:   'Poppins', sans-serif;
}

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background: #f7fbf9;
    color: #2d3748;
    line-height: 1.6;
}

a { color: var(--bd-green-dark); text-decoration: none; }
a:hover { color: var(--bd-green); }

/* ── Navbar ──────────────────────────────────────────────── */
.bd-navbar {
    background: linear-gradient(135deg, var(--bd-dark) 0%, var(--bd-dark-2) 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,.25);
    padding: 10px 0;
}

.brand-icon { font-size: 1.8rem; line-height: 1; }
.brand-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    display: block;
}
.brand-tld { color: var(--bd-green); font-size: .9rem; font-weight: 600; }

.nav-search-form {
    position: relative;
    width: 100%;
    max-width: 480px;
}

.nav-search-input {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    border-radius: var(--bd-radius) 0 0 var(--bd-radius) !important;
    padding: 9px 16px;
}
.nav-search-input::placeholder { color: rgba(255,255,255,.55); }
.nav-search-input:focus {
    background: rgba(255,255,255,.2);
    border-color: var(--bd-green);
    color: #fff;
    box-shadow: none;
}

.btn-search {
    background: var(--bd-green);
    border: none;
    color: #fff;
    border-radius: 0 var(--bd-radius) var(--bd-radius) 0 !important;
    padding: 9px 18px;
    font-size: 1rem;
}
.btn-search:hover { background: var(--bd-green-dark); color: #fff; }

.navbar-nav .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all .2s;
}
.navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,.1);
}

/* ── Live Search Dropdown ────────────────────────────────── */
.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: var(--bd-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    z-index: 9999;
    display: none;
    max-height: 380px;
    overflow-y: auto;
}
.search-dropdown.show { display: block; }
.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--bd-border);
    transition: background .15s;
    cursor: pointer;
    color: #2d3748;
    text-decoration: none;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bd-light); }
.search-item-icon { font-size: 1.5rem; width: 36px; text-align: center; }
.search-item-name { font-weight: 600; font-size: .95rem; }
.search-item-cat  { font-size: .78rem; color: var(--bd-gray); }
.search-item-cal  { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--bd-orange); white-space: nowrap; }

/* ── Hero Section ────────────────────────────────────────── */
.bd-hero {
    background: linear-gradient(135deg, var(--bd-dark) 0%, #0d6efd22 50%, var(--bd-dark-2) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><circle cx="30" cy="30" r="20" fill="none" stroke="%2327ae6022" stroke-width="1"/></svg>');
    background-size: cover, 60px 60px;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.bd-hero::before {
    content: '';
    position: absolute;
    top: -50px; right: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(46,204,113,.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.hero-title span { color: var(--bd-green); }
.hero-subtitle { color: rgba(255,255,255,.75); font-size: 1.1rem; }

.hero-search-box {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--bd-radius-lg);
    padding: 28px;
}
.hero-search-input {
    font-size: 1.1rem;
    padding: 14px 20px;
    border-radius: var(--bd-radius) 0 0 var(--bd-radius) !important;
    border: 2px solid transparent;
}
.hero-search-input:focus {
    border-color: var(--bd-green);
    box-shadow: 0 0 0 4px rgba(46,204,113,.15);
}
.btn-hero-search {
    background: linear-gradient(135deg, var(--bd-green), var(--bd-teal));
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 0 var(--bd-radius) var(--bd-radius) 0 !important;
}
.btn-hero-search:hover {
    background: linear-gradient(135deg, var(--bd-green-dark), var(--bd-teal));
    color: #fff;
    transform: translateX(2px);
}

.hero-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--bd-green);
    line-height: 1;
}
.hero-stat-label { color: rgba(255,255,255,.65); font-size: .85rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
    border: none;
    border-radius: var(--bd-radius);
    box-shadow: var(--bd-shadow);
    transition: transform .2s, box-shadow .2s;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bd-shadow-hover);
}

.food-card { overflow: hidden; height: 100%; }
.food-card-icon {
    font-size: 3rem;
    text-align: center;
    padding: 20px 0 10px;
    line-height: 1;
}
.food-card .card-title {
    font-weight: 600;
    font-size: .95rem;
    color: #2d3748;
    margin-bottom: 8px;
}
.food-card .card-body { padding: 12px 16px 16px; }
.food-card-cat {
    font-size: .75rem;
    color: var(--bd-gray);
    margin-bottom: 6px;
}
.food-card-macros {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.macro-badge {
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    color: #fff;
}
.macro-kcal { background: var(--bd-orange); }
.macro-p    { background: var(--bd-red); }
.macro-f    { background: var(--bd-blue); }
.macro-c    { background: var(--bd-purple); }

/* ── Category Cards ──────────────────────────────────────── */
.cat-card {
    border-radius: var(--bd-radius);
    overflow: hidden;
    text-align: center;
    padding: 24px 16px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    border: none;
    text-decoration: none;
    display: block;
    background: #fff;
    box-shadow: var(--bd-shadow);
}
.cat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--bd-shadow-hover);
    text-decoration: none;
}
.cat-card-icon { font-size: 2.8rem; margin-bottom: 10px; display: block; }
.cat-card-name {
    font-weight: 600;
    font-size: .9rem;
    color: #2d3748;
    margin-bottom: 4px;
}
.cat-card-count { font-size: .78rem; color: var(--bd-gray); }
.cat-card-bar {
    height: 4px;
    border-radius: 0 0 var(--bd-radius) var(--bd-radius);
    margin: 14px -16px -24px;
}

/* ── Section Headings ────────────────────────────────────── */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 6px;
}
.section-subtitle { color: var(--bd-gray); font-size: .95rem; }

.section-divider {
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--bd-green), var(--bd-teal));
    border-radius: 2px;
    margin-bottom: 20px;
}

/* ── Nutrition Facts Label ───────────────────────────────── */
.nutrition-label {
    border: 2px solid #000;
    border-radius: 0;
    font-family: Arial, sans-serif;
    max-width: 340px;
    background: #fff;
}
.nf-header { border-bottom: 8px solid #000; padding: 8px 12px; }
.nf-title { font-size: 2rem; font-weight: 900; line-height: 1; }
.nf-serving { font-size: .85rem; border-bottom: 4px solid #000; padding: 4px 12px; }
.nf-calories-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 4px 12px 6px;
    border-bottom: 8px solid #000;
}
.nf-calories-label { font-size: .85rem; font-weight: 700; }
.nf-calories-val { font-size: 3rem; font-weight: 900; line-height: 1; }
.nf-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 12px;
    border-bottom: 1px solid #ccc;
    font-size: .82rem;
}
.nf-row.thick { border-bottom: 4px solid #000; }
.nf-row.sub   { padding-left: 28px; }
.nf-row-name  { font-weight: 700; }
.nf-row-dv    { font-weight: 700; }
.nf-footnote  { padding: 6px 12px; font-size: .7rem; border-top: 4px solid #000; }
.nf-dv-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin: 2px 0;
    overflow: hidden;
}
.nf-dv-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--bd-green), var(--bd-teal));
    transition: width .8s ease;
}
.nf-dv-fill.high   { background: linear-gradient(90deg, var(--bd-orange), #e67e22); }
.nf-dv-fill.very-high { background: linear-gradient(90deg, var(--bd-red), #c0392b); }

/* ── Macro Chart ─────────────────────────────────────────── */
.macro-chart-wrap {
    background: #fff;
    border-radius: var(--bd-radius-lg);
    padding: 24px;
    box-shadow: var(--bd-shadow);
}
.macro-legend { list-style: none; padding: 0; margin: 0; }
.macro-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: .9rem;
}
.macro-legend-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Comparison Table ────────────────────────────────────── */
.compare-table { border-radius: var(--bd-radius); overflow: hidden; }
.compare-table thead th {
    background: var(--bd-dark);
    color: #fff;
    font-weight: 600;
    text-align: center;
}
.compare-table tbody tr:nth-child(even) { background: var(--bd-light); }
.compare-table .best { background: #d4edda; font-weight: 600; }
.compare-bar-wrap { background: #e9ecef; border-radius: 4px; height: 8px; overflow: hidden; margin-top: 3px; }
.compare-bar { height: 100%; border-radius: 4px; }

/* ── Search Results ──────────────────────────────────────── */
.filter-sidebar {
    background: #fff;
    border-radius: var(--bd-radius);
    padding: 20px;
    box-shadow: var(--bd-shadow);
    position: sticky;
    top: 80px;
}
.filter-title { font-weight: 700; font-size: 1rem; margin-bottom: 12px; color: #1a2332; }

.sort-bar {
    background: #fff;
    border-radius: var(--bd-radius);
    padding: 12px 20px;
    box-shadow: var(--bd-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Admin ───────────────────────────────────────────────── */
.admin-sidebar {
    background: var(--bd-dark);
    min-height: 100vh;
    padding: 0;
}
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.75);
    padding: 12px 20px;
    text-decoration: none;
    transition: all .2s;
    border-left: 3px solid transparent;
}
.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-left-color: var(--bd-green);
}
.admin-nav-link i { font-size: 1.1rem; width: 20px; }

.admin-stat-card {
    background: linear-gradient(135deg, var(--c1), var(--c2));
    border-radius: var(--bd-radius);
    color: #fff;
    padding: 20px 24px;
}
.admin-stat-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; }
.admin-stat-label { opacity: .85; font-size: .9rem; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.bd-breadcrumb {
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid var(--bd-border);
    font-size: .85rem;
}
.breadcrumb-item a { color: var(--bd-green-dark); }
.breadcrumb-item.active { color: var(--bd-gray); }

/* ── Tags / Badges ───────────────────────────────────────── */
.bd-tag {
    display: inline-block;
    background: var(--bd-light);
    color: var(--bd-green-dark);
    border: 1px solid rgba(46,204,113,.3);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: .8rem;
    font-weight: 500;
    margin: 3px;
    text-decoration: none;
}
.bd-tag:hover { background: var(--bd-green); color: #fff; border-color: var(--bd-green); }

/* ── Footer ──────────────────────────────────────────────── */
.bd-footer {
    background: var(--bd-dark);
    color: rgba(255,255,255,.75);
    padding: 50px 0 30px;
}
.footer-brand {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.footer-heading { color: var(--bd-green); font-weight: 600; margin-bottom: 12px; font-size: .9rem; }
.footer-links { margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .88rem; }
.footer-links a:hover { color: var(--bd-green); }
.footer-divider { border-color: rgba(255,255,255,.1); margin: 30px 0 20px; }

/* ── Utilities ───────────────────────────────────────────── */
.text-green  { color: var(--bd-green) !important; }
.text-orange { color: var(--bd-orange) !important; }
.bg-green    { background: var(--bd-green) !important; }
.bg-dark-bd  { background: var(--bd-dark) !important; }

.btn-primary-bd {
    background: linear-gradient(135deg, var(--bd-green), var(--bd-teal));
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: var(--bd-radius);
    padding: 10px 24px;
}
.btn-primary-bd:hover { background: var(--bd-green-dark); color: #fff; }

.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f0f4f8 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .bd-hero { padding: 40px 0 30px; }
    .hero-title { font-size: 1.6rem; }
    .nav-search-form { max-width: 100%; margin: 10px 0; }
    .filter-sidebar { position: static; }
    .nutrition-label { max-width: 100%; }
    .compare-table { font-size: .8rem; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--bd-green); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--bd-green-dark); }
