/* ============================================================
   KoşAtSepete — ana sayfa (hero, kategori şeridi, kampanya, raylar)
   ============================================================ */

/* ---------- Hero ---------- */
.ks-hero {
    position: relative; overflow: hidden; color: #2a231c; min-height: 360px;
    display: flex; align-items: center;
    background: #ebe4d6 url('/css/images/header_bg.jpg') right center / cover no-repeat;
}
/* Metin alanini okunur kilan krem degrade; sag tarafta at ve binici net kalir */
.ks-hero::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, rgba(245, 241, 232, 0.97) 0%, rgba(245, 241, 232, 0.92) 32%, rgba(245, 241, 232, 0.6) 48%, rgba(245, 241, 232, 0) 64%);
}
.ks-hero .container { position: relative; z-index: 2; }
.ks-hero-inner { padding: 44px 0 40px; max-width: 760px; }
.ks-hero h1 {
    font-family: var(--font-display, 'Playfair Display', Georgia, serif);
    font-size: 3.1rem; font-weight: 600; line-height: 1.12; margin: 0 0 10px; color: #1f1912; letter-spacing: -0.5px;
}
.ks-hero-sub { font-size: 1.12rem; color: #3d342a; margin: 0 0 24px; }

.ks-search {
    display: flex; align-items: stretch; background: #fff; border-radius: 40px;
    box-shadow: 0 10px 34px rgba(42, 35, 28, 0.14); padding: 6px; max-width: 760px;
}
.ks-search-scope {
    position: relative; flex-shrink: 0;
}
.ks-search-scope select {
    appearance: none; -webkit-appearance: none; height: 100%; border: 0; background: #f5f1e8; color: #2a231c;
    font-weight: 700; font-size: 0.9rem; padding: 0 36px 0 20px; border-radius: 34px; cursor: pointer;
}
.ks-search-scope::after {
    content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px;
    border-right: 2px solid #2a231c; border-bottom: 2px solid #2a231c; transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.ks-search-input { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; min-width: 0; }
.ks-search-input i { color: #6b5d47; font-size: 1.05rem; }
.ks-search-input input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 0.98rem; color: #2a231c; background: transparent; padding: 12px 0; }
.ks-search-input input::placeholder { color: #9a8b73; }
.ks-search-btn {
    border: 0; background: #c9a84c; color: #fff; border-radius: 34px; padding: 0 26px; font-weight: 700; font-size: 0.95rem;
    display: inline-flex; align-items: center; gap: 8px; transition: background .15s ease; white-space: nowrap;
}
.ks-search-btn:hover { background: #b8963f; }
.ks-search-page { border-radius: 14px; }
.ks-search-page input { flex: 1; border: 0; outline: none; padding: 12px 18px; font-size: 1rem; min-width: 0; background: transparent; }
.ks-search-page .ks-search-btn { border-radius: 10px; padding: 10px 22px; }

.ks-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 0.82rem; color: #3d342a; }
.ks-popular a {
    background: rgba(42, 35, 28, 0.08); color: #2a231c; border-radius: 999px; padding: 6px 13px; text-decoration: none; font-weight: 600; font-size: 0.8rem;
    transition: background .15s ease, color .15s ease;
}
.ks-popular a:hover { background: #2a231c; color: #fff; }

/* ---------- Kategori şeridi ---------- */
.ks-cats { background: #fff; padding: 26px 0 18px; }
.ks-cats-row { display: flex; justify-content: space-between; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.ks-cats-row::-webkit-scrollbar { display: none; }
.ks-cat {
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: #2a231c;
    min-width: 104px; flex: 1; text-align: center;
}
.ks-cat-icon {
    width: 56px; height: 56px; border-radius: 50%; background: #f5f1e8; border: 1px solid rgba(201, 168, 76, 0.28);
    display: flex; align-items: center; justify-content: center; font-size: 1.45rem; color: #2a231c;
    transition: background .18s ease, transform .18s ease, color .18s ease;
}
.ks-cat:hover .ks-cat-icon { background: #2a231c; color: #c9a84c; transform: translateY(-3px); }
.ks-cat span { font-size: 0.78rem; font-weight: 600; line-height: 1.25; max-width: 110px; }

/* ---------- Kampanya banner ---------- */
.ks-promo-wrap { padding: 22px 0 8px; }
.ks-promo {
    position: relative; overflow: hidden; border-radius: 18px; min-height: 176px; display: flex; align-items: center;
    background: #1e2a22 center / cover no-repeat; color: #fff; box-shadow: 0 14px 34px rgba(42, 35, 28, 0.16);
}
.ks-promo::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(20, 30, 24, 0.94) 0%, rgba(20, 30, 24, 0.86) 36%, rgba(20, 30, 24, 0.4) 60%, rgba(20, 30, 24, 0.1) 100%);
}
.ks-promo-body { position: relative; padding: 28px 40px; display: flex; align-items: center; gap: 40px; width: 100%; }
.ks-promo-kicker { font-size: 0.72rem; letter-spacing: 2px; font-weight: 700; color: #c9a84c; text-transform: uppercase; margin-bottom: 6px; }
.ks-promo-title { font-size: 1.7rem; font-weight: 800; margin: 0 0 6px; letter-spacing: 0.3px; }
.ks-promo-sub { font-size: 0.88rem; color: rgba(255, 255, 255, 0.82); margin: 0 0 14px; }
.ks-promo-btn {
    display: inline-flex; align-items: center; gap: 10px; background: #c9a84c; color: #2a231c; font-weight: 700; font-size: 0.86rem;
    border-radius: 10px; padding: 10px 18px; text-decoration: none; transition: background .15s ease;
}
.ks-promo-btn:hover { background: #e0c068; color: #2a231c; }
.ks-promo-ring {
    flex-shrink: 0; width: 104px; height: 104px; border-radius: 50%; border: 2px solid #c9a84c; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; line-height: 1.15; background: rgba(20, 30, 24, 0.35);
}
.ks-promo-ring b { font-size: 1.35rem; font-weight: 800; color: #fff; }
.ks-promo-ring small { font-size: 0.7rem; color: rgba(255, 255, 255, 0.85); }
/* Banner göstergeleri: görselin üzerinde değil, altında durur */
.ks-promo-carousel .carousel-indicators { position: static; margin: 14px 0 0; gap: 7px; }
.ks-promo-carousel .carousel-indicators [data-bs-target] {
    width: 8px; height: 8px; margin: 0; border: 0; border-radius: 999px; background: rgba(42, 35, 28, 0.22); opacity: 1;
    transition: width .25s ease, background .25s ease;
}
.ks-promo-carousel .carousel-indicators .active { width: 24px; background: #c9a84c; }

/* ---------- Raylar (3 sütun) ---------- */
.ks-rails { padding: 26px 0 10px; }
.ks-rails .ks-wide { padding-left: 28px; padding-right: 28px; }
.ks-rail { margin-bottom: 22px; }
.ks-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ks-rail-title {
    display: flex; align-items: center; gap: 10px; margin: 0;
    font-family: var(--font-display, 'Playfair Display', Georgia, serif); font-size: 1.32rem; font-weight: 600; color: #2a231c;
}
.ks-rail-title i { color: #c9a84c; font-size: 1.15rem; }
.ks-count { font-family: var(--font-body, 'Manrope', sans-serif); font-size: 0.75rem; font-weight: 700; color: #6b5d47; background: rgba(42, 35, 28, 0.06); border-radius: 999px; padding: 2px 9px; }
.ks-rail-more { font-size: 0.8rem; font-weight: 600; color: #3d342a; text-decoration: none; white-space: nowrap; }
.ks-rail-more:hover { color: #b8963f; }
.ks-rail-more i { font-size: 0.8rem; }

.ks-rail-body { position: relative; }
.ks-rail-track {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none; padding: 4px 2px 8px;
}
.ks-rail-track::-webkit-scrollbar { display: none; }
.ks-rail-nav {
    position: absolute; top: 34px; opacity: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(42, 35, 28, 0.12);
    background: #fff; color: #2a231c; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
    box-shadow: 0 4px 12px rgba(42, 35, 28, 0.14); transition: background .15s ease, color .15s ease; font-size: 0.9rem;
}
.ks-rail-body:hover .ks-rail-nav { opacity: 1; }
.ks-rail-nav:hover { background: #2a231c; color: #c9a84c; }
.ks-rail-nav.prev { left: -14px; }
.ks-rail-nav.next { right: -14px; }

/* ---------- Kart ---------- */
.ks-card {
    flex: 0 0 calc((100% - 20px) / 3); min-width: 132px; scroll-snap-align: start;
    background: #fff; border: 1px solid rgba(42, 35, 28, 0.08); border-radius: 12px; overflow: hidden;
    display: flex; flex-direction: column; text-decoration: none; color: #2a231c;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ks-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(42, 35, 28, 0.12); border-color: rgba(201, 168, 76, 0.35); color: #2a231c; }
.ks-card-img { position: relative; aspect-ratio: 4 / 3; background: #efe9dc; overflow: hidden; }
.ks-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ks-card:hover .ks-card-img img { transform: scale(1.05); }
.ks-card-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(201, 168, 76, 0.5); font-size: 1.8rem; }
.ks-tag {
    position: absolute; left: 8px; bottom: 8px; background: #c9a84c; color: #fff; font-size: 0.6rem; font-weight: 800; letter-spacing: 1px;
    padding: 3px 8px; border-radius: 4px;
}
.ks-tag.ks-tag-discount { background: #d64545; left: auto; right: 8px; bottom: 8px; }
.ks-fav {
    position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92);
    color: #6b5d47; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; cursor: pointer;
    box-shadow: 0 2px 8px rgba(42, 35, 28, 0.16); transition: transform .15s ease, color .15s ease;
}
.ks-fav:hover { transform: scale(1.1); color: #d64545; }
.ks-fav.active { color: #d64545; }
.ks-fav.active i::before { content: "\f415"; } /* bi-heart-fill */
.ks-fav.pop { animation: ks-pop .3s ease; }
@keyframes ks-pop { 0% { transform: scale(1); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }

.ks-card-body { padding: 9px 10px 8px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ks-card-title { font-size: 0.8rem; font-weight: 700; line-height: 1.25; color: #2a231c; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ks-card-meta { font-size: 0.68rem; color: #6b5d47; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-card-meta i { color: #9a8b73; font-size: 0.68rem; }
.ks-card-price { font-size: 0.86rem; font-weight: 800; color: #2a231c; margin-top: 2px; }
.ks-card-price s { font-size: 0.68rem; color: #9a8b73; font-weight: 600; margin-left: 4px; }
.ks-card-foot {
    border-top: 1px solid rgba(42, 35, 28, 0.07); padding: 6px 10px; font-size: 0.64rem; font-weight: 600; color: #4b3f31;
    display: flex; align-items: center; gap: 5px;
}
.ks-card-foot i { color: #1f9d5b; font-size: 0.7rem; }

/* Arama sayfası ızgarası */
.ks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ks-grid .ks-card { flex: none; }
.ks-grid .ks-card-title { font-size: 0.9rem; }
.ks-grid .ks-card-meta { font-size: 0.76rem; }
.ks-grid .ks-card-price { font-size: 0.98rem; }

/* ---------- Referans kulüpler ---------- */
.ks-clubs { padding: 18px 0 30px; }
.ks-clubs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.ks-club {
    display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid rgba(42, 35, 28, 0.08); border-radius: 12px;
    padding: 10px 16px; font-size: 0.82rem; font-weight: 700; color: #2a231c;
}
.ks-club img { height: 28px; width: auto; object-fit: contain; }
.ks-club i { color: #c9a84c; }
.ks-clubs-title { text-align: center; font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; color: #9a8b73; font-weight: 700; margin-bottom: 12px; }

/* ---------- Boş durum ---------- */
.ks-rail-empty {
    border: 1px dashed rgba(201, 168, 76, 0.5); border-radius: 12px; padding: 26px 16px; text-align: center; color: #6b5d47; font-size: 0.84rem; background: rgba(255, 255, 255, 0.6);
}
.ks-rail-empty i { display: block; font-size: 1.5rem; color: #c9a84c; margin-bottom: 6px; }

/* ---------- Duyarlılık ---------- */
@media (max-width: 1199px) {
    .ks-hero h1 { font-size: 2.6rem; }
    .ks-card { flex-basis: calc((100% - 10px) / 2); }
}
@media (max-width: 991px) {
    .ks-hero { min-height: 320px; background-image: url('/css/images/header_bg_mobile.jpg'); background-position: center center; }
    .ks-hero::before { background: linear-gradient(90deg, rgba(245, 241, 232, 0.96) 0%, rgba(245, 241, 232, 0.86) 55%, rgba(245, 241, 232, 0.35) 100%); }
    .ks-rail-nav { display: none; }
    .ks-rails .ks-wide { padding-left: 16px; padding-right: 16px; }
    .ks-card { flex-basis: 170px; }
    .ks-promo-ring { display: none; }
}
@media (max-width: 767px) {
    .ks-hero { min-height: 0; }
    .ks-hero::before { background: linear-gradient(180deg, rgba(245, 241, 232, 0.94) 0%, rgba(245, 241, 232, 0.86) 70%, rgba(245, 241, 232, 0.7) 100%); }
    .ks-hero-inner { padding: 34px 0 30px; }
    .ks-hero h1 { font-size: 2.05rem; }
    .ks-hero-sub { font-size: 1rem; }
    .ks-search { border-radius: 16px; flex-wrap: wrap; gap: 6px; }
    .ks-search-scope { width: 100%; }
    .ks-search-scope select { width: 100%; padding: 11px 36px 11px 16px; border-radius: 12px; }
    .ks-search-input { width: calc(100% - 96px); }
    .ks-search-btn { border-radius: 12px; padding: 0 16px; }
    .ks-cat { min-width: 88px; }
    .ks-cat-icon { width: 50px; height: 50px; font-size: 1.25rem; }
    .ks-promo-body { padding: 22px 22px; }
    .ks-promo-title { font-size: 1.3rem; }
    .ks-card { flex-basis: 150px; }
}
