/* ═══════════════════════════════════════════════════════════════════════════
   FurOutlet — Luxury Editorial Design System
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,400;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Palette — warm luxury */
  --cream:        #F8F5F0;
  --surface:      #FFFFFF;
  --text:         #1A1714;
  --text-soft:    #6B6158;
  --text-muted:   #9C948B;
  --accent:       #8B6914;
  --accent-hover: #6B4F0F;
  --accent-light: #F5EDD8;
  --cta:          #1A1714;
  --cta-hover:    #2D2823;
  --danger:       #B91C1C;
  --success:      #15803D;
  --border:       #E8E3DC;
  --border-light: #F0EBE4;
  --overlay-bg:   rgba(26, 23, 20, 0.55);
  --shadow-xs:    0 1px 2px rgba(26,23,20,0.04);
  --shadow-sm:    0 2px 8px rgba(26,23,20,0.06);
  --shadow-md:    0 4px 20px rgba(26,23,20,0.08);
  --shadow-lg:    0 12px 40px rgba(26,23,20,0.12);
  --shadow-xl:    0 20px 60px rgba(26,23,20,0.16);
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-pill:  9999px;

  /* Typography */
  --font-display: 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* Prevent horizontal touch-scrolling on the entire page.
   Do NOT use overflow-x:hidden on html/body — it implicitly sets
   overflow-y:auto, creating a scroll container that breaks
   position:sticky and window scroll events on iOS Safari.
   touch-action:pan-y blocks horizontal gestures at the browser level. */
html, body {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  overscroll-behavior-x: none;
  touch-action: pan-y pinch-zoom;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}
#scroll-container {
  overflow-y: auto;
  height: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#scroll-container::-webkit-scrollbar {
  display: none;
}
/* Lock scroll when multi-select chips are visible */
body.ai-scroll-lock {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
  background: var(--cream);
}
html {
  background: var(--cream);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;                  /* Chrome/Safari/iOS */
}

body {
  font-family: var(--font-body);
  margin: 0;
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Hero / Header ─────────────────────────────────────────────────────── */
.hero {
  background: var(--surface);
  padding: 12px 20px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  overscroll-behavior: contain;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.15s ease;
}

.hero.hero--assistant-open {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 56px - env(safe-area-inset-bottom, 0px));
  padding-bottom: 0;
  overflow: hidden;
}

body:has(.hero.hero--assistant-open) {
  overflow: hidden;
  height: 100dvh;
}

.hero.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  padding: 0;
  border-bottom: none;
  overflow: hidden;
}

/* Top bar: garbage (left) | logo (center) | heart+cart (right) */
.hero-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hero-top-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 44px;
  gap: 4px;
}

.hero-logo-link {
  text-decoration: none;
  color: inherit;
}
.hero-logo-link h1 { position: relative; }
.beta-badge {
  position: absolute;
  top: -6px;
  right: -28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.card-phone-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: #2563EB;
  transition: transform 0.15s;
}

.card-phone-btn:hover {
  transform: scale(1.15);
}

.card-phone-btn:active {
  transform: scale(0.95);
}

.card-phone-btn svg {
  width: 16px;
  height: 16px;
}

.phone-choice-popup {
  position: absolute;
  z-index: 100;
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-light, #e5e5e5);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  left: 50%;
  transform: translateX(-50%);
  bottom: 100%;
  margin-bottom: 6px;
  white-space: nowrap;
}
.phone-choice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
}
.phone-choice-btn:active { transform: scale(0.95); }
.phone-choice-btn--call {
  background: #2563EB;
  color: #fff;
}
.phone-choice-btn--whatsapp {
  background: #25D366;
  color: #fff;
}
.phone-choice-btn--viber {
  background: #7360F2;
  color: #fff;
}
.phone-choice-btn--like {
  background: #e53e3e;
  color: #fff;
}
.phone-choice-btn--wishlist {
  background: #6366f1;
  color: #fff;
}
.phone-choice-btn--unlike {
  background: #6b7280;
  color: #fff;
}
.card-fav-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  background: var(--accent, #8b6914);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  border-radius: 50%;
  min-width: 14px;
  height: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}
.heart-choice-popup {
  position: fixed;
  z-index: 10001;
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-light, #e5e5e5);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
.heart-popup-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #fff;
  color: #6366f1;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-left: 4px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.hero-top-right {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 0 0 auto;
  position: relative;
}

.hero-subtitle {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  max-height: 60px;
  overflow: hidden;
  transition: max-height 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
}

/* Collapsed: only top bar visible */
.hero.collapsed {
  padding-top: 8px;
  padding-bottom: 10px;
}

.hero.collapsed .hero-subtitle,
.hero.hero--assistant-open .hero-subtitle {
  max-height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 6px;
  position: relative;
  border-radius: 50%;
  transition: background 0.2s;
}

#hero-fav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;
}

.hero-action-btn:hover {
  background: var(--accent-light);
}

.hero-badge {
  display: none;
  position: absolute;
  top: 1px;
  right: 1px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.fav-badge-pulse {
  animation: fav-badge-pulse 1.5s ease-in-out infinite;
}

@keyframes fav-badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 105, 20, 0.4); }
  50% { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(139, 105, 20, 0); }
}

.hero-fav-pulse img {
  animation: hero-fav-heart-pulse 1.5s ease-in-out infinite;
}

