/* ==========================================================================
   Тема «Яркая»: цвета устройств. Выбирается в настройках (Оформление
   сайта) и подключается поверх theme-iqos.css - фирменная тема остаётся
   основой, здесь только переопределения.

   Идея: эмоцию витрине дают сами устройства. ILUMA выпускается в цветах
   Breeze Blue, Digital Violet, Terracotta, Leaf Green - и подложка под
   фото каждого товара тонируется в его цвет (data-tone, product_tone()).
   Насыщенный градиент - только на главном экране, всё остальное спокойное.

     #2B2735  сланец - текст и тёмные плашки
     #FFFFFF  чистый белый фон вместо тёплого бежевого
     #00D1D2  бирюза IQOS - кнопки действия
     #6A4CE0  фиолетовый - эмоциональный акцент (главный экран, хит, бонусы)
     #FF5E57  коралл - только скидки
   ========================================================================== */

/* Шрифты под лицензией OFL лежат в assets/fonts, как и Michroma: без
   обращений к Google Fonts. Только кириллица и латиница. Onest -
   вариативный, один файл на все начертания 400-700 */
@font-face {
    font-family: 'Onest';
    src: url('../fonts/onest-cyrillic.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Onest';
    src: url('../fonts/onest-latin.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Unbounded';
    src: url('../fonts/unbounded-500-cyrillic.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Unbounded';
    src: url('../fonts/unbounded-500-latin.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #FFFFFF;
    --bg-soft: #F5F3FB;
    --text: #2B2735;
    --text-muted: #6F6A7A;
    --line: #E7E4EF;

    --accent: #2B2735;
    --accent-dark: #17141D;
    --brand: #00D1D2;
    --brand-dark: #00BABB;
    --brand-ink: #007F80;
    --violet: #6A4CE0;
    --violet-soft: #EFEBFF;
    --coral: #FF5E57;
    --danger: #E5413B;

    /* Подложки под цвет устройства */
    --tone-violet: #EEE8FF;
    --tone-blue: #E3F0FF;
    --tone-green: #E1F6EF;
    --tone-warm: #FFEBE3;
    --tone-sand: #F8F0E3;
    --tone-slate: #ECEBF1;
    --tone-none: #F5F3FB;

    --font-display: 'Unbounded', 'Trebuchet MS', sans-serif;
    --font-text: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

body { font-family: var(--font-text); background: var(--bg); }

/* --- Заголовки: широкий Unbounded --------------------------------------- */
.section__title,
.product__title,
.hero__title,
.page-title,
h1 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.01em;
}
.section__title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
.product__title { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; }

/* --- Кнопки: строчные буквы, без разрядки --------------------------------- */
.btn {
    text-transform: none;
    letter-spacing: 0;
    font-size: 15px;
    font-weight: 600;
}
.btn--primary { background: var(--brand); color: var(--text); }
.btn--primary:hover { background: var(--brand-dark); color: var(--text); }
.btn--ghost { border-color: var(--line); background: var(--bg); }
.btn--ghost:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-soft); }

/* --- Шапка и меню ---------------------------------------------------------- */
.nav__link { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; }
.nav__link:hover, .nav__submenu a:hover { color: var(--violet); background: var(--violet-soft); }
.cart-link__count, .nav__personal-count { background: var(--violet); color: #fff; }

/* Скидка постоянного клиента - в карточке товара под доставкой.
   Белая с рамкой, как доставка: лиловый остаётся у "Нашли дешевле?" */
.loyalty-bar--product { background: none; border: 0; margin-top: 14px; font-size: 14px; }
.loyalty-bar--product .loyalty-bar__inner {
    justify-content: flex-start; text-align: left; overflow: hidden;
    min-height: 0; padding: 14px 16px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 20px;
}
.loyalty-bar--product .loyalty-bar__title { color: var(--text); }
.loyalty-bar--product .loyalty-bar__link { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.loyalty-bar--product .loyalty-bar__note { color: var(--text-muted); }
.loyalty-bar--product .loyalty-bar__track { background: var(--line); }
.loyalty-bar--product .loyalty-bar__fill { background: var(--violet); }

/* --- Главный экран: единственное по-настоящему яркое место ---------------- */
.hero__box {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 24px;
    padding: clamp(24px, 2.6vw, 36px) clamp(20px, 3vw, 44px);
    background:
        radial-gradient(60% 90% at 88% 20%, rgba(0, 209, 210, .55) 0%, rgba(0, 209, 210, 0) 60%),
        radial-gradient(50% 80% at 70% 110%, rgba(255, 94, 87, .45) 0%, rgba(255, 94, 87, 0) 60%),
        linear-gradient(120deg, #24164F 0%, #4A2DB0 48%, #6A4CE0 100%);
}

/* Снимок остаётся, но под фирменной вуалью вместо серо-чёрной */
.hero__box--photo::after { filter: brightness(1.25) saturate(1.1); mix-blend-mode: luminosity; opacity: .55; }
.hero__box--photo::before {
    background:
        radial-gradient(55% 90% at 92% 15%, rgba(0, 209, 210, .50) 0%, rgba(0, 209, 210, 0) 65%),
        radial-gradient(45% 70% at 75% 115%, rgba(255, 94, 87, .40) 0%, rgba(255, 94, 87, 0) 65%),
        linear-gradient(100deg, rgba(36, 22, 79, .96) 0%, rgba(58, 34, 150, .86) 45%, rgba(106, 76, 224, .45) 100%);
}
@media (max-width: 768px) {
    .hero__box--photo::before {
        background:
            radial-gradient(90% 60% at 100% 0%, rgba(0, 209, 210, .45) 0%, rgba(0, 209, 210, 0) 70%),
            linear-gradient(180deg, rgba(36, 22, 79, .94) 0%, rgba(74, 45, 176, .88) 100%);
    }
}

.hero__title {
    font-size: clamp(22px, 2.3vw, 32px);
    line-height: 1.15;
    max-width: none;
    margin-bottom: 12px;
}
/* Текст под заголовком - на всю ширину, чтобы блок был низким и
   витрина устройств попадала на первый экран */
.hero__text { color: rgba(255, 255, 255, .82); font-size: 15px; max-width: none; }
.hero__text p:last-child { margin-bottom: 0; }
.hero__actions { border-top: 0; margin-top: 20px; }
.hero__actions .btn { min-width: 0; padding: 11px 24px; }
/* На широком экране кнопки встают справа от текста - минус ещё одна строка */
@media (min-width: 1024px) {
    .hero__box { display: grid; grid-template-columns: 1fr auto; column-gap: 40px; align-items: center; }
    .hero__title { grid-column: 1 / -1; }
    .hero__actions { margin-top: 0; flex-wrap: nowrap; }
}
.btn--light { background: var(--brand); color: var(--text); padding: 14px 28px; }
.btn--light:hover { background: #fff; color: var(--text); }
.btn--outline { border-color: rgba(255, 255, 255, .55); color: #fff; padding: 14px 28px; }
.btn--outline:hover { border-color: #fff; background: rgba(255, 255, 255, .12); color: #fff; }

/* --- Подложки под цвет устройства ----------------------------------------- */
[data-tone] { --tone: var(--tone-none); }
[data-tone="violet"] { --tone: var(--tone-violet); }
[data-tone="blue"]   { --tone: var(--tone-blue); }
[data-tone="green"]  { --tone: var(--tone-green); }
[data-tone="warm"]   { --tone: var(--tone-warm); }
[data-tone="sand"]   { --tone: var(--tone-sand); }
[data-tone="slate"]  { --tone: var(--tone-slate); }

/* Фото поставщика на белой подложке: multiply гасит белое до цвета тона */
.product-card { border-color: var(--line); border-radius: 20px; padding: 10px 10px 14px; }
.product-card__image-link {
    background: var(--tone);
    border-radius: 14px;
    padding: 8px;
}
.product-card__image { mix-blend-mode: multiply; }
.product-card:hover { border-color: color-mix(in srgb, var(--tone) 40%, var(--violet)); }
.product-card__title { font-weight: 600; }
.product-card__buy { border-radius: 999px; }

.gallery__stage {
    background: var(--tone, var(--tone-none));
    border-radius: 28px;
}
.gallery__stage img { mix-blend-mode: multiply; }
.gallery__thumb { background: var(--tone, var(--tone-none)); }
.gallery__thumb img { mix-blend-mode: multiply; }

/* Плитки разделов - по кругу через тона линеек, как полка с цветами */
.category-tile { background: var(--tone-none); border-radius: 20px; }
.category-tiles > :nth-child(5n+1) .category-tile, .category-tiles > .category-tile:nth-child(5n+1) { background: var(--tone-blue); }
.category-tiles > :nth-child(5n+2) .category-tile, .category-tiles > .category-tile:nth-child(5n+2) { background: var(--tone-violet); }
.category-tiles > :nth-child(5n+3) .category-tile, .category-tiles > .category-tile:nth-child(5n+3) { background: var(--tone-green); }
.category-tiles > :nth-child(5n+4) .category-tile, .category-tiles > .category-tile:nth-child(5n+4) { background: var(--tone-warm); }
.category-tiles > :nth-child(5n+5) .category-tile, .category-tiles > .category-tile:nth-child(5n+5) { background: var(--tone-sand); }
.category-tile:hover { border-color: var(--violet); }
.category-tile__name { font-family: var(--font-display); font-weight: 500; font-size: 15px; }

/* --- Цены и значки --------------------------------------------------------- */
/* Unbounded широкий: на плитке цена со старой ценой рядом не влезает
   в строку, поэтому крупный шрифт - только в карточке товара */
.price--current { font-weight: 700; letter-spacing: -0.01em; }
.product__prices .price--current { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3vw, 38px); }
.price--old { color: var(--text-muted); }
.badge { border-radius: 999px; padding-inline: 9px; }
.badge--sale { background: var(--coral); color: #fff; }
.badge--hit { background: var(--violet); color: #fff; }
.badge--new { background: var(--brand); color: var(--text); }

/* --- Вкладки «ТОП продаж / Новинки» - пилюли ------------------------------- */
.showcase-tabs { gap: 8px; }
.showcase-tabs__btn {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 17px;
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
}
.showcase-tabs__btn.is-active { background: var(--text); border-color: var(--text); color: #fff; }

/* --- Карточка товара -------------------------------------------------------- */
.product__stock.is-in { background: var(--tone-green); color: #136B4B; }
.delivery-note { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; }
.delivery-note__question a { color: var(--violet); }
/* Заметка магазина - белая с рамкой, как доставка: лиловый остаётся
   только у "Нашли дешевле?", иначе два блока подряд сливаются */
.product-note { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; }

.price-match {
    border: 0;
    border-radius: 20px;
    background: var(--violet-soft);
    padding: 18px 20px;
}
.price-match__title { font-weight: 700; font-size: 16px; color: var(--text); }
.price-match__text { color: #4E4862; }

.tabs-block__btn.is-active { color: var(--text); border-bottom-color: var(--violet); }
.qty-stepper:focus-within { border-color: var(--violet); }
:focus-visible { outline-color: var(--violet); }

/* --- Подвал: тёмный якорь внизу страницы ----------------------------------- */
.footer { background: var(--text); color: rgba(255, 255, 255, .86); border-top: 0; }
.footer a { color: #fff; }
.footer a:hover { color: var(--brand); }
.footer__title { color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 15px; }
.footer__legal { border-top-color: rgba(255, 255, 255, .14); }
.footer__copy, .footer__notice { color: rgba(255, 255, 255, .6); }
.footer__warning { color: var(--text); }
.footer__warning .footer__notice { color: var(--text-muted); }
