/* ============================================================
   КАТЕГОРІЯ: «Показати ще», блоки переходу, згорнутий опис
   Додати в кінець sunice.css. Використовує змінні з :root.
   ============================================================ */


/* ------------------------------------------------------------
   «Показати ще» + лічильник + прогрес
   ------------------------------------------------------------ */

.load-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.load-more__count {
    margin: 0 0 12px;
    font-family: var(--inter);
    font-size: 16px;
    color: var(--black);
}

.load-more__bar {
    width: 100%;
    max-width: 320px;
    height: 4px;
    margin-bottom: 24px;
    background: var(--gray);
    border-radius: 2px;
    overflow: hidden;
}
.load-more__bar > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--blue);
    border-radius: 2px;
    transition: width .4s ease;
}

/* базовий вигляд бере .sun-btn-blue, тут лише специфіка кнопки */
.load-more__btn {
    border: 0;
    cursor: pointer;
    min-width: 260px;
}
.load-more__btn[hidden] { display: none; }
.load-more__btn:disabled { cursor: default; }
.load-more__btn.is-loading {
    background: var(--lightblue);
    color: var(--blue);
}
.load-more__btn.is-loading:hover {
    background: var(--lightblue);
    color: var(--blue);
}
.load-more__btn:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}

/* нові картки з'являються м'яко — реакція на дію користувача */
.catalog-product-grid > .grid-views.is-new {
    animation: catCardIn .35s ease both;
}
@keyframes catCardIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}


/* ------------------------------------------------------------
   Пагінація: залишається в HTML для SEO, візуально другорядна
   ------------------------------------------------------------ */

.tm-pagination--compact {
    margin-top: 24px;
    text-align: center;
}
.tm-pagination--compact .pagination {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}
.tm-pagination--compact .pagination > li > a,
.tm-pagination--compact .pagination > li > span {
    float: none;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    line-height: 34px;
    text-align: center;
    font-family: var(--inter);
    font-size: 14px;
    color: var(--black);
    background: transparent;
    border: 1px solid var(--gray);
    border-radius: 8px;
    margin: 0;
}
.tm-pagination--compact .pagination > li > a:hover {
    color: var(--blue);
    border-color: var(--blue);
    background: transparent;
}
.tm-pagination--compact .pagination > .active > span {
    color: var(--white);
    background: var(--blue);
    border-color: var(--blue);
}
/* Якщо хочете повністю прибрати візуально (посилання залишаться в HTML):
   .tm-pagination--compact { position: absolute; left: -9999px; }  */


/* ------------------------------------------------------------
   Чотири блоки переходу
   ------------------------------------------------------------ */

.cat-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.cat-links__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 220px;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--lightblue);
    border-radius: 12px;
    color: var(--black);
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.cat-links__item:hover,
.cat-links__item:focus-visible {
    color: var(--black);
    text-decoration: none;
    border-color: var(--blue);
    box-shadow: 0 0 20px var(--lightblue);
}
.cat-links__item:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.cat-links__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(195, 226, 255, .35);
    color: var(--blue);
    transition: background .2s ease, color .2s ease;
}
.cat-links__item:hover .cat-links__icon-wrap {
    background: var(--blue);
    color: var(--white);
}
.cat-links__icon {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cat-links__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-right: 24px; /* місце під стрілку */
}
.cat-links__title {
    font-family: var(--rubik);
    font-size: 22px;
    line-height: 1.2;
    font-weight: 400;
    color: var(--black);
    overflow-wrap: break-word;
    hyphens: auto;
}
.cat-links__item:hover .cat-links__title {
    color: var(--blue);
}
.cat-links__text {
    font-family: var(--inter);
    font-size: 15px;
    line-height: 1.4;
    color: #5f6368;
}

/* стрілка — той самий шеврон, що й на головній (.home-catalog-arrow) */
.cat-links__arrow {
    position: absolute;
    right: 24px;
    bottom: 30px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(-45deg);
    transition: transform .3s ease, right .3s ease;
}
.cat-links__item:hover .cat-links__arrow {
    right: 18px;
}

/* планшет: 2×2 */
@media (max-width: 991px) {
    .cat-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-links__item { min-height: 200px; }
}

/* телефон: список, іконка ліворуч — довгі українські слова не ламають сітку */
@media (max-width: 575px) {
    .cat-links { grid-template-columns: 1fr; gap: 12px; }
    .cat-links__item {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        min-height: 0;
        padding: 16px;
    }
    .cat-links__icon-wrap { width: 48px; height: 48px; }
    .cat-links__icon { width: 28px; height: 28px; }
    .cat-links__body { margin-top: 0; padding-right: 20px; }
    .cat-links__title { font-size: 18px; }
    .cat-links__arrow { bottom: auto; top: 50%; right: 16px; margin-top: -4px; }
    .cat-links__item:hover .cat-links__arrow { right: 12px; }
}


/* ------------------------------------------------------------
   Опис категорії: згорнутий
   Без JS текст показується повністю.
   ------------------------------------------------------------ */

.cat-desc__inner {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}

.cat-desc__body {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 960px;
    overflow: hidden;
    transition: max-height .4s ease;
}

.cat-desc__thumb {
    flex: 0 0 280px;
}
.cat-desc__thumb img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* затухання внизу згорнутого тексту */
.cat-desc.is-collapsed .cat-desc__body::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 110px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), var(--white) 85%);
    pointer-events: none;
}

