/* ================================
   Beauty & Skincare Comparison
   Optimized CSS
   ================================ */

:root {
  /* ===== BACKGROUNDS ===== */
  --bc-bg-mobile: url("https://files.easy-orders.net/1768316725199483807.webp");
  --bc-bg-desktop: url("https://files.easy-orders.net/1768781382508615774.webp");
  
  /* ===== DIMENSIONS & SPACING ===== */
  --bc-max-width: 1400px;
  --bc-section-min-h-mobile: 660px;
  --bc-section-min-h-desktop: 800px;
  --bc-section-pad: 10px;
  --bc-inner-pad-x: 24px;
  
  --bc-card-h-mobile: 450px;
  --bc-card-h-desktop: 600px;

  --bc-gap-topbar: 8px;
  --bc-gap-main-mobile: 8px;
  --bc-gap-main-desktop: 50px;
  --bc-topbar-offset: 0px;

  /* ===== ICONS ===== */
  --bc-icon-size-mobile: 72px;
  --bc-icon-size-desktop: 110px;
  --bc-icons-gap-mobile: 10px;
  --bc-icons-gap-desktop: 14px;
  --bc-icon-active-scale-mobile: 1.12;
  --bc-icon-active-scale-desktop: 1.20;

  /* ===== RADIUS ===== */
  --bc-radius-topbar: 1.2rem;
  --bc-radius-card: 2rem;
  --bc-radius-slider: 1.5rem;

  /* ===== GLASS EFFECTS ===== */
  --bc-topbar-bg: rgba(255,255,255,0.25);
  --bc-card-bg: rgba(255,255,255,0.15);
  --bc-btn-bg: rgba(0,0,0,0.04);
  
  /* ===== COLORS & TEXT ===== */
  --bc-text: #111827;
  --bc-text-soft: rgba(17,24,39,0.75);
  
  /* ===== SLIDER UTILS ===== */
  --bc-slider-line-w: 2px;
  --bc-handle-size: 36px;
}

/* Base Reset & Scoping */
body { margin: 0; padding: 0; }
.bc-app, .bc-app * { box-sizing: border-box; }

.bc-app {
  font-family: "Inter", sans-serif;
  width: 100vw;
  /* Centers the full-width section even inside other containers */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  
  background-color: transparent;
  position: relative;
  overflow: hidden;
  min-height: var(--bc-section-min-h-mobile);
  padding-block: var(--bc-section-pad);
  
  display: flex;
  align-items: center;
  justify-content: center;
}

.bc-app::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  background: var(--bc-bg-mobile) center/cover no-repeat;
  z-index: 0;
  animation: bcBgZoom 20s ease-in-out infinite alternate;
}

/* Layout Shell */
.bc-shell {
  width: 100%;
  max-width: var(--bc-max-width);
  padding-inline: var(--bc-inner-pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  gap: var(--bc-gap-topbar);
}

/* Topbar */
.bc-topbar {
  padding: 8px 20px;
  border-radius: var(--bc-radius-topbar);
  transform: translateY(var(--bc-topbar-offset));
}

.bc-topbar__title {
  margin: 0;
  text-align: center;
  color: var(--bc-text);
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1;
}

/* Main Content Area */
.bc-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bc-gap-main-mobile);
}

/* Left & Right Containers */
.bc-left, .bc-right {
  width: 100%;
  height: var(--bc-card-h-mobile);
  display: flex;
  justify-content: center;
}
.bc-card-frame { width: 100%; height: 100%; }

/* Glass Styles */
.bc-glass {
  background: var(--bc-topbar-bg);
  backdrop-filter: blur(4px) saturate(140%);
  -webkit-backdrop-filter: blur(4px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow: 0 4px 24px -1px rgba(0,0,0,0.05);
}

.bc-glass-card {
  background: var(--bc-card-bg);
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 26px 60px rgba(0,0,0,0.13);
}

.bc-glass-btn {
  background: var(--bc-btn-bg);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.30);
}

/* Icon Buttons Navigation */
.bc-icons {
  display: flex;
  gap: var(--bc-icons-gap-mobile);
  padding: 0 6px;
}

.bc-iconBtn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 14px;
  padding: 6px;
  cursor: pointer;
  width: var(--bc-icon-size-mobile);
  height: var(--bc-icon-size-mobile);
  transition: all 0.26s ease;
  opacity: 0.85;
  filter: grayscale(0.2);
}

.bc-iconBtn:hover { opacity: 1; filter: grayscale(0); transform: scale(1.05); }

