/* =========================
   GLOBAL / RESET
   ========================= */

body.site-body {
    padding-bottom: 60px;
    background-color: #f5f7fb; /* açık arka plan */
    color: #111827;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Hover geçişleri */
a,
button,
.btn,
.card,
.nav-link,
.list-group-item {
    transition: all 0.18s ease-in-out;
}

/* Linkler */
a {
    color: #2563eb;
}
a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

/* =========================
   NAVBAR
   ========================= */

.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.navbar-brand span {
    font-weight: 700;
    letter-spacing: .03em;
}

/* Aktif linkler */
.navbar .nav-link {
    color: #4b5563 !important;
    font-size: 0.9rem;
}
.navbar .nav-link.active,
.navbar .nav-link.show,
.navbar .nav-link:hover {
    color: #2563eb !important;
}

/* =========================
   CONTAINER & CARDS
   ========================= */

.container {
    max-width: 1250px;
}

/* Genel kart stili (filtre kartı, blog vs.) */
.card {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background-color: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.card-header {
    border-bottom-color: rgba(148, 163, 184, 0.45);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(219, 234, 254, 0.95));
    color: #111827;
}

.card-body {
    font-size: .9rem;
}

/* List group */
.list-group-item {
    border-color: rgba(148, 163, 184, 0.35);
    font-size: .9rem;
    background-color: #ffffff;
}
.list-group-item-action:hover {
    background-color: rgba(148, 163, 184, 0.08);
}
.list-group-item.active {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #f9fafb;
}

/* =========================
   BUTTONS
   ========================= */

.btn-sm,
.btn {
    border-radius: 999px;
    font-size: .85rem;
    padding-inline: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
}
.btn-success:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.35);
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-danger {
    background-color: transparent;
}

.btn-outline-secondary {
    border-color: #9ca3af;
    color: #4b5563;
}
.btn-outline-secondary:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.btn-outline-primary {
    border-color: #2563eb;
    color: #2563eb;
}
.btn-outline-primary:hover {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-outline-danger {
    border-color: #dc2626;
    color: #b91c1c;
}
.btn-outline-danger:hover {
    background-color: #dc2626;
    color: #ffffff;
}

/* =========================
   TABLES
   ========================= */

.table {
    font-size: .85rem;
}
.table thead th {
    background-color: #f3f4f6;
    border-bottom: 1px solid rgba(148, 163, 184, 0.6);
}
.table tbody tr:hover {
    background-color: rgba(148, 163, 184, 0.09);
}

/* =========================
   PRODUCT / MARKET CARDS (NEON)
   ========================= */

/* Eski product-card'lar için temel stil, diğer sayfalarda da kullanılıyor olabilir */
.product-card {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(129, 140, 248, 0.9);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.08),
        0 0 22px rgba(96, 165, 250, 0.45);
    background: radial-gradient(circle at top, #020617 0, #020617 45%, #020617 100%);
    color: #e5e7eb;
}

.product-card img {
    object-fit: cover;
    height: 170px;
    width: 100%;
}

.product-card .card-body {
    padding: 0.75rem 0.9rem 0.9rem;
}

.product-card-title {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .25rem;
    color: #f9fafb;
}

.product-card-price {
    font-weight: 700;
    color: #22c55e;
    font-size: .95rem;
}

/* =========================
   MARKET CARD – YENİ ANASAYFA KARTLARI
   ========================= */

.market-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(circle at top, #020617 0, #020617 55%, #020617 100%);
    border: 2px solid rgba(129, 140, 248, 0.9);        /* sabit neon sınır */
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.4),
        0 0 18px rgba(96, 165, 250, 0.55);
    transform: translateY(0);
}

.market-card-image img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.market-card-body {
    padding: .75rem .9rem .9rem;
    color: #e5e7eb;
}

/* Başlık: 2 satırda kırp, kartlar hizalı kalsın */
.market-card-title {
    font-size: .9rem;
    font-weight: 600;
    color: #f9fafb;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    line-height: 1.3;
}

.market-card-price {
    font-weight: 800;
    color: #22c55e;
    font-size: 1rem;
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.5),
        0 0 26px rgba(96, 165, 250, 0.85);
}

