/* Customer portal. Mobile-first. Logical properties only, so Arabic (RTL) mirrors without special cases. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.fjp {
  margin: 0; background: var(--fj-canvas-gradient); color: var(--fj-text);
  font-family: var(--fj-font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.fjp h1, body.fjp h2, body.fjp h3, body.fjp p { margin: 0; }
body.fjp button, body.fjp input, body.fjp textarea { font: inherit; color: inherit; }
body.fjp a { color: var(--fj-green); }
.fjp :focus-visible { outline: 3px solid var(--fj-focus); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.app { max-inline-size: 1040px; margin-inline: auto; padding: 16px 16px calc(150px + env(safe-area-inset-bottom)); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 14px; }
.page-head .eyebrow { color: var(--fj-muted); font-size: 13px; }
.page-head h1 { font-size: 22px; line-height: 1.25; font-weight: 700; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fj-text) !important; font-weight: 700; }
.brand img { inline-size: 36px; block-size: 36px; border-radius: 10px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-block-size: 44px; min-inline-size: 44px; padding-inline: 14px;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95); border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--fj-text); text-decoration: none;
  box-shadow: 0 2px 8px rgba(22, 34, 24, 0.06);
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.icon-btn:hover {
  border-color: #1A5F32;
  color: #1A5F32;
  background: #FFFFFF;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px -2px rgba(26, 95, 50, 0.2);
}
.icon-btn:hover svg {
  transform: scale(1.12);
  color: #1A5F32;
}
.icon-btn svg {
  inline-size: 20px; block-size: 20px;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), color 220ms ease;
}
.icon-btn:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 2px 4px rgba(26, 95, 50, 0.15);
}
html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  min-block-size: 44px; padding-inline: 18px; border-radius: var(--fj-radius-sm);
  border: 1px solid var(--fj-primary-500); background: linear-gradient(135deg, #1A5F32 0%, #24753F 100%);
  color: var(--fj-off-white) !important;
  font-weight: 700; font-size: 15px; cursor: pointer;
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 10px rgba(26, 95, 50, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 450ms ease;
  pointer-events: none;
}
.btn:hover:not([disabled]) {
  background: linear-gradient(135deg, #16532B 0%, #298246 100%);
  border-color: #16532B;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px -2px rgba(26, 95, 50, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.btn:hover:not([disabled])::after {
  transform: translateX(100%);
}
.btn:active:not([disabled]) {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 6px rgba(26, 95, 50, 0.2);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.85);
  color: #1A5F32 !important;
  border: 1px solid rgba(26, 95, 50, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 6px rgba(22, 34, 24, 0.05);
}
.btn-outline:hover:not([disabled]) {
  background: rgba(26, 95, 50, 0.08);
  border-color: #1A5F32;
  color: #145028 !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(26, 95, 50, 0.18);
}
.btn-outline:active:not([disabled]) {
  transform: translateY(1px) scale(0.97);
}
.btn-block { inline-size: 100%; }
.btn-sm { min-block-size: 40px; padding-inline: 14px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; inline-size: 20px; block-size: 20px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: fj-spin .7s linear infinite;
}
.btn-outline.is-loading::after { border-color: color-mix(in srgb, var(--fj-green) 30%, transparent); border-top-color: var(--fj-green); }
@keyframes fj-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- banners, alerts, empty ---------- */
.notice {
  background: linear-gradient(135deg, rgba(26, 95, 50, 0.94) 0%, rgba(35, 122, 64, 0.94) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-block-end: 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 16px rgba(26, 95, 50, 0.16);
}
.notice strong { font-weight: 700; }
.alert { border-radius: var(--fj-radius-sm); padding: 12px 14px; font-size: 14px; margin-block: 12px; }
.alert-error { background: var(--fj-err-bg); color: var(--fj-err-fg); }
.alert-warn { background: var(--fj-warn-bg); color: var(--fj-warn-fg); }
.empty { text-align: center; padding: 40px 16px; color: var(--fj-muted); }
.empty h2 { color: var(--fj-text); font-size: 18px; margin-block-end: 6px; }
.empty .btn { margin-block-start: 16px; }
.skeleton { background: linear-gradient(90deg, #f1e8db 25%, #f8f1e6 37%, #f1e8db 63%); background-size: 400% 100%; animation: fj-shimmer 1.3s ease infinite; border-radius: var(--fj-radius); min-block-size: 120px; }
@keyframes fj-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- catalog ---------- */
.pills {
  display: flex;
  gap: 8px;
  margin-block-end: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding-inline: 4px;
}
.pill {
  flex: 0 0 auto;
  min-block-size: 38px;
  padding-inline: 18px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px rgba(22, 34, 24, 0.05);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--fj-text);
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pill:hover {
  border-color: #1A5F32;
  color: #1A5F32;
  background: #FFFFFF;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 16px rgba(26, 95, 50, 0.18);
}
.pill[aria-pressed="true"] {
  background: linear-gradient(135deg, #1A5F32 0%, #267941 100%);
  border-color: #1A5F32;
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 95, 50, 0.35);
  transform: scale(1.02);
}
.pill[aria-pressed="true"]:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 8px 22px rgba(26, 95, 50, 0.45);
}

/* Staggered entrance animation for catalog items */
@keyframes fj-stagger-fade-up {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }
  65% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

.grid .product {
  animation: fj-stagger-fade-up 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--item-idx, 0) * 45ms);
  will-change: transform, opacity;
}

