:root {
  --bg: #edf3ff;
  --bg-strong: #dbe7ff;
  --surface: rgba(248, 251, 255, 0.86);
  --surface-strong: #ffffff;
  --surface-panel:
    radial-gradient(circle at top right, rgba(220, 233, 255, 0.3), transparent 34%),
    linear-gradient(180deg, rgba(251, 253, 255, 0.97), rgba(239, 246, 255, 0.98));
  --surface-panel-soft:
    linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(242, 248, 255, 0.96));
  --surface-deep: #112a52;
  --line: rgba(26, 63, 122, 0.18);
  --line-strong: rgba(17, 42, 82, 0.2);
  --line-soft: rgba(29, 95, 211, 0.12);
  --text: #12213d;
  --muted: #415b84;
  --brand: #1d5fd3;
  --brand-deep: #112a52;
  --accent: #1d5fd3;
  --accent-soft: #dce9ff;
  --danger: #c32033;
  --success: #1d5fd3;
  --shadow-lg: 0 30px 80px rgba(17, 42, 82, 0.16);
  --shadow-md: 0 18px 38px rgba(17, 42, 82, 0.12);
  --shadow-panel:
    0 12px 28px rgba(17, 42, 82, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --shadow-panel-soft:
    0 10px 24px rgba(17, 42, 82, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --radius-xl: 30px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(244, 248, 255, 0.88), rgba(227, 237, 252, 0.84)),
    radial-gradient(circle at top left, rgba(29, 95, 211, 0.1), transparent 26%),
    radial-gradient(circle at 85% 15%, rgba(17, 42, 82, 0.12), transparent 22%),
    url("/peakpx.jpg") center / cover fixed no-repeat;
}

button,
input,
select,
a {
  font: inherit;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(241, 246, 255, 0.28)),
    rgba(241, 246, 255, 0.24);
  backdrop-filter: blur(1px) saturate(0.96);
  -webkit-backdrop-filter: blur(1px) saturate(0.96);
  opacity: 0.78;
}

.shell {
  position: relative;
  width: min(1180px, calc(100% - 28px));
  margin: 18px auto 32px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.hero,
.toolbar-grid,
.items-grid {
  display: grid;
  gap: 18px;
}

.hero {
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.72fr);
  padding: 20px 20px 18px;
  min-height: 178px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(236, 244, 255, 0.94));
  overflow: hidden;
  animation: rise-in 520ms ease both;
}

.hero-copy {
  max-width: 820px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d5fd3, #112a52);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(17, 42, 82, 0.16);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-title,
.brand-subtitle {
  margin: 0;
}

.brand-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--surface-deep);
}

.brand-subtitle {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--muted);
}

.hero-aside {
  align-self: stretch;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 15px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17, 42, 82, 0.95), rgba(29, 95, 211, 0.9));
  color: #eef4ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.eyebrow,
.section-tag,
.hero-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 800;
}

.eyebrow,
.section-tag {
  color: var(--brand);
}

.hero-kicker {
  color: rgba(247, 240, 232, 0.7);
}

.hero h1,
.form-card h2,
.spotlight-card h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 17ch;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lead,
.item-check,
.source-line,
.location-text {
  color: var(--muted);
  line-height: 1.6;
}

.lead {
  max-width: 62ch;
  margin: 14px 0 0;
  font-size: 0.98rem;
}

.hero-location {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.secondary-hero-btn {
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cart-summary-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(36, 88, 180, 0.26), rgba(211, 54, 74, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: left;
  box-shadow: none;
  color: #eef4ff;
}

.cart-summary-card:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(42, 102, 205, 0.32), rgba(217, 68, 88, 0.24));
  box-shadow: none;
  filter: none;
}

.cart-summary-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.cart-summary-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-summary-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff6ea;
}

.cart-summary-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  color: #eef4ff;
}

.cart-summary-label,
.cart-summary-total {
  margin: 0;
  display: block;
}

.cart-summary-label {
  margin-top: 4px;
  color: rgba(255, 247, 238, 0.88);
  font-weight: 800;
}

.cart-summary-total {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fffaf2;
}

.toolbar-grid {
  grid-template-columns: minmax(0, 1fr);
  margin-top: -6px;
}

.form-card,
.action-card,
.stat-card,
.item-card,
.empty-card {
  padding: 20px;
}

.form-card {
  animation: rise-in 620ms ease both;
  padding-top: 18px;
}

.embedded-top-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(93, 69, 41, 0.12);
  display: grid;
  gap: 14px;
}

.spotlight-card {
  background:
    linear-gradient(180deg, rgba(255, 245, 248, 0.96), rgba(233, 243, 255, 0.94));
  animation: rise-in 700ms ease both;
}

.spotlight-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.spotlight-media {
  min-height: 180px;
}

