/* ═══════════════════════════════════════════
   ASSORT — каталог всех вкусов
   ═══════════════════════════════════════════ */

.page {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
    padding: 3px;
}

/* ─── SEO-заголовки (в разметке для индексации, визуально не показываются) ─── */
.ac-intro-title,
.ac-intro-subtitle,
.ac-line-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    font-weight: 400;
}

/* ─── Враппер со скролл-тенями ─── */
.assort-scroll-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}


/* ─── Прокручиваемый контент ─── */
.assort-content {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-bd) transparent;
    mask-image: linear-gradient(to bottom, transparent 0px, black 52px, black calc(100% - 52px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 52px, black calc(100% - 52px), transparent 100%);
}
.assort-content::-webkit-scrollbar {
    width: 4px;
}
.assort-content::-webkit-scrollbar-track {
    background: transparent;
}
.assort-content::-webkit-scrollbar-thumb {
    background: var(--glass-bd);
    border-radius: 2px;
}

/* ─── Сетка карточек ─── */
.ac-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    padding: 0 18px 10px;
    margin-top: 10px;
}

/* ─── Карточка ─── */
.ac-card {
    position: relative;
    transition: transform 0.28s cubic-bezier(0.15, 0, 0, 1.22);
    z-index: 1;
}

.ac-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Уменьшенные panel-edge для карточек */
.ac-card .panel-edge--left,
.ac-card .panel-edge--right {
    width: 7px;
    height: 80px;
}

.ac-card .panel-edge--top {
    width: 80px;
    height: 4px;
}

/* Уменьшенный эллипс-блик */
.ac-card:has(> .panel-edge) > .glass::before {
    width: 90px;
    height: 8px;
}

.ac-card .glass-glow {
    --color: var(--lc);
}

.ac-card .glass-glow,
.ac-card .glass {
    --cs: 14px;
}

.ac-card.core .glass {
    box-shadow: 0 4px 28px 0 rgba(255, 238, 0, 0.28) inset;
    backdrop-filter: blur(4px);
}
.ac-card.acid .glass {
    box-shadow: 0 4px 28px 0 rgba(132, 255, 6, 0.32) inset;
    backdrop-filter: blur(4px);
}
.ac-card.ice .glass {
    box-shadow: 0 4px 28px 0 rgba(0, 227, 255, 0.38) inset;
    backdrop-filter: blur(4px);
}

.ac-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ─── Шапка карточки ─── */
.ac-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 0;
    flex-shrink: 0;
}

.ac-card-line {
    font-family: var(--font-latin);
    font-size: 16px;
    font-weight: 400;
    color: var(--lc);
    text-transform: uppercase;
}

.ac-card-logo {
    width: 20px;
    height: 20px;
    display: block;
}

/* ─── Область арта + бутылки ─── */
.ac-card-art {
    flex: 1;
    min-height: 120px;
    position: relative;
    top: -5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 88% auto;
    background-repeat: no-repeat;
    background-position: center 40%;
}

.ac-card-bottle {
    width: 52%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

/* ─── Рамка арта ─── */
.ac-card-frame {
    position: absolute;
    top: 40%;
    width: 95px;
    height: 95px;
    pointer-events: none;
    filter: drop-shadow(0 0 4px var(--lc));
    background:
        linear-gradient(var(--lc), var(--lc)) 0 0 / 10px 2px no-repeat,
        linear-gradient(var(--lc), var(--lc)) 0 0 / 2px 10px no-repeat,
        linear-gradient(var(--lc), var(--lc)) 100% 0 / 10px 2px no-repeat,
        linear-gradient(var(--lc), var(--lc)) 100% 0 / 2px 10px no-repeat,
        linear-gradient(var(--lc), var(--lc)) 0 100% / 10px 2px no-repeat,
        linear-gradient(var(--lc), var(--lc)) 0 100% / 2px 10px no-repeat,
        linear-gradient(var(--lc), var(--lc)) 100% 100% / 10px 2px no-repeat,
        linear-gradient(var(--lc), var(--lc)) 100% 100% / 2px 10px no-repeat;
}

.ac-card-frame::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--lc);
    opacity: 0.15;
    transform: scaleY(0);
    transform-origin: center center;
}

.ac-card:hover .ac-card-frame::before {
    transform: scaleY(1);
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1.15);
    transition-delay: 0.1s;
}

/* ─── Название вкуса ─── */
.ac-card-name {
    font-family: var(--font-latin);
    font-size: 20px;
    font-weight: 400;
    color: var(--lc);
    text-align: center;
    padding: 0 0 20px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   МОДАЛКА — детальная карточка вкуса
   ═══════════════════════════════════════════ */
.ac-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 0.25s ease;
    background: rgba(16, 21, 31, 0.78);
    backdrop-filter: blur(6px);
}

.ac-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.ac-modal-card {
    position: relative;
    z-index: 1;
    min-width: 624px;
    width: fit-content;
    height: 510px;
    transform: scale(0.94);
    transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1.2);
}

.ac-modal-overlay.open .ac-modal-card {
    transform: scale(1);
}

.ac-modal-card .glass-glow,
.ac-modal-card .glass {
    --cs: 22px;
}

.ac-modal-card .glass-glow {
    --color: var(--lc);
}

.ac-modal-card.core .glass {
    box-shadow: 0 4px 48px 0 rgba(255, 238, 0, 0.35) inset;
    backdrop-filter: blur(10px);
}
.ac-modal-card.acid .glass {
    box-shadow: 0 4px 48px 0 rgba(132, 255, 6, 0.42) inset;
    backdrop-filter: blur(10px);
}
.ac-modal-card.ice .glass {
    box-shadow: 0 4px 48px 0 rgba(0, 227, 255, 0.5) inset;
    backdrop-filter: blur(10px);
}

.ac-modal-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: 100%;
    padding: 27px 42px;
}

.ac-modal-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min-content;
    min-width: 270px;
}

.ac-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    width: 100%;
}

.ac-modal-content {
    display: flex;
    flex-direction: row;
    gap: 20px;
    min-height: 0;
    flex-grow: 0;
}

.ac-modal-line {
    font-family: var(--font-latin);
    font-size: 38px;
    font-weight: 400;
    color: var(--lc);
    text-transform: uppercase;
}

.ac-modal-logo {
    width: 32px;
    height: 32px;
    display: block;
    opacity: 0.9;
}

.ac-modal-name {
    font-family: var(--font-latin);
    font-size: 38px;
    font-weight: 400;
    color: var(--lc);
    margin: 0;
    margin-bottom: 12px;
    text-align: center;
}

.ac-modal-desc {
    font-family: var(--font-kiril);
    font-size: 19px;
    margin: 0;
    text-align: center;
    color: var(--lc);
}

.ac-modal-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: center center;
}

.ac-modal-bottle {
    width: 211px;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 28px var(--lc, rgba(255, 255, 255, 0.25))) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.7));
}

/* ═══════════════════════════════════════════
   ПЛАНШЕТ — ≤ 1200px
   ═══════════════════════════════════════════ */
@media (max-width: 1200px) {
    .ac-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
}

/* ═══════════════════════════════════════════
   МОБИЛЬ — ≤ 900px
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
    html,
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .page {
        overflow: visible;
        flex: none;
        gap: 10px;
    }

    .assort-content {
        overflow: visible;
        min-height: 0;
    }

    .ac-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding-bottom: 60px;
    }
}