.card { background: var(--fj-card); border: 1px solid var(--fj-border); border-radius: var(--fj-radius); box-shadow: var(--fj-shadow); }
.product {
  position: relative;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px -2px rgba(22, 34, 24, 0.06), inset 0 1px 1px #fff;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 240ms cubic-bezier(0.16, 1, 0.3, 1), border-color 240ms ease;
}
.product:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 32px -4px rgba(22, 34, 24, 0.14), 0 0 0 1px rgba(26, 95, 50, 0.18), inset 0 1px 1px #fff;
  border-color: rgba(26, 95, 50, 0.25);
}
.product .tile {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0%, rgba(240, 246, 238, 0.75) 100%);
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-block-end: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(22, 34, 24, 0.04);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.product .tile img {
  inline-size: 78%;
  block-size: 78%;
  object-fit: contain;
  border-radius: 12px;
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 65%, rgba(0, 0, 0, 0.75) 82%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 65%, rgba(0, 0, 0, 0.75) 82%, transparent 100%);
  filter: drop-shadow(0 6px 12px rgba(22, 34, 24, 0.12));
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), filter 280ms ease;
}
.product:hover .tile img {
  transform: scale(1.08) translateY(-4px);
  filter: drop-shadow(0 12px 20px rgba(22, 34, 24, 0.2));
}
.product .badge-new {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  background: linear-gradient(135deg, #E67B13 0%, #F59E0B 100%);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(230, 123, 19, 0.35);
  z-index: 2;
}
.product .name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  color: #111827;
  margin: 0;
  min-block-size: 35px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product .size {
  color: var(--fj-muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  margin-block: 2px 3px;
  display: block;
}
.product .price { font-weight: 800; font-size: 15px; color: #145028; margin-block: 2px 4px; }
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-block-end: 6px;
  background: rgba(22, 34, 24, 0.04);
  border-radius: 12px;
  padding: 3px;
}
.stepper button {
  inline-size: 38px;
  block-size: 38px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: #fff;
  box-shadow: 0 1px 3px rgba(22, 34, 24, 0.08);
  font-size: 18px;
  font-weight: 700;
  display: grid;
  place-items: center;
  color: #1A5F32;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}
.stepper button:hover:not(:disabled) {
  border-color: #1A5F32;
  background: #1A5F32;
  color: #FFFFFF;
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(26, 95, 50, 0.35);
}
.stepper button:active:not(:disabled) {
  transform: scale(0.9);
  background: #145028;
}
.stepper button:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.stepper output { min-inline-size: 26px; text-align: center; font-size: 15px; font-weight: 800; color: #111827; font-variant-numeric: tabular-nums; }

/* ---------- sticky bars ---------- */
.cartbar {
  position: fixed;
  inset-inline: 12px;
  inset-block-end: calc(76px + env(safe-area-inset-bottom));
  z-index: 90;
  padding: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  transition: inset-block-end 300ms ease, opacity 250ms ease, transform 250ms ease;
}
.cartbar .btn {
  pointer-events: auto;
  inline-size: 100%;
  max-inline-size: 380px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-block-size: 50px;
  padding-inline: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1A5F32 0%, #237A40 100%);
  box-shadow: 0 12px 28px -4px rgba(26, 95, 50, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 700;
  font-size: 14.5px;
}
.cartbar .btn:hover { color: #fff; transform: translateY(-1px); }

/* ---------- bottom nav (centralized floating glass dock on mobile & desktop) ---------- */
.bottom-nav {
  position: fixed;
  inset-inline: 12px;
  inset-block-end: calc(12px + env(safe-area-inset-bottom));
  z-index: 95;
  background: transparent;
  border: none;
  padding: 0;
  pointer-events: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
}

.bottom-nav ul.nav-dock,
.bottom-nav ul {
  pointer-events: auto;
  list-style: none;
  display: flex;
  margin: 0 auto;
  padding: 6px 8px;
  inline-size: 100%;
  max-inline-size: 380px;
  position: relative;
  align-items: center;
  justify-content: space-around;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px -6px rgba(22, 34, 24, 0.16),
              0 0 0 1px rgba(26, 95, 50, 0.08),
              inset 0 1px 2px rgba(255, 255, 255, 0.95);
}

.bottom-nav li.nav-dock-item,
.bottom-nav li {
  flex: 1;
  display: flex;
  justify-content: center;
}

.bottom-nav a.nav-link,
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-block-size: 48px;
  padding: 4px 8px;
  text-decoration: none;
  color: var(--fj-muted);
  font-size: 11.5px;
  font-weight: 700;
  position: relative;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav a:hover,
.bottom-nav a:focus-visible {
  color: #1A5F32;
}

.nav-icon-wrap {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 5px rgba(22, 34, 24, 0.06), inset 0 1px 1px #fff;
  color: #1A5F32;
  transition: all 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-icon-wrap svg,
.bottom-nav a svg {
  inline-size: 19px;
  block-size: 19px;
  stroke-width: 2.2;
}

.bottom-nav a[aria-current="page"] {
  color: #1A5F32;
  font-weight: 800;
}

.bottom-nav a[aria-current="page"] .nav-icon-wrap {
  background: linear-gradient(135deg, #1A5F32 0%, #2A7E47 100%);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(26, 95, 50, 0.38), inset 0 1px 2px rgba(255, 255, 255, 0.45);
  transform: scale(1.06);
}

.bottom-nav a:active .nav-icon-wrap {
  transform: scale(0.92);
}

.bottom-nav a:hover:not([aria-current="page"]) {
  color: #1A5F32;
}

.bottom-nav a:hover:not([aria-current="page"]) .nav-icon-wrap {
  transform: translateY(-2px) scale(1.1);
  background: #FFFFFF;
  border-color: #1A5F32;
  box-shadow: 0 4px 12px rgba(26, 95, 50, 0.22);
}

.nav-indicator {
  display: none !important; /* remove awkward full-width line */
}

/* ==========================================================================
   Desktop View Optimization: Centralized Floating Glass Dock with 3D Depth
   ========================================================================== */
@media (min-width: 768px) {
  .bottom-nav {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 24px;
    background: transparent;
    border: none;
    padding: 0;
    pointer-events: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .bottom-nav ul.nav-dock,
  .bottom-nav ul {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    inline-size: auto;
    max-inline-size: none;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 48px -10px rgba(22, 34, 24, 0.18),
                0 0 0 1px rgba(26, 95, 50, 0.08),
                inset 0 1px 2px rgba(255, 255, 255, 0.95);
    margin-inline: auto;
  }

  .bottom-nav li.nav-dock-item,
  .bottom-nav li {
    flex: 0 0 auto;
  }

  .bottom-nav a.nav-link,
  .bottom-nav a {
    flex-direction: row;
    gap: 10px;
    padding: 6px 18px 6px 10px;
    min-block-size: 50px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--fj-text-muted);
    border: 1px solid transparent;
  }

  .nav-icon-wrap {
    inline-size: 38px;
    block-size: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 8px rgba(22, 34, 24, 0.07), inset 0 1px 1px #fff;
    color: #1A5F32;
  }

  .nav-icon-wrap svg,
  .bottom-nav a svg {
    inline-size: 21px;
    block-size: 21px;
    stroke-width: 2.25;
  }

  /* Active Item with Deep Pill & Radiant Tile */
  .bottom-nav a[aria-current="page"] {
    color: #145028;
    background: rgba(26, 95, 50, 0.09);
    border-color: rgba(26, 95, 50, 0.16);
    box-shadow: inset 0 1px 2px rgba(26, 95, 50, 0.08);
  }

  .bottom-nav a[aria-current="page"] .nav-icon-wrap {
    background: linear-gradient(135deg, #1A5F32 0%, #2A7E47 100%);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 18px -2px rgba(26, 95, 50, 0.42),
                0 3px 6px rgba(26, 95, 50, 0.22),
                inset 0 1px 2px rgba(255, 255, 255, 0.45);
    transform: translateY(-1px) scale(1.06);
  }

  /* Hover micro-interaction on Desktop */
  .bottom-nav a:hover:not([aria-current="page"]) {
    color: #1A5F32;
    background: rgba(255, 255, 255, 0.55);
  }

  .bottom-nav a:hover:not([aria-current="page"]) .nav-icon-wrap {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(22, 34, 24, 0.11), inset 0 1px 1px #fff;
    background: #FFFFFF;
  }

  /* Cart bar sits cleanly above the floating dock on desktop */
  .cartbar {
    inset-block-end: 98px;
    inset-inline: 0;
  }
  .cartbar .btn {
    max-inline-size: 460px;
  }
}

/* Fluid responsive adaptation for compact mobile viewports */
@media (max-width: 480px) {
  .app,
  #shop.shop-layout {
    padding-inline: 12px;
  }
  .catalog-panel {
    padding: 14px 10px 28px;
    border-radius: 18px;
  }
  .grid {
    gap: 10px;
  }
  .product {
    padding: 8px 8px 10px;
    border-radius: 16px;
  }
  .product .tile {
    border-radius: 12px;
  }
  .product .name {
    font-size: 13px;
    min-block-size: 32px;
  }
  .product .price {
    font-size: 14px;
  }
  .stepper {
    padding: 2px;
  }
  .stepper button {
    inline-size: 34px;
    block-size: 34px;
    font-size: 16px;
  }
  .stepper output {
    min-inline-size: 22px;
    font-size: 14px;
  }
  .btn-sm {
    min-block-size: 38px;
    font-size: 13.5px;
  }
  .bottom-nav ul.nav-dock,
  .bottom-nav ul {
    max-inline-size: 350px;
    padding: 5px 6px;
  }
  .cartbar .btn {
    max-inline-size: 350px;
  }
}
@media (min-width: 900px) {
  .app { padding-block-end: 140px; }
}

/* ---------- cart / checkout ---------- */
.checkout { display: grid; gap: 16px; }
@media (min-width: 900px) { .checkout { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: start; } .summary { position: sticky; inset-block-start: 16px; } }
.line { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; }
.line + .line { border-block-start: 1px solid var(--fj-border); }
.line .thumb { inline-size: 48px; block-size: 48px; border-radius: 12px; background: var(--fj-bg); display: grid; place-items: center; }
.line .thumb img { inline-size: 32px; block-size: 32px; }
.line .meta .name { font-weight: 700; }
.line .meta .sub { color: var(--fj-muted); font-size: 13px; }
.line .ctrl { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line .ctrl .stepper { margin: 0; gap: 4px; }
.line .ctrl .stepper button { inline-size: 40px; block-size: 40px; }
.link-btn { background: none; border: 0; color: var(--fj-muted); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px; min-block-size: 32px; }
.link-btn:hover { color: var(--fj-err-fg); }
.section { padding: 16px; }
.section h2 { font-size: 16px; font-weight: 700; }
.section .hint { color: var(--fj-muted); font-size: 13px; margin-block-end: 12px; }
.dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.date {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; min-block-size: 64px; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--fj-border); background: var(--fj-card);
}
.date .d { font-weight: 700; font-size: 15px; }
.date .s { font-size: 11px; color: var(--fj-muted); }
.date:hover:not(:disabled) { border-color: var(--fj-green-2); }
.date:disabled { background: color-mix(in srgb, var(--fj-border) 35%, var(--fj-card)); color: var(--fj-muted); cursor: not-allowed; }
.date[aria-pressed="true"] { background: var(--fj-green); border-color: var(--fj-green); color: #fff; }
.date[aria-pressed="true"] .s { color: #fff; }
.textarea {
  inline-size: 100%; min-block-size: 84px; padding: 12px; border: 1px solid var(--fj-border); border-radius: var(--fj-radius-sm);
  background: var(--fj-card); resize: vertical;
}
.textarea:focus { border-color: var(--fj-green-2); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; color: var(--fj-muted); }
.sum-row.total { color: var(--fj-text); font-weight: 800; font-size: 18px; border-block-start: 1px solid var(--fj-border); padding-block-start: 12px; margin-block-start: 6px; }
.sum-lines { font-size: 14px; }
.sum-lines div { display: flex; justify-content: space-between; gap: 8px; padding-block: 2px; }
.success { text-align: center; padding: 32px 20px; }
.success .check { inline-size: 64px; block-size: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--fj-ok-bg); color: var(--fj-ok-fg); display: grid; place-items: center; }
.success h2 { font-size: 22px; }
.success p { color: var(--fj-muted); margin-block: 6px 18px; }

/* ---------- forms (login) ---------- */
.auth { min-block-size: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card {
  inline-size: 100%; max-inline-size: 400px; padding: 32px 24px;
  background: var(--fj-glass-2-bg); backdrop-filter: var(--fj-glass-2-blur); -webkit-backdrop-filter: var(--fj-glass-2-blur);
  border: 1px solid var(--fj-glass-2-border); border-radius: var(--fj-radius-lg); box-shadow: var(--fj-glass-3-shadow);
  position: relative; overflow: hidden;
}
.auth-card::before {
  content: ""; position: absolute; inset-block-start: -40px; inset-inline-end: -40px; inline-size: 140px; block-size: 140px;
  background: radial-gradient(circle, rgba(177, 191, 94, 0.22) 0%, transparent 70%); pointer-events: none; border-radius: 50%;
}
.auth-card-leaves { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.auth-leaf { position: absolute; opacity: 0.22; filter: blur(1px); }
.auth-leaf.leaf-top { inset-block-start: -15px; inset-inline-end: -15px; inline-size: 80px; block-size: 80px; transform: rotate(25deg); }
.auth-card > :not(.auth-card-leaves) { position: relative; z-index: 1; }
.auth-top { display: flex; justify-content: flex-end; max-inline-size: 400px; inline-size: 100%; margin-block-end: 12px; }
.auth .logo { inline-size: 72px; block-size: 72px; object-fit: contain; margin: 0 auto 12px; display: block; filter: drop-shadow(0 4px 12px rgba(24, 95, 48, 0.12)); }
.page-head-brand { display: flex; align-items: center; gap: 12px; }
.brand-logo-mark { inline-size: 42px; block-size: 42px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(24, 95, 48, 0.12)); }
.auth h1 { text-align: center; font-size: 22px; font-weight: 700; color: var(--fj-text); }
.auth .sub { text-align: center; color: var(--fj-muted); margin-block: 4px 22px; font-size: 14px; }
.field { margin-block-end: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-block-end: 6px; color: var(--fj-muted); }
.input-wrap { position: relative; }
.input {
  inline-size: 100%; min-block-size: 48px; padding-inline: 14px; border: 1px solid var(--fj-border-hairline); border-radius: var(--fj-radius-md); background: var(--fj-glass-2-bg);
  color: var(--fj-text); transition: all var(--fj-motion-fast);
}
.input:focus { border-color: var(--fj-primary-500); box-shadow: var(--fj-focus-ring); background: var(--fj-white); outline: none; }
.input-wrap .toggle {
  position: absolute; inset-block: 0; inset-inline-end: 4px; min-inline-size: 44px; background: none; border: 0; cursor: pointer; color: var(--fj-muted); display: grid; place-items: center;
}
.input-wrap .toggle svg { inline-size: 22px; block-size: 22px; }
.input-wrap .input.has-toggle { padding-inline-end: 52px; }
.help { color: var(--fj-muted); font-size: 13px; text-align: center; margin-block-start: 16px; }
input[dir="ltr"] { text-align: start; }

/* ---------- account / orders ---------- */
.balance { background: var(--fj-green); color: #fff; border-radius: var(--fj-radius); padding: 18px; margin-block-end: 14px; }
.balance .label { font-size: 13px; opacity: .85; }
.balance .amount { font-size: 30px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.balance .small { font-size: 13px; opacity: .85; margin-block-start: 2px; }
.cols { display: grid; gap: 14px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; } }

.badge { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: var(--fj-radius-full); font-size: 12px; font-weight: 600; white-space: nowrap; letter-spacing: 0.02em; }
.badge.Pending { background: var(--fj-status-pending-bg); color: var(--fj-status-pending-fg); border: 1px solid var(--fj-status-pending-bd); }
.badge.Confirmed { background: var(--fj-status-confirmed-bg); color: var(--fj-status-confirmed-fg); border: 1px solid var(--fj-status-confirmed-bd); }
.badge.Out-for-Delivery { background: var(--fj-status-ofd-bg); color: var(--fj-status-ofd-fg); border: 1px solid var(--fj-status-ofd-bd); }
.badge.Delivered, .badge.Paid { background: var(--fj-status-ok-bg); color: var(--fj-status-ok-fg); border: 1px solid var(--fj-status-ok-bd); }
.badge.Unpaid, .badge.Partially-Paid { background: var(--fj-status-warn-bg); color: var(--fj-status-warn-fg); border: 1px solid var(--fj-status-warn-bd); }

.current { padding: 16px; }
.current .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.current .title { font-weight: 800; }
.current .sub { color: var(--fj-muted); font-size: 13px; }
.steps { list-style: none; margin: 16px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; text-align: center; color: var(--fj-muted); position: relative; }
.steps li::before { content: ""; position: absolute; inset-block-start: 8px; inset-inline-start: -50%; inline-size: 100%; block-size: 3px; background: var(--fj-border); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps .dot { inline-size: 18px; block-size: 18px; border-radius: 50%; background: var(--fj-border); z-index: 1; border: 3px solid var(--fj-card); box-shadow: 0 0 0 1px var(--fj-border); }
.steps li.done .dot { background: var(--fj-green); box-shadow: 0 0 0 1px var(--fj-green); }
.steps li.done::before { background: var(--fj-green); }
.steps li.current-step .dot { background: var(--fj-accent-400); box-shadow: 0 0 0 1px var(--fj-accent-500); }
.steps li.current-step::before { background: var(--fj-green); }
.steps li.done, .steps li.current-step { color: var(--fj-text); font-weight: 600; }

.tabs { display: flex; gap: 4px; background: var(--fj-glass-2-bg); padding: 4px; border-radius: var(--fj-radius-md); border: 1px solid var(--fj-border-subtle); margin-block: 6px 14px; }
.tabs button { flex: 1; min-block-size: 40px; background: none; border: 0; border-radius: var(--fj-radius-sm); font-weight: 600; color: var(--fj-muted); cursor: pointer; transition: all var(--fj-motion-fast); }
.tabs button[aria-selected="true"] { color: var(--fj-primary-700); background: var(--fj-white); box-shadow: var(--fj-shadow-sm); }
.list { display: grid; gap: 14px; }
.item-card {
  padding: 18px 20px;
  background: var(--fj-glass-2-bg);
  backdrop-filter: var(--fj-glass-2-blur);
  -webkit-backdrop-filter: var(--fj-glass-2-blur);
  border: 1px solid var(--fj-glass-2-border);
  box-shadow: var(--fj-glass-2-shadow);
  border-radius: var(--fj-radius);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--fj-shadow-md);
}
.item-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.item-card .id { font-weight: 800; font-size: 16px; color: var(--fj-text); }
.item-card .meta { color: var(--fj-muted); font-size: 13.5px; margin-block-start: 3px; }
.item-card .amt { font-weight: 800; font-size: 17px; text-align: end; font-variant-numeric: tabular-nums; color: var(--fj-primary-700); }
.item-card .amt div { margin-block-start: 4px; }
.item-card .lines { margin: 12px 0 0; padding: 12px 0 0; border-block-start: 1px dashed var(--fj-border); font-size: 14px; display: grid; gap: 6px; }
.item-card .lines div { display: flex; justify-content: space-between; gap: 8px; color: var(--fj-text-secondary); }
.item-card .actions { display: flex; gap: 10px; margin-block-start: 14px; flex-wrap: wrap; }
.statement { inline-size: 100%; border-collapse: collapse; font-size: 14px; }
.statement th, .statement td { padding: 10px 8px; text-align: start; border-block-end: 1px solid var(--fj-border); }
.statement th { font-size: 12px; color: var(--fj-muted); font-weight: 600; }
.statement td.num, .statement th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.footer-actions { display: flex; justify-content: center; margin-block-start: 22px; }

/* ---------- invoice page chrome (the invoice itself is styled in invoice_document.html) ---------- */
.invoice-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; max-inline-size: 794px; margin: 16px auto; padding-inline: 12px; }
.invoice-wrap { padding-block-end: 40px; overflow-x: auto; }
body.fjp-invoice { background: #efe6d8; }
/* ==========================================================================
   Ambient Canvas Background & Floating Leaves
   ========================================================================== */
.ambient-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-canvas::before,
.ambient-canvas::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: drift-blob 22s ease-in-out infinite alternate;
}

.ambient-canvas::before {
  inline-size: 500px;
  block-size: 500px;
  background: radial-gradient(circle, rgba(177, 191, 94, 0.28) 0%, transparent 70%);
  inset-block-start: -10%;
  inset-inline-start: -5%;
}

.ambient-canvas::after {
  inline-size: 600px;
  block-size: 600px;
  background: radial-gradient(circle, rgba(26, 95, 50, 0.18) 0%, transparent 70%);
  inset-block-end: -10%;
  inset-inline-end: -10%;
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}

.ambient-leaf {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

@keyframes float-leaf {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(14px, -18px, 0) rotate(8deg); }
  100% { transform: translate3d(-10px, -32px, 0) rotate(-6deg); }
}

@keyframes drift-blob {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(50px, 40px, 0) scale(1.15); }
}


/* ==========================================================================
   Story Hero: Scroll-Driven 4-Chapter Story (Shop)
   Pinned stage, Hello phase, Glide arc, scrubbed reversible chapters,
   accessible stacked headlines, and glass product panel curtain.
   ========================================================================== */

.story {
  position: relative;
  inline-size: 100%;
  min-block-size: 400vh;
  min-block-size: 400svh;
  margin-inline: -16px;
  --bottle-side: right;
}

@media (min-width: 768px) {
  .story {
    margin-inline: -24px;
  }
}

.story__stage {
  position: sticky;
  top: 0;
  inset-block-start: 0;
  inline-size: 100%;
  block-size: 100vh;
  block-size: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  contain: layout paint;
  z-index: 5;
  transition: opacity 400ms ease;
}

/* Ambient Tint Blobs */
.story__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.story__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(65px);
  opacity: 0.26;
  pointer-events: none;
  transition: background 1.2s ease, transform 1.2s ease;
}

.story__blob.b1 {
  inline-size: 420px;
  block-size: 420px;
  inset-block-start: 12%;
  inset-inline-start: 6%;
  background: #B1BF5E;
}

.story__blob.b2 {
  inline-size: 460px;
  block-size: 460px;
  inset-block-end: 8%;
  inset-inline-end: 8%;
  background: #1A5F32;
}

/* Hello Overlay (Phase A) */
.story__hello {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
  transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1), filter 650ms ease, transform 650ms ease;
}

.story__hello-greet {
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #1A5F32;
  text-align: center;
  line-height: 1;
  margin-block-end: 20px;
  transform: translateY(-24px);
  filter: drop-shadow(0 4px 20px rgba(26, 95, 50, 0.16));
}

html[lang="ar"] .story__hello-greet,
[dir="rtl"] .story__hello-greet {
  font-family: Cairo, sans-serif;
  letter-spacing: 0;
}

.story__hello-pill {
  padding: 10px 28px;
  border-radius: var(--fj-radius-full);
  background: var(--fj-glass-2-bg);
  backdrop-filter: var(--fj-glass-2-blur);
  -webkit-backdrop-filter: var(--fj-glass-2-blur);
  border: 1px solid var(--fj-glass-2-border);
  box-shadow: var(--fj-glass-2-shadow);
  font-weight: 700;
  font-size: clamp(15px, 2.4vw, 19px);
  color: var(--fj-text);
  transform: translateY(70px);
  max-inline-size: 85vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story__hello.is-hidden {
  opacity: 0;
  filter: blur(10px);
  transform: scale(0.94);
  visibility: hidden;
  pointer-events: none;
}

.page-head-greeting {
  transition: opacity 450ms ease;
}

.page-head-greeting.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Floating Leaves Layers */
.story__leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
}

.story__leaves--back { z-index: 2; }
.story__leaves--mid { z-index: 4; }
.story__leaves--front { z-index: 7; }

.story__leaf {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.story__leaf img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

/* Story Headlines (Behind bottle, accessible h2s) */
.story__words {
  position: absolute;
  top: 48%;
  inset-block-start: 48%;
  left: clamp(16px, 5vw, 64px);
  right: auto;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
  inline-size: calc(100% - clamp(16px, 5vw, 64px) - 20vw);
  max-inline-size: 880px;
}

[dir="rtl"] .story__words,
html[lang="ar"] .story__words {
  left: clamp(16px, 5vw, 64px);
  right: auto;
  text-align: start;
}

.story__headline {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  margin: 0;
  font-size: clamp(3.2rem, 11.5vw, 7.8rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #1A5F32;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 380ms cubic-bezier(0.22, 1, 0.36, 1), transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
  user-select: none;
  white-space: nowrap;
}

html[lang="ar"] .story__headline,
[dir="rtl"] .story__headline {
  font-family: Cairo, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.story__headline.is-active {
  opacity: 1;
  transform: translateY(0);
}

.story__headline.is-exiting {
  opacity: 0;
  transform: translateY(-26px);
}

.story__headline .char {
  display: inline-block;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1), opacity 350ms ease;
  transition-delay: calc(var(--char-idx, 0) * 28ms);
}

/* Central & Gliding 3D Bottle */
.story__bottle-wrap {
  position: absolute;
  top: 50%;
  inset-block-start: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  contain: layout paint;
  will-change: transform, opacity;
}

.story__bottle-x {
  will-change: transform;
}

.story__bottle-y {
  will-change: transform;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story__bottle-img {
  inline-size: clamp(210px, 34vw, 360px);
  block-size: auto;
  max-block-size: 62svh;
  object-fit: contain;
  filter: drop-shadow(0 18px 36px rgba(10, 31, 18, 0.22));
  display: block;
}

.story__shadow {
  position: absolute;
  inset-block-end: -26px;
  inline-size: 78%;
  block-size: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(10, 31, 18, 0.38) 0%, rgba(10, 31, 18, 0.12) 48%, rgba(10, 31, 18, 0) 72%);
  transform-origin: center;
  filter: blur(5px);
  pointer-events: none;
}

/* Description Glass Cards */
.story__cards {
  position: absolute;
  left: clamp(16px, 5vw, 64px);
  right: auto;
  inset-block-end: clamp(84px, 16svh, 220px);
  z-index: 6;
  pointer-events: auto;
  inline-size: clamp(260px, 32vw, 380px);
}

@media (max-width: 640px) {
  .story__cards {
    left: 16px;
    right: auto;
    inset-block-end: 92px;
    inline-size: calc(100vw - 32px);
    max-inline-size: 320px;
  }
}

[dir="rtl"] .story__cards,
html[lang="ar"] .story__cards {
  left: clamp(16px, 5vw, 64px);
  right: auto;
}

@media (max-width: 640px) {
  [dir="rtl"] .story__cards,
  html[lang="ar"] .story__cards {
    left: 16px;
    right: auto;
  }
}

.story__card {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: 100%;
  padding: 16px 20px;
  border-radius: var(--fj-radius);
  background: var(--fj-glass-2-bg);
  backdrop-filter: var(--fj-glass-2-blur);
  -webkit-backdrop-filter: var(--fj-glass-2-blur);
  border: 1px solid var(--fj-glass-2-border);
  box-shadow: var(--fj-glass-2-shadow);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 350ms cubic-bezier(0.22, 1, 0.36, 1), transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
  pointer-events: none;
}

.story__card.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.story__card.is-exiting {
  opacity: 0;
  transform: translateY(-12px);
}

.story__card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fj-text);
  font-weight: 500;
}

/* Progress Dots */
.story__dots {
  position: absolute;
  inset-inline-end: clamp(10px, 2.5vw, 24px);
  inset-block-start: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 6;
  pointer-events: none;
}

.story__dot {
  inline-size: 6px;
  block-size: 6px;
  border-radius: 999px;
  background: rgba(26, 95, 50, 0.25);
  transition: block-size 300ms var(--fj-ease-spring), background 300ms ease;
}

.story__dot.is-active {
  block-size: 22px;
  background: #1A5F32;
}

/* Skip Button */
.story__skip {
  position: absolute;
  inset-block-end: clamp(24px, 4.5svh, 44px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  inline-size: 46px;
  block-size: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 7;
  background: var(--fj-glass-2-bg);
  backdrop-filter: var(--fj-glass-2-blur);
  -webkit-backdrop-filter: var(--fj-glass-2-blur);
  border: 1px solid var(--fj-glass-2-border);
  box-shadow: var(--fj-shadow-sm);
  color: #1A5F32;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, opacity 300ms ease;
}

.story__skip:hover {
  transform: translateX(-50%) translateY(2px);
  background: var(--fj-white);
  color: #145028;
}

.story__skip:focus-visible {
  outline: var(--fj-focus-outline);
  outline-offset: 3px;
}

/* ==========================================================================
   Shop Layout & Side Flanks (Scroll Animation on Both Sides of Product Listing)
   ========================================================================== */

#shop.shop-layout {
  position: relative;
  inline-size: 100%;
  max-inline-size: 100%;
  padding-block: 16px calc(140px + env(safe-area-inset-bottom));
  padding-inline: 16px;
  margin-inline: auto;
}

@media (min-width: 1100px) {
  #shop.shop-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-inline: clamp(16px, 2.5vw, 48px);
    gap: clamp(16px, 2vw, 40px);
  }
}

.shop-main-col {
  inline-size: 100%;
  max-inline-size: 1040px;
  position: relative;
  z-index: 10;
  margin-inline: auto;
}

/* Side Flanks (Hidden on Mobile & Tablet, Active on Desktop >= 1100px) */
.shop-flank {
  display: none;
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  max-height: 840px;
  flex: 1 1 0;
  min-inline-size: 160px;
  max-inline-size: 340px;
  pointer-events: none;
  user-select: none;
  z-index: 5;
}

@media (min-width: 1100px) {
  .shop-flank {
    display: block;
  }
}

.shop-flank__sticky {
  position: relative;
  inline-size: 100%;
  block-size: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

/* Ambient blobs for flanks */
.flank-ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.24;
  pointer-events: none;
  z-index: 1;
}

.flank-ambient--left {
  inline-size: 260px;
  block-size: 260px;
  top: 20%;
  left: 10%;
  background: radial-gradient(circle, #B1BF5E 0%, #1A5F32 80%);
}

.flank-ambient--right {
  inline-size: 300px;
  block-size: 300px;
  top: 25%;
  right: 5%;
  background: radial-gradient(circle, #E69818 0%, #1A5F32 85%);
}

/* Floating leaves on flanks */
.flank-leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.flank-leaf {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}

.flank-leaf img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  filter: drop-shadow(0 8px 16px rgba(22, 34, 24, 0.12));
}

.flank-leaf--l1 {
  top: 8%;
  inset-inline-start: 10%;
  inline-size: 120px;
  transform: rotate(-18deg);
  opacity: 0.75;
}

.flank-leaf--l2 {
  bottom: 12%;
  inset-inline-end: 8%;
  inline-size: 140px;
  filter: blur(3px);
  transform: rotate(32deg);
  opacity: 0.55;
}

.flank-leaf--r1 {
  top: 8%;
  inset-inline-end: 5%;
  inline-size: 130px;
  transform: rotate(24deg);
  opacity: 0.7;
}

.flank-leaf--r2 {
  bottom: 12%;
  inset-inline-start: 0;
  inline-size: 110px;
  filter: blur(2px);
  transform: rotate(-28deg);
  opacity: 0.6;
}

/* Left Flank: Story cards */
.flank-story {
  position: relative;
  z-index: 4;
  inline-size: 100%;
  max-inline-size: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flank-story__header {
  margin-block-end: 4px;
}

.flank-story__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1A5F32;
  background: rgba(26, 95, 50, 0.08);
  padding: 4px 10px;
  border-radius: var(--fj-radius-full);
  border: 1px solid rgba(26, 95, 50, 0.15);
}

.flank-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--fj-glass-1-bg);
  backdrop-filter: var(--fj-glass-1-blur);
  -webkit-backdrop-filter: var(--fj-glass-1-blur);
  border: 1px solid var(--fj-glass-1-border);
  box-shadow: var(--fj-shadow-sm);
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.45;
  transform: translateX(-4px) scale(0.96);
}

.flank-card.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  background: var(--fj-glass-2-bg);
  border-color: rgba(26, 95, 50, 0.35);
  box-shadow: 0 8px 24px -4px rgba(26, 95, 50, 0.15);
}

.flank-card__title {
  font-size: 14px;
  font-weight: 800;
  color: #1A5F32;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.flank-card__desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--fj-text-muted);
  margin: 0;
}

.flank-dots {
  display: flex;
  gap: 6px;
  margin-block-start: 6px;
  align-items: center;
}

.flank-dot {
  inline-size: 6px;
  block-size: 6px;
  border-radius: 999px;
  background: rgba(26, 95, 50, 0.2);
  transition: all 300ms ease;
}

.flank-dot.is-active {
  inline-size: 18px;
  background: #1A5F32;
}

/* Right Flank: 3D Bottle */
.flank-bottle-container {
  position: relative;
  z-index: 4;
  inline-size: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
}

.flank-bottle-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
  transform-style: preserve-3d;
}

.flank-bottle-img {
  display: block;
  inline-size: clamp(180px, 18vw, 290px);
  block-size: auto;
  filter: drop-shadow(0 20px 32px rgba(22, 34, 24, 0.22));
  transition: filter 300ms ease;
}

.flank-bottle-shadow {
  inline-size: 70%;
  block-size: 24px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(18, 30, 20, 0.32) 0%, rgba(18, 30, 20, 0) 72%);
  margin-block-start: -8px;
  filter: blur(5px);
  will-change: transform, opacity;
}

/* Responsive scaling between 1100px and 1300px */
@media (min-width: 1100px) and (max-width: 1300px) {
  .shop-flank {
    min-inline-size: 150px;
    max-inline-size: 220px;
  }
  .flank-bottle-img {
    inline-size: clamp(150px, 14vw, 210px);
  }
  .flank-story {
    max-inline-size: 210px;
  }
  .flank-card {
    padding: 10px 12px;
  }
  .flank-card__title {
    font-size: 13px;
  }
  .flank-card__desc {
    font-size: 11px;
  }
}

/* Product Catalog Panel */
.catalog-panel {
  position: relative;
  z-index: 10;
  background: var(--fj-glass-1-bg);
  backdrop-filter: var(--fj-glass-1-blur);
  -webkit-backdrop-filter: var(--fj-glass-1-blur);
  border: 1px solid var(--fj-glass-1-border);
  border-radius: 28px;
  box-shadow: 0 4px 28px -4px rgba(22, 34, 24, 0.06);
  padding: 24px 20px 40px;
  margin-block-start: 16px;
}

.catalog-panel-handle {
  inline-size: 42px;
  block-size: 4px;
  border-radius: 999px;
  background: var(--fj-border-strong);
  margin: 0 auto 18px;
}

@media (max-width: 767px) {
  .catalog-panel {
    border-radius: 20px;
    padding: 16px 12px 32px;
    margin-inline: 0;
  }
  .catalog-panel-handle {
    display: none;
  }
}

/* Reduced Motion Mode: keep scroll-linked story running, disable ambient animations */
@media (prefers-reduced-motion: reduce) {
  .story__leaf,
  .ambient-leaf {
    animation: none !important;
  }
}

.fly-clone {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  inline-size: 46px;
  block-size: 46px;
  border-radius: var(--fj-radius-md);
  background: var(--fj-white);
  border: 1px solid var(--fj-border-hairline);
  box-shadow: var(--fj-shadow-md);
  display: grid;
  place-items: center;
}

.fly-clone img {
  inline-size: 32px;
  block-size: 32px;
  object-fit: contain;
}

.cartbar-pulse {
  animation: cart-pop 400ms var(--fj-ease-spring);
}

@keyframes cart-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.stepper button {
  transition: transform var(--fj-dur-fast) var(--fj-ease-spring), background-color var(--fj-dur-fast) ease;
}

.stepper button:active:not(:disabled) {
  transform: scale(0.88);
}

/* ==========================================================================
   Celebratory Order Success Overlay
   ========================================================================== */
.order-success-celebrate {
  position: relative;
  overflow: hidden;
}

.burst-leaves-wrap {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 0;
  block-size: 0;
  pointer-events: none;
  z-index: 0;
}

.burst-leaf {
  position: absolute;
  inline-size: 48px;
  block-size: 48px;
  margin-inline-start: -24px;
  margin-block-start: -24px;
  animation: leaf-burst 900ms var(--fj-ease-std) forwards;
}

.burst-leaf img {
  inline-size: 100%;
  block-size: auto;
  opacity: 0.85;
}

@keyframes leaf-burst {
  0% { transform: translate3d(0, 0, 0) scale(0.2) rotate(0deg); opacity: 1; }
  70% { opacity: 0.9; }
  100% { transform: translate3d(var(--bx), var(--by), 0) scale(0.8) rotate(var(--rot)); opacity: 0; }
}

.order-success-celebrate .check svg {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: draw-check 650ms 200ms ease forwards;
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

/* Portal navigation pulse (the progress bar + leaf loader live in loader.css) */
.bottom-nav a.is-navigating .nav-icon-wrap {
  animation: nav-item-pulse 0.85s ease-in-out infinite alternate;
  background: linear-gradient(135deg, #1A5F32 0%, #2A7E47 100%);
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(26, 95, 50, 0.45);
}
@keyframes nav-item-pulse {
  0% { transform: scale(1.02); filter: brightness(1); }
  100% { transform: scale(1.14); filter: brightness(1.18); }
}

/* ==========================================================================
   Reduced Motion Overrides
   ========================================================================== */
@media (prefers-reduced-motion: reduce), (update: slow) {
  .depth-hero,
  .hero-bottle-wrap,
  .hero-big-word,
  .ambient-canvas,
  .ambient-leaf,
  .depth-leaf,
  .burst-leaf,
  .nav-indicator {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .hero-shadow {
    opacity: 0.45 !important;
    transform: none !important;
  }
}

@media print {
  .no-print,
  .ambient-canvas,
  .depth-hero,
  .burst-leaves-wrap,
  .bottom-nav {
    display: none !important;
  }
  body.fjp-invoice {
    background: #fff !important;
  }
  .invoice-wrap {
    padding: 0 !important;
    overflow: visible !important;
  }
}