.spotlight-image,
.spotlight-placeholder {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(29, 95, 211, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

.spotlight-image {
  display: block;
  max-height: 280px;
  object-fit: cover;
}

.spotlight-placeholder {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.spotlight-actions {
  display: flex;
  justify-content: flex-start;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.section-heading.compact {
  margin-bottom: 0;
}

.section-heading label {
  font-weight: 800;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.inline-filter-row {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.inline-filter-row label {
  font-weight: 800;
}

.inline-filter-row select {
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

input {
  width: 100%;
  border: 1px solid rgba(159, 31, 43, 0.2);
  border-radius: 16px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(215, 58, 73, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 58, 73, 0.14);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff4f6;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(17, 42, 82, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(17, 42, 82, 0.28);
  filter: saturate(1.06);
}

button:active {
  transform: translateY(0);
}

.hero-aside button {
  background: linear-gradient(135deg, #e7f0ff, #f5f9ff);
  color: var(--surface-deep);
  box-shadow: none;
}

.hero-aside .cart-summary-card {
  background: linear-gradient(180deg, rgba(36, 88, 180, 0.26), rgba(17, 42, 82, 0.22));
  color: #eef4ff;
}

.cart-summary-card .hero-kicker {
  color: rgba(255, 247, 238, 0.72);
}

.top-section {
  padding: 18px;
  animation: rise-in 760ms ease both;
}

.staples-section {
  padding: 18px;
  animation: rise-in 800ms ease both;
}

.preferred-section {
  padding: 18px;
  animation: rise-in 820ms ease both;
}

.store-mode-section {
  padding: 18px;
  animation: rise-in 840ms ease both;
}

.staples-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.staples-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preferred-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.preferred-form input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.preferred-count {
  grid-column: 1 / -1;
  margin: 0;
}

.preferred-card {
  border-color: rgba(215, 58, 73, 0.2);
}

.preferred-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.preferred-offers li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(29, 95, 211, 0.15);
}

.preferred-offers li span {
  color: var(--muted);
  font-size: 0.9rem;
}

.store-mode-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.store-mode-label {
  font-weight: 800;
}

.store-mode-controls select {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.store-mode-summary,
.store-mode-list {
  margin-top: 14px;
}

.store-mode-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.store-mode-stat {
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.92), rgba(233, 243, 255, 0.96));
  border: 1px solid rgba(29, 95, 211, 0.18);
}

.store-mode-stat strong {
  display: block;
  margin-top: 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.8rem;
  line-height: 1;
}

.store-mode-card {
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.92), rgba(233, 243, 255, 0.96));
  border: 1px solid rgba(29, 95, 211, 0.16);
  box-shadow: 0 18px 34px rgba(17, 42, 82, 0.12);
}

.store-mode-missing {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.store-mode-missing.complete {
  border-style: solid;
  border-color: rgba(29, 95, 211, 0.22);
  background: rgba(220, 235, 255, 0.4);
}

.staples-panel[hidden] {
  display: none;
}

.top-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.staples-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

.preferred-section .staples-list {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.preferred-section .staple-card {
  display: grid;
  gap: 8px;
}

.preferred-section .staple-top h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 1rem;
}

.preferred-section .staple-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.preferred-section .preferred-actions {
  margin-top: 0;
  justify-content: flex-end;
  min-height: 0;
}

.preferred-section .preferred-offers {
  margin-top: 0;
}

.preferred-remove-btn {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  line-height: 1;
  font-size: 0.95rem;
  justify-content: center;
}

.top-item-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.9), rgba(233, 243, 255, 0.96));
  border: 1px solid rgba(29, 95, 211, 0.18);
}

.staple-card {
  display: grid;
  gap: 10px;
  align-self: start;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.92), rgba(233, 243, 255, 0.96));
  border: 1px solid rgba(29, 95, 211, 0.18);
}

.staple-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.staple-top h3 {
  margin: 6px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.04;
}

.top-item-chip strong,
.top-item-chip span {
  display: block;
}

.top-item-chip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.93rem;
}

.empty-top-card {
  padding: 18px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
}

.top-item-btn,
.top-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--brand-deep);
  border: 1px solid rgba(215, 58, 73, 0.26);
}

.top-item-btn.active,
.top-toggle-btn.active {
  color: var(--success);
  border-color: rgba(29, 95, 211, 0.28);
  background: rgba(220, 235, 255, 0.48);
}

.top-item-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.top-item-btn.active svg {
  fill: currentColor;
}

.items-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.store-cart {
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 241, 220, 0.64), transparent 34%),
    linear-gradient(180deg, rgba(255, 254, 250, 0.96), rgba(237, 246, 255, 0.99));
  border: 1px solid rgba(29, 95, 211, 0.12);
  box-shadow:
    0 16px 36px rgba(28, 46, 84, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.store-cart-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.store-cart-copy {
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(45, 107, 214, 0.95), rgba(28, 76, 170, 0.98));
  color: #fff;
  box-shadow: 0 18px 40px rgba(29, 95, 211, 0.18);
}

.store-cart-copy .section-tag,
.store-cart-copy h3,
.store-cart-copy .cart-store-total,
.store-cart-copy .cart-store-total strong {
  color: #fff;
}

.store-cart-copy .section-tag {
  opacity: 0.8;
}

.store-cart-top h3 {
  margin: 6px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.6rem;
  line-height: 1;
}

.cart-store-total {
  margin: 10px 0 0;
  color: var(--muted);
}

.cart-store-total strong {
  color: var(--surface-deep);
}

.store-cart-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 10px;
}

.store-cart-stat {
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface-panel-soft);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-panel-soft);
}

.store-cart-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--surface-deep);
  font-size: 1.3rem;
  line-height: 1;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(220, 233, 255, 0.85), rgba(255, 243, 228, 0.88));
  color: var(--accent);
  font-weight: 800;
  border: 1px solid rgba(29, 95, 211, 0.12);
}

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

.cart-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 18px;
  background: var(--surface-panel);
  border: 1px solid rgba(29, 95, 211, 0.14);
  box-shadow: var(--shadow-panel-soft);
}

.cart-item-row.current {
  border-left: 4px solid #1f8f57;
}

.cart-item-row.upcoming {
  border-left: 4px solid var(--danger);
}

.cart-item-row strong,
.cart-item-row span {
  display: block;
}

