/* Shared glass primitives extracted from the homepage. */
/* ═══════════════════════════════════════════════════════
   Apple iOS 26 Liquid Glass — matched to Figma reference
   ═══════════════════════════════════════════════════════ */

.liquid-glass-filter {
  filter: url(#liquid-distort);
}

.glass-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2rem) saturate(200%) brightness(1.08);
  -webkit-backdrop-filter: blur(2rem) saturate(200%) brightness(1.08);
  border: 0.0625rem solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 0.09375rem 0 rgba(255, 255, 255, 0.90),
    inset 0 -0.0625rem 0 rgba(0, 0, 0, 0.08),
    0 0.125rem 0.5rem rgba(0, 0, 0, 0.06),
    0 0.5rem 2rem rgba(0, 0, 0, 0.08),
    0 1.5rem 3rem rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 100% 45% at 50% 0%,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(255, 255, 255, 0.12) 45%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.glass-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 70% 30% at 50% 100%,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.glass-panel.on-light {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(255, 255, 255, 0.80);
}

.ios26-liquid-pill {
  position: relative;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(1.25rem) saturate(180%);
  -webkit-backdrop-filter: blur(1.25rem) saturate(180%);
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.1),
    0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.ios26-liquid-pill::marker {
  content: '';
}

.ios26-liquid-pill .ios26-liquid-pill__ring {
  position: absolute;
  top: 0.0625rem;
  left: 0.0625rem;
  right: 0.0625rem;
  bottom: 0.0625rem;
  border-radius: inherit;
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 2;
}

.ios26-liquid-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 100% 45% at 50% 0%,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(255, 255, 255, 0.12) 45%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.ios26-liquid-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 70% 30% at 50% 100%,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.ios26-liquid-pill>* {
  position: relative;
  z-index: 2;
}

/* ── NAVBAR PILL: allow nav links to be visible (not clipped) on desktop ── */
#smart-navbar .ios26-liquid-pill {
  overflow: visible;
}

/* ── Restore the visual glass effect using a pseudo-clipping wrapper ── */
#smart-navbar .nav-pill-bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

#smart-navbar .nav-pill-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 100% 45% at 50% 0%,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(255, 255, 255, 0.12) 45%,
      transparent 70%);
}

#smart-navbar .nav-pill-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 70% 30% at 50% 100%,
      rgba(255, 255, 0, 0.15) 0%,
      transparent 70%);
}

.glass-pill {
  position: relative;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(1.25rem) saturate(180%);
  -webkit-backdrop-filter: blur(1.25rem) saturate(180%);
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.1),
    0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.glass-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 100% 45% at 50% 0%,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(255, 255, 255, 0.12) 45%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.glass-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 70% 30% at 50% 100%,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.glass-pill>* {
  position: relative;
  z-index: 2;
}

.liquid-glass {
  position: relative;
  --lg-border-radius: 0.75rem;
  --lg-border-alpha: 0.28;
  --lg-fill-alpha: 0.08;
  --lg-blur: 1.125rem;
  --lg-sat: 145%;
  --lg-brightness: 1.05;
  --lg-contrast: 1.02;
  --lg-shadow: 0 0.625rem 1.75rem rgba(0, 0, 0, 0.22), 0 1.625rem 4rem rgba(0, 0, 0, 0.14);
  --lg-glow: 0 0 0 rgba(79, 70, 229, 0);
  border-radius: var(--lg-border-radius);
  background: rgba(255, 255, 255, var(--lg-fill-alpha));
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat)) brightness(var(--lg-brightness)) contrast(var(--lg-contrast));
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat)) brightness(var(--lg-brightness)) contrast(var(--lg-contrast));
  border: 0.0625rem solid rgba(255, 255, 255, var(--lg-border-alpha));
  box-shadow:
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.55),
    inset 0 -0.0625rem 0 rgba(0, 0, 0, 0.10),
    var(--lg-shadow),
    var(--lg-glow);
  overflow: hidden;
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 120% 70% at 50% -10%,
      rgba(255, 255, 255, 0.40) 0%,
      rgba(255, 255, 255, 0.12) 32%,
      rgba(255, 255, 255, 0.06) 48%,
      transparent 72%);
  pointer-events: none;
  z-index: 2;
}

