/* ==========================================================================
   Body Aesthetics Pricing List
   Matched to: bodyaesthetics.bg

   Mobile-first. 97% mobile traffic.
   Colors:  Gold #B59A45 · Dark text #2C2C2C · Muted #6B6B6B
            White #FFF · Cream #F8F5EF · Border #E8E0D0
   Fonts:   Cormorant Garamond (accents) · Montserrat (body + section titles)
   ========================================================================== */

:root {
    --ba-gold: #B59A45;
    --ba-gold-hover: #9E8539;
    --ba-gold-light: rgba(181, 154, 69, 0.06);
    --ba-gold-bg: rgba(181, 154, 69, 0.04);
    --ba-section-bg-odd: rgba(181, 154, 69, 0.05);
    --ba-section-bg-even: rgba(181, 154, 69, 0.11);
    --ba-section-gap: 14px;
    --ba-promo-red: #c0392b;
    --ba-white: #FFFFFF;
    --ba-cream: #F8F5EF;
    --ba-text: #2C2C2C;
    --ba-text-light: #6B6B6B;
    --ba-border: #E8E0D0;
    --ba-border-light: #F0EBE2;
    --ba-font-heading: 'Cormorant Garamond', Georgia, serif;
    --ba-font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --ba-transition: 0.25s ease;
    --ba-max-width: 960px;
    --ba-layout-max: 1200px;
    /* Filled by script from fixed header height, or set manually / data-ba-header-offset on #ba-price-list. */
    --ba-site-header-offset: 0px;
    /* Extra space below the header stack before sticky category nav (override on .ba-price-list in Custom CSS). */
    --ba-below-header-gap: 28px;
    /* Mobile: sticky category row height (label + select) for #anchor scroll-margin */
    --ba-mobile-sticky-h: 72px;
}

/* Scoped reset */
.ba-price-list *,
.ba-price-list *::before,
.ba-price-list *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ba-price-list {
    font-family: var(--ba-font-body);
    color: var(--ba-text);
    line-height: 1.5;
    background: var(--ba-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Layout: mobile = sticky category dropdown; desktop = 25% sidebar + 75% content
   ========================================================================== */

.ba-layout {
    max-width: var(--ba-layout-max);
    margin: 0 auto;
    padding: 0 12px;
}

.ba-main {
    min-width: 0;
}

/* ----- Desktop sidebar (25%) ----- */

.ba-sidebar {
    display: none;
}

.ba-sidebar-inner {
    padding: 8px 0 24px;
}

.ba-sidebar-heading {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ba-text-light);
    margin: 0 0 12px;
    padding: 0 4px;
}

.ba-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ba-cat-link--sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ba-text);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    transition:
        background var(--ba-transition),
        border-color var(--ba-transition),
        color var(--ba-transition);
}

.ba-cat-link--sidebar:hover {
    background: var(--ba-cream);
    color: var(--ba-gold);
    text-decoration: none;
}

.ba-cat-link--sidebar.is-active {
    background: var(--ba-cream);
    border-color: rgba(181, 154, 69, 0.45);
    color: var(--ba-gold);
}

.ba-cat-link--sidebar:focus-visible {
    outline: 2px solid var(--ba-gold);
    outline-offset: 2px;
}

.ba-cat-ic {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ba-gold);
}

.ba-ic-svg {
    display: block;
}

.ba-cat-txt {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.ba-sidebar--no-icons .ba-cat-link--sidebar {
    gap: 0;
}

.ba-cat-link--child {
    padding-left: 20px;
    font-size: 11px;
    font-weight: 500;
}

/* Sidebar: collapsible laser groups */

.ba-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ba-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    font-family: var(--ba-font-body);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ba-gold);
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background var(--ba-transition),
        border-color var(--ba-transition);
}

.ba-nav-group-toggle:hover {
    background: var(--ba-cream);
}

.ba-nav-group-toggle:focus-visible {
    outline: 2px solid var(--ba-gold);
    outline-offset: 2px;
}

.ba-nav-group-label {
    flex: 1;
    min-width: 0;
}

.ba-nav-group-chevron {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform var(--ba-transition);
}

