@font-face {
    font-family: 'Proxima Nova';
    src: url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Light.eot');
    src: local('Proxima Nova Light'), local('ProximaNova-Light'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Light.eot?#iefix') format('embedded-opentype'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Light.woff2') format('woff2'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Light.woff') format('woff'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Regular.eot');
    src: local('Proxima Nova Regular'), local('ProximaNova-Regular'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Regular.eot?#iefix') format('embedded-opentype'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Regular.woff2') format('woff2'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Regular.woff') format('woff'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Semibold.eot');
    src: local('Proxima Nova Semibold'), local('ProximaNova-Semibold'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Semibold.eot?#iefix') format('embedded-opentype'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Semibold.woff2') format('woff2'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Semibold.woff') format('woff'),
        url('/catalog/view/theme/oct_deals/fonts/ProximaNova-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}


/* ── Кругла лупа над відкритим зображенням у fancybox ───────────────────── */

.oct-lens {
    position: fixed;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .9);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
    background-color: #fff;
    background-repeat: no-repeat;
    pointer-events: none;      /* лупа не має перехоплювати рух миші */
    opacity: 0;
    transition: opacity .12s ease;
    z-index: 99995;            /* .fancybox-container має 99992 */
}

.oct-lens.is-visible {
    opacity: 1;
}

/* поки лупа активна, ховаємо рідний курсор — інакше він їздить поверх скла */
.fancybox-container.oct-lens-active .fancybox-image {
    cursor: none;
}


/* ── Слайдер модуля «Мультитовари» ───────────────────────────────────────── */
/* Кнопки й пагінацію малює готовий компонент теми .swiper .controls (main.css). */

/* Висота слайдів — за вмістом. У теми є .swiper-slide { height: 100% },
   у Swiper — .swiper-wrapper { height: 100% }. На головній це давало висоту
   за вмістом, а в сітці сторінки категорії відсотки розвʼязувались у значно
   більшу висоту: картки розтягувались до ~736px, а кнопки .controls вилазили
   за межі секції на наступний блок. */
.oct-mp-swiper .swiper-wrapper,
.oct-mp-swiper .swiper-slide {
    height: auto;
}

/* На телефоні риски пагінації (по одній на слайд) розтягуються на всю ширину
   й лягають поверх кнопок — там лишаємо тільки кнопки. */
@media (max-width: 767.98px) {
    .oct-mp-swiper .controls .swiper-pagination {
        display: none;
    }
}


/* ── Категорії на головній (модуль oct_home_categories) ───────────────────── */
/* Верстка та сама, що в «Переваг» (.benefits.pages), але оформлення картки своє:
   - у «Переваг» заокруглення й затемнення вшиті в PNG, а фото категорій звичайні;
   - стилі .pages у темі існують у двох версіях, що розходяться (scss/main.css
     і бандл із custom.css), тож покладатись на них не можна.
   Тому всі розміри задані тут явно, а подвійний клас дає вищу специфічність
   за будь-яке правило теми для .pages. */

.benefits.pages.oct-home-categories {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;           /* скільки б категорій не відмітили — переносяться рядами */
    align-items: stretch;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* 5 в ряд; ширина рахується від gap, щоб ряд точно вміщався */
.benefits.pages.oct-home-categories .item {
    position: relative;
    display: block;
    flex: 0 0 calc((100% - 4 * 20px) / 5);
    min-width: 0;
    width: auto;
    max-width: none;
    height: auto;
    overflow: hidden;
    border-radius: 20px;
}

.benefits.pages.oct-home-categories .item .bg {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 466 / 335;   /* пропорція карток «Переваг»: різні фото — однакова висота */
}

.benefits.pages.oct-home-categories .item .bg img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform .4s ease;
}

/* затемнення зліва, щоб білий заголовок читався на будь-якому фото */
.benefits.pages.oct-home-categories .item .bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.benefits.pages.oct-home-categories .item:hover .bg img {
    transform: scale(1.04);
}

/* Картка при 5 в ряд лише ~220px завширшки: тематичні 24px великими літерами
   й відступи 40px не влазять — зменшуємо (на телефоні нижче — ще менше) */
.benefits.pages.oct-home-categories .item .inner {
    padding: 20px;
    bottom: 0;
}

.benefits.pages.oct-home-categories .item .inner .title {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* Планшет: 5 в ряд затісно — 3 */
@media screen and (max-width: 1000px) {
    .benefits.pages.oct-home-categories .item {
        flex-basis: calc((100% - 2 * 20px) / 3);
    }
}

/* Тема на ≤1000px перемикає .pages у стовпчик — повертаємо рядки з переносом */
@media screen and (max-width: 1000px) {
    .benefits.pages.oct-home-categories {
        flex-direction: row;
        align-items: stretch;
    }
}

/* Телефон: 2 в ряд. Картка тут лише ~180×130px, а тема дає заголовку 24px
   великими літерами й відступи 20–40px — без зменшення текст не влазить. */
@media screen and (max-width: 768px) {
    .benefits.pages.oct-home-categories {
        gap: 12px;
    }

    .benefits.pages.oct-home-categories .item {
        flex-basis: calc((100% - 12px) / 2);
        border-radius: 14px;
    }

    .benefits.pages.oct-home-categories .item .inner {
        padding: 12px;
        bottom: 0;
    }

    .benefits.pages.oct-home-categories .item .inner .title {
        margin-bottom: 8px;
        font-size: 14px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .benefits.pages.oct-home-categories .item .btn-arrow {
        width: 40px;
        height: 22px;
    }
}

/* ── Серії: плитки на сторінці категорії з галочкою «Серія» (product/category.twig) ──
   5 в ряд; зелена плитка, біла назва ліворуч, кругле фото серії праворуч (як у макеті).
   Звичайні категорії лишаються зі смужками .ds-subcategories. */
.oct-series-tiles {
    --oct-series-bg: #2CA48D;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.oct-series-tile {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 80px;
    padding: 12px 85px 12px 24px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--oct-series-bg);
    color: #fff;
    text-decoration: none;
    transition: filter .2s ease;
}

.oct-series-tile:hover,
.oct-series-tile:focus {
    color: #fff;
    text-decoration: none;
    filter: brightness(.95);
}

.oct-series-tile-name {
    position: relative;
    z-index: 1;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    overflow-wrap: anywhere;
}

/* без фото назві не треба місце праворуч */
.oct-series-tile:not(:has(.oct-series-tile-image)) {
    padding-right: 24px;
}

.oct-series-tile-image {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 70px;
    height: 70px;
    transform: translateY(-50%);
    border-radius: 50%;
    overflow: hidden;
}

.oct-series-tile-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1199px) {
    .oct-series-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .oct-series-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .oct-series-tile {
        min-height: 64px;
        padding: 10px 70px 10px 14px;
        border-radius: 12px;
    }

    .oct-series-tile-name {
        font-size: 14px;
    }

    .oct-series-tile-image {
        width: 60px;
        height: 60px;
    }
}
