/* ============================================
   Catalog overrides — JSON-tabanli urun listesi
   ============================================ */

.product-card { display: flex; flex-direction: column; }
.product-card a { display: block; flex: 1; }
.product-image {
    width: 100%;
    aspect-ratio: 1024 / 1600;
    overflow: hidden;
    background: #f7f7f7;
    position: relative;
    display: block;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.product-info { padding: 14px 16px; }
.product-title {
    font-size: 14px;
    line-height: 1.35;
    min-height: 56px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}
.product-meta { margin-bottom: 6px; }
.product-price .price { font-size: 18px; font-weight: 700; color: var(--color-primary); }

.btn-add-cart {
    width: 100%;
    margin-top: auto;
}

/* Fiyatsız ürünlerde "Fiyat Sor" + telefon butonu (kart) */
.card-quote-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    margin: 0 14px 14px;
}
.btn-quote-wa,
.btn-quote-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s, background .15s, box-shadow .15s;
    line-height: 1;
}
.btn-quote-wa {
    background: #25d366;
    color: #fff;
    box-shadow: 0 2px 6px -2px rgba(37,211,102,.5);
}
.btn-quote-wa:hover {
    background: #1ebe5a;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -2px rgba(37,211,102,.6);
}
.btn-quote-call {
    background: var(--color-secondary);
    color: #fff;
    width: 38px;
    padding: 10px;
    box-shadow: 0 2px 6px -2px rgba(11,31,58,.4);
}
.btn-quote-call:hover {
    background: var(--color-secondary-light);
    transform: translateY(-1px);
}

/* "Fiyat için sorun" ibaresi (price slot'unda) */
.product-price-quote .price-quote {
    display: inline-block;
    background: var(--color-bg-soft);
    border: 1px dashed var(--color-border-strong);
    color: var(--color-text-muted);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.price-quote-lg {
    font-size: 22px;
    padding: 8px 18px;
    color: var(--color-secondary);
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
}

/* Detay sayfası — fiyatsız ürünler için büyük WhatsApp butonu */
.btn-quote-wa-lg {
    background: #25d366;
    color: #fff;
    box-shadow: 0 4px 14px -4px rgba(37,211,102,.55);
    border: 1.5px solid #25d366;
}
.btn-quote-wa-lg:hover {
    background: #1ebe5a;
    color: #fff;
    border-color: #1ebe5a;
    box-shadow: 0 8px 20px -4px rgba(37,211,102,.65);
    transform: translateY(-1px);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

/* ============================================
   Autocomplete dropdown — Google tipi öneri kutusu
   ============================================ */
.ac-wrap {
    position: relative;
    display: block;
}
.ac-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    max-height: 420px;
    overflow-y: auto;
    padding: 6px 0;
}
.ac-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
    transition: background .12s;
    min-height: 40px;
}
.ac-item:hover, .ac-item.active {
    background: var(--color-bg-soft);
}
.ac-icon {
    flex-shrink: 0;
    font-size: 16px;
    width: 22px;
    text-align: center;
    opacity: .8;
    margin-top: 1px;
}
.ac-label {
    flex: 1;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}
.ac-search-all {
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
    padding-top: 12px;
    font-weight: 600;
    color: var(--color-primary);
}
.search-bar.ac-wrap,
.search-bar .ac-wrap {
    flex: 1;
}
@media (max-width: 640px) {
    .ac-dropdown { max-height: 60vh; font-size: 14px; }
}

/* Smart code-search banner */
.smart-search-banner {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3f3 100%);
    border: 1px solid #fbcfb0;
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}
.smart-search-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.smart-search-icon {
    font-size: 22px;
    line-height: 1.1;
    flex-shrink: 0;
}
.smart-search-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
}
.smart-search-text strong { color: var(--color-primary); }
.smart-search-text small { color: var(--color-text-soft); display: block; margin-top: 2px; }

/* Active filter chips */
.active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.chip {
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}
.chip:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Vehicle tags on detail page */
.vehicle-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.vehicle-tag {
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    color: var(--color-secondary);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.vehicle-tag:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Model breakdown rows on detail page */
.model-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.model-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px dashed var(--color-border);
}
.model-row:first-child { border-top: 0; padding-top: 0; }
.model-row-brand {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 13px;
    min-width: 130px;
}
.model-row-list { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.model-tag {
    background: #fff;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s, color .15s;
}
.model-tag:hover { background: var(--color-accent); color: #fff; }

.product-quick-info { margin: 18px 0; padding: 0; }
.product-quick-info li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
    line-height: 1.6;
}
.product-quick-info li:last-child { border-bottom: 0; }
.product-quick-info strong { display: inline-block; min-width: 160px; color: var(--color-text-soft); font-weight: 500; }

.gallery-main {
    width: 100%;
    height: 560px;
    margin: 0 auto;
    overflow: hidden;
    background: #f7f7f7;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
@media (max-width: 768px) {
    .gallery-main { height: 420px; }
}

/* Category card on home */
.category-card {
    display: block;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px;
    transition: transform .15s, box-shadow .15s;
    text-align: center;
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.category-card img {
    width: 100%;
    aspect-ratio: 1024 / 1600;
    height: auto;
    object-fit: contain;
    background: #f7f7f7;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    display: block;
}
.category-card h3 { font-size: 14px; margin: 6px 0 2px; line-height: 1.3; }
.category-count { font-size: 12px; color: var(--color-text-soft); }

.btn-block { display: block; width: 100%; }

/* Sidebar search — header arama çubuğuyla aynı pill stili */
.side-search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--color-border-strong);
    border-radius: 999px;
    height: 44px;
    transition: border-color .15s, box-shadow .15s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    position: relative;
}
.side-search-bar:hover { border-color: var(--color-secondary); }
.side-search-bar:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(201, 48, 44, .12);
}
.side-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 14px;
    height: 100%;
    color: var(--color-secondary);
    flex-shrink: 0;
}
.side-search-icon svg { display: block; }
.side-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 14px 0 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 40px;
    height: 100%;
    outline: none;
    min-width: 0;
    width: 100%;
    color: var(--color-text);
    text-overflow: ellipsis;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}
