/*
 * BFH Single Perfume Content (detail.css)
 *
 * The main-column partials: notes tiers, the meter bars shared by Performance
 * and When To Wear, the review list, and the Similar Fragrances carousel.
 * Sidebar cards live in sidebar.css; the page frame lives in single.css.
 */

/* -------------------- Meters (Performance / When To Wear) -------------------- */
.bfh-meters {
    display: flex;
    flex-direction: column;
    gap: var(--bfh-space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.bfh-meter__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--bfh-space-3);
    margin-bottom: var(--bfh-space-2);
}

.bfh-meter__label {
    font-size: var(--bfh-text-sm);
    font-weight: var(--bfh-font-weight-medium);
    color: var(--bfh-text-secondary);
}

.bfh-meter__value {
    display: inline-flex;
    align-items: baseline;
    gap: var(--bfh-space-2);
    font-size: var(--bfh-text-sm);
    font-weight: var(--bfh-font-weight-semibold);
    color: var(--bfh-text-primary);
    font-variant-numeric: tabular-nums;
}

/* The winning option carries the emphasis in a wear row, so its share is
   demoted to a quiet suffix rather than competing with the label. */
.bfh-meter__percent {
    font-size: var(--bfh-text-xs);
    font-weight: var(--bfh-font-weight-regular);
    color: var(--bfh-color-primary);
}

.bfh-meter__track {
    position: relative;
    display: block;
    height: 8px;
    background-color: var(--bfh-border);
    border-radius: var(--bfh-radius-pill);
    overflow: hidden;
}

.bfh-meter__bar {
    display: block;
    height: 100%;
    /* Width comes from an inline style the template computes; only the paint
       and the settle animation belong here. */
    border-radius: var(--bfh-radius-pill);
    background: linear-gradient(90deg, var(--bfh-color-primary), var(--bfh-color-primary-hover));
    transition: width var(--bfh-anim-slow);
}

.bfh-meter--wear .bfh-meter__bar {
    background: linear-gradient(90deg, var(--bfh-color-primary-hover), var(--bfh-color-primary));
}

/* -------------------- Notes -------------------- */
.bfh-notes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--bfh-space-5);
}

.bfh-notes__tier {
    display: flex;
    flex-direction: column;
    gap: var(--bfh-space-3);
    padding: var(--bfh-space-4);
    background-color: var(--bfh-surface-hover);
    border: var(--bfh-border-width) solid var(--bfh-border);
    border-radius: var(--bfh-radius-lg);
}

.bfh-notes__tier-title {
    margin: 0;
    font-size: var(--bfh-text-xs);
    font-weight: var(--bfh-font-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bfh-text-muted);
}