/* Vitrin şeridi & diğer şeritler */
.market-card-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    font-size: 0.7rem;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ribbon-featured { 
    background: linear-gradient(135deg, #f97316, #facc15); 
    color:#111827; 
}
.ribbon-hot      { background: linear-gradient(135deg, #ef4444, #f97316); color:#f9fafb; }
.ribbon-popular  { background: linear-gradient(135deg, #3b82f6, #a855f7); color:#f9fafb; }
.ribbon-new      { background: linear-gradient(135deg, #22c55e, #14b8a6); color:#022c22; }
.ribbon-search   { background: linear-gradient(135deg, #64748b, #0ea5e9); color:#f9fafb; }

/* VİTRİN KARTLARINA NEON YANIP SÖNME ANİMASYONU */
@keyframes neonPulse {
    0% {
        box-shadow:
            0 0 0 1px rgba(15, 23, 42, 0.5),
            0 0 14px rgba(251, 191, 36, 0.55),
            0 0 28px rgba(252, 211, 77, 0.45);
        border-color: rgba(250, 204, 21, 0.9);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(15, 23, 42, 0.6),
            0 0 26px rgba(251, 191, 36, 0.95),
            0 0 42px rgba(252, 211, 77, 0.9);
        border-color: rgba(250, 250, 109, 1);
    }
    100% {
        box-shadow:
            0 0 0 1px rgba(15, 23, 42, 0.5),
            0 0 18px rgba(251, 191, 36, 0.6),
            0 0 32px rgba(252, 211, 77, 0.5);
        border-color: rgba(250, 204, 21, 0.95);
    }
}

/* sadece vitrin kartı (ribbon-featured içeren) yanıp söner */
.market-card:has(.ribbon-featured) {
    animation: neonPulse 2.4s ease-in-out infinite alternate;
}

/* =========================
   HOME SLIDER
   ========================= */

.home-slider-img {
    max-height: 420px;
    object-fit: cover;
    border-radius: 22px;
    border: 3px solid #111827; /* çerçeve */
    box-shadow:
        0 0 0 2px rgba(129, 140, 248, 0.9), /* neon dış çerçeve */
        0 24px 40px rgba(15, 23, 42, 0.45);
    background-color: #020617;
}

.home-slider-caption {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.85));
    border-radius: 16px;
    padding: 0.75rem 1rem;
}

.carousel-control-icon {
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(0,0,0,.8);
}

@media (max-width: 768px) {
    .home-slider-img {
        max-height: 230px;
        border-radius: 18px;
    }
    .home-slider-caption {
        font-size: 0.8rem;
        padding-bottom: 1.2rem;
    }

    /* küçük ekranlarda kart görselini biraz kısalt */
    .market-card-image img,
    .product-card img {
        height: 150px;
    }
}

/* =========================
   MOBILE BOTTOM BAR
   ========================= */

.mobile-bottom-nav,
.mobile-tabbar {
    position: fixed;
    z-index: 1030;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: #ffffff;
    border-top: 1px solid rgba(148, 163, 184, 0.5);
    display: flex;
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(12px);
}

.mobile-bottom-nav a,
.mobile-tabbar a {
    font-size: 11px;
    text-decoration: none;
    color: #4b5563;
}

.mobile-bottom-nav a div:first-child,
.mobile-tabbar a div:first-child {
    font-size: 16px;
}

.mobile-bottom-nav a.active,
.mobile-tabbar a.active {
    color: #2563eb;
    font-weight: 600;
}

/* =========================
   FORMS
   ========================= */

.form-control,
.form-select {
    border-radius: 10px;
    border-color: rgba(148, 163, 184, 0.7);
    font-size: .9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.1rem rgba(37, 99, 235, .25);
}

/* =========================
   BADGES
   ========================= */

.badge {
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
}

.badge.bg-secondary {
    background-color: #6b7280 !important;
}
.badge.bg-success {
    background-color: #22c55e !important;
}
.badge.bg-warning {
    background-color: #facc15 !important;
    color: #1f2933 !important;
}

/* =========================
   ALERTS
   ========================= */

.alert {
    border-radius: 10px;
}

/* =========================
   DARK MODE
   ========================= */

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body.site-body {
    background-color: #020617;
    color: #e5e7eb;
}

/* Navbar */
html[data-theme="dark"] .navbar {
    background-color: #020617 !important;
    border-bottom-color: #1f2937 !important;
    box-shadow: 0 2px 18px rgba(0,0,0,0.9);
}
html[data-theme="dark"] .navbar-light .navbar-nav .nav-link {
    color: #e5e7eb !important;
}
html[data-theme="dark"] .navbar-light .navbar-nav .nav-link:hover {
    color: #93c5fd !important;
}

/* Cards */
html[data-theme="dark"] .card {
    background-color: #020617;
    border-color: #1f2937;
    box-shadow: 0 18px 40px rgba(0,0,0,0.9);
}
html[data-theme="dark"] .card-header {
    background: linear-gradient(135deg, #020617, #0f172a);
    border-bottom-color: #1f2937;
}

/* Tables */
html[data-theme="dark"] .table {
    color: #e5e7eb;
}
html[data-theme="dark"] .table thead th {
    background-color: #020617;
    border-bottom-color: #1f2937;
}
html[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(30, 64, 175, 0.35);
}

/* List group */
html[data-theme="dark"] .list-group-item {
    background-color: #020617;
    border-color: #1f2937;
    color: #e5e7eb;
}
html[data-theme="dark"] .list-group-item-action:hover {
    background-color: #111827;
}
html[data-theme="dark"] .list-group-item.active {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Input & select */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background-color: #020617;
    color: #e5e7eb;
    border-color: #334155;
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    background-color: #020617;
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.1rem rgba(59,130,246,.4);
}

/* Buttons */
html[data-theme="dark"] .btn-outline-secondary {
    color: #e5e7eb;
    border-color: #4b5563;
}
html[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #374151;
    color: #f9fafb;
}
html[data-theme="dark"] .btn-outline-primary {
    color: #bfdbfe;
    border-color: #3b82f6;
}
html[data-theme="dark"] .btn-outline-primary:hover {
    background-color: #3b82f6;
    color: #f9fafb;
}
html[data-theme="dark"] .btn-outline-danger {
    color: #fecaca;
    border-color: #ef4444;
}
html[data-theme="dark"] .btn-outline-danger:hover {
    background-color: #ef4444;
    color: #f9fafb;
}

/* Dropdown */
html[data-theme="dark"] .dropdown-menu {
    background-color: #020617;
    border-color: #1f2937;
}
html[data-theme="dark"] .dropdown-item {
    color: #e5e7eb;
}
html[data-theme="dark"] .dropdown-item:hover {
    background-color: #111827;
}

/* Alerts */
html[data-theme="dark"] .alert-info {
    background-color: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.4);
    color: #dbeafe;
}
html[data-theme="dark"] .alert-danger {
    background-color: rgba(185, 28, 28, 0.18);
    border-color: rgba(248, 113, 113, 0.6);
}
html[data-theme="dark"] .alert-success {
    background-color: rgba(22, 163, 74, 0.15);
    border-color: rgba(74, 222, 128, 0.5);
}

/* Background helpers */
html[data-theme="dark"] .bg-body,
html[data-theme="dark"] .bg-body-tertiary {
    background-color: #020617 !important;
}

/* Mobil alt bar dark */
html[data-theme="dark"] .mobile-bottom-nav,
html[data-theme="dark"] .mobile-tabbar {
    background-color: #020617;
    border-top-color: #1f2937;
}
html[data-theme="dark"] .mobile-bottom-nav a,
html[data-theme="dark"] .mobile-tabbar a {
    color: #e5e7eb;
}

/* Product / market card dark */
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .market-card {
    background: radial-gradient(circle at top, #020617 0, #020617 55%, #020617 100%);
    border-color: rgba(129, 140, 248, 0.95);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.8),
        0 0 26px rgba(96, 165, 250, 0.9);
}

/* Navbar brand primary rengi */
html[data-theme="dark"] .navbar-brand span.text-primary {
    color: #3b82f6;
}

/* =========================
   KART İÇİNDEKİ GÖRÜNTÜLENME / TEXT-MUTED DÜZELTME
   ========================= */

/* İlan listesi kartları (anasayfa, filtrelenmiş ürünler vs.) */
.product-card .small,
.product-card .text-muted,
.market-card .small,
.market-card .text-muted {
    color: #f9fafb !important;  /* beyaza yakın */
    opacity: 0.95;
}

/* Koyu zemin üzerinde kullanılan genel helper */
.on-dark,
.on-dark * {
    color: #f9fafb;
}

/* on-dark içinde "text-muted" yine açık tonda olsun */
.on-dark .text-muted,
.on-dark .small {
    color: #e5e7eb !important;
    opacity: 0.9;
}

/* =========================
   ÜRÜN DETAY: SOL GÖRSEL KARTI TAM DOLDURSUN
   ========================= */

/* product-detail-main row'unda, sol kolon içindeki market-card tam yüksekliği kullansın */
.product-detail-main .col-md-5 > .market-card {
    height: 100%;
    width: 100%;
}

/* Sol kart içindeki image wrapper */
.product-detail-main .product-detail-image {
    height: 100%;
}

/* Detay sayfasında resim kart yüksekliğini tamamen doldursun */
.product-detail-main .product-detail-image img {
    width: 100%;
    height: 100% !important;   /* 170px kuralını ezer */
    object-fit: cover;
    display: block;
}
