/* TürkFiyat — ana stil */
:root {
    --tf-red: #8b1e1e;
    --tf-red-dark: #6a1414;
    --tf-cream: #faf6ef;
    --tf-sand: #efe6d6;
    --tf-ink: #2a2421;
    --tf-muted: #6f655d;
    --tf-green: #1f7a4d;
    --tf-green-bg: #e3f3ea;
    --tf-card: #ffffff;
    --tf-border: #e6dccb;
}

body {
    background: var(--tf-cream);
    color: var(--tf-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

a { color: var(--tf-red); }
a:hover { color: var(--tf-red-dark); }

.brand {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--tf-ink);
}
.brand span { color: var(--tf-red); }
.brand small { font-weight: 400; font-size: .8rem; opacity: .8; }

.site-header {
    background: #fff;
    border-bottom: 3px solid var(--tf-red);
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header a { text-decoration: none; }

.header-search { display: flex; gap: .5rem; min-width: 240px; }

.btn-accent {
    background: var(--tf-red);
    border-color: var(--tf-red);
    color: #fff;
}
.btn-accent:hover, .btn-accent:focus { background: var(--tf-red-dark); border-color: var(--tf-red-dark); color: #fff; }

.site-footer { background: var(--tf-sand); color: var(--tf-muted); }

/* ---------- Ana sayfa ---------- */
.hero {
    background: linear-gradient(135deg, var(--tf-red) 0%, #a83a2a 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
}
.hero h1 { font-weight: 800; letter-spacing: -0.02em; }
.hero .form-control { border: none; padding: .8rem 1rem; font-size: 1.1rem; }
.hero .btn { padding: .8rem 1.5rem; font-weight: 600; }
.hero .chips a {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: #fff;
    border-radius: 999px;
    padding: .2rem .8rem;
    margin: .2rem .2rem 0 0;
    text-decoration: none;
    font-size: .9rem;
}
.hero .chips a:hover { background: rgba(255,255,255,.3); }

.stat { background: var(--tf-card); border: 1px solid var(--tf-border); border-radius: .75rem; padding: 1rem; }
.stat .num { font-size: 1.6rem; font-weight: 800; }
.stat .lbl { color: var(--tf-muted); font-size: .85rem; }

/* ---------- Ürün kartları ---------- */
.product-card {
    background: var(--tf-card);
    border: 1px solid var(--tf-border);
    border-radius: .75rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s, transform .15s;
    text-decoration: none;
    color: inherit;
}
.product-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); color: inherit; }
.product-card .img {
    aspect-ratio: 1 / 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--tf-border);
}
.product-card .img img { max-width: 85%; max-height: 85%; object-fit: contain; }
.product-card .img .noimg { color: var(--tf-border); font-size: 2.5rem; }
.product-card .body { padding: .75rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.product-card .name { font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .price { font-size: 1.25rem; font-weight: 800; color: var(--tf-green); margin-top: auto; }
.product-card .meta { font-size: .8rem; color: var(--tf-muted); }

.badge-stores { background: var(--tf-sand); color: var(--tf-ink); font-weight: 600; }

/* ---------- Karşılaştırma tablosu ---------- */
.offer-table { background: var(--tf-card); border-radius: .75rem; overflow: hidden; border: 1px solid var(--tf-border); }
.offer-table table { margin: 0; }
.offer-table tr.best { background: var(--tf-green-bg); }
.offer-table tr.oos { opacity: .55; }
.offer-table .price { font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.offer-table .best-tag {
    background: var(--tf-green);
    color: #fff;
    font-size: .7rem;
    border-radius: 999px;
    padding: .1rem .5rem;
    margin-left: .3rem;
    vertical-align: middle;
}
.old-price { text-decoration: line-through; color: var(--tf-muted); font-size: .85rem; font-weight: 400; }

.product-hero-img {
    background: #fff;
    border: 1px solid var(--tf-border);
    border-radius: .75rem;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-hero-img img { max-width: 90%; max-height: 90%; object-fit: contain; }

.chart-box { background: var(--tf-card); border: 1px solid var(--tf-border); border-radius: .75rem; padding: 1rem; }

/* ---------- Yönetim ---------- */
body.admin { background: #f4f2ee; }
.admin-header { background: var(--tf-ink); }
.admin-header a { color: #f0e6d6; text-decoration: none; }
.admin-header a:hover { color: #fff; }
.admin-header .brand { color: #fff; }
.admin-main { max-width: 1400px; }
.admin .card { border-color: var(--tf-border); }
.admin .table td, .admin .table th { vertical-align: middle; }
.status-ok { color: var(--tf-green); font-weight: 600; }
.status-fail { color: #b42318; font-weight: 600; }
.status-none { color: var(--tf-muted); }
.form-section { background: #fff; border: 1px solid var(--tf-border); border-radius: .75rem; padding: 1.25rem; margin-bottom: 1rem; }
.form-section h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.small-help { font-size: .8rem; color: var(--tf-muted); }
.text-break-all { word-break: break-all; }
.thumb { width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid var(--tf-border); border-radius: .3rem; }

.login-box { max-width: 380px; margin: 8vh auto; }

@media (max-width: 576px) {
    .hero { padding: 1.5rem 1rem; }
    .hero h1 { font-size: 1.6rem; }
    .header-search { order: 3; width: 100%; }
}

.validation-summary-valid { display: none; }

/* Logo (sol üst) */
.brand-logo { display: inline-flex; align-items: center; flex-shrink: 0; margin-right: .5rem; text-decoration: none; }
.brand-logo img { height: 45px; width: auto; display: block; }
@media (max-width: 576px) {
    .brand-logo img { height: 36px; }
}