.cart-item-copy {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.cart-item-name {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
  color: var(--surface-deep);
}

.cart-item-offer {
  color: var(--muted);
  line-height: 1.4;
}

.cart-subline {
  margin-top: 6px;
  color: var(--muted);
}

.cart-line-total {
  margin-top: 10px;
  font-weight: 800;
  color: var(--surface-deep);
}

.date-badge {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(17, 42, 82, 0.12);
}

.date-badge.current {
  color: #1f8f57;
  background: transparent;
  border-color: rgba(31, 143, 87, 0.45);
}

.date-badge.upcoming {
  color: var(--danger);
  background: transparent;
  border-color: rgba(195, 32, 51, 0.45);
}

.cart-item-actions {
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 8px;
  min-width: 132px;
}

.cart-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-qty-controls .top-item-btn {
  min-width: 30px;
  justify-content: center;
  padding: 6px 10px;
}

.cart-qty {
  font-weight: 800;
  color: var(--brand-deep);
}

.cart-remove-btn {
  padding-block: 10px;
}

.empty-cart-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.52);
}

.cloud-preview-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  background: var(--surface-panel-soft);
  border-style: solid;
  border-color: rgba(29, 95, 211, 0.16);
  box-shadow: var(--shadow-panel-soft);
}

.cloud-preview-card h3 {
  margin: 0;
  color: var(--surface-deep);
  font-size: 1.25rem;
}

.cloud-preview-card p {
  margin: 0;
  line-height: 1.55;
}

body.cloud-preview .form-card button,
body.cloud-preview .form-card input,
body.cloud-preview .form-card select,
body.cloud-preview .hero-aside button,
body.cloud-preview .preferred-section button,
body.cloud-preview .preferred-section input {
  opacity: 0.68;
}

.item-card {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 18px;
  background: var(--surface-panel);
  border: 1px solid rgba(29, 95, 211, 0.14);
  box-shadow: var(--shadow-panel);
  animation: rise-in 880ms ease both;
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(29, 95, 211, 0.1);
}

.item-header-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

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

.item-name {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.item-check {
  margin: 0;
  font-size: 0.9rem;
}

.item-meta-stack {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 78px;
}

.delete-btn,
.refresh-item-btn {
  background: transparent;
  box-shadow: none;
  padding-inline: 14px;
}

.delete-btn {
  color: var(--danger);
  border: 1px solid rgba(162, 59, 50, 0.18);
}

.refresh-item-btn {
  color: var(--accent);
  border: 1px solid rgba(29, 95, 211, 0.24);
}

.advice {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-panel-soft);
  border: 1px solid rgba(29, 95, 211, 0.1);
  font-weight: 800;
  line-height: 1.48;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.best-price-line {
  margin: 0;
  color: var(--surface-deep);
}

.best-price-highlight {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--success);
  border: 1px solid rgba(29, 95, 211, 0.2);
}

.error-text,
.error-line,
.message.error {
  color: var(--danger);
}

.message {
  margin: 12px 0 0;
  min-height: 1.4em;
  font-weight: 700;
}

.message.success {
  color: var(--accent);
}

.source-line a {
  color: var(--accent);
  font-weight: 700;
}

.source-line {
  margin: 0;
  min-height: 1.25rem;
}

.source-line-empty {
  visibility: hidden;
}

.discovery-hints {
  margin-top: 0;
  padding: 14px 16px;
  border: 1px dashed rgba(29, 95, 211, 0.18);
  border-radius: 12px;
  background: var(--surface-panel-soft);
  color: var(--surface-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.discovery-hints h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.3;
}

.discovery-hints-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.discovery-hints-list strong {
  color: var(--surface-deep);
}

.discovery-hints-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.offers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.offer-row {
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(29, 95, 211, 0.12);
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.98), rgba(245, 250, 255, 0.96));
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.offer-row-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.offer-main {
  display: grid;
  gap: 0;
  min-width: 0;
}

.offer-row.current {
  border-left: 2px solid #1f8f57;
}

.offer-row.upcoming {
  border-left: 2px solid var(--danger);
}

