/* ============================================
   Music Bands Catalog - Frontend Styles
   ============================================ */

:root {
    --mbc-text-white: #FFFFFF;
    --mbc-text-gray: #969696;
    --mbc-text-description: #bdbdbd;
    --mbc-border-color: #2A2A2A;
    --mbc-genre-border: #6E6E6E;
    --mbc-thumb-opacity: 0.54;
    --mbc-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mbc-grid-gap: 30px;
    --mbc-grid-card-size: 145px;
}

/* ============================================
   SLIDER / БЕГУЩАЯ СТРОКА (Без CSS-анимаций, через JS)
   ============================================ */

.mbc-slider-container {
    position: relative;
    width: 100%;
    display: block;
}

.mbc-slider-arrow {
    position: absolute;
    top: 0;
    height: 145px; 
    width: 40px !important;
    background: rgba(0, 0, 0, 0.75) !important;
    color: #fff !important;
    border: none !important;
    z-index: 10;
    cursor: pointer !important;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.mbc-slider-arrow svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.mbc-slider-container:hover .mbc-slider-arrow {
    opacity: 1;
}

.mbc-slider-arrow:hover {
    background: rgba(0, 0, 0, 0.95) !important;
}

.mbc-slider-prev { left: 0; }
.mbc-slider-next { right: 0; }

@media (max-width: 768px) {
    .mbc-slider-arrow {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5) !important;
    }
}

.mbc-slider-wrapper,
.mbc-other-bands-slider-wrapper {
    overflow: hidden !important;
    width: 100% !important;
    position: relative !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.mbc-slider-track {
    display: flex !important;
    gap: 30px !important;
    align-items: flex-start !important;
    will-change: transform;
    width: max-content !important;
}

/* ============================================
   ЭЛЕМЕНТ СЛАЙДЕРА — СТРОГО ФИКСИРОВАННЫЕ РАЗМЕРЫ
   ============================================ */
.mbc-slider-item {
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: transform 0.3s ease;
    cursor: pointer !important;
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mbc-slider-item:hover {
    opacity: 0.92;
    text-decoration: none !important;
}

.mbc-slider-item:hover .mbc-slider-item-name {
    text-decoration: none !important;
}

/* Контейнер фото — строго квадрат 145x145 */
.mbc-slider-item .mbc-slider-item-image,
.mbc-slider-item-image {
    width: 145px !important;
    height: 145px !important;
    min-width: 145px !important;
    min-height: 145px !important;
    max-width: 145px !important;
    max-height: 145px !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    background: #1A1A1A !important;
    background-color: #1A1A1A !important;
    position: relative !important;
    flex-shrink: 0 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

/* Превью группы: зум через больший слой (div background или img) */
.mbc-band-thumb {
    position: absolute !important;
    width: calc(100% * var(--mbc-focus-zoom, 1)) !important;
    height: calc(100% * var(--mbc-focus-zoom, 1)) !important;
    top: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-y-ratio, 0)) !important;
    left: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-x-ratio, 0.5)) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: var(--mbc-focus-x, 50%) var(--mbc-focus-y, 0%) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Слайдер на главной: img надёжнее background-image после SPA/Elementor */
img.mbc-band-thumb {
    object-fit: cover !important;
    object-position: var(--mbc-focus-x, 50%) var(--mbc-focus-y, 0%) !important;
    display: block !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    background: transparent !important;
    background-image: none !important;
}

.mbc-band-thumb.mbc-no-image-placeholder,
.mbc-no-image-placeholder {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    background: #1A1A1A !important;
    background-image: none !important;
}

/* Legacy img fallback (если где-то остался img) */
.mbc-slider-item .mbc-slider-item-image img,
.mbc-slider-item-image img {
    width: calc(100% * var(--mbc-focus-zoom, 1)) !important;
    height: calc(100% * var(--mbc-focus-zoom, 1)) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: var(--mbc-focus-x, 50%) var(--mbc-focus-y, 0%) !important;
    transform: none !important;
    display: block !important;
    position: absolute !important;
    top: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-y-ratio, 0)) !important;
    left: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-x-ratio, 0.5)) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Название группы под фото (ОБЩЕЕ для сетки и слайдера) */
