/* Shared server and VPS catalog presentation for both public themes. */
:root {
    --catalog-ink: #132238;
    --catalog-muted: #66758a;
    --catalog-line: #e7edf4;
    --catalog-blue: #1368e8;
    --catalog-blue-deep: #0b2c61;
    --catalog-cyan: #38bdf8;
    --catalog-surface: #ffffff;
    --catalog-bg: #f4f7fb;
    --catalog-radius: 8px;
    --catalog-shadow: 0 18px 50px rgba(18, 42, 76, .08);
}

body {
    background: var(--catalog-bg) !important;
    color: var(--catalog-ink);
    overflow-x: hidden;
}

@media (min-width: 1201px) and (max-width: 1350px) {
    .header-container-modern {
        padding: 0 18px;
    }

    .header-menu {
        margin: 0 8px;
    }

    .header-actions {
        gap: 10px;
    }

    .search-input {
        width: 126px;
    }

    .user-guest {
        gap: 8px !important;
    }

    .register-btn {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

.server-page-header {
    min-height: 360px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 72px 24px 96px;
    margin: 0;
    text-align: left;
    background:
        linear-gradient(110deg, rgba(6, 24, 58, .96) 0%, rgba(9, 39, 90, .86) 48%, rgba(10, 74, 125, .66) 100%),
        url('/template/ibd/static/images/server/server-bg.avif') center / cover;
    position: relative;
    isolation: isolate;
}

.server-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent 0 58%, rgba(255, 255, 255, .08) 58.2% 58.5%, transparent 58.7% 100%);
    pointer-events: none;
}

.server-page-header::after {
    content: none !important;
}

.server-page-header.catalog-hero--server {
    background:
        linear-gradient(108deg, rgba(5, 23, 52, .97) 0%, rgba(8, 42, 84, .9) 54%, rgba(12, 87, 124, .7) 100%),
        url('/template/ibd/static/images/server/server-bg.avif') center / cover;
}

.server-page-header > * {
    position: relative;
    z-index: 1;
}

.catalog-hero-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.catalog-hero-copy {
    max-width: 720px;
}

.catalog-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #b9dcff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.catalog-eyebrow::before {
    content: '';
    width: 26px;
    height: 2px;
    background: var(--catalog-cyan);
}

.page-title {
    display: block;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}

.page-subtitle {
    max-width: 590px;
    margin: 18px 0 0;
    color: rgba(237, 246, 255, .76);
    font-size: 17px;
    line-height: 1.7;
}

.catalog-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 28px;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
}

.catalog-hero-points span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.catalog-hero-points i {
    color: #7dd3fc;
}

.server-main-container {
    width: min(1180px, calc(100% - 48px));
    box-sizing: border-box;
    padding: 0 0 76px;
    margin: -54px auto 0;
    gap: 26px;
    align-items: flex-start;
}

.server-sidebar {
    width: 248px;
    box-sizing: border-box;
    padding: 22px 16px;
    border: 1px solid rgba(231, 237, 244, .9);
    border-radius: var(--catalog-radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--catalog-shadow);
    top: 20px;
}

.sidebar-header {
    margin-bottom: 16px;
    padding: 0 8px 12px;
    border-bottom: 1px solid var(--catalog-line);
}

.sidebar-title {
    color: var(--catalog-ink);
    font-size: 16px;
}

.sidebar-subtitle {
    margin-top: 5px;
    color: #93a1b4;
    font-size: 10px;
    letter-spacing: 0;
}

.category-list {
    display: grid;
    gap: 6px;
}

.category-item {
    margin: 0;
}

.category-link {
    min-height: 48px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #52647b;
    font-size: 14px;
}

.category-link:hover,
.category-link.active {
    border-color: #cfe2ff;
    background: #edf5ff;
    color: var(--catalog-blue);
    box-shadow: none;
}

.category-link.active::before {
    width: 3px;
    height: 22px;
    background: var(--catalog-blue);
}

.category-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 6px;
    background: #f0f5fb;
    color: #7890aa;
}

.category-link.active .category-icon,
.category-link:hover .category-icon {
    background: #dcecff;
    color: var(--catalog-blue);
}

.sidebar-support.need-help {
    margin-top: 22px;
    padding: 14px;
    border-radius: 8px;
    background: #f1f7ff;
}

.nh-ico {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--catalog-blue);
}

.nh-ico svg {
    width: 20px;
    height: 20px;
}

.server-content-area {
    min-width: 0;
}

.server-filter-bar {
    display: block;
    margin-bottom: 18px;
    padding: 0;
}

.cat-wrap {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid var(--catalog-line);
    border-radius: 8px;
    background: var(--catalog-surface);
    overflow-x: auto;
    box-shadow: 0 8px 24px rgba(18, 42, 76, .05);
}

.cat-pill {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    box-shadow: none;
    color: #62748b;
    font-size: 13px;
}

.cat-pill .pill-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7b8da5;
}

.cat-pill .pill-icon svg {
    width: 20px;
    height: 20px;
}

.cat-pill .pill-text {
    font-size: 13px;
}

.cat-pill .pill-radio {
    display: none;
}

.cat-pill:hover {
    transform: none;
    border-color: #dbe8f8;
    background: #f7fbff;
}

.cat-pill.active {
    border-color: #c9ddff;
    background: #eaf3ff;
    box-shadow: none;
}