.offer-row.best-offer {
  background: linear-gradient(180deg, rgba(244, 249, 255, 1), rgba(235, 244, 255, 0.98));
  border-color: rgba(29, 95, 211, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(29, 95, 211, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.offer-row.empty {
  color: var(--muted);
  border-style: dashed;
  padding: 15px;
}

.offer-pick-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.offer-top-btn {
  min-width: 58px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 10px;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.62);
  color: var(--brand-deep);
  box-shadow: none;
}

.offer-top-btn:hover {
  background: rgba(255, 240, 244, 0.9);
  box-shadow: none;
}

.offer-top-btn.active {
  color: var(--success);
  background: rgba(220, 235, 255, 0.58);
}

.offer-top-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.offer-top-btn.active svg {
  fill: currentColor;
}

.offer-top-btn span {
  display: none;
}

.offer-pick-btn:hover {
  transform: none;
  box-shadow: none;
  filter: none;
  background: rgba(215, 58, 73, 0.08);
}

.offer-row strong,
.offer-meta {
  display: block;
}

.offer-pick-btn > div strong {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.offer-pick-btn > div span {
  display: block;
  margin-top: 3px;
  font-weight: 500;
  color: rgba(24, 35, 61, 0.9);
  line-height: 1.32;
}

.offer-row span {
  line-height: 1.32;
}

.offer-meta {
  text-align: right;
  color: var(--muted);
  min-width: 132px;
  font-size: 0.92rem;
}

.offer-page-link {
  justify-self: end;
  margin: 0 15px 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  box-shadow: none;
}

.offer-page-link:hover {
  transform: none;
  box-shadow: none;
  filter: none;
  color: var(--surface-deep);
  background: transparent;
}

.empty-card {
  color: var(--muted);
  text-align: center;
}

.cart-dialog,
.quantity-dialog,
.location-dialog,
.leaflets-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

body.dialog-open {
  overflow: hidden;
}

.dialog-fallback-open {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 12px;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow: auto;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: rgba(17, 42, 82, 0.42);
  z-index: 2000;
}

.dialog-fallback-open,
.dialog-fallback-open[open] {
  position: fixed !important;
  inset: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100dvh !important;
  max-height: none !important;
  padding: 12px !important;
  border: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(17, 42, 82, 0.42);
  overflow: auto;
  z-index: 2147483647;
}

.cart-dialog.dialog-fallback-open .cart-panel,
.leaflets-dialog.dialog-fallback-open .leaflets-panel,
.quantity-dialog.dialog-fallback-open .quantity-form,
.location-dialog.dialog-fallback-open .location-form {
  margin: auto;
}

.quantity-dialog.dialog-fallback-open,
.quantity-dialog.dialog-fallback-open[open] {
  align-items: flex-start;
  padding-top: clamp(56px, 10vh, 120px) !important;
}

.cart-dialog::backdrop,
.quantity-dialog::backdrop,
.location-dialog::backdrop,
.leaflets-dialog::backdrop {
  background: rgba(17, 42, 82, 0.42);
  backdrop-filter: blur(6px);
}

.cart-panel {
  width: min(760px, calc(100vw - 24px));
  max-height: min(88dvh, 920px);
  margin: auto;
  padding: 24px;
  display: grid;
  gap: 16px;
  overflow: auto;
  background:
    radial-gradient(circle at top right, rgba(255, 219, 192, 0.76), transparent 28%),
    radial-gradient(circle at top left, rgba(212, 230, 255, 0.86), transparent 24%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.99), rgba(232, 243, 255, 0.98));
  border: 1px solid rgba(29, 95, 211, 0.14);
  box-shadow:
    0 28px 80px rgba(17, 42, 82, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.leaflets-panel {
  width: min(920px, calc(100vw - 24px));
  max-height: min(88dvh, 920px);
  margin: auto;
  padding: 24px;
  display: grid;
  gap: 16px;
  overflow: auto;
  background:
    radial-gradient(circle at top right, rgba(255, 219, 192, 0.84), transparent 28%),
    radial-gradient(circle at top left, rgba(212, 230, 255, 0.9), transparent 24%),
    radial-gradient(circle at bottom left, rgba(255, 241, 214, 0.7), transparent 26%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.99), rgba(232, 243, 255, 0.98));
  border: 1px solid rgba(29, 95, 211, 0.14);
  box-shadow:
    0 28px 80px rgba(17, 42, 82, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.cart-panel-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.cart-panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cart-panel-top h2 {
  margin: 6px 0 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.02;
}

.cart-dialog-list {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.cart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.leaflets-store-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.leaflets-panel .cart-tab {
  border-radius: 16px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(29, 95, 211, 0.14);
}

.leaflets-panel .cart-tab:hover {
  background: linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(255, 249, 241, 0.98));
  border-color: rgba(29, 95, 211, 0.22);
}

.leaflets-panel .cart-tab.active {
  background:
    radial-gradient(circle at top right, rgba(255, 239, 214, 0.78), transparent 58%),
    linear-gradient(180deg, rgba(214, 230, 255, 0.98), rgba(252, 249, 243, 0.99));
  border-color: rgba(29, 95, 211, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(29, 95, 211, 0.06),
    0 10px 24px rgba(29, 95, 211, 0.08);
}

.cart-tab {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(29, 95, 211, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: var(--surface-deep);
  box-shadow: none;
  text-align: left;
}

.cart-tab:hover {
  background: linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(255, 249, 241, 0.98));
  border-color: rgba(29, 95, 211, 0.22);
  box-shadow: none;
}

.cart-tab.active {
  background:
    radial-gradient(circle at top right, rgba(255, 239, 214, 0.78), transparent 58%),
    linear-gradient(180deg, rgba(214, 230, 255, 0.98), rgba(252, 249, 243, 0.99));
  border-color: rgba(29, 95, 211, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(29, 95, 211, 0.06),
    0 10px 24px rgba(29, 95, 211, 0.08);
}

.cart-tab-name {
  display: block;
  font-weight: 800;
}

.cart-tab-count {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.cart-tab-panel {
  margin-top: 2px;
}

.leaflets-result {
  display: grid;
  gap: 16px;
}

.leaflets-showcase {
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 241, 220, 0.74), transparent 34%),
    linear-gradient(180deg, rgba(255, 254, 250, 0.96), rgba(237, 246, 255, 0.99));
  border: 1px solid rgba(29, 95, 211, 0.12);
  box-shadow:
    0 16px 36px rgba(28, 46, 84, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.leaflets-showcase.store-theme-default {
  --leaflet-theme-main: var(--accent);
  --leaflet-theme-soft: rgba(220, 233, 255, 0.9);
  --leaflet-theme-soft-2: rgba(255, 243, 228, 0.88);
  --leaflet-theme-text: var(--surface-deep);
  --leaflet-theme-on-accent: #ffffff;
  --leaflet-theme-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 249, 253, 0.98));
  --leaflet-theme-card-border: rgba(29, 95, 211, 0.14);
  --leaflet-theme-card-text: var(--surface-deep);
  --leaflet-theme-card-muted: rgba(58, 74, 104, 0.74);
  --leaflet-theme-panel-bg: linear-gradient(180deg, rgba(45, 107, 214, 0.92), rgba(28, 76, 170, 0.96));
  --leaflet-theme-panel-shadow: rgba(29, 95, 211, 0.16);
}

.leaflets-showcase.store-theme-kaufland {
  --leaflet-theme-main: #d61f26;
  --leaflet-theme-soft: rgba(214, 31, 38, 0.14);
  --leaflet-theme-soft-2: rgba(255, 122, 100, 0.18);
  --leaflet-theme-text: var(--surface-deep);
  --leaflet-theme-on-accent: #ffffff;
  --leaflet-theme-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 249, 0.98));
  --leaflet-theme-card-border: rgba(214, 31, 38, 0.18);
  --leaflet-theme-card-text: #2a2230;
  --leaflet-theme-card-muted: rgba(93, 59, 66, 0.72);
  --leaflet-theme-panel-bg: linear-gradient(135deg, rgba(221, 38, 47, 0.96), rgba(172, 17, 34, 0.98));
  --leaflet-theme-panel-shadow: rgba(214, 31, 38, 0.22);
  background:
    radial-gradient(circle at top right, rgba(255, 210, 195, 0.48), transparent 34%),
    linear-gradient(180deg, rgba(255, 251, 249, 0.96), rgba(255, 242, 239, 0.98));
}

.leaflets-showcase.store-theme-lidl {
  --leaflet-theme-main: #0f4db8;
  --leaflet-theme-soft: rgba(15, 77, 184, 0.14);
  --leaflet-theme-soft-2: rgba(255, 215, 72, 0.18);
  --leaflet-theme-text: var(--surface-deep);
  --leaflet-theme-on-accent: #ffffff;
  --leaflet-theme-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 255, 0.99));
  --leaflet-theme-card-border: rgba(15, 77, 184, 0.18);
  --leaflet-theme-card-text: #1e2942;
  --leaflet-theme-card-muted: rgba(50, 72, 121, 0.72);
  --leaflet-theme-panel-bg: linear-gradient(135deg, rgba(18, 78, 184, 0.96), rgba(8, 52, 138, 0.98));
  --leaflet-theme-panel-shadow: rgba(15, 77, 184, 0.22);
}

.leaflets-showcase.store-theme-billa {
  --leaflet-theme-main: #d82835;
  --leaflet-theme-soft: rgba(216, 40, 53, 0.14);
  --leaflet-theme-soft-2: rgba(255, 201, 158, 0.18);
  --leaflet-theme-text: var(--surface-deep);
  --leaflet-theme-on-accent: #ffffff;
  --leaflet-theme-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 248, 0.99));
  --leaflet-theme-card-border: rgba(216, 40, 53, 0.16);
  --leaflet-theme-card-text: #322634;
  --leaflet-theme-card-muted: rgba(95, 66, 73, 0.72);
  --leaflet-theme-panel-bg: linear-gradient(135deg, rgba(219, 51, 64, 0.95), rgba(175, 28, 41, 0.98));
  --leaflet-theme-panel-shadow: rgba(216, 40, 53, 0.2);
}