.ba-nav-group:not(.is-open) .ba-nav-group-chevron {
    transform: rotate(-45deg);
    margin-top: 2px;
}

.ba-nav-group-children {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0 4px;
}

.ba-nav-group:not(.is-open) .ba-nav-group-children {
    display: none;
}

/* ----- Mobile: sticky category <select> ----- */

.ba-mobile-sticky {
    position: sticky;
    top: calc(var(--ba-site-header-offset, 0px) + var(--ba-below-header-gap, 28px));
    z-index: 10050;
    margin: 0 0 10px;
    padding: 10px 12px 12px;
    background: var(--ba-white);
    border: 1px solid var(--ba-border);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    isolation: isolate;
}

.ba-mobile-jump {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.ba-mobile-jump-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ba-text-light);
    margin: 0;
}

/* Mobile: custom category picker (consistent across browsers) */

.ba-mobile-picker {
    position: relative;
    width: 100%;
}

.ba-mobile-picker-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    font-family: var(--ba-font-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ba-text);
    text-align: left;
    background: var(--ba-cream);
    border: 1px solid rgba(181, 154, 69, 0.45);
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        border-color var(--ba-transition),
        box-shadow var(--ba-transition),
        background var(--ba-transition);
}

.ba-mobile-picker-trigger:hover {
    border-color: var(--ba-gold);
}

.ba-mobile-picker.is-open .ba-mobile-picker-trigger,
.ba-mobile-picker-trigger:focus-visible {
    border-color: var(--ba-gold);
    box-shadow: 0 0 0 2px rgba(181, 154, 69, 0.2);
    outline: none;
}

.ba-mobile-picker-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ba-mobile-picker-chevron {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--ba-gold);
    border-bottom: 2px solid var(--ba-gold);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform var(--ba-transition);
}

.ba-mobile-picker.is-open .ba-mobile-picker-chevron {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.ba-mobile-picker-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 10060;
    max-height: min(60vh, 340px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--ba-white);
    border: 1px solid var(--ba-border);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(44, 44, 44, 0.12);
}

.ba-mobile-picker-panel[hidden] {
    display: none !important;
}

.ba-mobile-picker-list,
.ba-mobile-picker-sublist {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.ba-mobile-picker-group-label {
    display: block;
    padding: 10px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--ba-gold);
    line-height: 1.3;
}

.ba-mobile-picker-option {
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 14px;
    font-family: var(--ba-font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ba-text);
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--ba-transition), color var(--ba-transition);
}

.ba-mobile-picker-option--child {
    padding-left: 22px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ba-text);
}

.ba-mobile-picker-option:hover,
.ba-mobile-picker-option:focus-visible {
    background: var(--ba-cream);
    color: var(--ba-gold);
    outline: none;
}

.ba-mobile-picker-option.is-selected {
    background: rgba(181, 154, 69, 0.12);
    color: var(--ba-gold);
    font-weight: 600;
}

.ba-mobile-picker-option.is-selected::before {
    content: '✓';
    display: inline-block;
    width: 1.1em;
    margin-right: 6px;
    font-size: 12px;
    font-weight: 700;
}

