/* ════ Иконки платежных систем ════ */
.pay-icons-wrapper {
    border-top: 0px solid rgba(255,255,255,0.08);
    padding-top: 16px;
    margin-top: 4px;
}
.pay-icons-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 24px;
}
.pay-icon {
    height: 16px;
    width: auto;
    max-width: 100px;
    opacity: 0.55;
    filter: grayscale(1);
    transition: opacity .2s;
    display: inline-block;
    vertical-align: middle;
}
.pay-icon:hover {
    opacity: 0.85;
}
@media (max-width: 575px) {
    .pay-icons-row { gap: 14px 18px; }
    .pay-icon { height: 14px; }
}


/* ════ Кнопка «Добавить сайт» на главной ════ */
.btn-add-site {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 18px;
    background: linear-gradient(135deg, #46446d 0%, #7F77DD 100%);
    color: #fff !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all .2s;
    box-shadow: 0 3px 10px rgba(70,68,109,.25);
    letter-spacing: .01em;
}
.btn-add-site:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(70,68,109,.35);
    color: #fff !important;
}
.btn-add-site:active { transform: translateY(0); }
@media (max-width: 767px) {
    .btn-add-site { padding: 10px 16px; font-size: 13px; }
}

/* ════ Карточки категорий ════ */
.home-cat-col { display:flex; flex-direction:column; }

.hcc {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px 14px 12px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hcc::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, #46446d 0%, #8b88c4 60%, transparent 100%);
    opacity: .7;
}
.hcc:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(61,59,96,.12);
    border-color: rgba(70,68,109,.2);
    color: inherit;
    text-decoration: none;
}

/* ════ Верхний ряд: иконка + заголовок ════ */
.hcc__head {
    display: flex;
    align-items: center;
    gap: 11px;
}
.hcc__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f8;
    border: 1px solid rgba(0,0,0,.06);
}
.hcc__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .35s ease;
}
.hcc:hover .hcc__img { transform: scale(1.1); }

.hcc__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    
}
.hcc__title {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}
.hcc:hover .hcc__title { color: #46446d; }
.hcc__count {
    position: absolute;
    top: 25px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    background: #f0eeff;
    color: #64748b;
    font-size: .68rem;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1;
}

/* ════ Разделитель ════ */
.hcc__divider {
    border: none;
    border-top: 1px dashed rgba(0,0,0,.15);
    margin: 10px 0 8px;
}

/* ════ Подкатегории ════ */
.hcc__subs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.hcc__sub {
    display: inline-block;
    font-size: .71rem;
    color: #64748b;
    background: #f8f9fa;
    border: 1px solid #eaecef;
    border-radius: 999px;
    padding: 2px 8px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s,
                box-shadow .1s, transform .1s;
}
.hcc__sub:hover {
    background: #ede9ff;
    color: #46446d;
    border-color: rgba(70,68,109,.18);
}
.hcc__sub:active {
    transform: scale(.93);
    box-shadow: inset 2px 2px 5px rgba(70,68,109,.18),
                inset -1px -1px 4px rgba(255,255,255,.7);
    background: #ddd6fe;
    color: #3730a3;
    border-color: rgba(55,48,163,.3);
}
.hcc__sub:focus-visible {
    outline: 2px solid #46446d;
    outline-offset: 2px;
}

/* ════ Карточки ссылок ════ */
.home-link-card {
    transition: box-shadow .15s ease;
    border: 1px solid rgba(0,0,0,.04);
}
.home-link-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,.09) !important;
}

/* Скриншот в карточке */
.card-screenshot-wrap {
    overflow: hidden;
    border-radius: 8px;
    line-height: 0;
    aspect-ratio: 1 / 1;
    background: #f1f5f9;
}
.card-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 8px;
    display: block;
    transition: transform .25s ease;
}
.home-link-card:hover .card-screenshot { transform: scale(1.03); }
[data-theme="dark"] .card-screenshot-wrap {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.07);
}

/* ════ Тёмная тема ════ */
[data-theme="dark"] .hcc {
    background: #1e293b;
    border-color: rgba(255,255,255,.07);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
[data-theme="dark"] .hcc:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,.4);
    border-color: rgba(255,255,255,.12);
}
[data-theme="dark"] .hcc__icon  { background: #263347; border-color: rgba(255,255,255,.07); }
[data-theme="dark"] .hcc__title { color: #f1f5f9 !important; }
[data-theme="dark"] .hcc:hover .hcc__title { color: #e2e8f0 !important; }
[data-theme="dark"] .hcc__count {
    position: absolute;
    top: 25px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    background: #313e52;
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1;
}
[data-theme="dark"] .hcc__divider { border-top-color: rgba(255,255,255,.12); }
[data-theme="dark"] .hcc__sub {
    color: #94a3b8;
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.07);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s,
                box-shadow .1s, transform .1s;
}
[data-theme="dark"] .hcc__sub:hover {
    background: rgba(70,68,109,.5);
    color: #ddd6fe;
    border-color: transparent;
}
[data-theme="dark"] .hcc__sub:active {
    transform: scale(.93);
    box-shadow: inset 2px 2px 5px rgba(0,0,0,.35),
                inset -1px -1px 4px rgba(255,255,255,.04);
    background: rgba(109,106,170,.4);
    color: #ede9ff;
    border-color: rgba(196,181,253,.35);
}
[data-theme="dark"] .hcc__sub:focus-visible {
    outline: 2px solid #c4b5fd;
    outline-offset: 2px;
}