/**
 * OEM System Styles - Core UI & Components
 * Version: 3.0.0
 * @package OEM_System
 *
 * Font: font-family kullanılır; font yükleme tema sorumluluğu (render-blocking @import yok).
 */

/* ============================================
   VARIABLES
   ============================================
   Hedef mimari: :root = marka paleti | .oem-theme = layout token | .oem-hero vb = component.
   Şu an geriye uyumluluk için çoğu token :root’ta; override panelden gelir. */
:root {
    --oem-dark: #0b1612;
    --oem-dark-2: #121c19;
    --oem-card: #121c19;
    --oem-gold: var(--oem-color-accent, #d4af37);
    /* Derived from layout.css */
    --oem-border: #2a2a2a;
    --oem-text: #e0e0e0;
    --oem-text-bright: #e0e0e0;
    --oem-text-muted: rgba(224, 224, 224, 0.6);
    --oem-heading-dark: #0b1612;
    --oem-main-bg: #f8f8f8;
    --oem-container-bg: #1a1a1a;
    --oem-tab-normal: #f1f2f3;
    --oem-tab-hover: #0b1612;
    --oem-trust-bg: #fdfaf3;
    --oem-success: #25D366;
    --oem-phone-btn: #030407;

    /* Derived accent colors (inherit from layout.css if available) */
    --oem-accent-bg-05: color-mix(in srgb, var(--oem-color-accent, #d4af37) 5%, transparent);
    --oem-accent-bg-15: color-mix(in srgb, var(--oem-color-accent, #d4af37) 15%, transparent);
    --oem-accent-bg-20: color-mix(in srgb, var(--oem-color-accent, #d4af37) 20%, transparent);
    --oem-accent-bg-50: color-mix(in srgb, var(--oem-color-accent, #d4af37) 50%, transparent);

    --oem-hover: var(--oem-accent-bg-15);
    --oem-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --oem-radius: 8px;
    /* Scroll-to-anchor offsets (script.js reads these) */
    --oem-scroll-offset: 220;
    --oem-scroll-header-offset: 60;
    --oem-scroll-window-offset: 160;
    /* Z-index skala (modal/cookie bar ile çakışmasın) */
    --oem-z-dropdown: 300;
    --oem-z-overlay: 400;
    --oem-z-modal: 500;
}

/* Layout/theme token’lar (isteğe bağlı; component’lar :root veya buradan kullanabilir) */
.oem-theme {
    --oem-theme-surface: var(--oem-card);
    --oem-theme-text: var(--oem-text);
    --oem-theme-text-muted: var(--oem-text-muted);
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   LANDING PAGES (Virtual Pages) – Yapısal gövde
   ============================================ */

.oem-deep-landing,
.oem-landing-wrapper {
    width: 100%;
    margin: 0;
    padding: 2rem 1rem 4rem;
    background: var(--oem-dark, #0b1612);
    min-height: 60vh;
    font-family: 'Poppins', sans-serif;
    color: var(--oem-text);
}

.oem-landing-body {
    max-width: 1000px;
    margin: 0 auto;
}

.oem-container--landing {
    background: transparent;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Hero Section – tutarlı boşluk, palet renkleri */
.oem-hero {
    text-align: center;
    margin: 0 0 3rem;
    padding: 2.5rem 2rem 2.5rem;
    background: var(--oem-card);
    border-radius: 16px;
    border: 1px solid var(--oem-hero-border, rgba(197, 160, 89, 0.2));
    color: var(--oem-text-bright, #fff);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.oem-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--oem-accent-bg-05, rgba(212, 175, 55, 0.05)) 0%, transparent 60%);
    pointer-events: none;
}

@media (max-width: 768px) {
    .oem-hero::before {
        display: none;
    }
}

.oem-hero-title,
.oem-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.35rem, 4vw, 2rem);
    color: var(--oem-text-bright, #fff);
    margin: 0 0 1.25rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.oem-badges {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.oem-badge {
    background: var(--oem-accent-bg-20, rgba(212, 175, 55, 0.2));
    color: var(--oem-gold);
    border: 1px solid var(--oem-accent-bg-50, rgba(212, 175, 55, 0.5));
}

.cat-badge {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--oem-border);
}

.stock-badge {
    background: rgba(37, 211, 102, 0.15);
    color: var(--oem-success);
    border: 1px solid var(--oem-success);
}

.hero-desc {
    color: var(--oem-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 42rem;
    margin: 0 auto 0;
}

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--oem-radius);
    border: 1px solid var(--oem-border);
    flex-wrap: wrap;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--oem-gold);
    font-weight: 500;
}

.trust-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--oem-gold);
    flex-shrink: 0;
}

.trust-separator {
    opacity: 0.5;
    font-weight: 300;
}

/* Results Section – hero ile net ayrım, arka plansız; köşe yuvarlaklığı tutarlı olsun */
.oem-results-container {
    padding: 2.5rem 0 3rem;
    background: transparent;
    border-radius: 16px;
}

.oem-landing-header-title {
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--oem-border);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--oem-text-bright, #fff);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.oem-landing-header-icon {
    color: var(--oem-gold);
    flex-shrink: 0;
}

.oem-landing-header {
    border-bottom: 1px solid var(--oem-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.oem-landing-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--oem-text-bright, #fff);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.oem-landing-header svg {
    color: var(--oem-gold);
}

.header-icon {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--oem-gold);
    flex-shrink: 0;
}

.oem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Part Card */
.part-card {
    background: var(--oem-card);
    border: 1px solid var(--oem-border);
    border-radius: var(--oem-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.part-card:hover {
    transform: translateY(-5px);
    border-color: var(--oem-gold);
    box-shadow: var(--oem-shadow);
}

@media (prefers-reduced-motion: reduce) {
    .part-card:hover {
        transform: none;
    }
}

.card-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--oem-border);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.card-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-header h4 {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    flex: 1;
}

.card-header h4 a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.card-header h4 a:hover {
    color: var(--oem-gold);
}

.cat-tag {
    font-size: 10px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    color: #aaa;
    white-space: nowrap;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
    flex: 1;
    /* Equal height cards */
    display: flex;
    flex-direction: column;
}

.spec-line,
.spec-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.spec-line:last-child,
.spec-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.spec-line .label,
.spec-row .spec-label {
    color: var(--oem-text-muted);
}

.spec-line .value,
.spec-row .spec-value {
    color: #fff;
    font-weight: 500;
    text-align: right;
}

.spec-line .code,
.spec-row .code {
    color: var(--oem-gold);
    font-family: monospace;
    letter-spacing: 0.5px;
}

.spec-line .small,
.spec-row .small {
    font-size: 12px;
    color: #bbb;
    max-width: 60%;
    line-height: 1.3;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.status-ok {
    color: #2ecc71;
}

.status-wait {
    color: #f1c40f;
}

.card-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--oem-border);
    text-align: center;
    margin-top: auto;
    /* Push footer to bottom */
}

.oem-landing-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--oem-gold);
    color: #000 !important;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
}

.oem-landing-btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

.source-info {
    margin-top: 10px;
    font-size: 11px;
    color: #666;
}

.source-info a {
    color: #888;
    text-decoration: none;
}

.source-link {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.source-link:hover {
    opacity: 1;
}

.source-link a {
    color: #999;
    text-decoration: none;
    border-bottom: 1px dotted #777;
    transition: all 0.3s ease;
}

.source-link a:hover {
    color: var(--oem-gold);
    border-bottom-color: var(--oem-gold);
}

.oem-landing-no-results {
    text-align: center;
    padding: 80px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px dashed var(--oem-border);
    color: #fff;
    margin-top: 40px;
}

.oem-landing-no-results p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ccc;
}

.oem-landing-no-results a {
    color: var(--oem-gold);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid var(--oem-gold);
    padding-bottom: 2px;
}

/* ============================================
   SHORTCODE CATALOG (Product Page)
   ============================================ */
/* All catalog-specific styles (search bar, tables, tabs, support section) 
   have been moved and scoped in repeater-catalog.css to prevent global leaks. */

.yedek-parca-katalog {
    margin: 30px 0;
    font-family: 'Poppins', sans-serif;
}


/* Table container styles removed - now fully handled in repeater-catalog.css */




/* ============================================
   RESPONSIVE
   ============================================ */


@media (max-width: 768px) {
    .oem-deep-landing {
        padding: 1.5rem 0.75rem 3rem;
    }

    .oem-hero {
        padding: 1.75rem 1.25rem;
        margin-bottom: 2rem;
    }

    .oem-hero-title,
    .oem-hero h1 {
        font-size: 1.35rem;
    }

    .trust-indicators {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .oem-results-container {
        padding: 1.5rem 0 2rem;
    }

    .oem-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .trust-line {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .trust-separator {
        display: none;
    }

    .trust-item {
        font-size: 13px;
    }

    .yedek-parca-katalog.repeater-version .am-support-grid {
        grid-template-columns: 1fr;
    }

    .yedek-parca-katalog.repeater-version .am-contact-buttons {
        flex-direction: column;
    }

    .yedek-parca-katalog.repeater-version .katalog-search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================
   UTILITIES (uzun vadede utilities.css’e taşınabilir)
   ============================================ */

/* Toast – z-index: var(--oem-z-modal) */
.oem-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    z-index: var(--oem-z-modal, 500);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
}

.oem-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Exit animation */
.oem-toast:not(.show) {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Highlight – sadece background animate (border static, mobilde daha hafif) */
.highlight-row {
    border-left: 4px solid var(--oem-gold);
    animation: pulseRow 2s ease forwards;
}

@keyframes pulseRow {
    0% {
        background-color: var(--oem-accent-bg-20);
    }

    100% {
        background-color: transparent;
    }
}