.quick-popup {
    position: fixed;
    inset: 0;
    z-index: 1100;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 24px;

    box-sizing: border-box;

    visibility: hidden;
    pointer-events: none;

    opacity: 0;

    transition:
        opacity 0.4s ease,
        visibility 0s linear 0.4s;
}

.quick-popup[hidden] {
    display: none;
}

.quick-popup.is-visible {
    visibility: visible;
    pointer-events: auto;

    opacity: 1;

    transition:
        opacity 0.4s ease,
        visibility 0s linear 0s;
}

body.quick-popup-open {
    overflow: hidden;
}

.quick-popup__overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.48);

    opacity: 0;

    transition: opacity 0.4s ease;
}

.quick-popup.is-visible .quick-popup__overlay {
    opacity: 1;
}

.quick-popup__card {
    position: relative;
    z-index: 2;

    width: min(920px, 100%);
    max-height: calc(100dvh - 48px);

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 24px;

    background: #ffffff;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.18);

    opacity: 0;

    transform:
        translateY(18px)
        scale(0.975);

    transition:
        opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);

    box-sizing: border-box;
}

.quick-popup.is-visible .quick-popup__card {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}

.quick-popup__content {
    display: grid;

    grid-template-columns:
        360px minmax(0, 1fr);

    width: 100%;
    min-height: 560px;

    box-sizing: border-box;
}

.quick-popup__image {
    position: relative;

    min-width: 0;

    overflow: hidden;

    background: #f3f3ef;
}

.quick-popup__photo {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;

    opacity: 1;
    transform: none;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.quick-popup__body {
    display: flex;

    min-width: 0;

    flex-direction: column;
    justify-content: center;

    padding: 54px;

    box-sizing: border-box;
}

.quick-popup__eyebrow {
    margin: 0;
}

.quick-popup__title {
    margin: 20px 0 0;

    color: var(--foreground);

    font-size: clamp(34px, 3vw, 50px);
    font-weight: 900;

    line-height: 1.08;
    letter-spacing: -0.04em;
}

.quick-popup__text {
    display: flex;

    flex-direction: column;

    gap: 14px;

    margin-top: 24px;
}

.quick-popup__text p {
    margin: 0;

    color: var(--muted-foreground);

    font-size: 16px;
    font-weight: 400;

    line-height: 1.35;
    letter-spacing: -0.025em;
}

.quick-popup__button {
    align-self: flex-start;

    margin-top: 30px;

    cursor: pointer;
}

.quick-popup__button svg {
    transition: transform 0.25s ease;
}

.quick-popup__button.is-active svg {
    transform: rotate(45deg);
}

.quick-popup__contacts {
    display: block;
    width: 100%;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition:
        max-height 0.32s ease,
        margin-top 0.32s ease,
        opacity 0.2s ease,
        visibility 0s linear 0.32s;
}

.quick-popup__contacts.is-open {
    max-height: 220px;
    margin-top: 22px;
    opacity: 1;
    visibility: visible;
    transition:
        max-height 0.32s ease,
        margin-top 0.32s ease,
        opacity 0.2s ease,
        visibility 0s linear 0s;
}

.quick-popup__contacts-label {
    margin: 0 0 10px;

    color: var(--muted-foreground);

    font-size: 12px;

    line-height: 1.2;
    letter-spacing: -0.02em;
}

.quick-popup__contacts-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 8px;

    min-height: 0;
}

.quick-popup__contact {
    display: flex;

    min-width: 0;

    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #ffffff;

    color: var(--foreground);

    font-size: 13px;
    font-weight: 500;

    line-height: 1;

    text-decoration: none;

    box-sizing: border-box;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
}

.quick-popup__contact:hover {
    border-color: var(--foreground);

    background: #fafaf8;
}

.quick-popup__contact-icon {
    display: flex;

    flex: 0 0 auto;

    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    border-radius: 50%;

    background: var(--primary);

    color: #ffffff;
}

.quick-popup__contact-icon svg {
    display: block;

    width: 14px;
    height: 14px;
}