@keyframes hero-fav-heart-pulse {
  0%, 100% {
    transform: scale(1);
    filter: grayscale(0%) brightness(1);
  }
  50% {
    transform: scale(1.35);
    filter: grayscale(100%) brightness(0.4) sepia(100%) hue-rotate(-50deg) saturate(600%);
  }
}


/* ─── Hamburger Menu ─────────────────────────────────────────────────── */
#hero-hamburger-btn {
  padding: 6px;
}

.hamburger-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--border-light, #e0e0e0);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 160px;
  z-index: 2000;
  overflow: hidden;
}

.hamburger-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #222);
  cursor: pointer;
  white-space: nowrap;
}

.hamburger-menu__item:active {
  background: var(--cream, #f5f5f0);
}

.hamburger-menu__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hamburger-menu__count {
  font-weight: 400;
  opacity: 0.7;
}

.hamburger-menu__item--trash {
  justify-content: space-between;
}
.hamburger-menu__item--trash:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.hamburger-menu__trash-icon {
  margin-left: auto;
}

/* ─── A2HS iOS Instruction Modal ───────────────────────────────────────── */
.a2hs-ios-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.a2hs-ios-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.a2hs-ios-step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
}

.card-trash-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  flex-shrink: 0;
  color: var(--text, #222);
  transition: background 0.2s, transform 0.15s;
}
.card-trash-btn:hover { background: #fce4e4; color: #c0392b; }
.card-trash-btn:active { transform: scale(0.92); }

.card-trash-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  background: var(--accent, #8b6914);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  border-radius: 50%;
  min-width: 14px;
  height: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  padding: 0 2px;
  box-sizing: border-box;
}

.card-cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  flex-shrink: 0;
  color: var(--text, #222);
  transition: background 0.2s, transform 0.15s;
}
.card-cart-btn:hover { background: var(--accent-light, #f0f0f0); }
.card-cart-btn:active { transform: scale(0.92); }

.card-cart-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  background: var(--accent, #8b6914);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  border-radius: 50%;
  min-width: 14px;
  height: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  padding: 0 2px;
  box-sizing: border-box;
}

.trash-badge-pulse {
  animation: trash-badge-pulse 1.5s ease-in-out infinite;
}
@keyframes trash-badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 105, 20, 0.4); }
  50% { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(139, 105, 20, 0); }
}

.cart-badge-pulse {
  animation: cart-badge-pulse 1.5s ease-in-out infinite;
}

@keyframes cart-badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 105, 20, 0.4); }
  50% { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(139, 105, 20, 0); }
}

/* Search form — below the top bar */
.search-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  position: relative;
}

.search-btn {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #1B6B5A;
  background: #1B6B5A;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-btn:hover {
  background: #145247;
  border-color: #145247;
}

.search-btn-pulse {
  animation: search-btn-pulse 1s ease-in-out 3;
}

@keyframes search-btn-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(27, 107, 90, 0.5); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(27, 107, 90, 0); }
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 6px 16px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  flex-shrink: 0;
}
.filter-bar__btn:active {
  background: var(--cream);
}
.filter-bar__btn--main {
  background: #000;
  color: #fff;
  border-color: #000;
}
.filter-bar__btn--main:active {
  background: #333;
}
.filter-bar__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.filter-bar__count {
  font-weight: 400;
  opacity: 0.8;
}


.no-results-keyword {
  color: #B91C1C;
  animation: no-results-pulse 1.5s ease-in-out infinite;
}
@keyframes no-results-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-mag-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.search-mag-btn:hover {
  color: var(--text);
}
.search-mag-pulse {
  animation: search-mag-pulse 0.6s ease-in-out;
}
@keyframes search-mag-pulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.3); color: var(--text); }
}

.search-input {
  padding: 11px 36px 11px 38px;
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.search-clear-btn:hover {
  color: var(--text);
}

#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1000;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: left;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#suggestions li {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  transition: background 0.15s;
}

#suggestions li:last-child {
  border-bottom: none;
}

#suggestions li:hover {
  background: var(--accent-light);
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.suggestion-item__img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #fff;
}
.suggestion-item__info {
  min-width: 0;
}
.suggestion-item__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-item__price {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.suggestion-loading {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  list-style: none;
}

.search-validation {
  display: none;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 2px;
}

/* ─── Typo indicator ──────────────────────────────────────────────────── */
.search-input--typo,
.search-input--typo:focus {
  animation: typo-blink 0.4s ease-in-out 4;
  border-color: #DC2626 !important;
  box-shadow: none !important;
}
@keyframes typo-blink {
  0%, 100% { border-color: #DC2626; box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { border-color: #DC2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.25); }
}
.typo-indicator {
  font-size: 13px;
  color: #DC2626;
  line-height: 1.4;
  text-align: center;
  padding: 4px 0;
  pointer-events: none;
  animation: typo-fade-in 0.25s ease-out;
}
@keyframes typo-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.typo-indicator__arrow {
  font-weight: 700;
  font-size: 14px;
}
.typo-indicator__wrong {
  text-decoration: line-through;
  opacity: 0.7;
}
.typo-indicator__fix {
  color: #15803D;
  text-decoration: none;
}
.typo-indicator__unknown {
  color: #DC2626;
  animation: typo-unknown-pulse 1s ease-in-out infinite;
}
@keyframes typo-unknown-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Grid + Alpha Index wrapper ───────────────────────────────────────── */
.grid-with-index {
  display: flex;
  justify-content: center;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

/* ─── Product Grid ──────────────────────────────────────────────────────── */
#product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px 10px 80px;
  max-width: 700px;
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
}


.product-card {
  background: var(--surface);
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}

.product-card__number {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.5);
  border-radius: 4px;
  padding: 1px 5px;
  opacity: 1;
  pointer-events: none;
  z-index: 3;
}

.product-card:hover {
  box-shadow: var(--shadow-sm);
}

.product-card__title-row {
  display: none;
}

.product-card__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 8px 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.product-card__sku {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 1px;
  letter-spacing: 0.03em;
}

.product-card__body {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-right: 28px;
}

.product-card__body img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-light);
  -webkit-user-drag: none;
}