.mbc-slider-item .mbc-slider-item-name,
.mbc-slider-item-name,
.mbc-grid-item-name {
    margin-top: 10px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    color: var(--mbc-text-white) !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Слайдер: ширина названия = ширина карточки (не фиксированные 145px) */
.mbc-slider-item .mbc-slider-item-name,
.mbc-slider-item-name {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.mbc-grid-item-name {
    max-width: 145px !important;
    width: 145px !important;
}

.mbc-no-image-placeholder {
    width: 100% !important;
    height: 100% !important;
    background: #1A1A1A !important;
}

/* ============================================
   GRID (каталог)
   ============================================ */
.mbc-grid-filter {
    margin-bottom: 30px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: flex-start !important;
}

.mbc-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, var(--mbc-grid-card-size)) !important;
    justify-content: start !important;
    gap: var(--mbc-grid-gap) !important;
    width: 100% !important;
    padding: 20px 0 !important;
    background: transparent !important;
}

.mbc-grid-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: var(--mbc-grid-card-size) !important;
    min-width: var(--mbc-grid-card-size) !important;
    max-width: var(--mbc-grid-card-size) !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .mbc-grid-item {
        transition: opacity 0.2s ease;
    }

    .mbc-grid-item:hover {
        opacity: 0.92;
        text-decoration: none !important;
    }
}

.mbc-grid .mbc-grid-item-image {
    width: var(--mbc-grid-card-size) !important;
    height: var(--mbc-grid-card-size) !important;
    min-width: var(--mbc-grid-card-size) !important;
    min-height: var(--mbc-grid-card-size) !important;
    max-width: var(--mbc-grid-card-size) !important;
    max-height: var(--mbc-grid-card-size) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    background: #1A1A1A !important;
    position: relative !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.mbc-grid .mbc-grid-item-image img,
.mbc-grid .mbc-grid-item-image .mbc-no-image-placeholder {
    width: calc(100% * var(--mbc-focus-zoom, 1)) !important;
    height: calc(100% * var(--mbc-focus-zoom, 1)) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: var(--mbc-focus-x, 50%) var(--mbc-focus-y, 0%) !important;
    transform: none !important;
    display: block !important;
    position: absolute !important;
    top: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-y-ratio, 0)) !important;
    left: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-x-ratio, 0.5)) !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mbc-grid .mbc-grid-item-image .mbc-no-image-placeholder {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

.mbc-grid .mbc-grid-item-name {
    width: var(--mbc-grid-card-size) !important;
    max-width: var(--mbc-grid-card-size) !important;
    text-align: center !important;
}

/* ============================================
   SINGLE BAND PAGE
   ============================================ */
.mbc-single-band-page {
    padding: 40px 0 60px !important;
    font-family: var(--mbc-font-family) !important;
    background: transparent !important;
    background-color: transparent !important;
}

.mbc-single-container {
    max-width: 1060px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.mbc-band-title {
    font-family: var(--mbc-font-family) !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    line-height: 29px !important;
    color: var(--mbc-text-white) !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
}

/* Жанры (и фильтры в каталоге) */
.mbc-band-genres {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}

.mbc-genre-tag {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 16px !important;
    border: 1px solid var(--mbc-genre-border) !important;
    border-radius: 0 !important;
    font-family: var(--mbc-font-family) !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 19px !important;
    color: var(--mbc-text-gray) !important;
    white-space: nowrap !important;
    background: transparent !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    outline: none !important;
}

.mbc-genre-tag:hover,
.mbc-genre-tag.active {
    background: #FFFFFF !important;
    color: #1A1A1A !important;
    border-color: #FFFFFF !important;
}

/* Мета */
.mbc-band-meta-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 40px !important;
    margin-bottom: 30px !important;
}

.mbc-band-meta-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.mbc-meta-label {
    font-family: var(--mbc-font-family) !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 19px !important;
    color: var(--mbc-text-gray) !important;
}

.mbc-meta-value {
    font-family: var(--mbc-font-family) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 19px !important;
    color: var(--mbc-text-white) !important;
}

/* ============================================
   ФОТО ГАЛЕРЕЯ (Изменено для размытого фона)
   ============================================ */
.mbc-band-gallery {
    display: flex !important;
    gap: 16px !important;
    margin-bottom: 40px !important;
    align-items: flex-start !important;
}

.mbc-gallery-main {
    flex-shrink: 0 !important;
    width: 797px !important;
    height: 426px !important;
    aspect-ratio: 797 / 426;
    overflow: hidden !important;
    border-radius: 2px !important;
    background: #111111 !important; /* Чуть темнее для контраста */
    position: relative !important;
}

/* Слой для размытого фона */
.mbc-gallery-main::before {
    content: "";
    position: absolute;
    top: -5%; left: -5%; right: -5%; bottom: -5%; 
    background-image: var(--blur-bg); 
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4); 
    z-index: 1; 
    transition: background-image 0.3s ease; 
}