.liquid-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 70% 26% at 50% 110%,
      rgba(255, 255, 255, 0.12) 0%,
      transparent 68%),
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, 0.035) 0px,
      rgba(255, 255, 255, 0.035) 1px,
      rgba(255, 255, 255, 0.00) 2px,
      rgba(255, 255, 255, 0.00) 4px);
  opacity: 0.55;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
}

.liquid-glass>* {
  position: relative;
  z-index: 3;
}

.liquid-glass {
  transform: translateZ(0);
  will-change: transform;
}

.liquid-glass.rim-sheen {
  border-color: rgba(255, 255, 255, 0.32);
}

.liquid-glass.rim-sheen:focus-within,
.liquid-glass.rim-sheen:hover {
  --lg-fill-alpha: 0.09;
  --lg-glow: 0 0.875rem 2.75rem rgba(79, 70, 229, 0.12);
}

.liquid-glass.lg-shadow-sm {
  --lg-shadow: 0 0.5rem 1.375rem rgba(0, 0, 0, 0.20), 0 1.375rem 3.625rem rgba(0, 0, 0, 0.12);
}

.liquid-glass.lg-glow-sm {
  --lg-glow: 0 0.875rem 2.75rem rgba(79, 70, 229, 0.10);
}

.crystal-glass {
  position: relative;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(1rem) saturate(160%) brightness(1.02);
  -webkit-backdrop-filter: blur(1rem) saturate(160%) brightness(1.02);
  border: 0.0625rem solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.90),
    inset 0 -0.0625rem 0 rgba(0, 0, 0, 0.04),
    0 0.125rem 0.5rem rgba(0, 0, 0, 0.05),
    0 0.5rem 1.5rem rgba(0, 0, 0, 0.07);
  overflow: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);

  /* ═══════════════════ ADD THESE CODES TO RESOLVE THE ARTIFACT ═══════════════════ */
  outline: 0.0625rem solid transparent;
  /* Forces Chrome to antialias the outer border-box smoothly */
  backface-visibility: hidden;
  /* Promote to GPU rasterization to eliminate subpixel shift */
  -webkit-backface-visibility: hidden;
  background-clip: padding-box;
  /* Clips background colors precisely within the border boundary */
  -webkit-background-clip: padding-box;
}

.crystal-glass img {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  outline: 0.0625rem solid transparent;
}

.crystal-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 100% 35% at 50% 0%,
      rgba(255, 255, 255, 0.40) 0%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.glass-panel,
.liquid-glass,
.crystal-glass {
  transition: background 0.15s ease-out, border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.glass-panel input {
  background: transparent;
}

/* Shared primary glass action button. */
/* ── ADD TO CART — Liquid Glass Button ── */
.cart-btn-glass {
  position: relative;
  background: #4f46e5;
  backdrop-filter: blur(1.25rem) saturate(180%);
  /* 20px */
  -webkit-backdrop-filter: blur(1.25rem) saturate(180%);
  border: 0.0625rem solid rgba(255, 255, 255, 0.10);
  /* 1px */
  box-shadow:
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.10),
    inset 0 -0.0625rem 0 rgba(0, 0, 0, 0.15),
    0 0.125rem 0.25rem rgba(0, 0, 0, 0.18),
    0 0.375rem 0.875rem rgba(79, 70, 229, 0.35);
  color: #ffffff;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease, background 0.25s ease;
}

.cart-btn-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 100% 45% at 50% 0%,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0.05) 45%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.cart-btn-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 70% 30% at 50% 100%,
      rgba(255, 255, 255, 0.18) 0%,
      transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.cart-btn-glass>* {
  position: relative;
  z-index: 2;
}

.cart-btn-glass:hover {
  background: #4f46e5;
  box-shadow:
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.15),
    inset 0 -0.0625rem 0 rgba(0, 0, 0, 0.18),
    0 0.25rem 0.5rem rgba(0, 0, 0, 0.22),
    0 0.625rem 1.5rem rgba(79, 70, 229, 0.50);
  transform: translateY(-0.0625rem);
  /* -1px */
}
