/*
 * MRMNDL tema stilleri
 * Önceden header.php ve şablonlar içinde satır içi duran CSS buraya taşındı (tarayıcı önbelleğe alabilir).
 * Renkler Customizer'dan gelen CSS değişkenleriyle çalışır:
 *   --mrm-primary  (Ana renk / marka mavisi)
 *   --mrm-accent   (Vurgu rengi / top bar kırmızısı)
 *   --mrm-footer   (Footer arka planı)
 *   --mrm-brand-text (Top bar yazı rengi)
 */

:root {
    --mrm-primary: #0e407f;
    --mrm-accent: #dd3333;
    --mrm-footer: #0f172a;
    --mrm-brand-text: #ffffff;
}

/* Temel yazı boyutu koruması:
 * Bazı eklentilerin yüklediği Bootstrap 3, html { font-size: 10px } ve body { font-size: 14px } ayarlıyor.
 * Tailwind ölçüleri rem tabanlı olduğu için tüm yazılar %37 küçülüyordu. Bu kurallar daha güçlü seçiciyle düzeltir. */
html:root { font-size: 100%; }
html:root body {
    font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);
    font-size: 1rem;
    line-height: 1.5;
    color: inherit;
}

/* ---------- Renk yardımcı sınıfları ----------
 * Not: Tailwind dosyası katmansız (@layer yok) derlendi; böylece eklentilerden gelen genel
 * h2 / a / .hidden gibi kurallar temanın sınıflarını ezemez. Bu dosya Tailwind'den SONRA yüklenir.
 */
.mrm-bg-primary { background-color: var(--mrm-primary); }
.mrm-text-primary { color: var(--mrm-primary); }
.mrm-border-primary { border-color: var(--mrm-primary); }
.mrm-bg-accent { background-color: var(--mrm-accent); }
.mrm-text-accent { color: var(--mrm-accent); }
.mrm-border-accent { border-color: var(--mrm-accent); }
.mrm-bg-footer { background-color: var(--mrm-footer); }
.mrm-text-brand { color: var(--mrm-brand-text); }

.mrm-hover-bg-primary:hover { background-color: var(--mrm-primary); }
.mrm-hover-text-primary:hover { color: var(--mrm-primary); }
.mrm-hover-border-primary:hover { border-color: var(--mrm-primary); }
.mrm-hover-bg-accent:hover { background-color: var(--mrm-accent); }
.mrm-hover-text-accent:hover { color: var(--mrm-accent); }
.mrm-focus-border-primary:focus-within { border-color: var(--mrm-primary); }
.group:hover .mrm-ghover-bg-primary { background-color: var(--mrm-primary); }
.group:hover .mrm-ghover-text-primary { color: var(--mrm-primary); }
.group:hover .mrm-ghover-bg-accent { background-color: var(--mrm-accent); }
.group:hover .mrm-ghover-text-accent { color: var(--mrm-accent); }

/* Derlenmiş Tailwind dosyasında olmayan birkaç sınıf (yeni şablonlar için) */
.hover\:opacity-90:hover { opacity: 0.9; }
.pb-16 { padding-bottom: 4rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
@media (min-width: 48rem) { .md\:text-8xl { font-size: 6rem; line-height: 1; } }

/* ---------- Görünürlük (Bootstrap vb. '.hidden { display:none !important }' kurallarından etkilenmez) ---------- */
.mrm-desktop-flex { display: none; }
@media (min-width: 1024px) { .mrm-desktop-flex { display: flex !important; } }

/* ---------- SVG ikonlar ---------- */
.mrm-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    flex-shrink: 0;
    vertical-align: -0.125em;
}