.quick-popup__close {
    position: absolute;

    top: 18px;
    right: 18px;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    padding: 0;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.96);

    color: var(--foreground);

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.quick-popup__close:hover {
    border-color: var(--primary);

    background: var(--primary);

    color: var(--primary-foreground);
}

@media (max-width: 1440px) {
    .quick-popup {
        padding: 20px;
    }

    .quick-popup__card {
        width: min(860px, calc(100vw - 40px));
        max-height: calc(100dvh - 40px);
    }

    .quick-popup__content {
        grid-template-columns: minmax(290px, 330px) minmax(0, 1fr);
        min-height: 500px;
    }

    .quick-popup__body {
        padding: clamp(34px, 3.1vw, 44px);
    }

    .quick-popup__title {
        margin-top: 16px;
        font-size: clamp(34px, 3vw, 43px);
        line-height: 1.02;
    }

    .quick-popup__text {
        gap: 10px;
        margin-top: 18px;
    }

    .quick-popup__text p {
        font-size: 14px;
        line-height: 1.34;
    }

    .quick-popup__button {
        margin-top: 22px;
    }
}

@media (max-width: 1366px) {
    .quick-popup {
        padding: 16px;
    }

    .quick-popup__card {
        width: min(810px, calc(100vw - 32px));
        max-height: calc(100dvh - 32px);
        border-radius: 22px;
    }

    .quick-popup__content {
        grid-template-columns: minmax(270px, 305px) minmax(0, 1fr);
        min-height: 460px;
    }

    .quick-popup__body {
        padding: 34px 36px;
    }

    .quick-popup__title {
        font-size: clamp(32px, 2.8vw, 38px);
    }

    .quick-popup__text {
        margin-top: 16px;
    }

    .quick-popup__button {
        margin-top: 20px;
    }

    .quick-popup__contacts.is-open {
        margin-top: 16px;
    }
}

@media (min-width: 768px) and (max-height: 760px) {
    .quick-popup {
        padding: 12px;
    }

    .quick-popup__card {
        width: min(780px, calc(100vw - 24px));
        max-height: calc(100dvh - 24px);
    }

    .quick-popup__content {
        grid-template-columns: minmax(255px, 285px) minmax(0, 1fr);
        min-height: 0;
        height: min(440px, calc(100dvh - 24px));
    }

    .quick-popup__image {
        height: 100%;
    }

    .quick-popup__photo {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 30%;
    }

    .quick-popup__body {
        padding: 28px 32px;
        overflow-y: auto;
    }

    .quick-popup__title {
        margin-top: 12px;
        font-size: 32px;
    }

    .quick-popup__text {
        gap: 8px;
        margin-top: 12px;
    }

    .quick-popup__text p {
        font-size: 12.5px;
    }

    .quick-popup__button {
        margin-top: 16px;
    }
}

@media (max-width: 1024px) {
    .quick-popup__card {
        width: min(740px, calc(100vw - 28px));
    }

    .quick-popup__content {
        grid-template-columns: minmax(245px, 280px) minmax(0, 1fr);
        min-height: 430px;
    }

    .quick-popup__body {
        padding: 30px 32px;
    }

    .quick-popup__title {
        font-size: 32px;
    }
}

@media (max-width: 900px) and (min-width: 768px) {
    .quick-popup {
        padding: 14px;
    }

    .quick-popup__card {
        width: min(690px, calc(100vw - 28px));
    }

    .quick-popup__content {
        grid-template-columns: 250px minmax(0, 1fr);
        min-height: 410px;
    }

    .quick-popup__body {
        padding: 28px;
    }

    .quick-popup__title {
        font-size: 29px;
    }
}