.leaflets-showcase.store-theme-coop {
  --leaflet-theme-main: #1f8f57;
  --leaflet-theme-soft: rgba(31, 143, 87, 0.14);
  --leaflet-theme-soft-2: rgba(255, 117, 96, 0.16);
  --leaflet-theme-text: var(--surface-deep);
  --leaflet-theme-on-accent: #ffffff;
  --leaflet-theme-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 249, 0.99));
  --leaflet-theme-card-border: rgba(31, 143, 87, 0.16);
  --leaflet-theme-card-text: #1f2f29;
  --leaflet-theme-card-muted: rgba(63, 93, 82, 0.72);
  --leaflet-theme-panel-bg: linear-gradient(135deg, rgba(32, 145, 89, 0.95), rgba(18, 104, 62, 0.98));
  --leaflet-theme-panel-shadow: rgba(31, 143, 87, 0.2);
}

.leaflets-showcase.store-theme-tesco {
  --leaflet-theme-main: #c71732;
  --leaflet-theme-soft: rgba(199, 23, 50, 0.14);
  --leaflet-theme-soft-2: rgba(33, 92, 204, 0.18);
  --leaflet-theme-text: var(--surface-deep);
  --leaflet-theme-on-accent: #ffffff;
  --leaflet-theme-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 255, 0.99));
  --leaflet-theme-card-border: rgba(199, 23, 50, 0.16);
  --leaflet-theme-card-text: #242742;
  --leaflet-theme-card-muted: rgba(73, 80, 116, 0.72);
  --leaflet-theme-panel-bg: linear-gradient(135deg, rgba(201, 28, 54, 0.95), rgba(34, 80, 171, 0.98));
  --leaflet-theme-panel-shadow: rgba(84, 49, 118, 0.18);
}

.leaflets-showcase-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.leaflets-showcase-copy h3 {
  margin: 6px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.85rem;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.leaflets-showcase-copy {
  padding: 18px 20px;
  border-radius: 24px;
  background: var(--leaflet-theme-panel-bg);
  color: var(--leaflet-theme-on-accent);
  box-shadow: 0 18px 40px var(--leaflet-theme-panel-shadow);
}

.leaflets-showcase-copy .section-tag,
.leaflets-showcase-copy h3,
.leaflets-showcase-copy .cart-store-total,
.leaflets-showcase-copy .cart-store-total strong {
  color: var(--leaflet-theme-on-accent);
}

.leaflets-showcase-copy .section-tag {
  opacity: 0.78;
}

.leaflets-showcase-copy .cart-store-total {
  margin: 10px 0 0;
}

.leaflets-showcase-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 10px;
}

.leaflets-stat {
  padding: 12px 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 249, 255, 0.96));
  border: 1px solid rgba(29, 95, 211, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.leaflets-showcase[class*="store-theme-"] .leaflets-stat {
  background: var(--leaflet-theme-card-bg);
  border-color: var(--leaflet-theme-card-border);
  color: var(--leaflet-theme-card-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 12px 24px rgba(21, 31, 57, 0.08);
}

.leaflets-showcase[class*="store-theme-"] .leaflets-stat .section-tag,
.leaflets-showcase[class*="store-theme-"] .leaflets-stat strong {
  color: var(--leaflet-theme-card-text);
}

.leaflets-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--surface-deep);
  font-size: 1.3rem;
  line-height: 1;
}

.leaflets-stat:nth-child(1) strong {
  color: var(--accent);
}

.leaflets-stat:nth-child(2) strong {
  color: #1f8f57;
}

.leaflets-stat:nth-child(3) strong {
  color: var(--danger);
}