.bc-iconBtn.is-active {
  opacity: 1;
  filter: grayscale(0);
  border-color: rgba(255,255,255,0.9);
  transform: scale(var(--bc-icon-active-scale-mobile));
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.bc-iconBtn img { width: 100%; height: 100%; object-fit: contain; }

/* Product Details */
.bc-product {
  width: 100%; height: 100%;
  border-radius: var(--bc-radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
}

.bc-product__imageWrap {
  width: 100%; flex: 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 10px;
}

.bc-product__image {
  max-width: 85%; max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
}

.bc-product__meta {
  width: 100%; text-align: center;
  display: flex; flex-direction: column; gap: 12px;
}

.bc-product__name {
  margin: 0; color: var(--bc-text);
  font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 15px; line-height: 1.15;
  text-shadow: 0 2px 0 rgba(255,255,255,0.3);
}

.bc-product__tag {
  margin: 0; color: var(--bc-text-soft);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.22em; font-size: 10px;
}

.bc-product__btn {
  display: inline-block; text-decoration: none;
  color: #000; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.38em; font-size: 11px;
  padding: 10px 44px; border-radius: 14px;
  align-self: center;
  transition: background 0.22s ease, transform 0.16s ease;
}
.bc-product__btn:hover { background: rgba(255,255,255,0.4); }
.bc-product__btn:active { transform: scale(0.97); }

/* Animation */
@keyframes bcFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.bc-fade-in { animation: bcFadeIn 0.6s cubic-bezier(0.16,1,0.3,1) forwards; }

/* Slider Component */
.bc-slider {
  position: relative; width: 100%; height: 100%;
  border-radius: var(--bc-radius-slider);
  overflow: hidden; cursor: ew-resize; touch-action: none;
  --pos: 50%;
  opacity: 1; visibility: visible;
}
.bc-slider__before, .bc-slider__after {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.bc-slider__after { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.bc-slider__label {
  position: absolute; bottom: 14px; padding: 6px 14px;
  border-radius: 10px; font-size: 10px; text-transform: uppercase;
  font-weight: 800; letter-spacing: 0.22em; color: rgba(0,0,0,0.6); z-index: 12;
}
.bc-slider__label--after { left: 14px; }
.bc-slider__label--before { right: 14px; }

.bc-slider__line {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: var(--bc-slider-line-w);
  background: rgba(255,255,255,0.98);
  transform: translateX(calc(var(--bc-slider-line-w) * -0.5)); z-index: 15;
}

.bc-slider__handle {
  appearance: none; border: none; background: #fff;
  width: var(--bc-handle-size); height: var(--bc-handle-size);
  border-radius: 50%; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); cursor: ew-resize;
  box-shadow: 0 18px 32px rgba(0,0,0,0.18);
  display: grid; place-items: center; padding: 0;
}
.bc-slider__handle:focus-visible { outline: 2px solid rgba(255,255,255,0.9); outline-offset: 3px; }

.bc-hand-svg {
  width: clamp(18px, 2.4vw, 30px); height: clamp(18px, 2.4vw, 30px);
  color: rgba(107,114,128,0.95);
}

/* Wiggle Animation */
@keyframes bcWiggle { 0%,100%{ transform: translateX(-15%); } 50%{ transform: translateX(15%); } }
.bc-wiggle { display: inline-block; animation: bcWiggle 1.2s ease-in-out infinite; }
.bc-slider--interacted .bc-wiggle { animation: none; }
.bc-noselect { user-select: none; -webkit-user-select: none; }

/* Swipe Hint */
.bc-swipe-hint {
  position: absolute; top: 50%; left: var(--pos);
  transform: translate(-50%, -50%); z-index: 20;
  display: flex; align-items: center; gap: 6px;
  pointer-events: none;
  color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.bc-swipe-text { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.bc-hand-icon { width: 24px; height: 24px; animation: bcHandWiggle 1.5s ease-in-out infinite; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

@keyframes bcHandWiggle { 0%,100%{transform:translateX(-4px);} 50%{transform:translateX(4px);} }


/* Intro Animation */
.bc-slider--intro .bc-slider__line,
.bc-slider--intro .bc-slider__after {
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1), clip-path 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Spin Animation */
@keyframes bcSpinY {
  0% { transform: perspective(1000px) rotateY(0deg); }
  100% { transform: perspective(1000px) rotateY(360deg); }
}
.bc-is-loading {
  animation: bcSpinY 0.7s linear infinite;
  pointer-events: none;
}
.bc-stopping {
  animation: bcSpinY 1.5s ease-out forwards;
  pointer-events: none;
}

/* Background Animation */
@keyframes bcBgZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

/* =========================================
   ✅ DESKTOP MEDIA QUERY (Unified)
   ========================================= */
@media (min-width: 1024px) {
  .bc-app { min-height: var(--bc-section-min-h-desktop); --bc-handle-size: 52px; }
  .bc-app::before { background-image: var(--bc-bg-desktop); }
  .bc-shell { gap: var(--bc-gap-topbar); } /* Default gap is fine usually */
  
  .bc-topbar { padding: 14px 54px; --bc-topbar-offset: -60px; }
  .bc-topbar__title { font-size: 18px; letter-spacing: 0.48em; }
  
  .bc-main { flex-direction: row; gap: var(--bc-gap-main-desktop); }
  .bc-left, .bc-right { width: 45%; height: var(--bc-card-h-desktop); }
  
  .bc-icons { flex-direction: column; gap: var(--bc-icons-gap-desktop); padding: 0; }
  .bc-iconBtn {
    width: var(--bc-icon-size-desktop); height: var(--bc-icon-size-desktop);
    padding: 8px; border-radius: 16px;
  }
  .bc-iconBtn.is-active { transform: scale(var(--bc-icon-active-scale-desktop)); }
  
  .bc-product { padding: 24px; }
  .bc-product__imageWrap { margin-bottom: 18px; }
  .bc-product__meta { gap: 18px; }
  .bc-product__name { font-size: 22px; letter-spacing: 0.18em; }
  .bc-product__tag { font-size: 14px; letter-spacing: 0.28em; }
  .bc-product__btn { font-size: 14px; padding: 14px 70px; border-radius: 16px; }
  
  .bc-slider__label { bottom: 16px; font-size: 11px; padding: 7px 15px; }
}