/* Breakdance body overflow-x:hidden breaks sticky; clip avoids that. */
@supports (overflow-x: clip) {
    @media (min-width: 992px) {
        html.breakdance-animation-enabled:has(#ba-price-list),
        body.breakdance-animation-enabled:has(#ba-price-list) {
            overflow-x: clip !important;
        }
    }
}

@media (min-width: 992px) {
    .ba-layout {
        display: grid;
        grid-template-columns: minmax(200px, 25%) minmax(0, 1fr);
        gap: clamp(20px, 3vw, 40px);
        align-items: stretch;
        padding: 0 20px;
    }

    .ba-sidebar {
        display: flex;
        flex-direction: column;
        min-height: 0;
        align-self: stretch;
    }

    .ba-sidebar-inner {
        position: sticky;
        top: calc(var(--ba-site-header-offset, 0px) + var(--ba-below-header-gap, 28px));
        max-height: calc(
            100vh - var(--ba-site-header-offset, 0px) - var(--ba-below-header-gap, 28px) - 16px
        );
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ba-mobile-sticky {
        display: none !important;
    }

    .ba-sections {
        max-width: none;
        margin: 0;
        padding: 0 0 80px;
    }

    .ba-section {
        scroll-margin-top: calc(
            var(--ba-site-header-offset, 0px) + var(--ba-below-header-gap, 28px) + 12px
        );
        margin-left: 0;
        margin-right: 0;
        padding: 0 16px;
    }
}

@media (max-width: 991px) {
    .ba-price-list {
        --ba-below-header-gap: 20px;
        /* Fallback until JS measures the fixed header (in-app browsers, Messenger, etc.) */
        --ba-site-header-offset: max(var(--ba-site-header-offset, 0px), 72px);
    }

    .ba-main {
        padding-top: 4px;
    }

    .ba-sections {
        max-width: var(--ba-max-width);
        margin: 0 auto;
        padding: 0 0 60px;
    }

    .ba-section {
        scroll-margin-top: calc(
            var(--ba-site-header-offset, 0px) + var(--ba-below-header-gap, 28px) + var(--ba-mobile-sticky-h) + 12px
        );
    }
}

/* ==========================================================================
   Category section titles
   ========================================================================== */

/* Alternating section backgrounds (brand gold tints) */

.ba-section {
    margin: 0 -12px;
    padding: 0 12px;
    border-radius: 12px;
}

.ba-section + .ba-section {
    margin-top: var(--ba-section-gap);
}

.ba-section--odd {
    background: var(--ba-section-bg-odd);
}

.ba-section--even {
    background: var(--ba-section-bg-even);
}

.ba-section-body {
    padding-bottom: 8px;
}

.ba-category-header {
    padding: 36px 0 16px;
}

.ba-section:first-child .ba-category-header {
    padding-top: 24px;
}

/* #ba-price-list wins over .breakdance h2 / builder heading atoms */
#ba-price-list .ba-category-header h2 {
    font-family: var(--ba-font-body) !important;
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    font-style: normal !important;
    text-decoration: none !important;
    color: var(--ba-gold) !important;
    letter-spacing: 0.01em;
    line-height: 1.3;
    margin: 0 !important;
    padding: 0 !important;
    border: none;
    background: none !important;
    text-transform: none !important;
}

@media (min-width: 768px) {
    #ba-price-list .ba-category-header h2 {
        font-size: 1.5rem !important;
    }
}

#ba-price-list .ba-category-header h2::after {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: var(--ba-gold);
    margin-top: 10px;
}

/* ==========================================================================
   Pricing Table — MOBILE FIRST (cards)
   ========================================================================== */

.ba-table-wrap {
    width: 100%;
    overflow-x: visible;
}

.ba-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ba-font-body);
    font-size: 13px;
}

/* ---- Mobile: transform table into stacked cards ---- */

.ba-table thead {
    display: none;
}

.ba-table tbody {
    display: block;
}

.ba-row {
    display: block;
    border-bottom: 1px solid var(--ba-border);
    padding: 14px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(181, 154, 69, 0.15);
}

.ba-row:active {
    background: var(--ba-gold-light);
}

.ba-row:focus {
    outline: none;
}

.ba-row:focus-visible {
    outline: 2px solid var(--ba-gold);
    outline-offset: 2px;
}

.ba-row:last-child {
    border-bottom: 1px solid var(--ba-border);
}

.ba-td-zone {
    display: block;
    padding: 0 0 8px;
}

.ba-zone-name {
    font-family: var(--ba-font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--ba-gold);
    display: inline;
}

.ba-td-price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--ba-text);
}

/* Visible column title on mobile (e.g. "1 процедура", "6 процедури") */
.ba-mob-col-label {
    flex: 1 1 48%;
    max-width: 52%;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ba-text);
    text-transform: none;
}

.ba-td-price--promo .ba-mob-col-label {
    color: var(--ba-promo-red);
    font-weight: 700;
    text-transform: lowercase;
}

.ba-mob-col-value {
    flex: 0 1 auto;
    text-align: right;
    min-width: 0;
}

.ba-td-price .woocommerce-Price-amount,
.ba-td-price .amount {
    font-weight: 600;
    color: var(--ba-text);
    font-size: 13px;
}