.mbc-main-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Фото не обрезается */
    display: block !important;
    position: relative !important;
    z-index: 2 !important; /* Фото поверх фона */
    transition: opacity 0.3s ease;
    cursor: zoom-in;
}

/* Lightbox: увеличенное основное фото */
.mbc-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 48px 24px 24px !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mbc-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mbc-lightbox-backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.78) !important;
    cursor: pointer !important;
    z-index: 1 !important;
}

.mbc-lightbox-stage {
    position: relative !important;
    z-index: 2 !important;
    width: min(92vw, 1100px) !important;
    height: min(82vh, 620px) !important;
    max-width: 92vw !important;
    max-height: 82vh !important;
    overflow: hidden !important;
    border-radius: 2px !important;
    background: #111111 !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55) !important;
}

/* Размытый фон как в галерее — виден вокруг фото (object-fit: contain) */
.mbc-lightbox-stage::before {
    content: "" !important;
    position: absolute !important;
    top: -8% !important;
    left: -8% !important;
    right: -8% !important;
    bottom: -8% !important;
    background-image: var(--blur-bg) !important;
    background-size: cover !important;
    background-position: center !important;
    filter: blur(20px) brightness(0.4) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

.mbc-lightbox-image {
    position: relative !important;
    z-index: 2 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    margin: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease;
}

/* Крестик поверх всего lightbox, не внутри фото */
.mbc-lightbox-close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 3 !important;
    width: 48px !important;
    height: 48px !important;
    border: none !important;
    border-radius: 2px !important;
    background: rgba(0, 0, 0, 0.75) !important;
    color: #fff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: background 0.2s ease;
}

.mbc-lightbox-close:hover,
.mbc-lightbox-close:focus {
    background: rgba(20, 20, 20, 0.95) !important;
    outline: none !important;
}

.mbc-lightbox-close svg {
    width: 24px !important;
    height: 24px !important;
    fill: #fff !important;
    display: block !important;
}

/* Стрелки листания в увеличенном режиме */
.mbc-lightbox-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 3 !important;
    width: 48px !important;
    height: 64px !important;
    border: none !important;
    border-radius: 2px !important;
    background: rgba(0, 0, 0, 0.65) !important;
    color: #fff !important;
    cursor: pointer !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: background 0.2s ease;
}

.mbc-lightbox.mbc-lightbox-has-nav .mbc-lightbox-nav {
    display: flex !important;
}

.mbc-lightbox-nav:hover,
.mbc-lightbox-nav:focus {
    background: rgba(0, 0, 0, 0.9) !important;
    outline: none !important;
}

.mbc-lightbox-prev {
    left: 16px !important;
}

.mbc-lightbox-next {
    right: 16px !important;
}

.mbc-lightbox-nav svg {
    width: 28px !important;
    height: 28px !important;
    fill: #fff !important;
    display: block !important;
}

body.mbc-lightbox-open {
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .mbc-lightbox {
        padding: 56px 10px 10px !important;
    }

    .mbc-lightbox-stage {
        width: 96vw !important;
        height: 70vh !important;
    }

    .mbc-lightbox-close {
        top: 10px !important;
        right: 10px !important;
        width: 44px !important;
        height: 44px !important;
    }

    .mbc-lightbox-nav {
        width: 40px !important;
        height: 56px !important;
    }

    .mbc-lightbox-prev {
        left: 6px !important;
    }

    .mbc-lightbox-next {
        right: 6px !important;
    }
}

/* Gallery navigation arrows on main image */
.mbc-gallery-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42px;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    z-index: 3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.mbc-gallery-main:hover .mbc-gallery-nav {
    opacity: 1;
}