.product-card__details {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.product-card__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  padding: 2px 8px 8px;
  margin-bottom: 0;
}

.buy-btn {
  background: #6b5010;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  transition: background 0.2s;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@keyframes btn-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.buy-btn-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 6px;
  padding: 0 4px;
  line-height: 1;
}

.buy-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.buy-btn:active {
  transform: translateY(0);
}

/* Image wrap for Poshmark-style card */
.product-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #fff;
}

.product-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative; /* stack over ::before spinner */
  z-index: 1;
}

/* Per-image loading spinner: always painted; the <img> covers it once pixels
   arrive (an img without loaded pixels is transparent). Pure CSS, no JS. */
.product-card__image-wrap::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: rgba(0, 0, 0, 0.45);
  animation: fo-spin 0.9s linear infinite;
  z-index: 0;
  pointer-events: none;
}

.product-card__image-wrap .img-rotator {
  position: relative;
  z-index: 1;
}

.product-card__image-wrap .fav-heart-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.product-card__image-wrap .img-rotator {
  width: 100%;
  height: 100%;
}

/* Hide old card elements in main grid only (not in drawers) */
#product-grid .product-card__actions { display: none; }
#product-grid .product-card__body .buy-btn { display: none; }
#product-grid .product-card__body { display: none; }

/* Sold-out overlay */

/* Favorite heart on product card */
.fav-heart-btn {
  position: relative;
  background: none;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  line-height: 1;
  overflow: visible;
}

.fav-heart-btn:hover {
  transform: scale(1.15);
}

/* Actions row: phone, heart, share, View Product */
.product-card__actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  margin-top: 8px;
  margin-right: 28px;
}

.product-card__actions button,
.product-card__actions a,
.ai-card__header button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.product-card__actions .card-phone-btn {
  position: static;
  top: auto;
  right: auto;
}

.product-card__actions .fav-heart-btn {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.share-icon-btn {
  background: none;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
}

.share-icon-btn:hover {
  color: var(--accent);
  transform: scale(1.15);
}

/* Product link */
.product-link {
  font-size: 13px;
  color: #2e7d32;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  margin-left: auto;
  white-space: nowrap;
}

.product-link:hover {
  color: #1b5e20;
  text-decoration: underline;
}

/* Price styling */
.price-sale {
  color: var(--danger);
  font-weight: 700;
}

.price-original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 13px;
}

/* AI Shopping Assistant */
.ai-assistant {
  max-width: 700px;
  margin: 10px auto 0 auto;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.ai-assistant__question {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: #15803D;
  margin: 8px auto 0 auto;
  max-width: 700px;
  text-align: center;
  line-height: 1.4;
}

.ai-assistant__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  align-content: flex-start;
}

.ai-assistant__levels {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.ai-level {
  text-align: center;
}

.ai-level__label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #15803D;
  margin-bottom: 6px;
}

.ai-level__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.ai-level--entering {
  animation: levelSlideIn 0.25s ease-out;
}

@keyframes levelSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ai-cascade-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding: 0 16px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.ai-cascade-actions .ai-chip-search-btn {
  flex: 1;
  margin-top: 0;
}

.ai-chip {
  display: inline-block;
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s, box-shadow 0.18s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.ai-chip:hover {
  background: var(--cream);
  border-color: var(--text);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(26, 23, 20, 0.10);
}

.ai-chip:active {
  transform: translateY(0);
  box-shadow: none;
}

.ai-chip--view-all {
  background: var(--cream);
  border-style: dashed;
}

.ai-chip-count {
  font-weight: 400;
  opacity: 0.55;
  font-size: 11px;
  margin-left: 1px;
}

.ai-chip-spinner {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
}

.ai-chip-spinner__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8B6914;
  animation: ai-chip-bounce 1s infinite ease-in-out;
}

.ai-chip-spinner__dot:nth-child(2) { animation-delay: 0.15s; }
.ai-chip-spinner__dot:nth-child(3) { animation-delay: 0.3s; }

.ai-chip--pending { opacity: 0.8; }
.ai-chip:disabled { opacity: 0.55; pointer-events: none; }

.ai-chip--selected {
  background: #f0fdf4;
  border-color: #15803D;
  color: var(--text);
  order: -1;
}
.ai-chip--selected:hover {
  background: #dcfce7;
  border-color: #15803D;
  color: var(--text);
}
.ai-chip--selected .ai-chip-count {
  opacity: 0.7;
}

/* iOS-style toggle switch inside chips */
.ai-chip-toggle {
  display: inline-block;
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: #ccc;
  position: relative;
  vertical-align: middle;
  margin-right: 6px;
  transition: background 0.25s;
  flex-shrink: 0;
}
.ai-chip-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.25s;
}
.ai-chip-toggle--on {
  background: #34C759;
}
.ai-chip-toggle--on .ai-chip-toggle__knob {
  transform: translateX(12px);
}