.ba-na {
    color: var(--ba-border);
}

/* ---- Desktop: proper table layout ---- */

@media (min-width: 769px) {
    .ba-table thead {
        display: table-header-group;
    }

    .ba-table tbody {
        display: table-row-group;
    }

    .ba-row {
        display: table-row;
        padding: 0;
    }

    .ba-row {
        cursor: pointer;
    }

    .ba-row:hover {
        background: var(--ba-gold-light);
    }

    .ba-td-zone,
    .ba-td-price {
        display: table-cell;
        vertical-align: middle;
        padding: 12px 16px;
        border-bottom: 1px solid var(--ba-border-light);
    }

    .ba-td-zone {
        padding-left: 0;
    }

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

    .ba-mob-col-label {
        display: none;
    }

    .ba-mob-col-value {
        display: inline;
        text-align: right;
    }

    .ba-th-zone,
    .ba-th-price {
        font-family: var(--ba-font-body);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--ba-text-light);
        padding: 10px 16px;
        border-bottom: 2px solid var(--ba-gold);
        text-align: right;
        white-space: nowrap;
    }

    .ba-th-zone {
        text-align: left;
        padding-left: 0;
    }

    .ba-th-price--promo {
        color: var(--ba-promo-red);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        line-height: 1.25;
        white-space: normal;
    }

    .ba-th-promo-main {
        display: block;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .ba-zone-name {
        font-size: 14px;
    }

    .ba-row:last-child .ba-td-zone,
    .ba-row:last-child .ba-td-price {
        border-bottom: 1px solid var(--ba-border);
    }
}

/* ==========================================================================
   Simple product list (fallback for non-variable categories)
   ========================================================================== */

.ba-products {
    border-top: 1px solid var(--ba-border);
}

.ba-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    text-decoration: none;
    color: var(--ba-text);
    border-bottom: 1px solid var(--ba-border-light);
    transition: background var(--ba-transition), padding-left var(--ba-transition);
    cursor: pointer;
}

.ba-product-row:hover,
.ba-product-row:focus {
    background: var(--ba-gold-light);
    padding-left: 12px;
    text-decoration: none;
    color: var(--ba-text);
}

.ba-product-info {
    flex: 1;
    min-width: 0;
}

.ba-product-title {
    font-family: var(--ba-font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--ba-gold);
    line-height: 1.4;
    transition: color var(--ba-transition);
}

.ba-product-row:hover .ba-product-title {
    color: var(--ba-gold-hover);
}

.ba-product-price {
    flex: 0 0 auto;
    font-family: var(--ba-font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--ba-text);
    white-space: nowrap;
}

.ba-product-price del {
    font-size: 12px;
    font-weight: 400;
    color: var(--ba-text-light);
    margin-right: 4px;
}

.ba-product-price ins {
    text-decoration: none;
    color: var(--ba-gold);
    font-weight: 600;
}

/* ==========================================================================
   Empty state
   ========================================================================== */

p.ba-empty {
    text-align: center;
    font-family: var(--ba-font-heading);
    font-style: italic;
    color: var(--ba-text-light);
    padding: 64px 16px;
    font-size: 18px;
}

/* ==========================================================================
   Small mobile (< 400px)
   ========================================================================== */

@media (max-width: 400px) {
    .ba-zone-name {
        font-size: 14px;
    }

    .ba-td-price {
        font-size: 12px;
    }

    .ba-mob-col-label {
        font-size: 11px;
    }
}

/* ==========================================================================
   Breakdance / Page Builder resets
   ========================================================================== */

#ba-price-list h2,
#ba-price-list h3 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-weight: 500 !important;
    font-style: normal !important;
    text-decoration: none !important;
    text-transform: none !important;
}

#ba-price-list h2 {
    font-size: 1.2rem !important;
}

@media (min-width: 768px) {
    #ba-price-list h2 {
        font-size: 1.5rem !important;
    }
}

.ba-price-list a,
.ba-price-list a:visited {
    text-decoration: none;
}

.ba-price-list table {
    border: none;
    background: none;
}

.ba-price-list th,
.ba-price-list td {
    border: none;
    background: none;
}