/* типографіка тексту з адмінки */
.cat-desc__body h2 {
    font-family: var(--rubik);
    font-size: 32px;
    line-height: 1.2;
    font-weight: 400;
    /*color: var(--black);*/
}
.cat-desc__body h3 {
    margin: 6px 0 12px;
    font-family: var(--rubik);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 400;
    /*color: var(--black);*/
}
.cat-desc__body > :first-child { margin-top: 0; }
.cat-desc__body p,
.cat-desc__body li {
    font-family: var(--inter);
    font-size: 20px;
    line-height: 1.55;
    color: var(--black);
}
.cat-desc__body p { margin: 0 0 16px; }
.cat-desc__body ul,
.cat-desc__body ol { margin: 0 0 16px; }
.cat-desc__body a { color: var(--blue); }
.cat-desc__body img { max-width: 100%; height: auto; /*border-radius: 12px;*/ }
.cat-desc__body table { display: block; max-width: 100%; overflow-x: auto; }

/* кнопка «Читати далі / Згорнути» */
.cat-desc__toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    margin-top: 24px;
    padding: 0 32px;
    font-family: var(--rubik);
    font-size: 20px;
    font-weight: 400;
    color: var(--blue);
    background: var(--white);
    border: 1px solid var(--blue);
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.cat-desc__toggle[hidden] { display: none; }
.cat-desc__toggle [hidden] { display: none; }
.cat-desc__toggle:hover {
    background: var(--blue);
    color: var(--white);
}
.cat-desc__toggle:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}
.cat-desc__toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .3s ease, margin .3s ease;
}
.cat-desc__toggle[aria-expanded="true"]::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

@media (max-width: 767px) {
    .cat-desc__inner { flex-direction: column; gap: 24px; }
    .cat-desc__thumb { flex-basis: auto; width: 100%; max-width: 320px; }
    .cat-desc__body h2 { font-size: 26px; margin-top: 32px; }
    .cat-desc__body h3 { font-size: 21px; }
    .cat-desc__body p,
    .cat-desc__body li { font-size: 16px; }
    .cat-desc__toggle { width: 100%; justify-content: center; }
}


/* ------------------------------------------------------------
   Повага до prefers-reduced-motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .catalog-product-grid > .grid-views.is-new,
    .cat-desc__body,
    .load-more__bar > span,
    .cat-links__item,
    .cat-links__arrow {
        animation: none;
        transition: none;
    }
}




/* =========================================================
   Формати внутрішніх блоків
   ========================================================= */

.sc-format-list {

}

.sc-format-row {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 28px 0;
}

.sc-format-name {
    flex: 0 0 30%;
}

.sc-format-name h5 {
    margin: 0;
    font-family: inherit;
    font-weight: 600;
}

.sc-format-text {
    flex: 1;
}

.sc-format-text p {
    margin: 0;
    line-height: 1.6;
}


/* Mobile */
@media (max-width: 767px) {

    .sc-format-row {
        display: block;
        padding: 24px 0;
    }

    .sc-format-name {
        margin-bottom: 10px;
    }

    .sc-format-text p {
        line-height: 1.55;
    }

}





/* =========================================================
   Сценарії вибору — рядкова структура
   ========================================================= */

.sc-scenario-list {
    
}

.sc-scenario-row {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 32px 0;
}

.sc-scenario-meta {
    flex: 0 0 30%;
}

.sc-scenario__label {
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sc-scenario__label + .sc-brand__logo {
    margin-top: 0;
}

.sc-brand__logo {
    max-width: 180px;
}

.sc-brand__logo img {
    display: block;
    max-width: 100%;
    max-height: 45px;
    width: auto;
    height: auto;
}

.sc-scenario-content {
    flex: 1;
}

.sc-scenario-content h4 {
    margin-top: 0;
    margin-bottom: 14px;
}

.sc-scenario-content p {
    margin-bottom: 0;
    line-height: 1.6;
}

.sc-scenario-meta .sc-choice {
    display: inline-block;
}


/* Mobile */
@media (max-width: 767px) {

    .sc-scenario-row {
        display: block;
        padding: 26px 0;
    }

    .sc-scenario-meta {
        margin-bottom: 20px;
    }

    .sc-brand__logo {
        max-width: 160px;
    }

    .sc-scenario-content h4 {
        margin-bottom: 12px;
    }

}


/* =========================================================
   Каталожные характеристики — рядовая структура вместо таблиц
   Используется только внутри .sc-format-list--catalog
   ========================================================= */

.sc-format-list--catalog {
    width: 100%;
}

.sc-format-list--catalog .sc-format-row--catalog {
    align-items: baseline;
    gap: 48px;
    padding: 20px 0;
    border-top: 1px solid var(--lightblue);
}

.sc-format-list--catalog .sc-format-row--catalog:last-child {
    border-bottom: 1px solid var(--lightblue);
}

.sc-format-list--catalog .sc-format-name {
    flex: 0 0 28%;
}

.sc-format-list--catalog .sc-format-name h5 {
    margin: 0;
    font-family: var(--rubik);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 400;
    color: var(--black);
}

.sc-format-list--catalog .sc-format-text {
    flex: 1;
    min-width: 0;
}

.sc-format-list--catalog .sc-format-text p {
    margin: 0;
    font-family: var(--inter);
    font-size: 16px;
    line-height: 1.55;
    color: var(--black);
}

@media (max-width: 767px) {
    .sc-format-list--catalog .sc-format-row--catalog {
        display: block;
        padding: 18px 0;
    }

    .sc-format-list--catalog .sc-format-name {
        margin-bottom: 6px;
    }

    .sc-format-list--catalog .sc-format-name h5 {
        font-size: 17px;
    }

    .sc-format-list--catalog .sc-format-text p {
        font-size: 16px;
        line-height: 1.5;
    }
}