.ai-chip-search-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 24px;
  background: #15803D;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(21,128,61,0.3);
  transition: background 0.18s, transform 0.12s;
}
.ai-chip-search-btn:hover {
  background: #1a5c2e;
  transform: translateY(-1px);
}
.ai-chip-search-btn:disabled {
  background: #ccc;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.ai-chip-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
  padding-bottom: 0;
}
.ai-chip-actions .ai-chip-search-btn {
  flex: 1;
  margin-top: 0;
}
.ai-chip-search-btn--secondary {
  background: #2563EB;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.ai-chip-search-btn--secondary:hover {
  background: #1d4ed8;
}
.ai-chip-search-btn--clear {
  background: #6b7280;
  box-shadow: 0 2px 8px rgba(107,114,128,0.3);
}
.ai-chip-search-btn--clear:hover {
  background: #4b5563;
}

@keyframes ai-chip-bounce {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

.ai-assistant__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 8px auto 0 auto;
  max-width: 700px;
  min-height: 0;
}

.ai-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 14px;
  background: #1A1714;
  color: #fff;
  border: 1.5px solid #1A1714;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.ai-filter-tag__remove {
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  opacity: 0.8;
}

.ai-filter-tag__remove:hover {
  opacity: 1;
}

.ai-filter-sep {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  align-self: center;
}

.ai-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #1A1714;
  background: #fff;
  color: #1A1714;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.ai-nav-btn:active {
  background: #1A1714;
  color: #fff;
}

.ai-assistant__actions {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  z-index: 1099;
  background: #fff;
  padding: 8px 16px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.ai-action-btn {
  padding: 8px 20px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
}

.ai-action-btn:hover {
  background: #f0ebe4;
  border-color: #ccc5bb;
  color: var(--text);
}

.ai-action-btn--primary {
  background: #C8102E;
  border-color: #C8102E;
  color: #fff;
  font-size: 13px;
  padding: 9px 24px;
}

.ai-action-btn--primary:hover {
  background: #A30D25;
  border-color: #A30D25;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
}

/* AI Response */
#ai-response {
  display: none;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0 auto 16px auto;
  max-width: 700px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* AI Product Cards */
.ai-card-wrap {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  max-width: 100%;
  overflow: hidden;
}

.ai-card-wrap:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  transform: translateY(-1px);
}

.ai-card__header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-card__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.ai-card__body {
  display: flex;
  gap: 14px;
  align-items: center;
}

.ai-card__img-link {
  flex-shrink: 0;
}

.ai-card__img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}

.ai-card__img:hover {
  transform: scale(1.05);
}

/* ─── Image Rotator (crossfade) ──────────────────────────────────────── */
.img-rotator {
  position: relative;
  flex-shrink: 0;
}

.img-rotator img {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

/* Only animate crossfade when the rotator engine is actively cycling */
.img-rotator[data-rotating] img {
  transition: opacity 0.8s ease-in-out;
}

.img-rotator img.img-rotator--active {
  opacity: 1;
}

/* Product card rotator (legacy, now handled by .product-card__image-wrap .img-rotator) */

/* AI card rotator: 84×84 */
.ai-card__body .img-rotator {
  width: 84px;
  height: 84px;
}

.ai-card__info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ai-card__price {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.ai-card__desc {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-card__view-link {
  margin: 0;
  font-size: 12px;
  text-align: left;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.ai-card__view-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.ai-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-cards-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
}

/* ─── Drawer + Modal Overlay Animations ─────────────────────────────────── */
.fo-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99998;
  font-family: var(--font-body);
  animation: fo-fade-in 0.25s ease-out;
}

.fo-overlay--drawer {
  background: var(--overlay-bg);
  display: flex;
  justify-content: flex-end;
}

.fo-overlay--modal {
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* Drawer panel */
.fo-drawer {
  background: var(--surface);
  width: min(400px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(26,23,20,0.12);
  animation: fo-slide-in-right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fo-overlay--no-animate,
.fo-overlay--no-animate .fo-drawer {
  animation: none !important;
}

.fo-drawer__header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
}

.fo-drawer__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.fo-drawer__close {
  position: absolute;
  right: 8px;
  padding: 5px 14px;
  border-radius: 18px;
  border: 2px solid var(--border);
  background: var(--cream);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.fo-drawer__close:hover {
  background: var(--border);
  color: var(--text);
}

.fo-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

.fo-drawer__footer {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
}

.fo-drawer__footer .fo-btn--primary {
  background: #1B6B5A;
}

.fo-drawer__footer .fo-btn--primary:hover {
  background: #145247;
}

/* Modal card */
.fo-modal {
  background: var(--surface);
  width: 90%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: fo-scale-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fo-modal--scrollable {
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}

.fo-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  cursor: pointer;
  font-size: 16px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fo-modal__close:hover {
  background: var(--border);
  color: var(--text);
}

.fo-modal__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
}

.fo-modal__subtitle {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0 0 20px;
}

/* ─── Shared UI Components ──────────────────────────────────────────────── */

/* Item row (used in cart, favorites, shared) */
.fo-item-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.fo-item-row__body {
  display: flex;
  gap: 14px;
  align-items: center;
}

.fo-item-row:hover {
  background: var(--cream);
}

.fo-item-row:last-child {
  margin-bottom: 0;
}

.fo-item-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--cream);
  border: 1px solid var(--border-light);
}

.fo-item-img--sm {
  width: 52px;
  height: 52px;
}

.fo-item-info {
  flex: 1;
  min-width: 0;
}

.fo-item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 3px;
  color: var(--text);
}

.fo-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* Quantity controls */
.fo-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fo-qty__btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--cream);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.fo-qty__btn:hover {
  border-color: var(--text);
  background: var(--border);
}

.fo-qty__val {
  font-size: 14px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Buttons */
.fo-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.fo-btn--primary {
  background: var(--cta);
  color: #fff;
}

.fo-btn--primary:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.fo-btn--primary:active {
  transform: translateY(0);
}

.fo-sheet__footer .fo-btn--primary {
  background: #1B6B5A;
}

.fo-sheet__footer .fo-btn--primary:hover {
  background: #145247;
  transform: none;
}

.fo-sheet__footer .fo-btn--primary.fo-btn--disabled {
  cursor: default;
}

.fo-sheet__footer .fo-btn--primary.fo-btn--disabled:hover {
  transform: none;
  background: #1B6B5A;
}

.fo-sheet__footer .fo-btn--primary.fo-btn--select {
  background: var(--accent);
}

.fo-sheet__footer .fo-btn--primary.fo-btn--select:hover {
  background: var(--accent-hover);
}

.fo-btn--secondary {
  background: none;
  color: var(--text-soft);
  padding: 10px;
  font-weight: 500;
  font-size: 13px;
}

.fo-btn--secondary:hover {
  color: var(--text);
}

.fo-btn--outline {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  font-weight: 600;
  font-size: 13px;
}

.fo-btn--outline:hover {
  border-color: var(--text);
  background: var(--cream);
}

.fo-btn--sm {
  padding: 7px 14px;
  width: auto;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.fo-btn--icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px;
  transition: color 0.2s;
}

.fo-btn--icon:hover {
  color: var(--danger);
}

.fo-btn--del {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.6;
  margin-left: 4px;
}

.fo-btn--del:hover {
  background: #FEF2F2;
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: var(--shadow-xs);
}

.fo-btn--del:active {
  transform: scale(0.95);
}

/* Loading spinner */
.fo-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  gap: 20px;
}

.fo-spinner__ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--accent);
  border-right: 3px solid var(--accent);
  animation: fo-spin 0.9s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(139, 105, 20, 0.12);
}

