/* === BeanFF Woo Tasting Notes Redesign === */

:root {
  --beanff-primary: #48c1c5;
  --beanff-primary-dark: #3aa6a9;
  --beanff-text: #1a1a1a;
  --beanff-text-muted: #666;
  --beanff-bg-glass: rgba(255, 255, 255, 0.85);
  --beanff-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 1. Image Wrapper & Info FAB */
.beanff-loop-image-wrap {
  position: relative;
  overflow: hidden;
}

/* --- Desktop Hover Overlay --- */
.beanff-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 10;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none; /* Let clicks pass through to product image link */
}

.beanff-loop-image-wrap:hover .beanff-hover-overlay {
  opacity: 1;
}

.hover-overlay-content {
  width: 100%;
  padding: 20px;
  transform: translateY(15px);
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.beanff-loop-image-wrap:hover .hover-overlay-content {
  transform: translateY(0);
}

.hover-flavors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.hover-flavor-tag {
  background: rgba(255, 255, 255, 0.95);
  color: var(--beanff-text);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hover-roast-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.4);
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

.hover-roast-label {
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.hover-roast-scale {
  display: flex;
  gap: 5px;
}

.roast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.3s ease;
}

.roast-dot.is-active {
  background: var(--beanff-primary);
}

.hover-sensory-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  background: rgba(0,0,0,0.4);
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

.hover-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px; /* Space between label and bar */
}

.hover-stat-label {
  color: #fff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  width: 70px; /* Aligns all bars vertically */
  text-align: left; /* Clean alignment */
}

.hover-stat-bar {
  flex-grow: 1; /* Takes up remaining space */
  height: 4px; /* Thin, elegant bar */
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.hover-stat-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--beanff-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* --- Mobile Trigger Pill --- */
.beanff-mobile-trigger {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: var(--beanff-text);
  padding: 6px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  z-index: 10;
  cursor: pointer;
  white-space: nowrap;
}

.mobile-trigger-icon {
  display: flex;
  color: var(--beanff-primary);
}

/* Device Visibility Toggles */
@media (min-width: 1024px) {
  .beanff-hidden-desktop {
    display: none !important;
  }
}
@media (max-width: 1023px) {
  .beanff-hidden-mobile {
    display: none !important;
  }
}

/* 2. Modal Overlay & Container */
.mfp-bg.mfp-fade-tasting {
  opacity: 0;
  transition: all 0.3s ease-out;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
}

.mfp-bg.mfp-fade-tasting.mfp-ready { opacity: 1; }
.mfp-bg.mfp-fade-tasting.mfp-removing { opacity: 0; }

.mfp-wrap.mfp-fade-tasting .mfp-content {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.mfp-wrap.mfp-fade-tasting.mfp-ready .mfp-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.mfp-wrap.mfp-fade-tasting.mfp-removing .mfp-content {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
}

.beanff-tasting-modal {
  background: var(--beanff-bg-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  max-width: 600px;

  margin: 40px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--beanff-shadow);
  position: relative;
  font-family: 'Inter', sans-serif;
}

.tasting-modal-inner {
  padding: 30px;
}

.tasting-modal-header {
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 15px;
}

.tasting-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--beanff-text);
  letter-spacing: -0.5px;
}

.tasting-modal-title small {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--beanff-primary);
  letter-spacing: 2px;
  margin-top: 4px;
}

/* 3. Redesigned Tasting Notes Content */

/* Flavor Cards Grid */
.tasting-flavors-grid-large {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.tasting-flavor-card {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  transition: transform 0.3s ease;
  background: #2c2c2c; /* Fallback for transparency/missing images */
}

.tasting-flavor-card:hover {
  transform: translateY(-5px);
}

.flavor-card-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1447933630983-2ad3b81e46ae?auto=format&fit=crop&w=300&q=80');
  background-size: cover;
  background-position: center;
  filter: brightness(0.35) contrast(1.1); /* Darker background */
  z-index: 1;
}

.flavor-card-name {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-weight: 800; /* Bolder text */
  font-size: 14px;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8); /* Much stronger shadow */
}


/* Details Grid */
.tasting-details-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  align-items: start;
}

.detail-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--beanff-text-muted);
  margin: 0 0 15px 0;
  font-weight: 600;
}

/* Roasting Scale */
.roast-scale {
  display: flex;
  justify-content: space-between;
  background: rgba(0,0,0,0.03);
  padding: 15px 10px;
  border-radius: 12px;
  position: relative;
}

.roast-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #ddd;
  transition: all 0.3s ease;
}

.roast-step.is-active {
  color: var(--beanff-primary);
  transform: scale(1.1);
}

.roast-step svg {
  width: 24px;
  height: 24px;
}

/* Sensory Stats List */
.sensory-stats-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sensory-stat-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--beanff-text);
  display: flex;
  justify-content: space-between;
}

.stat-gauge-wrap {
  height: 8px;
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.stat-gauge-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--beanff-primary);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-gauge-markers {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.stat-gauge-markers span {
  width: 1px;
  height: 100%;
  background: rgba(255,255,255,0.3);
}

/* Close Button Override */
.mfp-close-btn-in .mfp-close {
  color: var(--beanff-text);
  top: 10px;
  right: 10px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.mfp-close-btn-in .mfp-close:hover { opacity: 1; }

/* Responsive adjustments */
@media (max-width: 640px) {
  .beanff-tasting-modal { margin: 20px; }
  .tasting-details-grid { grid-template-columns: 1fr; gap: 20px; }
  .tasting-flavors-grid-large { gap: 10px; }
}