.mbc-gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.mbc-gallery-prev {
    left: 0;
}

.mbc-gallery-next {
    right: 0;
}

.mbc-gallery-nav svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.mbc-gallery-thumbs {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    max-height: 426px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.mbc-gallery-thumbs::-webkit-scrollbar {
    width: 4px;
}

.mbc-gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.mbc-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.mbc-gallery-thumb {
    width: 106px !important;
    height: 96px !important;
    min-width: 106px !important;
    min-height: 96px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    cursor: pointer !important;
    opacity: var(--mbc-thumb-opacity);
    transition: opacity 0.3s ease;
    border-radius: 2px !important;
    position: relative !important;
}

.mbc-gallery-thumb.active,
.mbc-gallery-thumb:hover {
    opacity: 1 !important;
}

.mbc-gallery-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* ============================================
   ОПИСАНИЕ (Поддержка форматирования редактора)
   ============================================ */
.mbc-band-description {
    margin-bottom: 50px !important;
    font-family: var(--mbc-font-family) !important;
    color: var(--mbc-text-description) !important;
    font-size: 16px !important; 
    line-height: 1.6 !important;
}

.mbc-band-description p {
    margin-bottom: 16px !important;
    font-weight: 400 !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.mbc-band-description p:last-child {
    margin-bottom: 0 !important;
}

/* Заголовки внутри текста (остаются белыми) */
.mbc-band-description h1,
.mbc-band-description h2,
.mbc-band-description h3,
.mbc-band-description h4,
.mbc-band-description h5,
.mbc-band-description h6 {
    color: var(--mbc-text-white) !important;
    font-weight: 700 !important;
    margin: 24px 0 16px 0 !important;
    font-family: var(--mbc-font-family) !important;
    line-height: 1.3 !important;
    text-transform: none !important; 
}

.mbc-band-description h1 { font-size: 28px !important; }
.mbc-band-description h2 { font-size: 24px !important; }
.mbc-band-description h3 { font-size: 20px !important; }
.mbc-band-description h4 { font-size: 16px !important; }

/* Жирный шрифт (теперь наследует обычный цвет текста, не белый) */
.mbc-band-description strong,
.mbc-band-description b {
    font-weight: 700 !important;
    color: inherit !important; 
}

/* Курсив */
.mbc-band-description em,
.mbc-band-description i {
    font-style: italic !important;
}

/* Списки */
.mbc-band-description ul,
.mbc-band-description ol {
    margin: 0 0 16px 24px !important;
    padding: 0 !important;
    color: inherit !important;
}

.mbc-band-description ul {
    list-style-type: disc !important;
}

.mbc-band-description ol {
    list-style-type: decimal !important;
}

.mbc-band-description li {
    margin-bottom: 8px !important;
    font-weight: 400 !important;
}

/* Ссылки */
.mbc-band-description a {
    color: #FFFFFF !important;
    text-decoration: underline !important;
    transition: color 0.2s ease !important;
}

.mbc-band-description a:hover {
    color: #cccccc !important;
    text-decoration: none !important;
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */
.mbc-archive-page {
    min-height: 100vh !important;
    padding: 40px 0 60px !important;
    font-family: var(--mbc-font-family) !important;
    background: transparent !important;
}

.mbc-archive-title {
    font-family: var(--mbc-font-family) !important;
    font-weight: 700 !important;
    font-size: 32px !important;
    line-height: 39px !important;
    color: var(--mbc-text-white) !important;
    margin: 0 0 30px 0 !important;
}

.mbc-pagination {
    margin-top: 40px !important;
    text-align: center !important;
}

.mbc-pagination a,
.mbc-pagination span {
    display: inline-block !important;
    padding: 8px 14px !important;
    margin: 0 4px !important;
    color: var(--mbc-text-white) !important;
    background: #1A1A1A !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-family: var(--mbc-font-family) !important;
    font-size: 14px !important;
}

.mbc-pagination a:hover {
    background: #333 !important;
}

.mbc-pagination .current {
    background: #444 !important;
}

.mbc-no-bands {
    color: var(--mbc-text-gray) !important;
    font-family: var(--mbc-font-family) !important;
    font-size: 18px !important;
    text-align: center !important;
    padding: 40px 0 !important;
}

/* ============================================
   СБРОС СТИЛЕЙ ТЕМЫ ДЛЯ ЭЛЕМЕНТОВ ПЛАГИНА
   ============================================ */

.mbc-slider-wrapper *,
.mbc-other-bands-slider-wrapper *,
.mbc-grid * {
    box-sizing: border-box !important;
}

a.mbc-slider-item,
a.mbc-slider-item:visited,
a.mbc-slider-item:hover,
a.mbc-slider-item:active,
a.mbc-slider-item:focus,
a.mbc-grid-item,
a.mbc-grid-item:visited,
a.mbc-grid-item:hover,
a.mbc-grid-item:active,
a.mbc-grid-item:focus {
    text-decoration: none !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.mbc-slider-item figure,
.mbc-slider-item .wp-block-image,
.mbc-grid-item figure,
.mbc-grid-item .wp-block-image {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.mbc-slider-item-image figure,
.mbc-slider-item-image .wp-caption,
.mbc-slider-item-image figcaption {
    display: none !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .mbc-gallery-main {
        width: 100% !important;
        max-width: 600px !important;
        height: 350px !important;
    }

    .mbc-band-gallery {
        flex-direction: column !important;
    }

    .mbc-gallery-thumbs {
        flex-direction: row !important;
        max-height: none !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    .mbc-gallery-thumb {
        width: 90px !important;
        height: 80px !important;
        min-width: 90px !important;
        min-height: 80px !important;
    }
}

@media (max-width: 768px) {
    .mbc-band-title {
        font-size: 20px !important;
        line-height: 24px !important;
    }

    .mbc-band-meta-row {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .mbc-gallery-main {
        height: 260px !important;
    }

    .mbc-slider-item {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
    }

    .mbc-slider-item .mbc-slider-item-image,
    .mbc-slider-item-image {
        width: 120px !important;
        height: 120px !important;
        min-width: 120px !important;
        min-height: 120px !important;
        max-width: 120px !important;
        max-height: 120px !important;
    }

    /* Размер от контейнера + focus-zoom — не фиксировать px (ломает ракурс при resize) */
    .mbc-slider-item .mbc-slider-item-image img,
    .mbc-slider-item-image img,
    .mbc-slider-item .mbc-slider-item-image .mbc-band-thumb {
        width: calc(100% * var(--mbc-focus-zoom, 1)) !important;
        height: calc(100% * var(--mbc-focus-zoom, 1)) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        top: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-y-ratio, 0)) !important;
        left: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-x-ratio, 0.5)) !important;
    }

    .mbc-slider-item .mbc-slider-item-name,
    .mbc-slider-item-name {
        font-size: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .mbc-grid .mbc-grid-item-name {
        font-size: 14px !important;
    }

    .mbc-grid {
        --mbc-grid-gap: 20px;
        --mbc-grid-card-size: 145px;
    }

    .mbc-genre-tag {
        font-size: 14px !important;
    }

    .mbc-meta-label,
    .mbc-meta-value {
        font-size: 14px !important;
    }

    .mbc-band-description,
    .mbc-band-description p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    .mbc-single-band-page {
        padding: 20px 0 40px !important;
    }

    .mbc-gallery-nav {
        opacity: 0.85;
        width: 36px;
    }
}

@media (max-width: 480px) {
    .mbc-grid {
        --mbc-grid-gap: 16px;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .mbc-grid-item {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .mbc-grid .mbc-grid-item-image {
        width: 100% !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        aspect-ratio: 1 / 1 !important;
    }

    .mbc-grid .mbc-grid-item-image img {
        width: calc(100% * var(--mbc-focus-zoom, 1)) !important;
        height: calc(100% * var(--mbc-focus-zoom, 1)) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        top: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-y-ratio, 0)) !important;
        left: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-x-ratio, 0.5)) !important;
    }

    .mbc-grid .mbc-grid-item-image .mbc-no-image-placeholder {
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        top: 0 !important;
        left: 0 !important;
    }

    .mbc-grid .mbc-grid-item-name {
        width: 100% !important;
        max-width: 100% !important;
    }

    .mbc-slider-item {
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
    }

    .mbc-slider-item .mbc-slider-item-image,
    .mbc-slider-item-image {
        width: 100px !important;
        height: 100px !important;
        min-width: 100px !important;
        min-height: 100px !important;
        max-width: 100px !important;
        max-height: 100px !important;
    }

    .mbc-slider-item .mbc-slider-item-image img,
    .mbc-slider-item-image img {
        width: calc(100% * var(--mbc-focus-zoom, 1)) !important;
        height: calc(100% * var(--mbc-focus-zoom, 1)) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        top: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-y-ratio, 0)) !important;
        left: calc((1 - var(--mbc-focus-zoom, 1)) * 100% * var(--mbc-focus-x-ratio, 0.5)) !important;
    }

    .mbc-slider-item .mbc-slider-item-name,
    .mbc-slider-item-name {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .mbc-gallery-main {
        height: 200px !important;
    }

    .mbc-gallery-thumb {
        width: 70px !important;
        height: 60px !important;
        min-width: 70px !important;
        min-height: 60px !important;
    }
}

/* ============================================
   УТИЛИТЫ (ДОЛЖНЫ БЫТЬ В САМОМ НИЗУ ДЛЯ ПРИОРИТЕТА)
   ============================================ */
a.mbc-grid-item.mbc-load-more-hidden,
.mbc-grid-item.mbc-load-more-hidden {
    display: none !important;
}

/* SSR: скрыть «лишние» карточки на мобилке до JS (между mobile и desktop лимитом) */
@media (max-width: 768px) {
    a.mbc-grid-item.mbc-ssr-hide-mobile,
    .mbc-grid-item.mbc-ssr-hide-mobile {
        display: none !important;
    }
}

/* Раскрытые вручную карточки нельзя снова спрятать через load-more */
a.mbc-grid-item[data-mbc-revealed="1"],
.mbc-grid-item[data-mbc-revealed="1"],
a.mbc-grid-item.mbc-load-more-revealed,
.mbc-grid-item.mbc-load-more-revealed {
    display: flex !important;
}

a.mbc-grid-item.mbc-hidden,
.mbc-grid-item.mbc-hidden {
    display: none !important;
}

/* Кнопка «Показать ещё» в сетке каталога */
.mbc-grid-show-more-wrap {
    text-align: center !important;
    margin-top: 10px !important;
    padding-bottom: 20px !important;
}

.mbc-grid-show-more-btn {
    background: transparent !important;
    color: #9C9C9C !important;
    border: 1px solid #858585 !important;
    padding: 10px 30px !important;
    font-family: var(--mbc-font-family) !important;
    font-size: 15px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.mbc-grid-show-more-btn:hover {
    color: #FFFFFF !important;
    border-color: #FFFFFF !important;
}

/* Плавное появление подгруженных карточек — только transform, без opacity:0 */
.mbc-grid-item.mbc-grid-item-enter {
    transform: translateY(12px);
}

.mbc-grid-item.mbc-grid-item-enter.mbc-grid-item-enter-active {
    transform: translateY(0);
    transition: transform 0.35s ease;
}

/* На сенсорных экранах transform при прокрутке даёт «пропадание» карточек в iOS/Android */
@media (hover: none), (pointer: coarse) {
    .mbc-grid-item.mbc-grid-item-enter,
    .mbc-grid-item.mbc-grid-item-enter.mbc-grid-item-enter-active {
        transform: none !important;
        transition: none !important;
    }

    .mbc-grid-item[data-mbc-revealed="1"],
    .mbc-grid-item.mbc-load-more-revealed {
        transform: none !important;
        transition: none !important;
    }
}

/* ============================================
   ОСНОВНОЙ ЗАГОЛОВОК И МЕТА-ДАННЫЕ
   ============================================ */

/* Главный заголовок (Название группы): десктоп 24px, мобильный 20px */
.mbc-band-name,
.mbc-band-title {
    font-size: 24px !important;
    line-height: 29px !important;
}

@media (max-width: 768px) {
    .mbc-band-name,
    .mbc-band-title {
        font-size: 20px !important;
        line-height: 24px !important;
    }
}

/* Делаем "Годы активности" и "Место происхождения" стилем Regular (нежирным) */
.mbc-meta-label,
.mbc-band-meta-label,
.mbc-band-meta strong,
.mbc-band-info strong {
    font-weight: 400 !important;
}