.fo-spinner__text {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

.fo-spinner__dots::after {
  content: '';
  animation: fo-dots 1.4s steps(4, end) infinite;
}

@keyframes fo-spin {
  to { transform: rotate(360deg); }
}

@keyframes fo-dots {
  0%  { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

.ai-chip-spinner-inline {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--border-light);
  border-top: 1.5px solid #8B6914;
  border-radius: 50%;
  animation: fo-spin 0.9s ease-in-out infinite;
  margin-left: 4px;
  vertical-align: middle;
}

/* Input */
.fo-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--surface);
}

.fo-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.fo-input::placeholder {
  color: var(--text-muted);
}

/* Subtotal row */
.fo-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.fo-shipping-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.fo-shipping-note--free {
  color: var(--success);
  font-weight: 500;
}

/* Error text */
.fo-error {
  color: var(--danger);
  font-size: 13px;
  margin: 6px 0 14px;
  min-height: 18px;
}

/* Empty state */
.fo-drawer__body--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fo-empty {
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.fo-empty__text {
  margin: 0;
}

.fo-empty b {
  color: var(--text-soft);
}

/* ─── Cart Empty State Demo ─────────────────────────────────────────── */
.fo-empty-cart-guide {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 0;
}

.fo-cart-demo-card {
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  position: relative;
}

.fo-cart-demo-card .fo-hidden-demo-img {
  background: transparent;
  width: auto;
  height: auto;
}

.fo-cart-demo-add-btn {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  animation: btn-blink 1.5s ease-in-out infinite;
}

.fo-hidden-demo-card {
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  position: relative;
}

.fo-hidden-demo-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  position: relative;
}

.fo-hidden-demo-title {
  flex: 1;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.fo-hidden-demo-x {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  font-size: 15px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: default;
  position: relative;
  z-index: 1;
  animation: fo-demo-x-pulse 3s ease-in-out infinite;
}

.fo-hidden-demo-ring {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(0, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--danger);
  opacity: 0;
  pointer-events: none;
  animation: fo-demo-ring-ping 3s ease-in-out infinite;
}

.fo-hidden-demo-body {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fo-hidden-demo-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  order: 2;
}

.fo-hidden-demo-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.fo-hidden-demo-line {
  height: 8px;
  border-radius: 4px;
  background: var(--border-light);
}

.fo-hidden-demo-swipe-hint {
  position: absolute;
  right: -32px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  animation: fo-demo-swipe-hint 3s ease-in-out infinite;
}

.fo-hidden-demo-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

@keyframes fo-demo-x-pulse {
  0%, 100% { color: var(--text-muted); transform: scale(1); }
  15% { color: var(--danger); transform: scale(1.25); }
  30% { color: var(--text-muted); transform: scale(1); }
}

@keyframes fo-demo-ring-ping {
  0%, 100% { opacity: 0; transform: translate(0, -50%) scale(1); }
  10% { opacity: 0.7; transform: translate(0, -50%) scale(1); }
  30% { opacity: 0; transform: translate(0, -50%) scale(1.8); }
}

@keyframes fo-demo-card-idle {
  0%, 35%, 100% { transform: translateX(0); }
  50% { transform: translateX(-18px); }
  65% { transform: translateX(0); }
}

@keyframes fo-demo-swipe-hint {
  0%, 35%, 70%, 100% { opacity: 0; transform: translateY(-50%) translateX(0); }
  42% { opacity: 0.8; transform: translateY(-50%) translateX(0); }
  58% { opacity: 0.8; transform: translateY(-50%) translateX(-14px); }
  65% { opacity: 0; transform: translateY(-50%) translateX(-14px); }
}

/* ─── Favorites Empty State Demo ─────────────────────────────────────── */
.fo-empty-fav-guide {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 0;
}

.fo-fav-demo-card {
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  position: relative;
}

.fo-fav-demo-heart {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: default;
  position: relative;
  z-index: 1;
  animation: fo-demo-heart-pulse 3s ease-in-out infinite;
}

.fo-fav-demo-pulse {
  animation: fo-demo-heart-pulse 2.5s ease-in-out infinite;
}

.fo-fav-demo-pulse img {
  animation: fo-demo-heart-img 2.5s ease-in-out infinite;
}

@keyframes fo-demo-heart-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 58, 58, 0); }
  50% { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.4); }
}

