/* ================================================
   header-price.css — Тікер + перемикач валюти
   ================================================ */

.header-top {
    background: #f5f5f5;
    border-bottom: 1px solid #ffffff;
    width: 100%;
    position: fixed;
    z-index: 11111;
    box-shadow: 0 0 9px hsl(0deg 0% 0% / 15%);
}

.ht-ticker__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 7px 1.4em 7px 1em;
    gap: 0;
}

.ht-ticker__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    white-space: nowrap;
    padding: 0 10px;
}

/* Назва + одиниця виміру */
.ht-ticker__label-wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
    align-items: center;
}

/* Блок з двома рядками цін */
.ht-ticker__prices {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Рядок: підпис + ціна */
.ht-ticker__price-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Підписи Купуємо / Продаємо */
.ht-ticker__direction {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    width: 60px;
    flex-shrink: 0;
}

.ht-buy-label  { color: #333; }
.ht-sell-label { color: #333; }

.ht-ticker__divider {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: #333;
    flex-shrink: 0;
}

.ht-ticker__metal {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ht-gold      { color: #ac8331; }
.ht-silver    { color: #b0b8c1; }
.ht-platinum  { color: #8ab4f8; }
.ht-palladium { color: #c084fc; }

.ht-ticker__unit {
    font-size: 10px;
    color: #ffffff;
    background: #ac8331;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

.ht-ticker__buy  { color: #532f2f; font-weight: 700; font-size: 13px; }
.ht-ticker__sep  { color: #444; font-size: 11px; }
.ht-ticker__sell { color: #466957; font-weight: 700; font-size: 13px; }

.ht-ticker__updated {
    font-size: 11px;
    color: #252525;
    padding-left: 18px;
    white-space: nowrap;
}
.ht-ticker__time { color: #252525; }

/* Блоки валют в тікері */
.ht-pln, .ht-eur, .ht-usd {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ================================================
   ІНДИКАТОР ЗМІНИ ЦІНИ ▲▼
   ================================================ */

.vb-tick-change {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    margin-left: 2px;
}
.vb-tick-up   { color: #466957; }
.vb-tick-down { color: #532f2f; }
.vb-tick-pct  { font-weight: 500; opacity: 0.75; }


/* ================================================
   ПЕРЕМИКАЧ ВАЛЮТИ
   ================================================ */

/* Обгортка для валюти + мови */
.ht-right-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding-left: 20px;
}

.ht-currency-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Перемикач мови */
.ht-lang-switcher {
    display: flex;
    align-items: center;
    border-left: 1px solid #333;
    padding-left: 8px;
    position: relative;
    z-index: 9999;
}

.ht-lang-switcher a,
.ht-lang-switcher span {
    color: #333;
    text-decoration: none;
    border: 0px solid #333;
    border-radius: 3px;
    transition: all 0.15s;
    letter-spacing: 0.5px;
    text-align: left;
    display: flex;
    align-self: flex-start;
    width: -webkit-fill-available;
}
.ht-lang-switcher a:hover { border-color: #555; color: #999; }
.ht-lang-switcher .active,
.ht-lang-switcher .current-lang {
    background: #555;
    border-color: #555;
    color: #fff;
}

.ht-currency-btn {
    background: #ffffff;
    border: 1px solid #e4e0d5;
    color: #666;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.15s;
    line-height: 1.6;
}

.ht-currency-btn:hover {
    border-color: #000000;
    color: #ffffff;
    background-color: #000000;
}

.ht-currency-btn:focus,
.ht-currency-btn--active {
    background: #8a6a1a;
    border-color: #8a6a1a;
    color: #fff;
}


/* ================================================
   ПЕРЕМИКАЧ МОВИ (TranslatePress)
   ================================================ */

.ht-lang-switcher .trp-shortcode-switcher__wrapper {
    --bg: #1a1a1a;
    --bg-hover: #2a2a2a;
    --text: #888;
    --text-hover: #ccc;
    --border: 1px solid #333;
    --border-width: 1px;
    --border-color: #333;
    --border-radius: 4px;
    --flag-size: 14px;
    --aspect-ratio: 4/3;
    --font-size: 11px;
    --transition-duration: 0.2s;
    --flag-radius: 2px;
}

.ht-lang-switcher .trp-flag-image {
    width: 16px !important;
    height: auto !important;
}

.ht-lang-switcher .trp-language-item-name {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.4px !important;
}

.ht-lang-switcher .trp-shortcode-arrow {
    width: 14px !important;
    height: 14px !important;
    fill: #4d4d4d;
}

.ht-lang-switcher .trp-switcher-dropdown-list a {
    color: #999 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    gap: 8px !important;
}
.ht-lang-switcher .trp-switcher-dropdown-list a:hover {
    color: #d4a843 !important;
    background: #222 !important;
}

.trp-language-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    text-decoration: none;
    min-height: 20px;
    box-sizing: content-box;
    min-width: 80px;
}

.trp-shortcode-switcher__wrapper {
    display: flex;
}

.trp-switcher-dropdown-list .trp-language-item .trp-language-item-name {
    align-self: center;
}

.trp-language-item__default .trp-language-item-name {
    align-self: center;
}

.trp-shortcode-switcher {
    padding: 4px 4px !important;
}


/* ================================================
   ВАЛЮТНІ РЕЖИМИ — показуємо ТІЛЬКИ обрану валюту
   ================================================ */

/* --- Крок 1: ховаємо ВСІ валютні елементи (з високою специфічністю) --- */
.ht-pln, .ht-eur, .ht-usd,
.ht-change-pln, .ht-change-eur, .ht-change-usd,
.vb-loop-pln, .vb-loop-eur, .vb-loop-usd,
ul.products li.product .vb-loop-pln,
ul.products li.product .vb-loop-eur,
ul.products li.product .vb-loop-usd,
.vb-price-pln, .vb-price-eur, .vb-price-usd {
    display: none !important;
}

/* --- Крок 2: PLN (обраний або за замовчуванням) --- */
html:not([data-currency]) .ht-pln,
html:not([data-currency]) .ht-change-pln,
html[data-currency="PLN"] .ht-pln,
html[data-currency="PLN"] .ht-change-pln,
body[data-currency="PLN"] .ht-pln,
body[data-currency="PLN"] .ht-change-pln {
    display: inline-flex !important;
}
html:not([data-currency]) .vb-loop-pln,
html:not([data-currency]) ul.products li.product .vb-loop-pln,
html:not([data-currency]) .vb-price-pln,
html[data-currency="PLN"] .vb-loop-pln,
html[data-currency="PLN"] ul.products li.product .vb-loop-pln,
html[data-currency="PLN"] .vb-price-pln,
body[data-currency="PLN"] .vb-loop-pln,
body[data-currency="PLN"] ul.products li.product .vb-loop-pln,
body[data-currency="PLN"] .vb-price-pln {
    display: block !important;
}

/* --- Крок 3: EUR режим --- */
html[data-currency="EUR"] .ht-eur,
html[data-currency="EUR"] .ht-change-eur,
body[data-currency="EUR"] .ht-eur,
body[data-currency="EUR"] .ht-change-eur {
    display: inline-flex !important;
}
html[data-currency="EUR"] .vb-loop-eur,
html[data-currency="EUR"] ul.products li.product .vb-loop-eur,
body[data-currency="EUR"] .vb-loop-eur,
body[data-currency="EUR"] ul.products li.product .vb-loop-eur {
    font-size: clamp(0.7rem, 0.4vw + 0.8vw, 1rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    display: block !important;
    color: #1a1a18 !important;
    opacity: 1 !important;
    white-space: nowrap !important;
    margin-top: 0 !important;
}
html[data-currency="EUR"] .vb-price-eur,
body[data-currency="EUR"] .vb-price-eur {
    font-size: 20px !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    display: block !important;
}
html[data-currency="EUR"] .vostberg-buy .vb-price-eur,
body[data-currency="EUR"] .vostberg-buy .vb-price-eur  { color: #cc0000; }
html[data-currency="EUR"] .vostberg-sell .vb-price-eur,
body[data-currency="EUR"] .vostberg-sell .vb-price-eur { color: #007a00; }
html[data-currency="EUR"] .vostberg-manual-price .vb-price-eur,
body[data-currency="EUR"] .vostberg-manual-price .vb-price-eur { color: #007a00; }

/* --- Крок 4: USD режим --- */
html[data-currency="USD"] .ht-usd,
html[data-currency="USD"] .ht-change-usd,
body[data-currency="USD"] .ht-usd,
body[data-currency="USD"] .ht-change-usd {
    display: inline-flex !important;
}
html[data-currency="USD"] .vb-loop-usd,
html[data-currency="USD"] ul.products li.product .vb-loop-usd,
body[data-currency="USD"] .vb-loop-usd,
body[data-currency="USD"] ul.products li.product .vb-loop-usd {
    font-size: clamp(0.7rem, 0.4vw + 0.8vw, 1rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    display: block !important;
    color: #1a1a18 !important;
    opacity: 1 !important;
    white-space: nowrap !important;
    margin-top: 0 !important;
}
html[data-currency="USD"] .vb-price-usd,
body[data-currency="USD"] .vb-price-usd {
    font-size: 20px !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    display: block !important;
}
html[data-currency="USD"] .vostberg-buy .vb-price-usd,
body[data-currency="USD"] .vostberg-buy .vb-price-usd  { color: #cc0000; }
html[data-currency="USD"] .vostberg-sell .vb-price-usd,
body[data-currency="USD"] .vostberg-sell .vb-price-usd { color: #007a00; }
html[data-currency="USD"] .vostberg-manual-price .vb-price-usd,
body[data-currency="USD"] .vostberg-manual-price .vb-price-usd { color: #007a00; }


/* ================================================
   МОБІЛЬНА АДАПТАЦІЯ
   ================================================ */

@media (max-width: 1400px) {
    .ht-change-pln,
    .vb-tick-change{
        display: none;
    }
}

@media (max-width: 1100px) {
    .ht-ticker__inner {
        padding: 7px 1em 7px 0.2em;
    }
}

@media (max-width: 991px) {
    .ht-ticker__updated{
        display: none;
    }
}

@media (max-width: 768px) {
    .ht-ticker__inner {
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 7px 12px;
        overflow: visible;
    }
    .ht-ticker__inner::-webkit-scrollbar { display: none; }
    .ht-ticker__item:first-child { padding-left: 0; }
    .ht-ticker__item { padding: 0 12px; }
    .ht-ticker__updated { display: none; }
    .ht-currency-switcher { padding-left: 0px; }
}


/* ================================================
   ТОВАРИ "НЕМАЄ В НАЯВНОСТІ"
   ================================================ */

ul.products li.product.vb-out-of-stock {
    opacity: 0.6;
    filter: grayscale(30%);
    position: relative;
}
ul.products li.product.vb-out-of-stock:hover {
    opacity: 0.75;
    filter: grayscale(15%);
    transform: none !important;
    box-shadow: none !important;
}

.vb-loop-out {
    border: 1px solid #e8e8e8 !important;
    background: #f9f9f9 !important;
    border-radius: 8px;
    margin: 10px 0 6px;
    padding: 10px;
}
.vb-loop-out-label {
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    text-align: center;
    padding: 4px 0;
}

.ht-currency-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 1px solid #e4e0d5;
    border-radius: 6px !important;
    padding: 4px 28px 4px 12px !important;
    font-size: 11px;
    font-weight: 700;
    height: 31px;
    color: #333;
    min-width: 70px;
    cursor: pointer;
    background-position: 87% 50% !important;
    line-height: 1.1 !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ht-currency-select:hover { border-color: #cbb98a; }
.ht-currency-select:focus {
    outline: none;
    border-color: #b8860b;
    box-shadow: 0 0 0 3px rgba(184,134,11,0.1);
}
.ht-currency-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.ht-currency-select {
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    line-height: 1.2;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ht-currency-select:hover { border-color: #cbb98a; }
.ht-currency-select:focus {
    outline: none;
    border-color: #b8860b;
    box-shadow: 0 0 0 3px rgba(184,134,11,0.1);
}
.ht-currency-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    fill: #4d4d4d;
}

@media (max-width: 768px) {
    .header-search {
        margin: 0 10px 0 0 !important;
    }

    .vb-search__box {
        padding: 0 10px !important;
    }

    .vb-search__input {
        padding: 5px 6px 7px 8px !important;
        height: 31px !important;
    }
}