/* Perfume Detail & Carousel Elementor Widgets */

/*
 * Widget-local aliases only. These used to sit on :root with hard-coded light
 * values, which overrode the active theme's tokens for the whole page and made
 * every widget render light-on-light against the dark design. They now defer to
 * the theme and apply only inside plugin widgets.
 */
.bfh-element,
.bfh-widget-wrapper,
.bfh-perfume-detail-widget {
    --bfh-text-main: var(--bfh-text-primary, #111827);
    --bfh-primary: var(--bfh-color-primary, #18B7B0);
    --bfh-primary-hover: var(--bfh-color-primary-hover, #02C3AE);
    --bfh-accent: var(--bfh-color-primary, #18B7B0);
    --bfh-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --bfh-shadow: var(--bfh-shadow-1, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    --bfh-transition: var(--bfh-anim-normal, 200ms ease-in-out);
}

/* Detail Widget */
.bfh-perfume-detail-widget {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--bfh-text-main);
    background: var(--bfh-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--bfh-shadow);
}

/* Hero Section */
.bfh-hero-section {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
    border-bottom: 1px solid var(--bfh-border);
}

.bfh-breadcrumbs {
    font-size: 0.875rem;
    color: var(--bfh-text-muted);
    margin-bottom: 2rem;
}

.bfh-breadcrumbs a {
    color: var(--bfh-primary);
    text-decoration: none;
    transition: color var(--bfh-transition);
}

.bfh-breadcrumbs a:hover {
    color: var(--bfh-primary-hover);
}

.bfh-hero-content {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.bfh-hero-image-col {
    flex: 1 1 300px;
    display: flex;
    justify-content: center;
}

.bfh-hero-bottle {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--bfh-shadow-sm);
    transition: transform var(--bfh-transition);
}

.bfh-hero-bottle:hover {
    transform: scale(1.02);
}

.bfh-hero-info-col {
    flex: 2 1 400px;
}

.bfh-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.bfh-hero-meta {
    font-size: 1.125rem;
    color: var(--bfh-text-muted);
    margin: 0 0 2rem 0;
}

.bfh-hero-actions {
    display: flex;
    gap: 1rem;
}

.bfh-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bfh-surface);
    border: 1px solid var(--bfh-border);
    color: var(--bfh-text-muted);
    cursor: pointer;
    transition: all var(--bfh-transition);
}

.bfh-btn-action:hover {
    color: var(--bfh-primary);
    border-color: var(--bfh-primary);
    background: var(--bfh-surface-hover);
}

/* Detail Grid */
.bfh-detail-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Stats */
.bfh-stats-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bfh-stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bfh-surface);
    border: 1px solid var(--bfh-border);
    border-radius: 8px;
    transition: background var(--bfh-transition), border-color var(--bfh-transition);
}

.bfh-stat-card:hover {
    background: var(--bfh-surface-hover);
    border-color: var(--bfh-primary);
}

.bfh-stat-label {
    font-weight: 600;
}

.bfh-stat-value {
    font-weight: 700;
    color: var(--bfh-primary);
}

/* Rating Ring */
.bfh-rating-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bfh-surface);
    border: 1px solid var(--bfh-border);
    border-radius: 8px;
}

.bfh-rating-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.bfh-rating-ring {
    transform: rotate(-90deg);
}

.bfh-rating-ring-bg {
    fill: none;
    stroke: var(--bfh-border);
    stroke-width: 8;
}

.bfh-rating-ring-fill {
    fill: none;
    stroke: var(--bfh-accent);
    stroke-width: 8;
    stroke-dasharray: 339.292;
    stroke-dashoffset: calc(339.292 - (339.292 * var(--rating-percentage)) / 100);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.bfh-rating-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--bfh-text-main);
}

.bfh-rating-label {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--bfh-text-muted);
}

/* Notes Grid */
.bfh-notes-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bfh-notes-tier {
    margin-bottom: 1rem;
}

.bfh-tier-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bfh-text-muted);
    margin-bottom: 0.75rem;
}

.bfh-notes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.bfh-note-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: var(--bfh-surface);
    border: 1px solid var(--bfh-border);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bfh-text-main);
    transition: all var(--bfh-transition);
    cursor: default;
}

.bfh-note-badge:hover {
    background: var(--bfh-primary);
    color: #fff;
    border-color: var(--bfh-primary);
    transform: translateY(-2px);
    box-shadow: var(--bfh-shadow-sm);
}

/* Accords */
.bfh-accords-section h3 {
    margin-bottom: 1.5rem;
}

.bfh-accords-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bfh-accord-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bfh-accord-label {
    flex: 0 0 100px;
    font-size: 0.875rem;
    font-weight: 500;
}

.bfh-accord-bar-container {
    flex: 1;
    height: 8px;
    background: var(--bfh-surface-hover);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bfh-accord-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--bfh-primary);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Carousel Widget */
.bfh-perfume-carousel-widget {
    position: relative;
    padding: 2rem 0;
}

.bfh-carousel-item {
    background: var(--bfh-surface);
    border: 1px solid var(--bfh-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--bfh-transition), box-shadow var(--bfh-transition);
}

.bfh-carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--bfh-shadow);
}

.bfh-carousel-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
}

.bfh-carousel-image-wrap {
    aspect-ratio: 1;
    background: var(--bfh-surface-hover);
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bfh-carousel-image-wrap img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.bfh-carousel-no-image {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
}

.bfh-carousel-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--bfh-text-main);
}

.bfh-carousel-brand {
    font-size: 0.875rem;
    color: var(--bfh-text-muted);
    margin: 0;
}