@keyframes fo-demo-heart-img {
  0%, 100% { filter: grayscale(0%) brightness(1); }
  50% { filter: grayscale(100%) brightness(0.4) sepia(100%) hue-rotate(-50deg) saturate(600%); }
}

.fo-fav-demo-swipe-hint {
  position: absolute;
  left: -32px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  animation: fo-demo-swipe-hint-right 3s ease-in-out infinite;
}

.fo-fav-demo-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

@keyframes fo-demo-heart-pulse {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.3); }
  15% { content: "❤️"; }
  25% { transform: scale(1); }
}


@keyframes fo-demo-card-idle-right {
  0%, 35%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
  65% { transform: translateX(0); }
}

@keyframes fo-demo-swipe-hint-right {
  0%, 35%, 70%, 100% { opacity: 0; transform: translateY(-50%) translateX(0); }
  42% { opacity: 0.8; transform: translateY(-50%) translateX(0); }
  58% { opacity: 0.8; transform: translateY(-50%) translateX(14px); }
  65% { opacity: 0; transform: translateY(-50%) translateX(14px); }
}

/* ─── Cart Empty State Demo ─────────────────────────────────────────── */
.fo-empty-cart-guide {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fo-cart-demo-card {
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  position: relative;
}


.fo-cart-demo-swipe-hint {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fo-demo-cart-arrow 2s ease-in-out infinite;
}

.fo-cart-demo-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

@keyframes fo-demo-cart-arrow {
  0%, 35%, 70%, 100% { opacity: 0; transform: translateX(-50%) translateY(0); }
  42% { opacity: 0.8; transform: translateX(-50%) translateY(0); }
  58% { opacity: 0.8; transform: translateX(-50%) translateY(-8px); }
  65% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

/* ─── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes fo-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fo-slide-in-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@keyframes fo-scale-in {
  from { opacity: 0; transform: scale(0.93) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fo-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ─── Bottom Sheet (option selector) ────────────────────────────────────── */
.fo-overlay--sheet {
  background: var(--overlay-bg);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.fo-sheet {
  background: var(--surface);
  width: 100%;
  max-width: 100%;
  height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(26,23,20,0.18);
  animation: fo-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.fo-sheet__handle {
  display: none;
}

.fo-sheet__hero-image {
  width: 100%;
  display: flex;
  justify-content: center;
  background: #fff;
  overflow: visible;
  align-items: center;
  padding: 16px 0 0;
  margin-bottom: -3px;
  flex-shrink: 0;
}

.fo-sheet__hero-image--compact {
  padding: 4px 0 1px;
}

.fo-sheet__hero-image--compact .fo-sheet__thumb {
  max-width: 60vw;
  max-height: 40vh;
}

.fo-sheet__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1px 20px 1px;
  border-bottom: 1px solid var(--border-light);
  margin-top: 0;
}

.fo-sheet__thumb {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border: 2px solid #fff;
  cursor: pointer;
  transition: opacity 0.6s ease-in-out;
}

.fo-sheet__thumb--fading {
  opacity: 0;
}

/* Lightbox for expanded product image */
.fo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fo-fade-in 0.2s ease;
  cursor: zoom-out;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.fo-lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  animation: fo-scale-in 0.25s ease;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.fo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.fo-lightbox__nav:hover {
  background: rgba(255,255,255,0.3);
}

.fo-lightbox__nav--prev { left: 12px; }
.fo-lightbox__nav--next { right: 12px; }

.fo-lightbox__close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.fo-lightbox__counter {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
}

.fo-sheet__product-info {
  flex: 1;
  min-width: 0;
}

.fo-sheet__product-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fo-sheet__product-sku {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 1px;
  letter-spacing: 0.03em;
}

.fo-sheet__product-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

.fo-sheet__product-price--sale {
  color: var(--danger);
}

.fo-sheet__product-price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

.fo-sheet__close {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--cream);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}

.fo-sheet__close:hover {
  background: var(--border);
  color: var(--text);
}

.fo-sheet__close--top {
  align-self: flex-end;
  margin: 4px 14px 0 0;
}

.fo-sheet__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
  padding: 0px 6px 4px;
  flex-shrink: 0;
  overflow: visible;
}

.fo-sheet__topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fo-sheet__close--topleft {
  padding: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin: 0;
  margin-left: 0;
  font-size: inherit;
  gap: 0;
}

.fo-sheet__share-btn {
  padding: 4px 8px;
  border-radius: 16px;
  border: none;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fo-sheet__share-btn svg {
  width: 14px;
  height: 14px;
}

.fo-sheet__share-btn:hover {
  transform: scale(1.05);
}

.fo-sheet__like-btn {
  padding: 4px 8px;
  border-radius: 16px;
  border: none;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fo-sheet__like-btn svg {
  width: 14px;
  height: 14px;
}

.fo-sheet__like-btn:hover {
  transform: scale(1.05);
}

.fo-sheet__description {
  padding: 1px 20px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
  text-align: center;
}

.fo-sheet__scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.fo-sheet__body {
  padding: 3px 20px;
}

.fo-sheet__footer {
  padding: 14px 20px;
  padding-bottom: max(24px, calc(env(safe-area-inset-bottom, 14px) + 24px));
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* Option group highlight — persistent blink on first unselected group */
.fo-option-group--highlight {
  animation: fo-option-shake 0.4s ease-in-out;
}
.fo-option-group--highlight .fo-option-chips,
.fo-option-group--highlight .fo-option-select {
  outline: 2px solid var(--danger);
  border-radius: var(--radius-md);
  animation: fo-option-blink 1s ease-in-out 0.4s infinite;
}
.fo-option-group--highlight .fo-option-group__label {
  color: var(--danger);
}

@keyframes fo-option-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

@keyframes fo-option-blink {
  0%, 100% { outline-color: var(--danger); }
  50% { outline-color: transparent; }
}

/* Option groups */
.fo-option-group {
  margin-bottom: 16px;
}

.fo-option-group:last-child {
  margin-bottom: 0;
}

.fo-option-group__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fo-option-group__required {
  color: var(--danger);
  margin-left: 2px;
}

/* Option chips */
.fo-option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fo-option-chip {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.fo-option-chip:hover {
  border-color: var(--text-soft);
}

.fo-option-chip--selected {
  border-color: var(--cta);
  background: var(--cta);
  color: #fff;
}

.fo-option-chip--selected:hover {
  border-color: var(--cta-hover);
  background: var(--cta-hover);
}

.fo-option-chip--unavailable {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.fo-option-chip--unavailable:hover {
  border-color: var(--border);
}

/* Native select for options with many values */
.fo-option-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B6158' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.fo-option-select:focus {
  outline: none;
  border-color: var(--cta);
}

/* Out of stock notice in sheet */
.fo-sheet__oos {
  font-size: 13px;
  color: var(--danger);
  margin-top: 4px;
  font-weight: 500;
}

/* Item options text in cart drawer */
.fo-item-options {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* ─── Old checkout box (legacy, hidden) ─────────────────────────────────── */
#checkout-box { display: none; }
#checkout-overlay { display: none !important; }

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #product-grid {
    padding: 10px 8px 80px;
  }

  .hero h1 {
    font-size: 28px;
  }

  /* Prevent iOS auto-zoom on input focus (requires >= 16px) */
  .search-input,
  .fo-input {
    font-size: 16px;
  }

  .fo-drawer {
    width: 100%;
  }
}

@media (hover: none) {
  .product-card:hover {
    box-shadow: none;
  }
}

/* ─── Transfer Cart Toast ──────────────────────────────────────────────── */
.fo-transfer-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cta);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  animation: fo-toast-in 0.3s ease;
  max-width: calc(100vw - 32px);
}

.fo-transfer-toast--error {
  background: var(--danger);
}

@keyframes fo-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Fixed Bottom Footer Tab Bar ──────────────────────────────────────── */
.app-footer {
  position: fixed;
  bottom: 0;
  touch-action: manipulation;
  left: 0;
  right: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-height: 56px;
  background: #fff;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  padding-top: 2px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.app-footer::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: 0;
  right: 0;
  height: 100px;
  background: #fff;
}

.app-footer__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 12px;
  position: relative;
  font-family: var(--font-body);
}

.app-footer__btn:active {
  color: var(--accent);
}
.app-footer__btn--current {
  color: var(--accent);
  pointer-events: none;
}

.app-footer__badge {
  position: absolute;
  top: 0;
  right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ─── Offline Modal ────────────────────────────────────────────────────── */
.fo-offline-icon {
  font-size: 40px;
  margin-bottom: 14px;
  line-height: 1;
}

.fo-offline-msg {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 22px;
}

.fo-offline-ok {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--cta);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}

.fo-offline-ok:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.fo-offline-ok:active {
  transform: translateY(0);
}


/* ─── Card Removal Animation ──────────────────────────────────────────── */
.product-card--removing {
  animation: fo-card-remove 0.25s ease forwards;
  pointer-events: none;
}

@keyframes fo-card-remove {
  to {
    opacity: 0;
    transform: scale(0.92);
  }
}

/* ─── Card Restore Animation ─────────────────────────────────────────── */


/* ─── Delete Undo Toast ──────────────────────────────────────────────── */
.fo-delete-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cta);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 10001;
  animation: fo-toast-in 0.3s ease;
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s, transform 0.2s;
}