.leaflets-showcase[class*="store-theme-"] .leaflets-stat:nth-child(1) strong,
.leaflets-showcase[class*="store-theme-"] .leaflets-stat:nth-child(2) strong,
.leaflets-showcase[class*="store-theme-"] .leaflets-stat:nth-child(3) strong {
  color: var(--leaflet-theme-text);
}

.leaflets-showcase-actions {
  display: flex;
  justify-content: flex-end;
}

.leaflets-group {
  display: grid;
  gap: 12px;
}

.leaflets-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.leaflets-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(220, 233, 255, 0.85), rgba(255, 243, 228, 0.88));
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid rgba(29, 95, 211, 0.12);
}

.leaflets-showcase[class*="store-theme-"] .leaflets-count-pill {
  background: linear-gradient(180deg, color-mix(in srgb, var(--leaflet-theme-soft) 84%, white 16%), color-mix(in srgb, var(--leaflet-theme-soft-2) 82%, white 18%));
  border-color: color-mix(in srgb, var(--leaflet-theme-main) 22%, white 78%);
  color: var(--leaflet-theme-main);
}

.leaflets-links {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.leaflets-products {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.leaflet-product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border-radius: 20px;
  border: 1px solid rgba(29, 95, 211, 0.14);
  background:
    radial-gradient(circle at top right, rgba(255, 241, 220, 0.44), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 249, 255, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.62),
    0 10px 22px rgba(29, 95, 211, 0.05);
  position: relative;
}

.leaflets-showcase[class*="store-theme-"] .leaflet-product-card {
  background: var(--leaflet-theme-card-bg);
  border-color: var(--leaflet-theme-card-border);
  color: var(--leaflet-theme-card-text);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 12px 28px rgba(21, 31, 57, 0.08);
}

.leaflet-product-card::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--leaflet-theme-soft, var(--accent)), var(--leaflet-theme-soft-2, #ff8e63));
}

.leaflet-product-card:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 16px 30px rgba(29, 95, 211, 0.09);
}

.leaflet-product-card strong,
.leaflet-product-card span {
  display: block;
}

.leaflet-product-copy strong {
  font-size: 1.06rem;
  line-height: 1.16;
  letter-spacing: -0.01em;
}

.leaflets-showcase[class*="store-theme-"] .leaflet-product-copy strong,
.leaflets-showcase[class*="store-theme-"] .leaflet-product-card span {
  color: var(--leaflet-theme-card-text);
}

.leaflet-product-card span {
  margin-top: 4px;
  color: var(--muted);
}

.leaflet-product-meta {
  font-size: 0.92rem;
  opacity: 0.88;
}

.leaflet-product-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.leaflet-product-actions .top-item-btn,
.leaflets-showcase-actions .refresh-item-btn {
  border-radius: 999px;
}

.leaflets-showcase.store-theme-kaufland .leaflet-product-actions .top-item-btn,
.leaflets-showcase.store-theme-kaufland .leaflets-showcase-actions .refresh-item-btn {
  background: rgba(255, 255, 255, 0.96);
  color: #b91922;
  border-color: rgba(214, 31, 38, 0.18);
}

.leaflets-showcase[class*="store-theme-"] .leaflet-product-actions .top-item-btn,
.leaflets-showcase[class*="store-theme-"] .leaflets-showcase-actions .refresh-item-btn {
  background: rgba(255, 255, 255, 0.92);
  color: var(--leaflet-theme-main);
  border-color: color-mix(in srgb, var(--leaflet-theme-main) 18%, white 82%);
}

.leaflet-page-content {
  display: grid;
  gap: 14px;
}

.leaflet-page-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.leaflet-page-image {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(29, 95, 211, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

.leaflet-link-card {
  display: grid;
  gap: 6px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(29, 95, 211, 0.14);
  background:
    radial-gradient(circle at top right, rgba(255, 241, 220, 0.5), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 249, 255, 0.98));
  color: var(--surface-deep);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 28px rgba(29, 95, 211, 0.05);
  position: relative;
  overflow: hidden;
}

.leaflets-showcase[class*="store-theme-"] .leaflet-link-card {
  background: var(--leaflet-theme-card-bg);
  border-color: var(--leaflet-theme-card-border);
  color: var(--leaflet-theme-card-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 14px 28px rgba(21, 31, 57, 0.08);
}

.leaflet-link-card:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 18px 34px rgba(29, 95, 211, 0.09);
}

.leaflet-link-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--leaflet-theme-soft, var(--accent)), var(--leaflet-theme-soft-2, #ff9168));
}

.leaflet-link-card.current strong {
  color: #12492f;
}

.leaflet-link-card.upcoming strong {
  color: #7b2d23;
}

.leaflet-link-card.current .leaflet-link-kicker {
  color: #1f8f57;
}

.leaflet-link-card.upcoming .leaflet-link-kicker {
  color: var(--danger);
}

.leaflets-showcase[class*="store-theme-"] .leaflet-link-card strong,
.leaflets-showcase[class*="store-theme-"] .leaflet-link-card span,
.leaflets-showcase[class*="store-theme-"] .leaflet-link-kicker {
  color: var(--leaflet-theme-card-text);
}

.leaflets-showcase[class*="store-theme-"] .leaflet-link-card span {
  color: var(--leaflet-theme-card-muted);
}

.leaflets-showcase[class*="store-theme-"] .leaflet-link-card.current .leaflet-link-kicker,
.leaflets-showcase[class*="store-theme-"] .leaflet-link-card.upcoming .leaflet-link-kicker {
  color: var(--leaflet-theme-main);
}

