/* Fruit Up Interactive Kitchen (Campus 03) - 4-Mode Grocery, Bargain, Top Brands & Live Map Styles
   120fps Project Butter transitions, hidden pill scrollbars, dark mode parity, iPhone 390px zero-overflow. */

.fuk-finder-wrap {
  display: grid;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

.fuk-groc-panel {
  display: grid;
  gap: 20px;
  min-width: 0;
  animation: fukTabEnter 200ms var(--spring, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

/* ---------- Top Hub Shell & 4-Pill Sub-Navigation ---------- */
.fuk-groc-hub-bar,
.fuk-groc-section-card,
.fuk-finder-console,
.fuk-route-shell {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border, #e4dfd5);
  border-radius: 24px;
  padding: 20px 22px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-card, 0 10px 30px rgba(7, 17, 11, 0.06));
  min-width: 0;
  max-width: 100%;
}

.fuk-groc-hub-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.fuk-groc-hub-top h2,
.fuk-finder-intro h3,
.fuk-route-top h3 {
  margin: 4px 0 4px;
  font-family: var(--display, Anton, Impact, sans-serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 2.9vw, 2.25rem);
  line-height: 1.05;
  color: var(--text, #141a16);
}

.fuk-finder-intro p,
.fuk-route-top p {
  margin: 0;
  color: var(--text-2, #46524b);
  max-width: 68ch;
  font-size: 0.93rem;
}

.fuk-groc-hub-kpis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fuk-groc-subnav {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  max-width: 100%;
}

.fuk-groc-subnav::-webkit-scrollbar,
.fuk-enc-cats::-webkit-scrollbar,
.fuk-store-chips::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.fuk-groc-pill {
  appearance: none;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 15px;
  border-radius: 16px;
  border: 1.5px solid var(--border-strong, #cfc8ba);
  background: var(--surface-2, #edf5f0);
  color: var(--text, #141a16);
  font-family: var(--body, Inter, sans-serif);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 170ms var(--spring, cubic-bezier(0.22, 1, 0.36, 1)),
              background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.fuk-groc-pill:hover {
  border-color: var(--primary, #155e3a);
  transform: translateY(-1px);
}

.fuk-groc-pill:active {
  transform: scale(0.97);
}

.fuk-groc-pill.is-active {
  background: var(--primary, #155e3a);
  border-color: var(--primary, #155e3a);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(21, 94, 58, 0.22);
}

html[data-theme="dark"] .fuk-groc-pill.is-active {
  background: var(--accent, #19b660);
  border-color: var(--accent, #19b660);
  color: #05180d;
}

.fuk-groc-pill-ico {
  font-size: 1.05rem;
  line-height: 1;
}

.fuk-subnav-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.69rem;
  font-weight: 700;
  background: rgba(21, 94, 58, 0.12);
  color: var(--primary, #155e3a);
}

.fuk-groc-pill.is-active .fuk-subnav-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

html[data-theme="dark"] .fuk-groc-pill.is-active .fuk-subnav-count {
  background: rgba(5, 24, 13, 0.2);
  color: #05180d;
}

/* ---------- Sub-Tab A: Curated Ready-to-Shop Grocery Lists ---------- */
.fuk-curated-lists-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  align-items: stretch;
  min-width: 0;
}

.fuk-curated-list-card {
  background: var(--surface-2, #edf5f0);
  border: 1.5px solid var(--border, #e4dfd5);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  transition: transform 170ms var(--spring, cubic-bezier(0.22, 1, 0.36, 1)), border-color 160ms ease, box-shadow 160ms ease;
}

.fuk-curated-list-card:hover {
  border-color: var(--primary, #155e3a);
  transform: translateY(-2px);
}

.fuk-curated-list-card.is-loaded {
  border-color: var(--accent, #19b660);
  box-shadow: 0 8px 24px rgba(25, 182, 96, 0.14);
}

.fuk-curated-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.fuk-budget-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.72rem;
  font-weight: 800;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

html[data-theme="dark"] .fuk-budget-pill {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.5);
}

.fuk-loaded-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent, #19b660);
  color: #05180d;
}

.fuk-curated-top h3 {
  margin: 0 0 5px;
  font-size: 1.08rem;
  line-height: 1.24;
  color: var(--text, #141a16);
}

.fuk-curated-meta {
  margin: 0;
  font-size: 0.81rem;
  color: var(--text-2, #46524b);
  line-height: 1.4;
}

.fuk-list-thumb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.fuk-list-mini-thumb {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e4dfd5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.fuk-list-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fuk-list-mini-thumb.is-emoji {
  font-size: 1.15rem;
}

.fuk-list-more-chip {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-2, #46524b);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e4dfd5);
}

.fuk-list-preview-drawer {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e4dfd5);
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 0.81rem;
}

.fuk-list-preview-drawer summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary, #155e3a);
  user-select: none;
}

.fuk-list-preview-ul {
  list-style: none;
  margin: 8px 0 2px;
  padding: 0;
  display: grid;
  gap: 5px;
  max-height: 210px;
  overflow-y: auto;
}

.fuk-list-preview-item {
  display: grid;
  gap: 2px;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border, #e4dfd5);
}

.fuk-list-preview-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fuk-list-preview-item.is-owned strong {
  text-decoration: line-through;
  opacity: 0.65;
}

.fuk-list-preview-tip {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--text-2, #46524b);
}

.fuk-curated-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

/* ---------- Active Consolidated Shopping Cart ---------- */
.fuk-cart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-2, #edf5f0);
  border: 1px solid var(--border, #e4dfd5);
}

.fuk-cart-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fuk-cart-quick-add {
  flex: 1 1 230px;
  min-width: 0;
}

.fuk-cart-quick-add select,
.fuk-swap-filter-box input,
.fuk-enc-search-row input,
.fuk-finder-field select,
.fuk-finder-field input[type="text"],
.fuk-route-meal-picker select,
.fuk-route-meal-picker input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-family: var(--body, Inter, sans-serif);
  font-size: max(16px, 1rem);
  line-height: 1.3;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong, #cfc8ba);
  background: var(--bg, #faf8f4);
  color: var(--text, #141a16);
}

.fuk-empty-cart-box {
  background: var(--surface-2, #edf5f0);
  border: 1.5px dashed var(--border-strong, #cfc8ba);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fuk-empty-cart-box h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.fuk-empty-cart-box p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-2, #46524b);
  max-width: 64ch;
}

.fuk-empty-cart-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fuk-cart-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  align-items: start;
}

.fuk-cart-section-card {
  background: var(--surface-2, #edf5f0);
  border: 1.5px solid var(--border, #e4dfd5);
  border-radius: 18px;
  padding: 15px;
  display: grid;
  gap: 11px;
  min-width: 0;
}

.fuk-cart-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fuk-cart-sec-head h4 {
  margin: 0;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

.fuk-cart-sec-head h4 small {
  color: var(--text-2, #46524b);
  font-weight: 600;
}

.fuk-cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.fuk-cart-row {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e4dfd5);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.fuk-cart-row.is-in-pantry {
  opacity: 0.66;
}

.fuk-cart-row.is-in-pantry .fuk-cart-row-title strong {
  text-decoration: line-through;
}

.fuk-cart-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.fuk-cart-row-img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: contain;
  background: var(--surface-2, #edf5f0);
  padding: 2px;
  flex-shrink: 0;
}

.fuk-cart-row-emoji {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface-2, #edf5f0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.fuk-cart-row-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fuk-cart-row-title strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.fuk-cart-row-title small {
  font-size: 0.76rem;
  color: var(--text-2, #46524b);
}

.fuk-cart-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fuk-est-price-chip {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

html[data-theme="dark"] .fuk-est-price-chip {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}

.fuk-cart-row-tip {
  font-size: 0.78rem;
  color: var(--text-2, #46524b);
  padding-left: 28px;
  line-height: 1.38;
}

.fuk-cart-row-tip.is-bargain {
  color: var(--primary, #155e3a);
}

html[data-theme="dark"] .fuk-cart-row-tip.is-bargain {
  color: #82f3b2;
}

.fuk-cart-brands-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding-left: 28px;
  font-size: 0.77rem;
}

.fuk-brand-mini-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2, #edf5f0);
  border: 1px solid var(--border, #e4dfd5);
  font-weight: 700;
  font-size: 0.72rem;
}

/* ---------- Sub-Tab B: Bargain Shopper Vault ---------- */
.fuk-bargain-hero {
  background: radial-gradient(circle at 88% 18%, rgba(25, 182, 96, 0.24), transparent 52%),
              linear-gradient(145deg, #0b2617 0%, #155e3a 100%);
  color: #f4fbf6;
  border-radius: 24px;
  padding: 24px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 16px 38px rgba(7, 17, 11, 0.16);
}

.fuk-bargain-hero-copy {
  max-width: 66ch;
  display: grid;
  gap: 8px;
}

.fuk-bargain-hero-copy .fuk-ws-eyebrow {
  color: #82f3b2;
}

.fuk-bargain-hero-copy h3 {
  margin: 0;
  font-family: var(--display, Anton, Impact, sans-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1.04;
  color: #ffffff;
}

.fuk-bargain-hero-copy p {
  margin: 0;
  color: #d6eadc;
  font-size: 0.95rem;
  line-height: 1.5;
}

.fuk-bargain-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fuk-playbook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.fuk-playbook-card {
  background: var(--surface-2, #edf5f0);
  border: 1.5px solid var(--border, #e4dfd5);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  transition: border-color 160ms ease, transform 170ms var(--spring, cubic-bezier(0.22, 1, 0.36, 1));
}

.fuk-playbook-card:hover,
.fuk-playbook-card.is-highlighted {
  border-color: var(--primary, #155e3a);
  transform: translateY(-2px);
}

.fuk-playbook-head h4 {
  margin: 8px 0 5px;
  font-size: 1.14rem;
  color: var(--text, #141a16);
}

.fuk-playbook-head p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-2, #46524b);
  line-height: 1.45;
}

.fuk-playbook-block {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e4dfd5);
  border-radius: 14px;
  padding: 11px 13px;
  display: grid;
  gap: 6px;
}

.fuk-playbook-block.is-tactics {
  border-left: 3.5px solid var(--accent, #19b660);
}

.fuk-playbook-block strong {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary, #155e3a);
}

.fuk-playbook-block ul {
  margin: 0;
  padding-left: 17px;
  display: grid;
  gap: 4px;
  font-size: 0.83rem;
  color: var(--text, #141a16);
  line-height: 1.42;
}

.fuk-playbook-foot {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

/* Smart Budget Swaps Table */
.fuk-swap-filter-box {
  flex: 1 1 260px;
  max-width: 340px;
}

.fuk-swaps-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border, #e4dfd5);
}

.fuk-swaps-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface, #ffffff);
  font-size: 0.87rem;
}

.fuk-swaps-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--surface-dark, #0f2e1c);
  color: #ffffff;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fuk-swaps-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border, #e4dfd5);
  vertical-align: top;
  line-height: 1.45;
}

.fuk-swaps-table tbody tr:nth-child(even) {
  background: var(--surface-2, #edf5f0);
}

.fuk-splurge-name {
  display: block;
  color: var(--text-2, #46524b);
}

.fuk-splurge-cost {
  display: inline-block;
  margin-top: 3px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.76rem;
  color: var(--action, #e5232d);
  text-decoration: line-through;
}

.fuk-bargain-name {
  display: block;
  color: var(--text, #141a16);
}

.fuk-bargain-cost {
  display: inline-block;
  margin-top: 3px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary, #155e3a);
}

html[data-theme="dark"] .fuk-bargain-cost {
  color: #82f3b2;
}

.fuk-savings-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(25, 182, 96, 0.16);
  color: #0d6b39;
  border: 1px solid rgba(25, 182, 96, 0.38);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

html[data-theme="dark"] .fuk-savings-badge {
  background: rgba(25, 182, 96, 0.24);
  color: #82f3b2;
}

/* ---------- Sub-Tab C: A-Z Health-Food & Top Brands Encyclopedia ---------- */
.fuk-enc-controls {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.fuk-enc-search-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.fuk-enc-cats {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  max-width: 100%;
}

.fuk-enc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.fuk-enc-card {
  background: var(--surface-2, #edf5f0);
  border: 1.5px solid var(--border, #e4dfd5);
  border-radius: 18px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  transition: border-color 160ms ease, transform 160ms var(--spring, cubic-bezier(0.22, 1, 0.36, 1));
}

.fuk-enc-card:hover,
.fuk-enc-card.is-highlighted {
  border-color: var(--primary, #155e3a);
  transform: translateY(-2px);
}

.fuk-enc-card-top {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.fuk-enc-specimen {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border, #e4dfd5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: 1.7rem;
  overflow: hidden;
}

.fuk-enc-specimen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fuk-enc-title-box {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.fuk-enc-cat-tag {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary, #155e3a);
}

html[data-theme="dark"] .fuk-enc-cat-tag {
  color: #82f3b2;
}

.fuk-enc-title-box h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.22;
  color: var(--text, #141a16);
}

.fuk-enc-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.fuk-enc-brands-box {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e4dfd5);
  border-radius: 12px;
  padding: 9px 11px;
  display: grid;
  gap: 6px;
}

.fuk-enc-mini-label {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted, #6e7b73);
}

.fuk-enc-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fuk-brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(21, 94, 58, 0.1);
  color: var(--primary, #155e3a);
  border: 1px solid rgba(21, 94, 58, 0.25);
  font-size: 0.74rem;
  font-weight: 700;
}

html[data-theme="dark"] .fuk-brand-pill {
  background: rgba(25, 182, 96, 0.18);
  color: #82f3b2;
  border-color: rgba(25, 182, 96, 0.35);
}

.fuk-enc-details {
  display: grid;
  gap: 6px;
  font-size: 0.81rem;
  color: var(--text-2, #46524b);
  line-height: 1.42;
}

.fuk-enc-details strong {
  color: var(--text, #141a16);
}

.fuk-enc-bargain-box {
  background: var(--warn-bg, #fff8ec);
  border: 1px solid var(--warn-border, #e5b869);
  color: var(--warn-text, #6b440b);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.79rem;
}

.fuk-enc-bargain-box strong {
  color: inherit;
}

.fuk-enc-aisle-row em {
  font-style: normal;
  color: var(--muted, #6e7b73);
}

.fuk-enc-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- Sub-Tab D: Live Store Map & 2-Stop Route ---------- */
.fuk-finder-top-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: end;
}

.fuk-finder-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.fuk-finder-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2, #46524b);
}

.fuk-finder-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.fuk-finder-search-row input {
  flex: 1 1 210px;
}

.fuk-finder-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.fuk-store-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  max-width: 100%;
}

.fuk-store-chip {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong, #cfc8ba);
  background: var(--surface-2, #edf5f0);
  color: var(--text, #141a16);
  font-family: var(--body, Inter, sans-serif);
  font-size: 0.81rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--spring, cubic-bezier(0.22, 1, 0.36, 1)),
              background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.fuk-store-chip:hover {
  border-color: var(--chip-color, var(--primary, #155e3a));
  transform: translateY(-1px);
}

.fuk-store-chip:active {
  transform: scale(0.97);
}

.fuk-cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fuk-open-now-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-2, #46524b);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.fuk-open-now-label input {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--primary, #155e3a);
  flex-shrink: 0;
}

/* Selected Ingredient Shelf-Check Spotlight Banner */
.fuk-shelf-banner {
  background: var(--surface-2, #edf5f0);
  border: 1.5px solid var(--border, #e4dfd5);
  border-radius: 18px;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.fuk-shelf-emoji {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  background: var(--surface, #ffffff);
  border: 2px solid var(--primary, #155e3a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  overflow: hidden;
  padding: 3px;
}

.fuk-shelf-emoji img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fuk-shelf-copy {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-2, #46524b);
  min-width: 0;
}

.fuk-shelf-copy strong {
  color: var(--text, #141a16);
}

.fuk-shelf-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
}

.fuk-shelf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Map + Results Split Stage */
.fuk-finder-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.98fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.fuk-map-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid var(--border, #e4dfd5);
  background: linear-gradient(145deg, #0c2618 0%, #15422a 60%, #1c5335 100%);
  min-height: 430px;
}

.fuk-map-canvas {
  width: 100%;
  height: 430px;
  min-height: 430px;
}

.fuk-map-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.78rem;
  font-weight: 800;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.fuk-map-fallback {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  background: radial-gradient(circle at 82% 20%, rgba(25, 182, 96, 0.22), transparent 55%),
              linear-gradient(155deg, rgba(10, 32, 20, 0.97), rgba(18, 56, 36, 0.95));
  color: #f4fbf6;
}

.fuk-map-fallback h3 {
  margin: 0;
  font-family: var(--display, Anton, Impact, sans-serif);
  font-weight: 400;
  font-size: 1.55rem;
  color: #ffffff;
}

.fuk-map-fallback p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #d6eadc;
  max-width: 48ch;
}

.fuk-light-ghost {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

.fuk-map-results {
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
  min-width: 0;
}

.fuk-results-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-2, #46524b);
}

.fuk-finder-status-card {
  background: var(--surface-2, #edf5f0);
  border: 1px solid var(--border, #e4dfd5);
  border-radius: 16px;
  padding: 16px 18px;
  display: grid;
  gap: 9px;
}

.fuk-finder-status-card h4 {
  margin: 0;
  font-size: 1rem;
}

.fuk-finder-status-card p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-2, #46524b);
}

.fuk-place-card {
  background: var(--surface-2, #edf5f0);
  border: 1.5px solid var(--border, #e4dfd5);
  border-radius: 16px;
  padding: 14px 15px;
  display: grid;
  gap: 10px;
  transition: border-color 160ms ease, transform 160ms var(--spring, cubic-bezier(0.22, 1, 0.36, 1));
}

.fuk-place-card:hover,
.fuk-place-card.is-selected {
  border-color: var(--primary, #155e3a);
  transform: translateY(-1px);
}

.fuk-place-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fuk-place-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #ffffff;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.74rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fuk-place-card h4 {
  margin: 0;
  font-size: 0.96rem;
}

.fuk-place-card p {
  margin: 4px 0 0;
  font-size: 0.83rem;
  color: var(--text-2, #46524b);
  line-height: 1.44;
}

.fuk-place-distance {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(21, 94, 58, 0.12);
  color: var(--primary, #155e3a);
}

html[data-theme="dark"] .fuk-place-distance {
  background: rgba(25, 182, 96, 0.18);
  color: #82f3b2;
}

.fuk-place-card-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fuk-maps-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 0.77rem;
  color: var(--muted, #6e7b73);
  border-top: 1px solid var(--border, #e4dfd5);
  padding-top: 12px;
}

.fuk-maps-legal a {
  color: var(--primary, #155e3a);
  text-decoration: underline;
}

/* Shared Route & Stops Layout */
.fuk-route-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.fuk-route-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fuk-route-meter {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.79rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-sage, #edf5f0);
  border: 1px solid var(--border, #e4dfd5);
  color: var(--text, #141a16);
}

.fuk-route-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fuk-route-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fuk-route-meal-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
}

.fuk-route-meal-picker select {
  flex: 1 1 220px;
}

.fuk-route-servings-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2, #46524b);
}

.fuk-route-servings-wrap input {
  width: 72px;
  text-align: center;
}

.fuk-plan-chips,
.fuk-plan-empty-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 15px;
  background: var(--surface-2, #edf5f0);
  border: 1px solid var(--border, #e4dfd5);
  font-size: 0.84rem;
  color: var(--text-2, #46524b);
}

.fuk-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  border-radius: 999px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-strong, #cfc8ba);
  font-weight: 700;
  color: var(--text, #141a16);
}

.fuk-plan-chip.is-list-chip {
  border-color: var(--primary, #155e3a);
}

.fuk-plan-chip button {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-muted, #f3efe8);
  color: var(--text-2, #46524b);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.fuk-stops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.fuk-stop-card {
  background: var(--surface-2, #edf5f0);
  border: 1.5px solid var(--border, #e4dfd5);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.fuk-stop-card.is-stop1 {
  border-color: rgba(21, 94, 58, 0.35);
}

.fuk-stop-card.is-stop2 {
  border-color: rgba(180, 83, 9, 0.38);
}

.fuk-stop-card.is-online {
  border-color: rgba(126, 34, 206, 0.32);
}

.fuk-stop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.fuk-stop-head h4 {
  margin: 6px 0 3px;
  font-size: 1.04rem;
}

.fuk-stop-head p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-2, #46524b);
}

.fuk-stop-pill {
  display: inline-block;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.fuk-stop-pill.is-green {
  background: #155e3a;
  color: #ffffff;
}

.fuk-stop-pill.is-amber {
  background: #b45309;
  color: #ffffff;
}

.fuk-stop-pill.is-purple {
  background: #7e22ce;
  color: #ffffff;
}

.fuk-stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fuk-route-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.fuk-route-item {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e4dfd5);
  border-radius: 14px;
  padding: 11px 13px;
  display: grid;
  gap: 6px;
}

.fuk-route-item.is-in-pantry {
  opacity: 0.68;
}

.fuk-route-item.is-in-pantry .fuk-route-check strong {
  text-decoration: line-through;
}

.fuk-route-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fuk-route-check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 0.9rem;
  min-width: 0;
}

.fuk-route-check input {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--primary, #155e3a);
  flex-shrink: 0;
}

.fuk-owned-tag {
  font-style: normal;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(25, 182, 96, 0.16);
  color: #155e3a;
  white-space: nowrap;
}

html[data-theme="dark"] .fuk-owned-tag {
  color: #82f3b2;
}

.fuk-route-item-meta {
  display: grid;
  gap: 3px;
  font-size: 0.8rem;
  color: var(--text-2, #46524b);
  padding-left: 27px;
}

.fuk-route-item-meta strong {
  color: var(--text, #141a16);
}

.fuk-online-backup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fuk-online-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-strong, #cfc8ba);
  color: var(--text, #141a16);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms var(--spring, cubic-bezier(0.22, 1, 0.36, 1)), border-color 150ms ease;
}

.fuk-online-chip:hover {
  border-color: #7e22ce;
  transform: translateY(-1px);
}

.fuk-muted-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-2, #46524b);
}

/* ---------- Responsive Breakpoints (Tablet & iPhone 390px) ---------- */
@media (max-width: 1120px) {
  .fuk-curated-lists-grid,
  .fuk-enc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .fuk-finder-top-bar,
  .fuk-finder-stage,
  .fuk-stops-grid,
  .fuk-playbook-grid,
  .fuk-cart-sections-grid {
    grid-template-columns: 1fr;
  }

  .fuk-shelf-banner {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .fuk-shelf-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .fuk-map-frame,
  .fuk-map-canvas {
    height: 360px;
    min-height: 360px;
  }

  .fuk-map-results {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .fuk-curated-lists-grid,
  .fuk-enc-grid {
    grid-template-columns: 1fr;
  }

  .fuk-groc-hub-bar,
  .fuk-groc-section-card,
  .fuk-finder-console,
  .fuk-route-shell,
  .fuk-bargain-hero {
    padding: 16px;
  }

  .fuk-groc-pill {
    flex: 0 0 auto;
    padding: 8px 13px;
    font-size: 0.83rem;
  }

  /* Zero-overflow mobile card layout for Smart Budget Swaps Table */
  .fuk-swaps-table thead {
    display: none;
  }

  .fuk-swaps-table,
  .fuk-swaps-table tbody,
  .fuk-swaps-table tr,
  .fuk-swaps-table td {
    display: block;
    width: 100%;
  }

  .fuk-swaps-table tr {
    padding: 12px;
    border-bottom: 1.5px solid var(--border, #e4dfd5);
  }

  .fuk-swaps-table td {
    padding: 5px 0;
    border: 0;
  }

  .fuk-swaps-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono, ui-monospace, monospace);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted, #6e7b73);
    margin-bottom: 2px;
  }
}

/* ---------- Order Ingredients or Drive Now Panel ---------- */
.fuk-delivery-panel {
  margin-top: 20px;
  padding: 20px;
  border-radius: 18px;
  border: 1.5px solid var(--border, #dfe6df);
  background: linear-gradient(180deg, rgba(21, 94, 58, 0.045), rgba(21, 94, 58, 0.015));
  display: grid;
  gap: 14px;
}

.fuk-delivery-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.fuk-delivery-head h4 {
  margin: 4px 0 4px;
  font-size: 1.05rem;
  color: var(--text, #141a16);
}

.fuk-delivery-head p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-2, #4d5b52);
}

.fuk-delivery-area-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fuk-delivery-area-input {
  min-width: 170px;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border, #d5ddd6);
  background: var(--surface, #ffffff);
  color: var(--text, #141a16);
  font-size: max(16px, 0.92rem);
}

.fuk-delivery-primary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.fuk-delivery-cta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), filter 180ms ease;
}

.fuk-delivery-cta span {
  font-size: 0.92rem;
  line-height: 1.2;
}

.fuk-delivery-cta small {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.92;
}

.fuk-delivery-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.fuk-delivery-cta:active {
  transform: scale(0.97);
}

.fuk-delivery-cta.is-instacart {
  background: #0f6b3d;
  border-color: #0b532f;
}

.fuk-delivery-cta.is-doordash {
  background: #c8331e;
  border-color: #a52715;
}

.fuk-delivery-cta.is-walmart {
  background: #0c5db9;
  border-color: #094995;
}

.fuk-delivery-cta.is-wholefoods {
  background: #155e3a;
  border-color: #10482c;
}

.fuk-delivery-subrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fuk-delivery-sub-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #627068);
}

.fuk-delivery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fuk-delivery-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, #d5ddd6);
  background: var(--surface, #ffffff);
  color: var(--text, #141a16);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), border-color 160ms ease;
}

.fuk-delivery-chip:hover {
  border-color: var(--primary, #155e3a);
  color: var(--primary, #155e3a);
}

.fuk-delivery-split {
  display: grid;
  gap: 12px;
}

.fuk-delivery-ready-box {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border, #dfe6df);
  background: var(--surface, #ffffff);
  display: grid;
  gap: 10px;
}

.fuk-delivery-ready-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.fuk-delivery-pref-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fuk-delivery-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fuk-delivery-nav-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border, #dfe6df);
  background: var(--surface, #ffffff);
  display: grid;
  gap: 8px;
}

.fuk-delivery-nav-card strong {
  font-size: 0.86rem;
  color: var(--text, #141a16);
}

.fuk-delivery-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

html[data-theme="dark"] .fuk-delivery-panel {
  background: linear-gradient(180deg, rgba(25, 182, 96, 0.08), rgba(10, 26, 17, 0.45));
  border-color: #274435;
}

html[data-theme="dark"] .fuk-delivery-ready-box,
html[data-theme="dark"] .fuk-delivery-nav-card,
html[data-theme="dark"] .fuk-delivery-chip,
html[data-theme="dark"] .fuk-delivery-area-input {
  background: #0d2116;
  border-color: #274435;
  color: #f4f1e8;
}

@media (max-width: 880px) {
  .fuk-delivery-primary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fuk-delivery-nav-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .fuk-delivery-primary-grid {
    grid-template-columns: 1fr;
  }
  .fuk-delivery-area-input {
    width: 100%;
  }
}
