.bp-auto-price,
.bp-auto-price * {
    box-sizing: border-box;
}

.bp-auto-price {
    --bpw-text: #493d3a;
    --bpw-muted: #8d7e7b;
    --bpw-line: #eee6e5;
    --bpw-heading: #f6eeee;
    --bpw-heading-hover: #f1e4e4;
    --bpw-row-alt: #fcf9f9;
    --bpw-row-hover: #f8eeee;
    --bpw-button: #e3d1d1;
    --bpw-button-hover: #d6bcbc;
    width: 100%;
    color: var(--bpw-text);
    font-family: Roboto, Arial, sans-serif;
}

.bpw button,
.bpw input,
.bpw select,
.bpw a {
    font: inherit;
}

.bpw__layout {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.bpw__sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
    max-height: calc(100vh - 120px);
}

.bpw__menu {
    position: static;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border-right: 1px solid var(--bpw-line);
    padding-right: 22px;
}

.bpw__menu-button {
    width: 100%;
    min-height: 52px;
    padding: 13px 40px 13px 16px;
    border: 0;
    background: transparent;
    color: #756764;
    text-align: left;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease;
}

.bpw__menu-button:hover {
    border-radius: 20px 5px 35px 5px;
    background: #f3eaea;
    color: #3d3432;
}

.bpw__menu-button.is-active {
    border-radius: 20px 5px 35px 5px;
    background: var(--bpw-button);
    color: #443936;
}

.bpw__main {
    min-width: 0;
}

.bpw__toolbar {
    position: sticky;
    top: 72px;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    padding: 8px 0 18px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

.bpw__search {
    position: relative;
    display: block;
    width: min(390px, 100%);
}

.bpw__search input {
    width: 100%;
    height: 49px;
    padding: 0 44px 0 46px;
    border: 1px solid #e5d9d7;
    border-radius: 28px;
    outline: none;
    background: #fff;
    color: var(--bpw-text);
}

.bpw__search input:focus {
    border-color: #d1b8b5;
    box-shadow: 0 0 0 3px rgba(209, 184, 181, 0.15);
}

.bpw__search-icon {
    position: absolute;
    top: 16px;
    left: 18px;
    width: 14px;
    height: 14px;
    border: 1.6px solid #8b7d79;
    border-radius: 50%;
}

.bpw__search-icon::after {
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 7px;
    height: 1.6px;
    background: #8b7d79;
    content: '';
    transform: rotate(45deg);
}

.bpw__search-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 33px;
    height: 33px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #877976;
    font-size: 24px;
    cursor: pointer;
}

.bpw__search-clear:hover {
    background: var(--bpw-heading);
}

.bpw__section {
    display: none;
}

.bpw__section.is-active {
    display: block;
}

.bpw__section-title {
    margin: 0 0 25px;
    color: #302b29;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.15;
    font-weight: 400;
}

.bpw__group {
    width: 100%;
}

.bpw__group + .bpw__group {
    margin-top: 14px;
}

.bpw__group-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 84px;
    padding: 18px 28px;
    overflow: hidden;
    border: 0;
    border-radius: 30px;
    background: var(--bpw-heading);
    color: #342e2c;
    text-align: left;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.bpw__group-heading:hover {
    background: var(--bpw-heading-hover);
}

.bpw__group.is-single .bpw__group-heading {
    cursor: default;
}

.bpw__group.is-single .bpw__group-heading:hover {
    background: var(--bpw-heading);
}

.bpw__group-heading::before,
.bpw__group-heading::after {
    position: absolute;
    width: 170px;
    height: 170px;
    border: 4px solid rgba(219, 194, 194, 0.22);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.bpw__group-heading::before {
    top: -125px;
    left: -105px;
}

.bpw__group-heading::after {
    right: -115px;
    bottom: -140px;
}

.bpw__group-title {
    position: relative;
    z-index: 1;
    padding-right: 20px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 300;
}

.bpw__group-toggle {
    position: relative;
    z-index: 1;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid #ddcfcd;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.bpw__group-toggle::before,
.bpw__group-toggle::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 1px;
    background: #6c5d5a;
    content: '';
    transform: translate(-50%, -50%);
}

.bpw__group-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform 180ms ease;
}

.bpw__group.is-open .bpw__group-toggle::after {
    transform: translate(-50%, -50%);
}

.bpw__group-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 260ms ease;
}

.bpw__group.is-open .bpw__group-body {
    grid-template-rows: 1fr;
}

.bpw__group-inner {
    min-height: 0;
    overflow: hidden;
}

.bpw__table-wrap {
    padding: 10px 0 4px;
}

.bpw__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.bpw__table col:nth-child(2) {
    width: 170px;
}

.bpw__table col:nth-child(3) {
    width: 170px;
}

.bpw__row {
    height: 70px;
    background: #fff;
    transition: background-color 180ms ease;
}

.bpw__row:nth-child(even) {
    background: var(--bpw-row-alt);
}

.bpw__row:hover {
    background: var(--bpw-row-hover);
}