.side-search-bar input::-webkit-search-cancel-button,
.side-search-bar input::-webkit-search-decoration { -webkit-appearance: none; }
.side-search-bar input::placeholder {
    color: #475569;
    opacity: 1;
    font-weight: 500;
}
/* Autocomplete wrapper inside side-search-bar — input takes full width */
.side-search-bar .ac-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Filter sidebar — make sticky on desktop */
@media (min-width: 992px) {
    .filters {
        position: sticky;
        top: 90px;
        /* overflow ayarini kaldirdik — autocomplete dropdown'i kirpiyordu */
    }
}

/* Autocomplete dropdown sidebar'da — sağa doğru genişle, yazılar tam görünsün */
.side-search-bar .ac-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}
.side-search-bar .ac-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: -10px;
    right: -10px;
    width: auto;            /* sidebar genişliğinde sığar (yazılar wrap olur) */
    z-index: 1000;
    box-shadow: 0 12px 32px rgba(15,23,42,.18);
    max-height: 70vh;
    border-radius: 12px;
}
/* Sidebar dropdown'da uzun ürün adlari alt satıra geçsin (truncate yerine) */
.side-search-bar .ac-dropdown .ac-label {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.35;
    word-break: break-word;
    flex: 1;
    min-width: 0;
}
.side-search-bar .ac-dropdown .ac-item {
    align-items: flex-start;
    padding: 11px 14px;
    min-height: 44px;
    height: auto;
}
.side-search-bar .ac-dropdown .ac-icon {
    margin-top: 2px;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .side-search-bar .ac-dropdown { width: calc(100vw - 24px); }
}

/* ============================================
   Brand logos & badges
   ============================================ */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    line-height: 1;
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1px;
}
.brand-logo.is-fallback {
    background: var(--brand-color, #0a4480);
    color: #fff;
}
.brand-abbr {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    text-align: center;
    line-height: 1;
}

/* Vehicle tag with logo (detail page) */
.vehicle-tag {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px !important;
}
.vehicle-tag .brand-logo {
    width: 22px;
    height: 22px;
}

/* Model row brand label with logo */
.model-row-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.model-row-brand .brand-logo {
    width: 20px;
    height: 20px;
}

/* Vehicle badge floating on product card image */
.product-image { position: relative; }
.card-vehicle-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.card-vehicle-badge .brand-logo {
    width: 18px;
    height: 18px;
}

/* ============================================
   Index — 3 ana araç tipi cardı
   ============================================ */
.vehicle-types {
    padding: 50px 0 30px;
}
.vehicle-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 22px;
}
.vehicle-type-card {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s, border-color .15s;
    text-decoration: none;
    color: inherit;
}
.vehicle-type-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}
.vehicle-type-binek-ticari { background: linear-gradient(135deg, #fff 60%, #fef3f3); }
.vehicle-type-is-makinalari { background: linear-gradient(135deg, #fff 60%, #fef9e7); }
.vehicle-type-traktor { background: linear-gradient(135deg, #fff 60%, #ecfdf5); }
.vt-image {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg-soft);
    flex-shrink: 0;
}
.vt-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}
.vt-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    line-height: 1;
    z-index: 1;
}
.vt-body h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
}
.vt-meta {
    margin: 0 0 10px;
    color: var(--color-text-soft);
    font-size: 13px;
}
.vt-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.vt-card-logo {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 3px;
    line-height: 0;
}
.vt-arrow {
    font-size: 28px;
    color: var(--color-primary);
    font-weight: 300;
    align-self: center;
    transition: transform .15s;
}
.vehicle-type-card:hover .vt-arrow { transform: translateX(4px); }

/* ============================================
   Popüler Markalar Logo Grid
   ============================================ */
.popular-brands {
    padding: 30px 0;
    background: var(--color-bg-soft);
}
.brand-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 22px;
}
.brand-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: transform .15s, box-shadow .15s, border-color .15s;
    text-decoration: none;
    color: inherit;
    text-align: center;
}
.brand-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}
.brand-tile .brand-logo {
    width: 44px;
    height: 44px;
}
.brand-tile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}
.brand-tile-count {
    font-size: 11px;
    color: var(--color-text-soft);
}

/* Finder form: 4-column responsive */
.finder-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}
.finder-form select,
.finder-form button {
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    font-size: 14px;
}
.finder-form button {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    cursor: pointer;
}