.leaflet-link-kicker {
  color: var(--brand);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.leaflet-link-card strong {
  font-size: 1.02rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.leaflet-link-card span {
  color: var(--muted);
}

/* Leaflets modal redesign */
.leaflets-panel {
  width: min(1120px, calc(100vw - 32px));
  max-height: 84vh;
  gap: 0;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.99), rgba(241, 247, 255, 0.98)),
    radial-gradient(circle at top right, rgba(220, 233, 255, 0.3), transparent 28%);
  border: 1px solid #d9e2f1;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.leaflets-panel .cart-panel-top {
  padding-bottom: 16px;
  border-bottom: 1px solid #e4ebf5;
}

.leaflets-panel .cart-panel-top h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  color: #14213d;
}

.leaflet-modal-subtitle {
  margin: 8px 0 0;
  color: #6b7a90;
  font-size: 14px;
  line-height: 1.45;
}

.leaflets-panel .cart-panel-actions .delete-btn {
  background: #fff;
  border: 1px solid #d6e0f0;
  color: #21314d;
  box-shadow: none;
}

.leaflets-panel .cart-panel-actions .delete-btn:hover {
  background: #f5f8fd;
  border-color: #c7d4e8;
  box-shadow: none;
  transform: none;
  filter: none;
}

.leaflets-store-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 24px;
  margin: 0 -24px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  border-bottom: 1px solid #e4ebf5;
}

.leaflets-panel .cart-tab {
  flex: 0 0 auto;
  min-width: 0;
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d6e0f0;
  background: #fff;
  color: #21314d;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: none;
}

.leaflets-panel .cart-tab:hover {
  background: #f5f8fd;
  border-color: #c7d4e8;
  box-shadow: none;
  transform: none;
}

.leaflets-panel .cart-tab.active {
  background: #1f5eff;
  color: #fff;
  border-color: #1f5eff;
  box-shadow: none;
}

.leaflets-panel .cart-tab-name {
  font-weight: 700;
}

.leaflets-panel .cart-tab-count {
  display: none;
}

.leaflets-result {
  display: grid;
  gap: 0;
}

.leaflets-showcase {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.leaflet-storebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #e4ebf5;
  min-height: 72px;
}

.leaflet-storebar-copy {
  display: grid;
  gap: 6px;
}

.leaflet-store-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf3ff;
  color: #4b74d8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leaflet-storebar strong {
  display: block;
  color: #14213d;
  font-size: 18px;
  line-height: 1.2;
}

.leaflet-storebar span {
  color: #6b7a90;
  font-size: 14px;
}

.leaflet-store-link {
  color: #1f5eff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.leaflet-store-link:hover {
  text-decoration: underline;
}

.leaflets-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0 12px;
}

.leaflets-toolbar h3 {
  margin: 0;
  color: #14213d;
  font-size: 20px;
}

.leaflets-tools {
  display: flex;
  gap: 12px;
}

.leaflets-tools input,
.leaflets-tools select {
  height: 42px;
  border: 1px solid #d6e0f0;
  border-radius: 12px;
  background: #fff;
  padding: 0 14px;
  color: #21314d;
  box-shadow: none;
}

.leaflets-tools input {
  min-width: 240px;
}

.leaflets-products {
  padding: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.leaflet-product-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  background: var(--surface-panel);
  border: 1px solid rgba(29, 95, 211, 0.12);
  border-radius: 18px;
  padding: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--shadow-panel-soft);
}

.leaflet-product-card::before {
  display: none;
}

.leaflet-product-card:hover {
  transform: translateY(-2px);
  border-color: #c8d7f0;
  box-shadow:
    0 14px 28px rgba(17, 42, 82, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.leaflet-product-copy strong {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
  color: #14213d;
}

.leaflet-product-meta {
  margin: 0 0 14px;
  font-size: 13px;
  color: #6b7a90;
  opacity: 1;
}

.leaflet-product-price {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #14213d;
}

.leaflet-product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.leaflet-detail-link {
  color: #71819a;
  text-decoration: none;
  font-weight: 600;
}

.leaflet-detail-link:hover {
  color: #4d5f7d;
  text-decoration: underline;
}

.leaflet-primary-btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 0;
  background: #1f5eff;
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}

.leaflet-primary-btn:hover {
  background: #194fe0;
  box-shadow: none;
  transform: none;
  filter: none;
}

.quantity-form {
  width: min(460px, calc(100vw - 24px));
  max-height: min(82dvh, 560px);
  margin: auto;
  padding: 24px;
  display: grid;
  gap: 12px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.98), rgba(234, 244, 255, 0.96));
}

.location-form {
  width: min(460px, calc(100vw - 24px));
  max-height: min(82dvh, 620px);
  margin: auto;
  padding: 24px;
  display: grid;
  gap: 12px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.98), rgba(234, 244, 255, 0.96));
}

.quantity-form h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.05;
}

.location-form h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.05;
}

.quantity-copy {
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.5;
}

.quantity-form label {
  font-weight: 800;
}

.location-form label {
  font-weight: 800;
}