@media (max-width: 767px) {
    .quick-popup {
        align-items: center;
        justify-content: center;
        padding: 10px;
    }

    .quick-popup__card {
        width: min(420px, 100%);
        max-width: 420px;
        height: auto !important;
        min-height: 0 !important;
        max-height: calc(100dvh - 20px);
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 20px;
    }

    .quick-popup__content {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
    }

    .quick-popup__image {
        position: relative;
        flex: 0 0 180px;
        width: 100%;
        height: 180px !important;
        min-height: 0 !important;
        overflow: hidden;
    }

    .quick-popup__photo {
        display: block;
        width: 100%;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center 32% !important;
        transform: none;
    }

    .quick-popup__body {
        display: block;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        padding: 16px 16px 18px;
    }

    .quick-popup__eyebrow {
        font-size: 10.5px;
        line-height: 1.2;
    }

    .quick-popup__title {
        margin-top: 8px;
        font-size: clamp(23px, 6.6vw, 28px);
        line-height: 1.03;
    }

    .quick-popup__text {
        gap: 6px;
        margin-top: 10px;
    }

    .quick-popup__text p {
        font-size: 12.5px;
        line-height: 1.28;
    }

    .quick-popup__button {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        margin-top: 14px;
    }

    .quick-popup__contacts {
        display: block;
        width: 100%;
        max-height: 0;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
    }

    .quick-popup__contacts.is-open {
        max-height: 190px;
        margin-top: 12px;
        opacity: 1;
        visibility: visible;
    }

    .quick-popup__contacts-label {
        margin-bottom: 7px;
        font-size: 11.5px;
    }

    .quick-popup__contacts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .quick-popup__contact {
        min-height: 40px;
        gap: 8px;
        padding: 7px 9px;
        font-size: 11.5px;
    }

    .quick-popup__contact-icon {
        width: 24px;
        height: 24px;
    }

    .quick-popup__close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .quick-popup {
        padding: 8px;
    }

    .quick-popup__card {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 18px;
    }

   .quick-popup__image {
    flex-basis: 280px;
    height: 280px !important;
    min-height: 280px !important;
}

  .quick-popup__photo {
    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
    object-position: center 25% !important;

    transform: none !important;
}

    .quick-popup__body {
        padding: 15px 15px 17px;
    }

    .quick-popup__title {
        font-size: clamp(22px, 6.5vw, 26px);
    }
}

@media (max-width: 390px) {
    .quick-popup {
        padding: 6px;
    }

    .quick-popup__card {
        max-height: calc(100dvh - 12px);
        border-radius: 16px;
    }

    .quick-popup__image {
        position: relative;
        flex-basis: 280px;
        width: 100%;
        height: 280px !important;
        min-height: 280px !important;
        overflow: hidden;
    }

   .quick-popup__photo {
    position: static;
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 25% !important;
    transform: none !important;
}

    .quick-popup__body {
        padding: 13px 14px 15px;
    }

    .quick-popup__title {
        margin-top: 7px;
        font-size: 22px;
    }

    .quick-popup__text {
        gap: 5px;
        margin-top: 8px;
    }

    .quick-popup__text p {
        font-size: 12px;
        line-height: 1.26;
    }

    .quick-popup__button {
        min-height: 44px;
        margin-top: 11px;
    }

    .quick-popup__contacts.is-open {
        max-height: 260px;
        margin-top: 9px;
    }

    .quick-popup__contacts-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .quick-popup__contact {
        min-height: 39px;
        padding: 7px 9px;
        font-size: 12px;
    }

    .quick-popup__close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 767px) and (max-height: 700px) {
    .quick-popup {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .quick-popup__card {
        max-height: calc(100dvh - 12px);
    }

    .quick-popup__image {
        flex-basis: 130px;
        height: 130px !important;
    }

    .quick-popup__body {
        padding-top: 12px;
        padding-bottom: 13px;
    }

    .quick-popup__title {
        margin-top: 6px;
        font-size: 21px;
    }

    .quick-popup__text {
        margin-top: 7px;
    }

    .quick-popup__text p {
        font-size: 11.5px;
    }

    .quick-popup__button {
        min-height: 42px;
        margin-top: 9px;
    }
}

@media (max-width: 767px) and (max-height: 600px) {
    .quick-popup__image {
        flex-basis: 110px;
        height: 110px !important;
    }

    .quick-popup__body {
        padding: 10px 13px 12px;
    }

    .quick-popup__title {
        font-size: 20px;
    }

    .quick-popup__text p {
        font-size: 11px;
    }

    .quick-popup__button {
        min-height: 40px;
        margin-top: 8px;
    }
}

