/* Стили для компонента custom:gallery.tiles (Формат 4х3, Montserrat) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

.bx-gallery-compact-slider {
    --bg-primary: #EEE2D6;
    --bg-secondary: #D8B89A;
    --accent: #ED5338;
    --radius-tile: 15px;
    --radius-btn: 5px;
    font-family: 'Montserrat', system-ui, sans-serif;
    background-color: rgba(238, 226, 214, 0.65);
    border-top: 1px solid var(--bg-secondary);
    padding: 32px 0 36px 0;
    margin-top: 40px;
}

.bx-gallery-compact-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.bx-gallery-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bx-gallery-compact-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.bx-gallery-compact-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #2b2520;
    letter-spacing: -0.2px;
}

.bx-gallery-compact-subtitle {
    font-size: 12px;
    color: #7a6e65;
}

.bx-gallery-compact-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bx-compact-arrow {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-btn);
    color: #2b2520;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bx-compact-arrow:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.bx-gallery-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.bx-gallery-track::-webkit-scrollbar {
    display: none;
}

.bx-compact-tile {
    flex: 0 0 270px;
    scroll-snap-align: start;
}

.bx-compact-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-tile);
    overflow: hidden;
    background-color: var(--bg-secondary);
    border: 1px solid var(--bg-secondary);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(43, 37, 32, 0.06);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.bx-compact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(43, 37, 32, 0.15);
}

.bx-compact-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bx-compact-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.bx-compact-card:hover .bx-compact-img-wrap img {
    transform: scale(1.05);
}

.bx-compact-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.85) 100%);
}

.bx-compact-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.bx-compact-badge {
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-btn);
    text-transform: uppercase;
}

.bx-compact-arrow-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    color: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease, background 0.25s ease;
}

.bx-compact-card:hover .bx-compact-arrow-icon {
    transform: rotate(45deg);
    background: var(--accent);
}

.bx-compact-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    z-index: 2;
    color: #fff;
}

.bx-compact-name {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bx-compact-card:hover .bx-compact-name {
    color: var(--bg-primary);
}

.bx-compact-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.bx-compact-domain {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bx-compact-link-btn {
    color: var(--bg-primary);
    font-weight: 600;
}