.fo-delete-toast__undo {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.fo-delete-toast__undo:hover {
  background: rgba(255,255,255,0.35);
}

/* ─── Swipe-to-Delete ────────────────────────────────────────────────── */
.product-card-swipe-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.swipe-delete-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: var(--danger);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 24px;
  color: #fff;
  font-size: 22px;
  border-radius: var(--radius-md);
  pointer-events: none;
}

/* ─── Batch Delete Mode ──────────────────────────────────────────────── */
.batch-select-btn {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.batch-select-btn:hover {
  border-color: var(--text);
}

.batch-select-btn--active {
  background: var(--cta);
  color: #fff;
  border-color: var(--cta);
}

.product-card--selectable {
  cursor: pointer;
}

.product-card--selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  opacity: 0.85;
}

.batch-check-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  pointer-events: none;
  transition: all 0.15s;
}

.product-card--selected .batch-check-overlay {
  background: #1a7a2e;
  border-color: #1a7a2e;
  color: #fff;
}

.fo-batch-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(26,23,20,0.08);
  animation: fo-toast-in 0.25s ease;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
}

/* ─── Favorites Page ─────────────────────────────────────────────────── */

.fav-page-header {
  display: flex;
  flex-direction: column;
  padding: 12px 10px 0;
  max-width: 700px;
  margin: 0 auto;
}

