.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 15, 12, .55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    animation: overlayIn .2s ease;
}

@keyframes overlayIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.popup-form {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.95);
    width: min(520px, 92vw);
    max-height: 95vh;
    background: #fff;
    border-radius: 20px;
    border: 0.5px solid rgba(171, 120, 112, .2);
    box-shadow: 0 20px 60px rgba(26, 15, 12, .15);
    z-index: 1001;
    overflow: hidden;
    animation: popIn .3s cubic-bezier(.34, 1.4, .64, 1) forwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translate(-50%, -47%) scale(.93);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.popup-accent-bar {
    height: 3px;
    background: linear-gradient(90deg, #ab7870, #c9907e, #ab7870);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% center
    }

    100% {
        background-position: -200% center
    }
}

.popup-header {
    padding: 16px 22px 14px;
    border-bottom: 0.5px solid #f0e8e6;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a0f0c;
    letter-spacing: -.01em;
}

.popup-subtitle {
    font-size: 13px;
    color: #9c8070;
    margin-top: 3px;
}

.close-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f5ede9;
    border: none;
    outline: none;
    color: #ab7870;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .2s;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.close-button:hover {
    background: #ecddd7;
    transform: rotate(90deg);
}

.close-button::before,
.close-button:hover::before {
    display: none;
}

.popup-body {
    padding: 16px 22px 22px;
    overflow-y: auto;
    max-height: calc(88vh - 74px);
}

.order-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.order-form .full {
    grid-column: 1 / -1;
}

.order-section {
    grid-column: 1 / -1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #ab7870;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.order-section::after {
    content: '';
    flex: 1;
    height: .5px;
    background: #f0e8e6;
}

.order-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-field label {
    font-size: 11px;
    color: #9c8070;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-weight: 600;
}

.order-field label .req {
    color: #ab7870;
}

.order-field label .opt {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #c9b8b3;
}

.order-field input,
.order-field select,
.order-field textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1.5px solid #ecddd7;
    border-radius: 10px;
    font-size: 13px;
    color: #1a0f0c;
    background: #fdf8f7;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    font-family: inherit;
    box-sizing: border-box;
}

.order-field input:focus,
.order-field select:focus,
.order-field textarea:focus {
    border-color: #ab7870;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(171, 120, 112, .1);
}

.order-field input::placeholder,
.order-field textarea::placeholder {
    color: #d4c4be;
}

.order-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ab7870' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-color: #fdf8f7;
    cursor: pointer;
    padding-right: 34px;
}

.order-field textarea {
    resize: vertical;
    min-height: 60px;
}

.popup-form .btn-order {
    width: 90%;
    padding: 12px;
    background: #ab7870;
    color: #fff;
    border: none;
    outline: none;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .03em;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(171, 120, 112, .3);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-order:hover {
    background: #9a6b63;
    box-shadow: 0 6px 22px rgba(171, 120, 112, .4);
}

.btn-order:active {
    transform: scale(.99);
}

.btn-order::before,
.btn-order:hover::before {
    display: none;
}

@media (max-width: 540px) {
    .popup-form {
        width: 96vw;
        border-radius: 16px;
    }

    .popup-header {
        padding: 18px 20px 16px;
    }

    .popup-body {
        padding: 18px 20px 24px;
    }

    .popup-title {
        font-size: 16px;
    }

    .order-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .order-form .full {
        grid-column: 1;
    }

    .order-section {
        grid-column: 1;
    }
}