/*
Theme Name: OMNI Light Catalog
Description: Clean catalog theme
Version: 2.0
*/

/* ============================================================
   1) RESET & KÖKEL DEĞİŞKENLER
   ============================================================ */
:root {
    --omni-blue: #1a73e8;
    --omni-blue-dark: #1557b0;
    --omni-black: #000000;
    --omni-text: #333333;
    --omni-border: #e2e8f0;
    --omni-bg: #f7f9fa;
    --omni-white: #ffffff;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--omni-bg);
    color: var(--omni-text);
    line-height: 1.5;
}

a { text-decoration: none; }

/* ============================================================
   2) LAYOUT - .omni-wrap ile plugin CSS çakışması önlendi
   ============================================================ */
.omni-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================================
   3) HEADER
   ============================================================ */
.omni-header {
    background: var(--omni-white);
    border-bottom: 2px solid var(--omni-blue);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 100;
}

.omni-header .omni-container {
    height: 64px;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.omni-header-inner {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Logo solda — flex: 1 ile nav'ı ortalar */
.omni-logo {
    flex: 1;
    display: flex;
    align-items: center;
}

.omni-logo a {
    font-size: 22px;
    font-weight: 800;
    color: var(--omni-black);
    white-space: nowrap;
}

.omni-logo img,
.omni-logo .custom-logo {
    max-height: 45px;
    width: auto;
    display: block;
}

/* Masaüstü nav — ortada, position: relative X butonu için */
.omni-nav {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.omni-menu {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.omni-menu li a {
    color: var(--omni-text);
    font-size: 15px;
    font-weight: 700;
    padding: 6px 0;
    display: block;
    transition: color 0.2s;
}

.omni-menu li a:hover,
.omni-menu .current-menu-item > a {
    color: var(--omni-blue);
}

/* Sağ aksiyonlar — flex: 1 + justify-content: flex-end ile sağa yaslanır */
.omni-header-actions {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Arama butonu */
.omni-search-btn {
    background: none;
    border: none;
    color: var(--omni-black);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.omni-search-btn:hover {
    background: #f1f5f9;
    color: var(--omni-blue);
}

/* Desktopta varsayılan gizle */
.omni-nav-close {
    display: none;
}

/* Hamburger — masaüstünde gizli */
.omni-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 200;
}

.omni-menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--omni-black);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* ============================================================
   4) TAM EKRAN ARAMA OVERLAY
   ============================================================ */
.omni-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.omni-search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.omni-search-overlay-inner {
    width: 100%;
    max-width: 700px;
}

.omni-search-overlay form {
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--omni-black);
}

.omni-search-overlay input[type="search"] {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 32px;
    font-weight: 800;
    color: var(--omni-black);
    outline: none;
    padding: 15px 0;
    text-align: center;
}

.omni-overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--omni-black);
    transition: background 0.2s, transform 0.2s;
    z-index: 100001;
}

.omni-overlay-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

/* ============================================================
   5) GRID (ANA SAYFA & ARŞİV)
   ============================================================ */
.omni-grid-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 25px auto;
    max-width: 1200px;
    padding: 0 15px;
}

.omni-grid-item {
    background: var(--omni-white);
    border: 1px solid var(--omni-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.omni-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.omni-grid-thumb-link {
    display: block;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f8fafc;
}

.omni-grid-thumb {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    transition: opacity 0.2s;
}

.omni-grid-thumb:hover { opacity: 0.9; }

.omni-grid-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: auto;
    padding-top: 8px;
}

.omni-grid-title a {
    color: var(--omni-text);
    transition: color 0.2s;
}

.omni-grid-title a:hover { color: var(--omni-blue); }

/* ============================================================
   6) TEKİL POST
   ============================================================ */
.omni-post-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 0;
}

.omni-post-main {
    flex: 1;
    background: var(--omni-white);
    border: 1px solid var(--omni-border);
    border-radius: 8px;
    padding: 15px 30px 30px;
    min-width: 0;
}

.omni-post-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.omni-sticky-sidebar-placeholder {
    position: sticky;
    top: 20px;
    min-height: 600px;
}

