/* ===== style.css — стили ТВ-меню (совместимый) ===== */

/* Шрифт */
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

:root {
    --bg-dark: #0f0f10;
    --bg-panel: #1a1a1b;
    --bg-panel-2: #171718;
    --text-primary: #ffffff;
    --text-muted: #8b8f96;
    --accent-yellow: #ffd33d;
    --accent-yellow-2: #f2c200;

    --col-gap: 48px;
    --panel-radius: 18px;

    /* Фиксированные размеры для старых браузеров */
    --fs-title: 24px;
    --fs-name: 24px;
    --fs-number: 20px;
    --fs-meta: 17px;
    --fs-price: 24px;
    --fs-legend: 16px;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Базовая настройка для телевизоров */
html {
    font-size: 16px;
    width: 100%;
    height: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #0f0f10;
    color: #ffffff;
    font-family: "Rubik", Arial, sans-serif;
    overflow: auto;
    /* фон-картинка */
    background: url('./img/back.jpg') center center no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.tv-root {
    width: 100%;
    height: 100%;
}

/* Адаптивная страница для телевизоров */
.tv-page {
    width: 100%;
    height: 100%;
    margin: 0;
    display: table;
    table-layout: fixed;
    overflow: hidden;
}

/* Безопасные отступы для телевизоров (overscan) */
.tv-content {
    display: table-cell;
    vertical-align: top;
    padding: 40px 60px 60px;
    width: 100%;
    height: 100%;
}

/* Двухколоночная сетка без CSS Grid */
.tv-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 40px 60px 60px;
}

.tv-content:after {
    content: "";
    display: table;
    clear: both;
}

.tv-header {
    display: none;
}

.tv-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.08);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ===== Колонки ===== */
.menu-column {
    float: left;
    width: 48%;
    height: 100%;
    margin-right: 4%;
}

.menu-column:last-child {
    margin-right: 0;
}

.column-surface {
    width: 100%;
    padding: 18px 24px 22px;
    height: 100%;
}

/* Шапка колонки (иконки объёмов) */
.column-header {
    position: relative;
    padding: 0 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 10px;
}

.column-header__legend {
    float: right;
    margin-top: -20px;
    padding-bottom: 20px;
}

.column-header__legend:after {
    content: "";
    display: table;
    clear: both;
}

.legend-unit {
    float: left;
    margin-left: 40px;
}

.legend-unit:first-child {
    margin-left: 0;
}

.legend-unit:after {
    content: "";
    display: table;
    clear: both;
}

.legend-icon {
    width: 38px;
    height: 38px;
    display: block;
    float: left;
    margin-right: 10px;
}

.legend-icon--small {
    width: 34px;
    height: 34px;
}

.legend-label {
    font-size: 16px;
    font-weight: 300;
    text-transform: lowercase;
    color: rgba(255, 255, 255, 0.79);
    line-height: 38px;
    float: left;
}

/* ===== Список позиций ===== */
.menu-list {
    height: calc(100% - 60px);
    overflow: hidden;
    width: 100%;
}

/* Фиксированная высота элемента пива */
.beer-item {
    height: 110px;
    min-height: 80px;
    max-height: 110px;
    position: relative;
    padding: 12px 10px;
    border-radius: 14px;
    margin-bottom: 8px;
    outline: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.51);
    overflow: hidden;
}

.beer-item:after {
    content: "";
    display: table;
    clear: both;
}

.beer-item:hover {
    background: rgba(0, 0, 0, 0.33);
}

.beer-logo {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    overflow: hidden;

    background: #0b0b0c;
    float: left;
    margin-right: 18px;
    position: relative;
    margin-top: 6px;
}

.beer-logo__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.beer-main {
    float: left;
    width: calc(100% - 300px);
    height: 76px;
    position: relative;
}

.beer-number {
    font-size: 40px;
    font-weight: 900;
    color: #ffd33d;
    text-shadow: 0 2px 0 #000;
    min-width: 56px;
    float: left;
    margin-right: 16px;
    line-height: 76px;
}

.beer-texts {
    float: left;
    width: calc(100% - 72px);
    padding-top: 12px;
}

/* Размеры шрифта для названий - фиксированные для совместимости */
.beer-title--normal {
    font-size: 38px;
    font-weight: 900;
}

.beer-title--medium {
    font-size: 30px;
    font-weight: 900;
}

.beer-title--small {
    font-size: 31px;
    font-weight: 900;
}

.beer-title--tiny {
    font-weight: 900;
    font-size: 24px;
}

/* Убираем переносы строк для всех размеров */
.beer-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
    margin-bottom: 4px;
        color: rgba(255, 255, 255, 0.89);
}

.beer-meta--normal {
    font-size: 18px;
    color: #8b8f96;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.beer-meta--small {
    font-size: 15px;
    color: #8b8f96;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

/* Правый блок цен */
.beer-prices {
    float: right;

    height: 76px;
    position: relative;
}

.beer-price {
    font-size: 38px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.89);
    text-shadow: 0 2px 0 #000;
    float: left;
    width: 110px;
    text-align: center;
    line-height: 76px;
    margin-left: 15px;
}

.beer-price:first-child {
    margin-left: 0;
}

.beer-price--small {
    width: 90px;
}

.beer-price--large {
    width: 90px;
}