.fav-page-header__top {
  display: flex;
  align-items: center;
}

.fav-page-header__back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}

.fav-page-header__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  text-align: center;
}

.fav-page-header__spacer {
  width: 34px;
  flex-shrink: 0;
}

.fav-page-header__filter-row {
  display: flex;
  padding: 10px 0;
}

.fav-page-header__filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text);
}

/* Heart button top-right on favorites page */
.product-card__image-wrap .fav-heart-btn--right {
  left: auto;
  right: 6px;
}

/* Product description under title */
.product-card__desc {
  padding: 0 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-soft);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 2px;
}

/* Favorites page action buttons - fixed above footer */
.fav-page-actions {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  z-index: 1099;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

/* Sort sheet for favorites */
.fo-sheet {
  background: var(--surface);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 20px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
}

.fo-sheet__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
}

.fo-sheet__option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: none;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.fo-sheet__option:hover {
  background: var(--accent-light);
}

/* ─── Ask Fur Outlet FAB ───────────────────────────────────────────────── */

.ask-fab {
  position: fixed;
  bottom: 108px;
  right: 16px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.ask-fab:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.ask-fab:active {
  transform: scale(0.97);
}

.ask-fab svg {
  flex-shrink: 0;
}

.ask-fab__label {
  letter-spacing: 0.02em;
}

/* Pulse animation on first visit */
@keyframes ask-fab-pulse {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50% { box-shadow: 0 0 0 8px rgba(139, 105, 20, 0.2), var(--shadow-lg); }
}

.ask-fab--pulse {
  animation: ask-fab-pulse 2s ease-in-out 3;
}

/* Hide FAB when chat is open */
.ask-fab--hidden {
  display: none;
}

/* ─── Chat Overlay ─────────────────────────────────────────────────────── */

.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9100;
  width: 100%;
  max-width: 100vw;
  height: 100dvh;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .chat-overlay {
    top: auto;
    left: auto;
    width: 420px;
    right: 16px;
    bottom: 16px;
    height: 650px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
  }
}

.chat-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  flex-shrink: 0;
  gap: 8px;
}

.chat-overlay__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  white-space: nowrap;
}

.chat-beta-badge {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-left: 4px;
  vertical-align: super;
}

.chat-overlay__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.chat-overlay__action-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
  padding: 0;
}

.chat-overlay__action-btn:hover {
  background: var(--border-light);
}

.chat-overlay__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chat-overlay__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
}

.chat-overlay__close:hover {
  background: var(--border-light);
}

/* Messages area */
.chat-overlay__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}

.chat-overlay__messages::-webkit-scrollbar {
  display: none;
}

/* Input area */
.chat-overlay__input-wrap {
  display: flex;
  gap: 6px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px)) 10px;
  border-top: 1px solid var(--border);
  background: var(--cream);
  flex-shrink: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.chat-overlay__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.chat-overlay__input:focus {
  border-color: var(--accent);
}

.chat-overlay__input::placeholder {
  color: var(--text-muted);
}

.chat-overlay__send {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.chat-overlay__send:hover {
  background: var(--accent-hover);
}

/* Message bubbles */
.chat-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg--assistant {
  align-self: flex-start;
  background: var(--cream);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--cream);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
}

.chat-typing__dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: chat-typing-bounce 1.2s ease-in-out infinite;
}

.chat-typing__dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* Product cards in chat — reuse home grid tile layout */
.chat-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}

/* Follow-up question chips */
.chat-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chat-followup-chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chat-followup-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* Complete the Look section in chat */
.chat-complete-look {
  margin-top: 10px;
}

.chat-complete-look__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.chat-supplemental-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 6px 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 8px;
}

.chat-complete-look__tip {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.chat-complete-look__scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chat-complete-look__scroll::-webkit-scrollbar {
  display: none;
}

.chat-complete-look__item {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
  cursor: pointer;
}

.chat-complete-look__item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.chat-complete-look__item-name {
  font-size: 11px;
  color: var(--text);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-complete-look__item-price {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

/* ─── Auth Modal ─────────────────────────────────────────────────────── */

.auth-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-modal__input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-modal__input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-modal__input::placeholder {
  color: var(--text-soft);
}

.auth-modal__submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity 0.2s;
}

.auth-modal__submit:hover {
  opacity: 0.9;
}

.auth-modal__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-modal__error {
  background: #fff0f0;
  color: #c33;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 4px;
}

.auth-modal__switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  margin: 14px 0 0;
}

.auth-modal__switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-modal__switch a:hover {
  text-decoration: underline;
}

.auth-modal__forgot {
  display: block;
  text-align: right;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  margin-top: -4px;
}

.auth-modal__forgot:hover {
  text-decoration: underline;
}

/* ─── Hidden Count Note ──────────────────────────────────────────────── */
