/*
Theme Name: Plastic Child
Theme URI:
Description: Child theme for Plastic
Author: Aiata
Template: plastic
Text Domain: plastic-child
Version: 1.0.0
*/

/* Hide site title text - logo is used instead */
.site-title,
.site-description {
    display: none !important;
}

/* === DİL SWITCHER === */

/* Header grid'e 4. alan ekle */
.site-header {
    grid-template-areas:
        "primary logo secondary lang"
        "expand expand expand expand" !important;
    grid-template-columns: 1fr auto 1fr auto !important;
}

/* Navbar switcher wrap */
.lang-switcher-wrap {
    grid-area: lang;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.lang-current {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35em;
    color: inherit;
    font-family: var(--font-alt);
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.3em 0.7em;
    transition: background 0.2s;
}

.lang-current:hover {
    background: rgba(255,255,255,0.15);
}

.lang-current img {
    width: 18px;
    height: auto;
    border-radius: 2px;
}

.lang-arrow {
    font-size: 0.75em;
    opacity: 0.7;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.6em);
    right: 0;
    background: white;
    border-radius: 0.75em;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 110px;
    overflow: hidden;
    z-index: 200;
}

.lang-dropdown.open {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.7em 1em;
    text-decoration: none;
    color: #222;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: background 0.15s;
    white-space: nowrap;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-option.active {
    background: #f0f0f0;
}

.lang-option img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

/* Menü açıkken switcher gizle */
.site-header:has(.navigation.toggled) .lang-switcher-wrap {
    display: none;
}

/* Menü içi switcher */
.menu-lang-wrapper {
    list-style: none;
}

.menu-lang-switcher {
    display: flex !important;
    gap: 2em;
    padding: 1.2em 0 0.5em;
    justify-content: center;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-top: 1em;
    width: 100%;
}

.menu-lang-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4em;
    text-decoration: none;
    color: #333;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.menu-lang-item.current {
    opacity: 1;
}

.menu-lang-item:hover {
    opacity: 1;
}

.menu-lang-item img {
    width: 32px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* === TÜRKÇE UPPERCASE FIX ===
 * CSS text-transform: uppercase Türkçe locale'de i → İ yapar.
 * Marka isimleri (Sunfinder, Wayfinder) yanlış görünür.
 * Çözüm: TR'de text-transform kaldır, JS ile İngilizce uppercase uygula.
 */
:lang(tr) [data-tr-upper] {
    text-transform: none !important;
}
:lang(tr) [style*="text-transform: none"] {
    text-transform: none !important;
}

/* Konfiguratör sayfasında dil switcher sol üstte */
body.page-template-page-configurator .lang-switcher-wrap {
    position: fixed;
    top: 0.6em;
    right: 1em;
    left: auto;
    z-index: 200;
    grid-area: unset;
}

/* Normal sayfalarda dil switcher navbar'da sağda — logo ile paralel */
.site-header .lang-switcher-wrap {
    align-self: center;
}

/* === TÜRKÇE UPPERCASE FIX ===
 * CSS text-transform: uppercase Türkçe'de i → I yapar (İ yerine).
 * Çözüm: TR sayfalarında text-transform kaldır, JS ile toLocaleUpperCase('tr') uygula.
 */
:lang(tr) .navigation a {
    text-transform: none !important;
}