.bpw__cell {
    height: 70px;
    padding: 14px 12px;
    border-top: 1px solid var(--bpw-line);
    border-bottom: 1px solid var(--bpw-line);
    vertical-align: middle;
}

.bpw__service {
    font-size: 16px;
    line-height: 1.45;
}

.bpw__service-wrap {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.bpw__new-badge {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 24px;
    padding: 0 11px;
    border: 1px solid rgba(178, 139, 136, 0.2);
    border-radius: 18px 4px 18px 4px;
    background: linear-gradient(135deg, #ead9d8 0%, #ddc3c2 100%);
    color: #5b4946;
    box-shadow: 0 4px 12px rgba(112, 79, 76, 0.09);
    font-size: 10px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.bpw__row--new {
    background-image: linear-gradient(90deg, rgba(241, 225, 224, 0.26), transparent 34%);
}

.bpw__row--new:hover .bpw__new-badge {
    background: linear-gradient(135deg, #e2cdcc 0%, #d3b5b3 100%);
}

.bpw__cell--price {
    text-align: right;
    white-space: nowrap;
}

.bpw__old-price {
    display: block;
    margin-bottom: 2px;
    color: #a3928f;
    font-size: 12px;
}

.bpw__price {
    color: #493d3a;
    font-size: 18px;
    font-weight: 400;
}

.bpw__cell--book {
    text-align: right;
}

.bpw__book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 146px;
    min-width: 136px;
    height: 30px;
    padding: 0 16px 0 20px;
    border: 0;
    border-radius: 30px 0 30px 2px;
    background: var(--bpw-button);
    color: #584a47 !important;
    font-size: 14px;
    line-height: 1;
    text-decoration: none !important;
    transition: color 180ms ease, background-color 180ms ease;
}

.bpw__book:hover {
    background: var(--bpw-button-hover);
    color: #403532 !important;
}

.bpw__book-arrow {
    width: 7px;
    height: 7px;
    margin-left: 1px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

/* Поле выбранной услуги в форме Tilda */
.t-input-group.bpw-service-field {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 0 20px !important;
    text-align: center;
}

.t-input-group.bpw-service-field::before {
    display: block;
    margin-bottom: 5px;
    color: #8d7e7b;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
    content: 'Услуга:';
}

.t-input-group.bpw-service-field .t-input-block {
    width: 100%;
    overflow: visible !important;
}

.t-input-group.bpw-service-field input[name="service"],
.t-input-group.bpw-service-field textarea[name="service"] {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #493d3a !important;
    font-family: Roboto, Arial, sans-serif !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    text-align: center !important;
}

.t-input-group.bpw-service-field--empty {
    display: none !important;
}

.bpw__empty,
.bpw__no-data {
    padding: 28px;
    background: var(--bpw-heading);
    color: var(--bpw-muted);
    text-align: center;
}

.bpw__empty[hidden],
.bpw__row[hidden],
.bpw__group[hidden] {
    display: none !important;
}

.bpw__mobile-nav {
    display: none;
}

.bpw__visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 900px) {
    .bpw__layout {
        display: block;
    }

    .bpw__sidebar {
        display: none;
    }

    .bpw__mobile-nav {
        display: block;
        margin-bottom: 20px;
    }

    .bpw__mobile-nav label {
        display: block;
        margin-bottom: 7px;
        color: var(--bpw-muted);
        font-size: 13px;
    }

    .bpw__select {
        width: 100%;
        height: 50px;
        padding: 0 14px;
        border: 1px solid #e5d9d7;
        background: #fff;
        color: var(--bpw-text);
    }

    .bpw__toolbar {
        top: 0;
    }
}

@media (max-width: 640px) {
    .bpw__service-wrap {
        align-items: flex-start;
        gap: 8px;
    }

    .bpw__new-badge {
        min-width: 42px;
        height: 21px;
        padding: 0 8px;
        font-size: 9px;
    }

    .bpw__group-heading {
        min-height: 74px;
        padding: 16px 15px;
    }

    .bpw__group-title {
        font-size: 22px;
    }

    .bpw__table,
    .bpw__table tbody {
        display: block;
        width: 100%;
    }

    .bpw__table colgroup {
        display: none;
    }

    .bpw__row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        height: auto;
        min-height: 105px;
        padding: 13px 15px;
        border-bottom: 1px solid var(--bpw-line);
    }

    .bpw__cell {
        display: block;
        height: auto;
        padding: 0;
        border: 0;
    }

    .bpw__cell--service {
        grid-column: 1 / -1;
        padding-bottom: 12px;
    }

    .bpw__cell--price,
    .bpw__cell--book {
        display: flex;
        align-items: center;
        min-height: 34px;
    }

    .bpw__cell--price {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 5px;
        padding-right: 10px;
        text-align: left;
    }

    .bpw__cell--price .bpw__old-price {
        margin-bottom: 0;
    }

    .bpw__cell--book {
        justify-content: flex-end;
    }

    .bpw__book {
        width: 136px;
        font-size: 13px;
    }
}