.cat-pill.active .pill-icon,
.cat-pill.active .pill-text {
    color: var(--catalog-blue);
}

.cat-pill:focus-visible,
.category-link:focus-visible,
.btn-buy:focus-visible,
.pagination-btn:focus-visible,
.ps-hints button:focus-visible {
    outline: 3px solid rgba(19, 104, 232, .24);
    outline-offset: 2px;
}

.product-search {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--catalog-line);
    border-radius: var(--catalog-radius);
    background: var(--catalog-surface);
    box-shadow: 0 8px 24px rgba(18, 42, 76, .04);
}

.ps-bar {
    padding: 11px 14px;
    border-radius: 6px;
    box-shadow: none;
}

.ps-hints {
    gap: 7px;
    margin-top: 2px;
}

.ps-hints button {
    padding: 5px 10px;
    border-radius: 6px;
    background: #f7f9fc;
}

.ps-result {
    gap: 8px;
}

.ps-card {
    padding: 14px;
    border-color: var(--catalog-line);
    border-radius: 8px;
    box-shadow: none;
}

.ps-price {
    margin-top: 8px;
    color: var(--catalog-blue);
    font-weight: 700;
}

.catalog-status {
    display: none;
    min-height: 20px;
    color: var(--catalog-muted);
    font-size: 13px;
}

.catalog-status.is-visible {
    display: block;
}

.server-content-area.is-loading .product-grid {
    opacity: .45;
    pointer-events: none;
}

.product-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 5px;
    padding: 0 2px;
}

.product-list-title {
    color: var(--catalog-ink);
    font-size: 22px;
}

.product-list-desc {
    margin: 0;
    color: var(--catalog-muted);
}

.product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 7px 0 18px;
}

.product-card {
    min-width: 0;
    box-sizing: border-box;
    padding: 22px 20px 18px;
    border: 1px solid var(--catalog-line);
    border-radius: 8px;
    background: var(--catalog-surface);
    box-shadow: 0 8px 26px rgba(18, 42, 76, .045);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #c9ddff;
    box-shadow: 0 18px 36px rgba(18, 89, 175, .12);
}

.card-status-dot {
    top: 22px;
    right: 20px;
    width: 7px;
    height: 7px;
}

.product-title {
    min-height: 1.35em;
    margin-bottom: 8px;
    padding-right: 20px;
    color: var(--catalog-ink);
    font-size: 16px;
    line-height: 1.35;
}

.product-price {
    margin-bottom: 14px;
    color: var(--catalog-blue);
    font-size: 27px;
}

.product-specs {
    margin-bottom: 18px;
}

.spec-item {
    min-width: 0;
    margin-bottom: 9px;
    color: #62748b;
    font-size: 13px;
}

.spec-item > *:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.spec-icon {
    width: 22px;
    height: 22px;
    background: #f0f5fb;
    color: #6e89a8;
}

.btn-buy {
    min-height: 42px;
    box-sizing: border-box;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--catalog-blue);
    font-size: 13px;
}

.btn-buy:hover {
    background: #0c56c7;
    box-shadow: 0 8px 18px rgba(19, 104, 232, .24);
}

.pagination-container {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination-btn {
    width: 34px;
    height: 34px;
    border-color: var(--catalog-line);
}

#noProductsMsg {
    box-sizing: border-box;
    margin: 12px 0;
    padding: 42px 20px !important;
    border: 1px dashed #cdd8e5;
    border-radius: 8px;
    background: rgba(255, 255, 255, .7);
}

.catalog-help-wrap {
    width: min(1180px, calc(100% - 48px));
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 0 76px;
}

.catalog-help-wrap .help-news {
    margin-top: 0;
}

.catalog-help-wrap .hn-card {
    border-color: var(--catalog-line);
    border-radius: 8px;
    box-shadow: none;
}

.catalog-help-wrap .hn-card:hover {
    transform: translateY(-3px);
    border-color: #c9ddff;
    box-shadow: 0 14px 30px rgba(18, 89, 175, .1);
}

@media (max-width: 1050px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {
    .server-page-header {
        min-height: 330px;
        padding: 58px 20px 88px;
    }

    .page-title {
        font-size: 38px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .server-main-container {
        width: calc(100% - 28px);
        display: block;
        margin-top: -46px;
    }

    .server-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 14px;
        padding: 14px;
    }

    .sidebar-header {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        margin-bottom: 10px;
        padding: 0 4px 10px;
    }

    .sidebar-subtitle {
        margin: 0;
    }

    .category-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .category-item {
        flex: 0 0 auto;
        width: 148px;
    }

    .category-link {
        min-height: 44px;
        padding: 7px 9px;
    }

    .category-icon {
        width: 26px;
        height: 26px;
        margin-right: 8px;
    }

    .sidebar-support.need-help {
        display: none;
    }

    .product-search {
        padding: 13px;
        border-radius: 8px;
    }

    .ps-card {
        grid-template-columns: 1fr;
    }

    .ps-actions a {
        display: flex;
        justify-content: center;
    }

    .product-list-header {
        display: block;
    }

    .product-list-title {
        font-size: 20px;
    }

    .product-list-desc {
        margin-top: 5px;
        font-size: 12px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .product-card {
        padding: 18px 16px 15px;
    }

    .catalog-help-wrap {
        width: calc(100% - 28px);
        padding-bottom: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .category-link,
    .btn-buy {
        transition: none;
    }
}