/* Адаптация под маленькие экраны */
@media (max-width: 1366px) {
    :root {
        --fs-title: 36px;
        --fs-name: 36px;
        --fs-number: 32px;
        --fs-meta: 15px;
        --fs-price: 36px;
        --fs-legend: 14px;
    }

    .tv-content {
        padding: 30px 40px 40px;
    }

    .beer-item {
        height: 80px;
        min-height: 80px;
        max-height: 80px;
        margin-bottom: 6px;
    }

    .beer-logo {
        width: 52px;
        height: 52px;
        min-width: 52px;
        margin-right: 14px;
        margin-top: 4px;
    }

    .beer-main {
        width: calc(100% - 240px);
        height: 56px;
    }

    .beer-number {
        font-size: 32px;
        line-height: 56px;
        min-width: 48px;
        margin-right: 12px;
    }

    .beer-texts {
        width: calc(100% - 60px);
        padding-top: 8px;
    }

    .beer-title--normal {
        font-size: 36px;
    }

    .beer-title--medium {
        font-size: 30px;
    }

    .beer-title--small {
        font-size: 26px;
    }

    .beer-title--tiny {
        font-size: 22px;
    }

    .beer-meta--normal {
        font-size: 15px;
        color: #8b8f96;
        letter-spacing: 0.02em;
        line-height: 1.2;
    }

    .beer-meta--small {
        font-size: 11px;
        color: #8b8f96;
        letter-spacing: 0.02em;
        line-height: 1.2;
    }

    .beer-prices {
        width: 180px;
        height: 56px;
    }

    .beer-price {
        font-size: 36px;
        line-height: 56px;
        margin-left: 30px;
    }

    .beer-price--small,
    .beer-price--large {
        width: 75px;
    }

    .legend-icon {
        width: 32px;
        height: 32px;
    }

    .legend-icon--small {
        width: 28px;
        height: 28px;
    }

    .legend-label {
        font-size: 14px;
        line-height: 32px;
    }

    .legend-unit {
        margin-left: 50px;
    }
}

/* Адаптация для низкой высоты экрана (768px и меньше) */
@media (max-height: 768px) {
    .tv-content {
        padding: 20px 40px 20px;
    }

    .beer-item {
        height: 70px;
        min-height: 70px;
        max-height: 70px;
        margin-bottom: 4px;
        padding: 8px 10px;
    }

    .beer-logo {
        width: 46px;
        height: 46px;
        min-width: 46px;
        margin-right: 12px;
        margin-top: 2px;
    }

    .beer-main {
        width: calc(100% - 220px);
        height: 50px;
    }

    .beer-number {
        font-size: 28px;
        line-height: 50px;
        min-width: 42px;
        margin-right: 10px;
    }

    .beer-texts {
        width: calc(100% - 52px);
        padding-top: 6px;
    }

    .beer-title--normal {
        font-size: 28px;
    }

    .beer-title--medium {
        font-size: 24px;
    }

    .beer-title--small {
        font-size: 22px;
    }

    .beer-title--tiny {
        font-size: 20px;
    }

    .beer-meta--normal {
        font-size: 13px;
        color: #8b8f96;
        letter-spacing: 0.02em;
        line-height: 1.2;
    }

    .beer-meta--small {
        font-size: 10px;
        color: #8b8f96;
        letter-spacing: 0.02em;
        line-height: 1.2;
    }

    .beer-prices {
        width: 160px;
        height: 50px;
    }

    .beer-price {
        font-size: 28px;
        line-height: 50px;
        margin-left: 10px;
    }

    .beer-price--small,
    .beer-price--large {
        width: 70px;
    }

    .column-header {
        padding: 0 12px 6px;
        margin-bottom: 6px;
    }

    .legend-icon {
        width: 28px;
        height: 28px;
    }

    .legend-icon--small {
        width: 24px;
        height: 24px;
    }

    .legend-label {
        font-size: 13px;
        line-height: 28px;
    }

    .legend-unit {
        margin-left: 30px;
    }

    .out-of-stock-stamp {
        height: 60px;
        margin-top: -30px;
    }

    .menu-list {
        height: calc(100% - 45px);
    }
}

/* Модификаторы */
.menu-column--left .beer-item {}

.menu-column--right .beer-item {}

.beer-item--1 {}

.beer-item--2 {}

.beer-item--3 {}

.beer-item--4 {}

.beer-item--5 {}

.beer-item--6 {}

.beer-item--7 {}

.beer-item--8 {}

.beer-item--9 {}

.beer-item--10 {}

.beer-item--11 {}

.beer-item--12 {}

.beer-item--13 {}

.beer-item--14 {}

.beer-item--15 {}

.beer-item--16 {}

/* ===== Out of Stock стили ===== */
.beer-item--out-of-stock {
    opacity: 0.6;
    position: relative;
}

.beer-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 14px;
    z-index: 10;
}

.out-of-stock-stamp {
    width: auto;
    height: 80px;
    opacity: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    z-index: 11;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -40px;
    margin-left: 50px;
}

/* Дополнительное затемнение для лучшей видимости */
.beer-item--out-of-stock:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    z-index: 5;
}
/* Защита от выгорания мигает прозрачность и смещение */
@keyframes beerTextBreath {
    0%   { opacity: 0.80; }
    50%  { opacity: 0.99; }
    100% { opacity: 0.80; }
}

/* Название пива */
.beer-title {
    animation: beerTextBreath 10s ease-in-out infinite;
}

/* Мелкий текст под названием */
.beer-meta {
    animation: beerTextBreath 10s ease-in-out infinite;
}
.beer-price {
    animation: beerTextBreath 10s ease-in-out infinite;
}
.beer-number {
    animation: beerTextBreath 10s ease-in-out infinite;
}
@keyframes beerMicroShift {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(2px, 2px); }
    50%  { transform: translate(-3px, 3px); }
    75%  { transform: translate(2px, -2px); }
    100% { transform: translate(0, 0); }
}

.beer-main {
    animation: beerMicroShift 33s linear infinite;
}