/* ---------- Mobil menü (drawer) ---------- */
#mobile-menu-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
}
#mobile-menu-drawer.open { transform: translateX(0); pointer-events: auto; }
#mobile-menu-overlay { transition: opacity 0.4s ease; opacity: 0; backdrop-filter: blur(4px); }
#mobile-menu-drawer.open #mobile-menu-overlay { opacity: 1; }
.menu-open { overflow: hidden; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- Header & arama ---------- */
.header-main-flex {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px;
}
.search-logic-wrapper { flex: 1 !important; min-width: 0; }
.search-logic-wrapper { display: none; }
@media (min-width: 768px) { .search-logic-wrapper { display: block !important; max-width: 600px; } }

/* ---------- Sticky ---------- */
@media (max-width: 1023px) {
    .mobile-sticky-wrapper { position: sticky; top: 0; z-index: 1000; background: white; box-shadow: 0 2px 15px rgba(0,0,0,0.03); }
}

@media (min-width: 1024px) {
    #sticky-nav { position: sticky; top: 0; z-index: 1000; background: white; box-shadow: 0 2px 15px rgba(0,0,0,0.05); transition: height 0.4s ease, box-shadow 0.4s ease; }
    #sticky-nav.is-sticky { height: 90px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
    #sticky-nav.is-sticky #sticky-logo { opacity: 1; visibility: visible; transform: translateX(0); }
    #sticky-nav.is-sticky #sticky-logo img { height: 65px !important; max-height: 65px !important; width: auto !important; }

    /* Genel menü */
    .desktop-menu-wrapper ul { display: flex; align-items: center; list-style: none !important; margin: 0; padding: 0; }

    .desktop-menu-wrapper > ul > li > a {
        padding: 15px 0;
        display: flex;
        align-items: center;
        gap: 6px;
        position: relative;
        color: var(--mrm-primary);
        font-weight: 700;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    .desktop-menu-wrapper > ul > li:hover > a { color: var(--mrm-accent) !important; }

    /* Aktif menü */
    .desktop-menu-wrapper ul li.current-menu-item > a,
    .desktop-menu-wrapper ul li.current-page-ancestor > a,
    .desktop-menu-wrapper ul li.current-menu-ancestor > a,
    .desktop-menu-wrapper ul li.current-menu-parent > a { color: var(--mrm-accent) !important; }

    .desktop-menu-wrapper > ul > li.current-menu-item > a::before,
    .desktop-menu-wrapper > ul > li.current-page-ancestor > a::before,
    .desktop-menu-wrapper > ul > li.current-menu-ancestor > a::before,
    .desktop-menu-wrapper > ul > li.current-menu-parent > a::before {
        content: "";
        position: absolute;
        bottom: 5px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--mrm-accent);
    }

    /* Alt menü oku (Font Awesome yerine CSS) */
    .desktop-menu-wrapper > ul > li.menu-item-has-children > a::after {
        content: "";
        width: 6px;
        height: 6px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-2px) rotate(45deg);
        opacity: 0.6;
        margin-left: 4px;
        display: inline-block;
        transition: transform 0.3s ease;
    }
    .desktop-menu-wrapper > ul > li.menu-item-has-children:hover > a::after {
        transform: translateY(1px) rotate(225deg);
        opacity: 1;
    }

    .desktop-menu-wrapper ul li ul.sub-menu {
        position: absolute;
        top: 100%;
        background: white;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
        border-top: 2px solid var(--mrm-accent);
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        z-index: 999;
    }
    .desktop-menu-wrapper ul li:hover > ul.sub-menu,
    .desktop-menu-wrapper ul li:focus-within > ul.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* A: Mega menü (görselli) */
.mrm-menu-mega .desktop-menu-wrapper ul li ul.sub-menu {
        left: 0; width: 100%; padding: 30px 40px !important;
        display: flex !important; flex-wrap: wrap !important;
        justify-content: center !important; gap: 15px !important;
    }
.mrm-menu-mega .mega-column { flex: 0 0 calc(16.66% - 15px) !important; min-width: 150px; max-width: 180px; }
.mrm-menu-mega .mega-link-wrapper { display: block !important; text-decoration: none !important; text-align: center; }
.mrm-menu-mega .mega-card-image {
        width: 100%; height: 120px; border-radius: 12px; overflow: hidden;
        margin-bottom: 10px; background: #ffffff; display: flex !important;
        align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
.mrm-menu-mega .mega-card-image img { max-width: 90%; max-height: 90%; width: auto; height: auto; object-fit: contain !important; transition: transform 0.4s ease; }
.mrm-menu-mega .mega-link-wrapper:hover img { transform: scale(1.1); }
.mrm-menu-mega .mega-link-wrapper:hover .mega-title { color: var(--mrm-accent) !important; }
.mrm-menu-mega .mega-title { color: var(--mrm-primary) !important; font-weight: 800 !important; font-size: 12px !important; text-transform: uppercase; display: block !important; }
.mrm-menu-mega .mega-column.current-menu-item .mega-title { color: var(--mrm-accent) !important; }

    /* B: Standart açılır menü */
.mrm-menu-standard .desktop-menu-wrapper > ul > li { position: relative !important; }
.mrm-menu-standard .desktop-menu-wrapper ul li ul.sub-menu { width: 250px; left: 0; display: block !important; padding: 10px 0 !important; }
.mrm-menu-standard .desktop-menu-wrapper ul li ul.sub-menu li { display: block !important; width: 100%; }
.mrm-menu-standard .desktop-menu-wrapper ul li ul.sub-menu li a {
        padding: 10px 20px !important; color: var(--mrm-primary) !important; font-size: 14px !important;
        display: block !important; border-bottom: 1px solid #f3f4f6;
    }
.mrm-menu-standard .desktop-menu-wrapper ul li ul.sub-menu li a:hover { background: #f9fafb; color: var(--mrm-accent) !important; }
.mrm-menu-standard .mega-card-image { display: none !important; }
}

#sticky-logo { opacity: 0; visibility: hidden; transform: translateX(-1rem); transition: all 0.3s ease; }

/* ---------- Mobil menü akordeon ---------- */
#mobile-menu-open { cursor: pointer !important; z-index: 1010; transition: transform 0.2s ease; }
#mobile-menu-drawer nav ul li { border-bottom: 1px solid #f9fafb; position: relative; list-style: none; }
#mobile-menu-drawer nav ul li a { display: block; padding: 15px 50px 15px 0; color: #1f2937; text-decoration: none; transition: color 0.3s ease; }
#mobile-menu-drawer nav ul li a:hover,
#mobile-menu-drawer nav ul li.current-menu-item > a,
#mobile-menu-drawer nav ul li.current-page-ancestor > a { color: var(--mrm-accent) !important; }

.mob-expand { position: absolute; right: 0; top: 0; width: 50px; height: 54px; display: flex; align-items: center; justify-content: center; color: #9ca3af; border-left: 1px solid #f9fafb; cursor: pointer; background: none; border-top: 0; border-right: 0; border-bottom: 0; }
.mob-expand .mrm-icon { transition: transform 0.3s ease; }
.mob-expand.active .mrm-icon { transform: rotate(180deg); }
.mob-expand.active { color: var(--mrm-primary); }
#mobile-menu-drawer ul.sub-menu { display: none; background: #fcfcfc; padding-left: 15px; border-top: 1px solid #f3f4f6; }
#mobile-menu-drawer ul.sub-menu.open { display: block; }

/* ---------- Logo & footer ---------- */
.custom-logo-link img { max-width: 100%; height: auto !important; }
#sticky-logo img { height: 35px; width: auto !important; }
/* Footer: 4 sütun, boş sütunlar gizlenince kalanlar eşit yayılır */
.mrm-footer-grid { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .mrm-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .mrm-footer-grid { grid-template-columns: repeat(var(--mrm-footer-cols, 4), minmax(0, 1fr)); } }
.mrm-footer-logo { max-width: 200px; max-height: 80px; width: auto; height: auto; object-fit: contain; }
.mrm-footer-menu { list-style: none; margin: 0; padding: 0; }
.mrm-footer-menu a { color: inherit; transition: color 0.3s ease; }
.mrm-footer-menu a:hover, .mrm-footer-menu .current-menu-item > a { color: #ffffff; }

/* Footer widget'ları (footer tasarımına uyumlu) */
.mrm-footer-widgets { font-size: 0.875rem; line-height: 1.7; }
.mrm-footer-widget + .mrm-footer-widget { margin-top: 2rem; }
.mrm-footer-widget-title,
.mrm-footer-widget h2,
.mrm-footer-widget h3,
.mrm-footer-widget .wp-block-heading { color: #ffffff; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 1rem; margin: 0 0 1.5rem; }
.mrm-footer-widget ul { list-style: none; margin: 0; padding: 0; }
.mrm-footer-widget li + li { margin-top: 1rem; }
.mrm-footer-widget a { color: inherit; transition: color 0.3s ease; }
.mrm-footer-widget a:hover { color: #ffffff; }
.mrm-footer-widget p { margin: 0 0 1rem; }
.mrm-footer-widget img { max-width: 100%; height: auto; }
.mrm-footer-widget select, .mrm-footer-widget input { color: #111827; border-radius: 8px; padding: 6px 10px; }

/* ---------- Sayfalama ---------- */
.mrmndl-pagination,
.custom-search-pagination ul,
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
}
.mrmndl-pagination .page-numbers,
.custom-search-pagination ul li a,
.custom-search-pagination ul li span {
    min-width: 45px;
    height: 45px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    color: var(--mrm-primary);
    font-weight: 800;
    font-size: 14px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}
.mrmndl-pagination a.page-numbers:hover,
.custom-search-pagination ul li a:hover {
    background: var(--mrm-primary);
    color: #ffffff;
    transform: translateY(-3px);
}
.mrmndl-pagination .page-numbers.current,
.custom-search-pagination ul li span.current {
    background: var(--mrm-primary);
    color: #ffffff;
    border-color: var(--mrm-primary);
}
.nav-links .page-numbers { padding: 6px 12px; font-weight: 800; font-size: 12px; color: var(--mrm-primary); }
.nav-links .page-numbers.current { color: var(--mrm-accent); }

/* ---------- WooCommerce (WooCommerce'in kendi CSS'i yüklenmediği için gereken minimum) ---------- */
.woocommerce-breadcrumb a { color: inherit; text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--mrm-primary); }
.woocommerce-result-count { margin: 0; }
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select {
    border: 1px solid #f3f4f6; border-radius: 9999px; padding: 6px 14px;
    font-size: 12px; font-weight: 700; color: #4b5563; background: #fff;
}

.custom-product-tabs .woocommerce-tabs ul.tabs { display: flex !important; gap: 40px !important; list-style: none; margin: 0 0 25px; border: none !important; padding: 0 15px !important; overflow: visible !important; border-bottom: 1px solid #f3f4f6 !important; }
.custom-product-tabs .woocommerce-tabs ul.tabs li { background: transparent !important; border: none !important; position: relative; overflow: visible !important; margin: 0; padding: 0; }
.custom-product-tabs .woocommerce-tabs ul.tabs li a { font-weight: 800 !important; text-transform: uppercase !important; color: #d1d5db !important; font-size: 12px !important; padding: 0 5px 15px 5px !important; display: block; white-space: nowrap !important; text-decoration: none; }
.custom-product-tabs .woocommerce-tabs ul.tabs li.active a { color: var(--mrm-primary) !important; }
.custom-product-tabs .woocommerce-tabs ul.tabs li.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px; background-color: #edba0b !important; border-radius: 10px; }
.custom-product-tabs .woocommerce-Tabs-panel { color: #4b5563; font-size: 14px; line-height: 1.7; padding: 0 15px; }
.custom-product-tabs .woocommerce-Tabs-panel > h2:first-child { display: none; }
.custom-product-tabs .woocommerce-Tabs-panel p { margin-bottom: 1em; }
.custom-product-tabs .woocommerce-Tabs-panel ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1em; }
.custom-product-tabs table.shop_attributes { width: 100%; border-collapse: collapse; }
.custom-product-tabs table.shop_attributes th,
.custom-product-tabs table.shop_attributes td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.custom-product-tabs table.shop_attributes th { width: 30%; font-weight: 800; color: #374151; }
.custom-product-tabs table.shop_attributes td p { margin: 0; }

/* Ürün galerisi */
.mrm-gallery-thumb { border: 1px solid #f3f4f6; transition: border-color 0.2s ease; }
.mrm-gallery-thumb:hover { border-color: var(--mrm-primary); }
.mrm-gallery-thumb.is-active { border: 2px solid var(--mrm-primary); }

#relatedSlider::-webkit-scrollbar { display: none; }
#relatedSlider { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- Sayfa içeriği (page.php / single.php) ---------- */
.mrm-content { color: #374151; font-size: 15px; line-height: 1.8; }
.mrm-content > * + * { margin-top: 1em; }
.mrm-content h2 { font-size: 1.5em; font-weight: 900; color: var(--mrm-primary); margin-top: 1.6em; }
.mrm-content h3 { font-size: 1.25em; font-weight: 800; color: var(--mrm-primary); margin-top: 1.4em; }
.mrm-content h4 { font-size: 1.05em; font-weight: 800; color: #111827; margin-top: 1.2em; }
.mrm-content a { color: var(--mrm-accent); font-weight: 700; text-decoration: underline; }
.mrm-content ul { list-style: disc; padding-left: 1.5em; }
.mrm-content ol { list-style: decimal; padding-left: 1.5em; }
.mrm-content img { border-radius: 16px; }
.mrm-content table { width: 100%; border-collapse: collapse; }
.mrm-content th, .mrm-content td { border: 1px solid #f3f4f6; padding: 8px 12px; text-align: left; }
.mrm-content blockquote { border-left: 4px solid var(--mrm-accent); padding-left: 1em; color: #6b7280; font-style: italic; }

/* ---------- İletişim formu (CF7) ---------- */
.google-map-iframe iframe { width: 100% !important; height: 100% !important; border: 0 !important; }
.custom-contact-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.custom-contact-form textarea,
.custom-contact-form select { width: 100%; padding: 15px; border-radius: 15px; border: 1px solid #f3f4f6; background: #f9fafb; margin-bottom: 15px; font-size: 14px; }
.custom-contact-form input[type="submit"] { background: var(--mrm-primary); color: white; padding: 15px 40px; border-radius: 15px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: 0.3s; border: none; }
.custom-contact-form input[type="submit"]:hover { background: #edba0b; transform: translateY(-2px); }

/* ---------- YouTube önizleme (Hakkımızda) ---------- */
.mrm-yt { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.mrm-yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.3s ease; }
.mrm-yt:hover img { opacity: 1; }
.mrm-yt-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 9999px; background: rgba(255,0,0,0.9); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; padding-left: 4px; }
.mrm-yt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 1rem; }

/* ---------- Link odak çerçevesi ve alt çizgi ----------
 * Bootstrap 3 (bir eklentiden geliyor) linklere tıklayınca siyah/mavi odak çerçevesi
 * ve üzerine gelince alt çizgi ekliyordu.
 * - Fareyle tıklamada çerçeve çıkmaz; klavyeyle (Tab) gezinenler için görünür kalır (erişilebilirlik).
 * - Hover'da alt çizgi yok; sadece sayfa/yazı içeriğindeki metin linkleri altı çizili kalır.
 */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none;
}
html:root a:hover,
html:root a:focus,
html:root a:active {
    text-decoration: none;
}
html:root .mrm-content a,
html:root .mrm-content a:hover { text-decoration: underline; }

/* ---------- Masaüstü menü ortalı ----------
 * Menü sayfaya göre tam ortada durur. Kaydırınca beliren küçük logo menüyü itmesin diye
 * sola sabitlenir (yer kaplamaz).
 */
@media (min-width: 1024px) {
    .desktop-menu-wrapper > ul { justify-content: center; }
    #sticky-logo {
        position: absolute;
        left: 1rem;
        top: 50%;
        margin: 0;
        transform: translate(-1rem, -50%);
    }
    #sticky-nav.is-sticky #sticky-logo { transform: translate(0, -50%); }
}
.break-all { word-break: break-all; }
.inline-flex { display: inline-flex; }