.quantity-actions {
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1320px) {
  .preferred-section .staples-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .hero,
  .toolbar-grid,
  .items-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 22px, 100%);
  }

  .preferred-section .staples-list {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 14ch;
    font-size: clamp(1.95rem, 4.9vw, 3rem);
  }

  .hero-aside {
    padding: 16px;
  }

  .toolbar-grid {
    margin-top: 0;
  }

  .leaflets-panel {
    width: min(100vw - 20px, 100%);
  }

  .leaflets-products {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  html {
    scroll-behavior: auto;
    font-size: 14px;
  }

  body {
    background:
      linear-gradient(180deg, rgba(242, 247, 255, 0.9), rgba(227, 237, 252, 0.86)),
      radial-gradient(circle at top left, rgba(29, 95, 211, 0.08), transparent 24%),
      radial-gradient(circle at 85% 15%, rgba(17, 42, 82, 0.08), transparent 20%),
      url("/peakpx.jpg") center / cover no-repeat;
  }

  .page-backdrop {
    background: rgba(241, 246, 255, 0.26);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0.62;
  }

  .card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 10px 24px rgba(17, 42, 82, 0.12);
  }

  .shell {
    width: min(100% - 14px, 100%);
    margin: 8px auto 18px;
    gap: 10px;
  }

  .hero,
  .form-card,
  .action-card,
  .top-section,
  .item-card,
  .empty-card {
    padding: 14px;
    border-radius: 18px;
  }

  .hero {
    min-height: auto;
    animation: none;
  }

  .hero-aside {
    padding: 14px;
    border-radius: 18px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 1.8rem;
    line-height: 1.02;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .brand-title {
    font-size: 1.35rem;
  }

  .brand-subtitle {
    font-size: 0.9rem;
  }

  .toolbar-grid {
    margin-top: 0;
  }

  .lead {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .hero-location {
    font-size: 1.4rem;
  }

  .toolbar-grid,
  .top-list,
  .items-grid {
    gap: 12px;
  }

  .form-card,
  .action-card,
  .staples-section,
  .preferred-section,
  .store-mode-section,
  .item-card,
  .empty-card,
  .top-section {
    animation: none;
  }

  .store-mode-controls,
  .preferred-form,
  .store-mode-summary-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .store-mode-controls select,
  .store-mode-controls button,
  .preferred-form button {
    width: 100%;
  }

  .top-list {
    grid-template-columns: 1fr;
  }

  .form-row,
  .cart-item-row,
  .offer-row,
  .inline-filter-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .preferred-section .staples-list {
    grid-template-columns: 1fr;
  }

  .item-top {
    flex-direction: column;
  }

  .item-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-row button,
  .hero-aside button,
  .item-actions button,
  .inline-filter-row select,
  .preferred-form input,
  .preferred-form button,
  .form-row input {
    width: 100%;
  }

  input,
  .inline-filter-row select,
  .preferred-form input {
    padding: 12px 14px;
  }

  button {
    padding: 11px 14px;
  }

  .offer-row {
    gap: 8px;
  }

  .offer-row-shell,
  .offer-pick-btn {
    display: grid;
    grid-template-columns: 1fr;
  }

  .offer-main {
    display: grid;
  }

  .offer-top-btn {
    border-left: 0;
    border-top: 1px solid var(--line);
    min-width: 0;
    min-height: 42px;
    width: 100%;
    justify-content: center;
  }

  .offer-meta {
    text-align: left;
    min-width: 0;
    font-size: 0.9rem;
  }

  .offer-page-link {
    justify-self: start;
    margin: 0 15px 12px;
  }

  .cart-item-actions {
    justify-items: start;
  }

  .store-cart-top,
  .store-cart-stats {
    grid-template-columns: 1fr;
    display: grid;
  }

  .cart-count {
    justify-self: start;
  }

  .cart-item-row {
    grid-template-columns: 1fr;
  }

  .cart-panel,
  .quantity-form {
    padding: 16px;
  }

  .leaflets-panel {
    padding: 16px;
  }

  .leaflets-panel .cart-panel-top,
  .leaflet-storebar,
  .leaflets-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .leaflets-store-list {
    margin: 0 -16px;
    padding: 12px 16px;
  }

  .leaflets-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .leaflets-tools input {
    min-width: 0;
  }

  .leaflet-store-link,
  .leaflet-primary-btn {
    width: fit-content;
  }

  .leaflets-panel {
    width: min(100vw - 12px, 100%);
    max-height: min(92vh, 920px);
    padding: 14px;
    gap: 12px;
  }

  .cart-panel-top {
    grid-template-columns: 1fr;
    display: grid;
  }

  .cart-panel-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cart-dialog-list {
    grid-template-columns: 1fr;
  }

  .leaflets-store-list,
  .leaflets-products,
  .leaflets-links {
    grid-template-columns: 1fr;
  }

  .leaflets-showcase-top,
  .leaflets-showcase-stats,
  .leaflets-group-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .leaflets-showcase-actions {
    justify-content: start;
  }

  .leaflet-product-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .leaflet-product-actions {
    width: 100%;
    grid-template-columns: 1fr 1fr;
    display: grid;
    justify-items: stretch;
  }

  .leaflet-product-actions .top-item-btn,
  .leaflet-product-actions button {
    width: 100%;
    justify-content: center;
  }

  .cart-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cart-tab {
    width: 100%;
  }

  .quantity-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .best-price-highlight {
    width: 100%;
    text-align: center;
  }

  .item-name,
  .staple-top h3 {
    font-size: 1.2rem;
    line-height: 1.08;
  }

  .advice,
  .location-text,
  .item-check,
  .source-line {
    font-size: 0.94rem;
  }

  .item-card {
    gap: 2px;
  }

  .item-actions {
    gap: 6px;
  }

  .offer-pick-btn {
    padding: 12px;
    gap: 10px;
  }

  .offer-row span {
    line-height: 1.26;
  }

  .best-price-line {
    line-height: 1.35;
  }
}

@media (hover: none) and (pointer: coarse) {
  html {
    scroll-behavior: auto;
  }

  body {
    background:
      linear-gradient(180deg, rgba(239, 246, 255, 0.84), rgba(223, 236, 255, 0.8)),
      radial-gradient(circle at top left, rgba(215, 58, 73, 0.12), transparent 24%),
      radial-gradient(circle at 85% 15%, rgba(29, 95, 211, 0.1), transparent 20%),
      url("/peakpx.jpg") center / cover no-repeat;
  }

  .page-backdrop,
  .card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .page-backdrop {
    background: rgba(230, 240, 255, 0.18);
    opacity: 0.45;
  }

  .hero,
  .form-card,
  .action-card,
  .staples-section,
  .preferred-section,
  .store-mode-section,
  .item-card,
  .empty-card,
  .top-section {
    animation: none;
  }
}