.bfh-notes__list {
    display: flex;
    flex-direction: column;
    gap: var(--bfh-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.bfh-notes__note {
    display: flex;
    align-items: center;
    gap: var(--bfh-space-3);
    font-size: var(--bfh-text-sm);
    color: var(--bfh-text-primary);
}

/* The icon span is empty in the markup, so it is drawn here as a tinted dot
   that shifts hue per tier — top notes brightest, base notes deepest. */
.bfh-notes__icon {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: var(--bfh-radius-round);
    background-color: var(--bfh-color-primary);
}

.bfh-notes__tier--mid .bfh-notes__icon {
    background-color: var(--bfh-accord-floral);
}

.bfh-notes__tier--base .bfh-notes__icon {
    background-color: var(--bfh-accord-woody);
}

.bfh-notes__name {
    min-width: 0;
}

/* -------------------- Reviews -------------------- */
.bfh-reviews__empty {
    margin: 0;
    padding: var(--bfh-space-6) 0;
    text-align: center;
    font-size: var(--bfh-text-sm);
    color: var(--bfh-text-muted);
}

/* Collapsed until a paging error fills it, so no blank line is reserved for a
   message that normally never appears. */
.bfh-reviews__status {
    margin: var(--bfh-space-3) 0 0;
    text-align: center;
    font-size: var(--bfh-text-xs);
    color: var(--bfh-danger);
}

.bfh-reviews__status:empty {
    display: none;
}

.bfh-reviews__list {
    display: flex;
    flex-direction: column;
    gap: var(--bfh-space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.bfh-review {
    display: flex;
    gap: var(--bfh-space-4);
    padding-bottom: var(--bfh-space-5);
    border-bottom: var(--bfh-border-width) solid var(--bfh-border);
}

.bfh-review:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.bfh-review__avatar {
    flex: 0 0 48px;
}

.bfh-review__avatar img {
    width: 48px;
    height: 48px;
    border-radius: var(--bfh-radius-round);
    object-fit: cover;
    background-color: var(--bfh-border);
}

.bfh-review__body {
    display: flex;
    flex-direction: column;
    gap: var(--bfh-space-2);
    min-width: 0;
}

.bfh-review__head {
    display: flex;
    align-items: baseline;
    gap: var(--bfh-space-3);
    flex-wrap: wrap;
}

.bfh-review__author {
    font-size: var(--bfh-text-sm);
    font-weight: var(--bfh-font-weight-semibold);
    color: var(--bfh-text-primary);
}

.bfh-review__date {
    font-size: var(--bfh-text-xs);
    color: var(--bfh-text-muted);
}

.bfh-review__title {
    margin: 0;
    font-size: var(--bfh-text-base);
    font-weight: var(--bfh-font-weight-semibold);
    color: var(--bfh-text-primary);
}

.bfh-review__text {
    margin: 0;
    font-size: var(--bfh-text-sm);
    color: var(--bfh-text-secondary);
}

.bfh-reviews__more {
    align-self: center;
    margin-top: var(--bfh-space-5);
}

/* -------------------- Similar Fragrances carousel -------------------- */
.bfh-similar {
    margin-top: var(--bfh-space-8);
}

.bfh-carousel__nav {
    display: flex;
    gap: var(--bfh-space-2);
}

.bfh-carousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: transparent;
    border: var(--bfh-border-width) solid var(--bfh-border);
    border-radius: var(--bfh-radius-round);
    color: var(--bfh-text-primary);
    font-size: var(--bfh-text-lg);
    line-height: 1;
    cursor: pointer;
    transition: all var(--bfh-anim-fast);
}

.bfh-carousel__arrow:hover:not(:disabled) {
    border-color: var(--bfh-color-primary);
    color: var(--bfh-color-primary);
    background-color: var(--bfh-color-primary-transparent);
}

.bfh-carousel__arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Scroll-snapped rather than transform-driven, so the rail still works by
   touch, trackpad and keyboard if the carousel script never initialises. */
.bfh-carousel__track {
    display: flex;
    gap: var(--bfh-space-5);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: var(--bfh-space-2);
}

.bfh-carousel__track::-webkit-scrollbar {
    display: none;
}

/* Slides-per-view is a variable so the Elementor carousel widget can set it
   per breakpoint without duplicating this rule. */
.bfh-carousel__slide {
    --bfh-carousel-slides: 4;
    flex: 0 0 calc(
        (100% - (var(--bfh-space-5) * (var(--bfh-carousel-slides) - 1)))
        / var(--bfh-carousel-slides)
    );
    min-width: 200px;
    scroll-snap-align: start;
}

/* -------------------- Responsive -------------------- */
/* Each breakpoint caps the variable rather than restating the calc, so an
   Elementor per-device override still wins where it is narrower. */
@media (max-width: 1024px) {
    .bfh-carousel__slide {
        --bfh-carousel-slides: 3;
    }
}

@media (max-width: 768px) {
    .bfh-carousel__slide {
        --bfh-carousel-slides: 2;
    }
}

@media (max-width: 520px) {
    .bfh-carousel__slide {
        flex-basis: 78%;
        min-width: 0;
    }

    .bfh-review {
        gap: var(--bfh-space-3);
    }

    .bfh-review__avatar {
        flex-basis: 40px;
    }

    .bfh-review__avatar img {
        width: 40px;
        height: 40px;
    }
}