.omni-post-title,
.omni-post-article h1 {
    font-size: 30px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 20px;
    line-height: 1.3;
}

.omni-post-content h2 { font-size: 26px; font-weight: 700; color: #111; margin: 25px 0 15px; line-height: 1.3; }
.omni-post-content h3 { font-size: 24px; font-weight: 700; color: #222; margin: 20px 0 12px; line-height: 1.3; }
.omni-post-content h4 { font-size: 22px; font-weight: 700; color: #333; margin: 20px 0 12px; line-height: 1.3; }
.omni-post-content h5 { font-size: 20px; font-weight: 700; color: #444; margin: 15px 0 10px; line-height: 1.3; }

/* ============================================================
   7) BREADCRUMB
   ============================================================ */

.omni-breadcrumb-strip {
    background-color: #e9edf3;
    width: 100%;
    padding: 6px 0;
}

.omni-breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: left !important;
    display: block;
    color: #1f2937;
}

.omni-breadcrumb a {
    color: #0f4aa1;
    text-decoration: none;
    font-weight: 600;
}

.omni-breadcrumb a:hover {
    text-decoration: underline;
    color: #0b3a82;
}

/* ============================================================
   8) SAYFALAMA
   ============================================================ */
.omni-pagination {
    text-align: center;
    margin: 40px 0;
}

.omni-pagination .page-numbers {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 5px;
    border: 1px solid var(--omni-border);
    border-radius: 6px;
    color: var(--omni-black);
    font-weight: 700;
    background: var(--omni-white);
    transition: background 0.2s;
}

.omni-pagination .page-numbers.current {
    background-color: var(--omni-blue);
    color: var(--omni-white);
    border-color: var(--omni-blue);
}

/* ============================================================
   9) FİYAT LİSTESİ
   ============================================================ */
.weekly-price-list {
    list-style: none;
    margin: 20px 0;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background: var(--omni-white);
    overflow: hidden;
}

.weekly-price-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 10px 14px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
    color: var(--omni-black);
    line-height: 1.4;
}

.weekly-price-list li:nth-child(even) { background-color: #f8fafc; }
.weekly-price-list li:hover { background-color: #f1f5f9; }
.weekly-price-list li:last-child { border-bottom: none; }

.product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--omni-white);
    background-color: #d32f2f;
    padding: 4px 12px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ============================================================
   10) MOBİL (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

    .omni-header .omni-container {
        height: 60px;
        padding: 0 15px;
    }

    .omni-logo img,
    .omni-logo .custom-logo {
        max-width: 140px;
    }

    .omni-nav {
        position: fixed;
        inset: 0;
        background: rgba(255, 255, 255, 0.98);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s;
    }

    .omni-nav.is-open {
        opacity: 1;
        visibility: visible;
    }

    .omni-menu {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        width: 100%;
        max-width: 400px;
        padding: 20px;
    }

    .omni-menu li a {
        font-size: 24px;
        font-weight: 800;
        padding: 12px 0;
        display: block;
    }

    .omni-nav-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: #f1f5f9;
        border: none;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--omni-black);
        transition: background 0.2s, transform 0.2s;
    }

    .omni-nav-close:hover {
        background: #e2e8f0;
        transform: rotate(90deg);
    }

    .omni-menu-toggle {
        display: flex;
    }

    /* FIX APPLIED */
    .omni-grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .omni-menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .omni-menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .omni-menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .omni-search-overlay input[type="search"] {
        font-size: 24px;
    }

    .omni-wrap {
        padding-left: 15px;
        padding-right: 15px;
    }

    .omni-post-wrapper {
        flex-direction: column;
    }

    .omni-post-main {
        border: none;
        border-radius: 0;
        padding: 15px;
    }

    .omni-post-sidebar {
        display: none;
    }

    .omni-post-title,
    .omni-post-article h1 {
        font-size: 26px;
    }

    .omni-breadcrumb-strip {
        padding: 6px 15px;
    }

    .weekly-price-list li { font-size: 14px; padding: 8px 10px; }
    .product-price { font-size: 14px; padding: 3px 8px; }

    .omni-katalog-wrapper {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
        max-width: none;
    }
}