﻿:root {
  --green: #0057d9;
  --green-dark: #003b95;
  --green-soft: #f0f7ff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5eaf2;
  --bg: #f5f7fa;
  --card: #FFFFFFEE;
  --danger: #e53935;
  --danger-hot: #ff3b30;
  --accent: #2563EB;
  --whatsapp: #16b957;
  --buy: #16b957;
  --buy-dark: #0b9f48;
  --buy-soft: #e9fbf1;
  --shadow: 0 16px 42px rgba(0, 87, 217, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 38px) 22px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(135deg, #0057d9 0%, #007bff 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(0, 87, 217, 0.18);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1.05;
}

.topbar p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.cart-button {
  min-width: 108px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(0, 43, 105, 0.24);
  color: white;
}

.cart-button strong {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  margin-left: 8px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 4vw, 28px) 148px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

#categorySelect {
  display: none;
}

.search-box,
.checkout-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input,
.search-panel select,
.checkout-form input,
.checkout-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 16px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
}

.search-box input:focus,
.search-panel select:focus,
.checkout-form input:focus,
.checkout-form select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 60, 93, 0.14);
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  border: 0;
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #fff4cc 0%, #ffe082 100%);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(255, 201, 40, 0.2);
}

.home-hero strong,
.home-hero span {
  display: block;
}

.home-hero strong {
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.05;
}

.home-hero span {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.home-hero button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--green);
  color: white;
  font-weight: 900;
  white-space: nowrap;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.category-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 16px;
  background: white;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.category-card:hover {
  border-color: #cfe1ff;
  box-shadow: 0 10px 24px rgba(0, 87, 217, 0.1);
  transform: translateY(-1px);
}

.category-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 16px;
  font-weight: 900;
}

.category-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: normal;
}

.category-card strong {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.category-chevron {
  color: var(--green);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.category-card.active {
  border: 2px solid var(--green);
  background: var(--green-soft);
}

.category-detail {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.category-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.category-detail-head h2 {
  margin: 0;
  color: var(--green);
  font-size: clamp(24px, 5vw, 34px);
  text-align: center;
}

.category-detail-head button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.category-detail > p {
  margin: 0;
  padding: 12px 18px;
  color: var(--muted);
  font-weight: 800;
}

.subcategory-list {
  display: grid;
}

.subcategory-block {
  border-top: 1px solid var(--line);
}

.subcategory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 64px;
  border: 0;
  padding: 0 18px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.subcategory-row span {
  font-size: 20px;
  font-weight: 700;
}

.subcategory-row strong {
  color: var(--green);
}

.segment-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
  background: #eef6fd;
}

.segment-list button {
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 500;
}

.segment-list button:first-child {
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
}

.segment-list small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 800;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 2px 10px;
  color: var(--muted);
  font-weight: 700;
}

.status-row.compact {
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(300px, 1fr));
  gap: 12px;
}

.product-image-wrap {
  position: relative;
  width: 118px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.product-image-wrap img {
  width: 118px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  object-fit: contain;
  background: #f8faf9;
}

.product-image-wrap.uses-fallback img {
  background: #fff8d6;
}

.illustrative-label {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  display: none;
  border-radius: 999px;
  padding: 3px 5px;
  background: rgba(255, 255, 255, 0.9);
  color: #5b6570;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 1px 5px rgba(15, 45, 78, 0.12);
}

.product-image-wrap.uses-fallback .illustrative-label {
  display: block;
}

.promo-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--danger-hot);
  color: white;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.34);
}

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

.promo-price {
  color: var(--danger);
}

.product-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  min-height: 172px;
  border: 1px solid #EEF2F7;
  border-radius: 20px;
  padding: 12px;
  background: #FFFFFFEE;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.product-info {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-width: 0;
}

.product-name {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.chip {
  border-radius: 999px;
  padding: 4px 8px;
  background: #EFF6FF;
  color: #3B82F6;
  font-size: 11px;
  font-weight: 700;
}

.promo-chip {
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff4cc;
  color: #9a6100;
  font-size: 12px;
  font-weight: 900;
}

.promo-card {
  border-color: #ffd76a;
}

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  align-self: end;
  gap: 8px;
  margin-top: auto;
}

.price-block {
  display: grid;
  gap: 2px;
}

.price-block span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.price-block em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  text-decoration: line-through;
}

.price {
  color: var(--danger);
  font-size: 28px;
  font-weight: 900;
  white-space: nowrap;
}

.add-button,
.send-button,
.pager button {
  border: 0;
  border-radius: 16px;
  color: white;
  font-weight: 800;
}

.add-button {
  min-height: 42px;
  padding: 0 16px;
  width: 100%;
  white-space: normal;
  background: linear-gradient(135deg, var(--buy) 0%, var(--buy-dark) 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.18);
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.add-button:hover {
  background: linear-gradient(135deg, #19c963 0%, var(--buy-dark) 100%);
  box-shadow: 0 6px 14px rgba(34, 197, 94, 0.22);
}

.add-button:active {
  transform: scale(0.96);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.pager button {
  min-width: 110px;
  min-height: 42px;
  background: var(--green);
}

.pager button:disabled {
  cursor: default;
  background: #cfdad5;
  color: #6f8179;
}

.floating-cart {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(420px, calc(100vw - 28px));
  min-height: 62px;
  border: 0;
  border-radius: 999px;
  padding: 10px 12px 10px 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  background: var(--ink);
  color: white;
  box-shadow: 0 16px 38px rgba(8, 21, 16, 0.28);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 28;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(520px, calc(100vw - 24px));
  transform: translateX(-50%);
  border: 1px solid rgba(0, 87, 217, 0.12);
  border-radius: 24px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bottom-nav-item {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bottom-nav-item span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 1;
}

.bottom-nav-item strong {
  font-size: 12px;
}

.bottom-nav-item.active {
  background: transparent;
  color: #2563EB;
}

.bottom-nav-item.active::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 1px;
  border-radius: 999px;
  background: #2563EB;
}

.bottom-nav-item em {
  position: absolute;
  top: 4px;
  right: 18%;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
}

.bottom-nav-item:not(.has-items) em {
  display: none;
}

.floating-cart.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-cart span {
  display: grid;
  min-width: 0;
  text-align: left;
}

.floating-cart strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-cart small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.floating-cart em {
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
}

.floating-cart.pulse em {
  animation: cartPulse 0.34s ease;
}

@keyframes cartPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.cart-drawer.open {
  pointer-events: auto;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(8, 21, 16, 0.46);
  transition: opacity 0.18s ease;
}

.cart-drawer.open .cart-backdrop {
  opacity: 1;
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  height: 100%;
  padding: 18px;
  overflow-y: auto;
  transform: translateX(100%);
  background: white;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.cart-drawer.open .cart-panel {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-head h2 {
  margin: 0;
  font-size: 24px;
}

.cart-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 22px;
}

.cart-items {
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  margin: 16px 0;
  min-height: 0;
  overflow: visible;
  padding-right: 2px;
}

.cart-drawer.cart-is-empty .cart-items {
  margin: 16px 0 0;
}

.checkout-form.hidden {
  display: none;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdfc;
}

.cart-item > div:first-child {
  min-width: 0;
}

.cart-item h3 {
  margin: 0 0 5px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.cart-promo {
  color: #8a5200 !important;
  font-weight: 900;
}

.qty-controls {
  display: grid;
  grid-template-columns: 34px 34px 34px;
  align-items: center;
  gap: 4px;
}

.qty-controls button {
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 900;
}

.qty-controls span {
  text-align: center;
  font-weight: 900;
}

.checkout-form {
  display: grid;
  flex: 0 0 auto;
  gap: 12px;
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.checkout-title {
  display: grid;
  gap: 3px;
  border-radius: 16px;
  padding: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.checkout-title span {
  font-size: 18px;
  font-weight: 900;
}

.checkout-title small {
  color: var(--muted);
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.legal-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(135deg, #0057d9 0%, #007bff 100%);
  color: white;
}

.cart-total strong {
  font-size: 24px;
}

.send-button {
  min-height: 58px;
  border-radius: 20px;
  background: var(--whatsapp);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(22, 185, 87, 0.22);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 34px 16px;
  background: white;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.cart-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: min(52vh, 320px);
  border-radius: 22px;
  padding: 24px 18px;
  background: #f7f9fc;
  color: var(--muted);
  text-align: center;
}

.cart-empty-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 3px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  font-size: 28px;
  font-weight: 900;
}

.cart-empty h3 {
  margin: 0;
  color: var(--green);
  font-size: clamp(24px, 6vw, 30px);
  line-height: 1.1;
}

.cart-empty p {
  margin: 0;
  max-width: 300px;
  font-size: 16px;
  line-height: 1.35;
}

.cart-empty button {
  min-height: 46px;
  border: 2px solid var(--green);
  border-radius: 16px;
  padding: 0 20px;
  background: white;
  color: var(--green);
  font-weight: 900;
}

@media (max-width: 920px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    gap: 10px;
    padding-top: calc(14px + env(safe-area-inset-top));
  }

  .topbar h1 {
    font-size: 23px;
  }

  .topbar p {
    font-size: 13px;
  }

  .cart-button {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 9px 10px;
  }

  .cart-button span {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .home-hero button {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    gap: 10px;
  }

  .category-detail-head {
    grid-template-columns: 1fr auto;
    padding: 14px;
  }

  .category-detail-head h2 {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: left;
  }

  .category-detail-head button:first-child {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .category-detail-head button:last-child {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .subcategory-row {
    min-height: 58px;
  }

  .subcategory-row span {
    font-size: 18px;
  }

  .category-card {
    min-height: 70px;
    padding: 12px;
  }

  .category-icon {
    width: 32px;
    height: 32px;
  }

  .category-name {
    font-size: 14px;
  }

  .product-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    min-height: 172px;
    padding: 10px;
  }

  .product-image-wrap {
    width: 112px;
  }

  .product-image-wrap img {
    width: 112px;
  }

  .product-name {
    min-height: 38px;
    font-size: 15px;
  }

  .price {
    font-size: 22px;
  }

  .add-button {
    min-height: 44px;
    font-size: 15px;
  }

  .floating-cart {
    left: 12px;
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: auto;
  }

  .cart-panel {
    padding: 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

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

  .qty-controls {
    grid-template-columns: 42px 42px 42px;
    justify-content: end;
  }

}

/* ============================================================
   V8 mobile retail refresh: Apple + Mercado Libre inspired
   Keeps the existing data and checkout logic intact.
   ============================================================ */

:root {
  --v8-bg: #f5f7fa;
  --v8-card: #ffffff;
  --v8-ink: #1f2937;
  --v8-muted: #6b7280;
  --v8-line: #e7edf5;
  --v8-blue: #0057d9;
  --v8-blue-soft: #edf6ff;
  --v8-green: #16b957;
  --v8-red: #e53935;
  --v8-yellow: #ffc928;
}

body {
  background: var(--v8-bg);
  color: var(--v8-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  border-radius: 0 0 30px 30px;
  padding: calc(18px + env(safe-area-inset-top)) clamp(18px, 4vw, 38px) 22px;
  background: var(--v8-card);
  color: var(--v8-ink);
  box-shadow: 0 12px 28px rgba(15, 36, 67, 0.08);
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.menu-button {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  width: 42px;
  height: 42px;
  place-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--v8-blue-soft);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--v8-blue);
}

.topbar h1 {
  color: var(--v8-ink);
  font-size: clamp(20px, 5vw, 30px);
}

.topbar p {
  color: var(--v8-muted);
  font-weight: 700;
}

.welcome-copy {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  margin-top: 2px;
}

.welcome-copy span {
  color: var(--v8-muted);
  font-size: 13px;
  font-weight: 800;
}

.welcome-copy strong {
  color: var(--v8-ink);
  font-size: clamp(22px, 6vw, 34px);
  line-height: 1.05;
}

.cart-button {
  min-width: 76px;
  border: 1px solid var(--v8-line);
  background: var(--v8-card);
  color: var(--v8-ink);
  box-shadow: 0 4px 16px rgba(15, 36, 67, 0.06);
}

.cart-button strong {
  background: var(--v8-yellow);
  color: var(--v8-ink);
}

main {
  padding-top: 14px;
}

.search-panel {
  border: 0;
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 18px rgba(15, 36, 67, 0.06);
}

.search-box span {
  display: none;
}

.search-box input,
.checkout-form input,
.checkout-form select {
  min-height: 54px;
  border: 0;
  border-radius: 17px;
  background: var(--v8-bg);
  font-size: 16px;
}

.search-box input::placeholder {
  color: #9aa6b2;
}

.home-hero {
  align-items: center;
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(135deg, #fff6d5 0%, #ffe089 100%);
  box-shadow: 0 12px 30px rgba(255, 201, 40, 0.18);
}

.home-hero strong {
  font-size: clamp(20px, 5vw, 28px);
}

.home-hero button {
  background: var(--v8-blue);
  color: #fff;
}

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 9px;
}

.product-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 112px;
  border: 0;
  border-radius: 18px;
  padding: 10px 12px;
  background: var(--v8-card);
  box-shadow: 0 3px 10px rgba(15, 36, 67, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:active {
  transform: scale(0.985);
}

.product-image-wrap {
  width: 86px;
}

.product-image-wrap img {
  width: 86px;
  border: 0;
  border-radius: 16px;
  background: #f7f9fc;
}

.product-image-wrap.uses-fallback img {
  background: #fff8d6;
}

.illustrative-label {
  right: 5px;
  bottom: 5px;
  left: 5px;
  padding: 2px 4px;
  font-size: 8px;
}

.promo-badge {
  top: -4px;
  left: -4px;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--v8-red);
  font-size: 10px;
}

.product-info {
  display: grid;
  align-content: center;
  grid-template-rows: auto auto auto;
  min-width: 0;
}

.product-name {
  min-height: 0;
  font-size: 15px;
  line-height: 1.22;
}

.product-meta {
  gap: 5px;
  margin: 6px 0 4px;
}

.chip {
  background: var(--v8-blue-soft);
  color: var(--v8-blue);
  font-size: 11px;
}

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.price-block {
  gap: 0;
}

.price {
  color: var(--v8-red);
  font-size: 21px;
}

.add-button-circle {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  border-radius: 999px;
  padding: 0;
  background: var(--v8-green);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.18);
}

.add-button-circle span {
  color: white;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-1px);
}

.add-button-circle:active {
  transform: scale(0.9);
}

.floating-cart {
  left: 14px;
  right: 14px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  width: auto;
  min-height: 58px;
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.96);
  box-shadow: 0 12px 32px rgba(15, 36, 67, 0.28);
}

.floating-cart em {
  background: var(--v8-green);
  color: white;
}

.bottom-nav {
  border: 1px solid rgba(15, 36, 67, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -4px 24px rgba(15, 36, 67, 0.08);
}

.bottom-nav-item {
  border-radius: 16px;
  color: var(--v8-muted);
}

.bottom-nav-item span {
  font-size: 11px;
  font-weight: 900;
}

.bottom-nav-item.active {
  color: var(--v8-blue);
}

.bottom-nav-item.active::after {
  background: var(--v8-blue);
}

.category-card {
  border: 0;
  box-shadow: 0 4px 14px rgba(15, 36, 67, 0.06);
}

.category-card.active {
  border: 1px solid var(--v8-blue);
  background: var(--v8-blue-soft);
}

.category-icon {
  background: var(--v8-blue-soft);
  color: var(--v8-blue);
}

.cart-total {
  background: linear-gradient(135deg, var(--v8-blue) 0%, #007bff 100%);
}

.send-button {
  background: var(--v8-green);
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding-top: calc(16px + env(safe-area-inset-top));
  }

  .topbar h1 {
    font-size: 23px;
  }

  .cart-button span {
    display: none;
  }

  main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 102px;
    gap: 10px;
    padding: 9px 10px;
  }

  .product-image-wrap,
  .product-image-wrap img {
    width: 78px;
  }

  .product-name {
    font-size: 14px;
  }

  .chip {
    font-size: 10px;
  }

  .price {
    font-size: 19px;
  }

  .add-button-circle {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .bottom-nav-item strong {
    font-size: 11px;
  }
}

/* UI polish overrides: compact mobile layout and calmer supermarket palette. */
:root {
  --brand-blue: #0057d9;
  --brand-blue-soft: #edf5ff;
  --market-green: #16b957;
  --offer-yellow: #fff0b8;
  --offer-yellow-strong: #ffd95a;
  --page-bg: #f4f6f9;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #667085;
  --soft-line: #e8eef6;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--page-bg);
}

.topbar {
  border-radius: 0 0 24px 24px;
  box-shadow: 0 10px 24px rgba(15, 36, 67, 0.07);
}

.cart-button {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cart-button strong {
  margin-left: 0;
  background: var(--offer-yellow-strong);
}

.search-panel {
  box-shadow: 0 4px 14px rgba(15, 36, 67, 0.045);
}

.home-hero {
  background: linear-gradient(135deg, #fff8dd 0%, var(--offer-yellow) 100%);
  box-shadow: 0 10px 22px rgba(255, 204, 58, 0.14);
}

.home-hero button {
  box-shadow: 0 8px 16px rgba(0, 87, 217, 0.18);
}

.status-row {
  min-width: 0;
  overflow: hidden;
}

.status-row span {
  min-width: 0;
}

#productStatus {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#pageStatus {
  flex: 0 1 auto;
  max-width: 48%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card {
  border: 1px solid rgba(232, 238, 246, 0.95);
  box-shadow: 0 2px 8px rgba(15, 36, 67, 0.045);
}

.product-name {
  color: #111827;
  font-weight: 850;
}

.chip {
  background: #f1f6ff;
  color: #2f6edb;
}

.price {
  color: #e62929;
}

.product-image-wrap.uses-fallback img {
  background: linear-gradient(145deg, #fff9df 0%, #f5f7fb 100%);
}

.bottom-nav {
  right: max(8px, env(safe-area-inset-right));
  left: max(8px, env(safe-area-inset-left));
  width: auto;
  transform: none;
  border-radius: 20px;
  padding: 4px;
}

.bottom-nav-item {
  min-height: 42px;
}

.bottom-nav-item strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-cart {
  right: 10px;
  left: 10px;
  bottom: calc(74px + env(safe-area-inset-bottom));
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding-right: 12px;
    padding-left: 14px;
  }

  .cart-button {
    display: none;
  }

  .welcome-copy strong {
    font-size: 28px;
  }

  .home-hero {
    gap: 12px;
    padding: 15px;
  }

  .home-hero strong {
    font-size: 23px;
  }

  .home-hero button {
    min-height: 40px;
  }

  .status-row {
    margin-right: 2px;
    margin-left: 2px;
    font-size: 14px;
  }

  #pageStatus {
    display: none;
  }

  .product-card {
    border-radius: 16px;
  }

  .bottom-nav-item strong {
    font-size: 9px;
  }
}

@media (max-width: 640px) {
  *,
  *::before,
  *::after {
    max-width: 100%;
  }

  body,
  #app {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  #app,
  main,
  .search-panel,
  .home-hero,
  .status-row,
  .product-grid,
  .pager {
    width: 100%;
    max-width: 100%;
  }

  main {
    overflow: hidden;
  }

  .home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .home-hero div,
  .home-hero strong,
  .home-hero span {
    min-width: 0;
  }

  .home-hero button {
    width: 100%;
    min-width: 0;
    padding-right: 12px;
    padding-left: 12px;
  }

  .pager {
    display: grid;
    grid-template-columns: 88px 28px 88px;
    justify-content: center;
    gap: 8px;
    padding: 0 2px;
  }

  .pager button {
    width: 100%;
    max-width: 88px;
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 13px;
  }

  .bottom-nav {
    right: 12px;
    left: 12px;
    max-width: calc(100vw - 24px);
    overflow: hidden;
  }

  .bottom-nav-item {
    min-width: 0;
    padding-right: 2px;
    padding-left: 2px;
  }

  .bottom-nav-item strong {
    display: none;
  }

  .bottom-nav-item span {
    width: 22px;
    height: 22px;
  }

  .bottom-nav-item em {
    right: 24%;
  }
}

@media (max-width: 380px) {
  main {
    padding-right: 8px;
    padding-left: 8px;
  }

  .home-hero {
    padding: 13px;
  }

  .home-hero strong {
    font-size: 21px;
  }

  .home-hero span {
    font-size: 14px;
  }

  .product-card {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .product-image-wrap,
  .product-image-wrap img {
    width: 70px;
  }

  .product-name {
    font-size: 13px;
  }

  .price {
    font-size: 18px;
  }
}

/* ============================================================
   V11.6 Genova market palette: warmer neighborhood supermarket
   ============================================================ */

:root {
  --market-bg: #f7f1e8;
  --market-card: #fffdf8;
  --market-ink: #24312b;
  --market-muted: #6f746f;
  --market-line: #eadfce;
  --market-red: #d83a2e;
  --market-red-dark: #a92620;
  --market-red-soft: #fff0ed;
  --market-green: #168a52;
  --market-green-dark: #0f6b3f;
  --market-green-soft: #e9f7ef;
  --market-cream: #fff2c7;
  --market-yellow: #ffc94a;
  --market-shadow: 0 14px 32px rgba(88, 63, 31, 0.11);
  --green: var(--market-red);
  --green-dark: var(--market-red-dark);
  --green-soft: var(--market-red-soft);
  --accent: var(--market-yellow);
  --buy: var(--market-green);
  --buy-dark: var(--market-green-dark);
  --buy-soft: var(--market-green-soft);
  --whatsapp: #17a85a;
  --bg: var(--market-bg);
  --card: var(--market-card);
  --ink: var(--market-ink);
  --muted: var(--market-muted);
  --line: var(--market-line);
  --shadow: var(--market-shadow);
  --v8-bg: var(--market-bg);
  --v8-card: var(--market-card);
  --v8-ink: var(--market-ink);
  --v8-muted: var(--market-muted);
  --v8-line: var(--market-line);
  --v8-blue: var(--market-red);
  --v8-blue-soft: var(--market-red-soft);
  --v8-green: var(--market-green);
  --v8-yellow: var(--market-yellow);
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 201, 74, 0.2), transparent 28%),
    linear-gradient(180deg, #fff8ec 0%, var(--market-bg) 38%, #f3ecdf 100%);
  color: var(--market-ink);
}

.topbar {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98) 0%, rgba(255, 246, 224, 0.98) 100%);
  border-bottom: 1px solid rgba(216, 58, 46, 0.09);
  box-shadow: 0 10px 28px rgba(88, 63, 31, 0.1);
}

.menu-button {
  background: var(--market-red-soft);
}

.menu-button span {
  background: var(--market-red);
}

.topbar h1 {
  color: var(--market-red-dark);
}

.welcome-copy span,
.topbar p {
  color: var(--market-muted);
}

.welcome-copy strong {
  color: var(--market-ink);
}

.cart-button {
  border-color: rgba(22, 138, 82, 0.18);
  background: #ffffff;
}

.cart-button strong,
.bottom-nav-item em {
  background: var(--market-yellow);
  color: #3b2a08;
}

.search-panel {
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 8px 22px rgba(88, 63, 31, 0.08);
}

.search-box input,
.checkout-form input,
.checkout-form select {
  background: #f5efe5;
}

.search-box input:focus,
.search-panel select:focus,
.checkout-form input:focus,
.checkout-form select:focus {
  border-color: var(--market-red);
  box-shadow: 0 0 0 3px rgba(216, 58, 46, 0.14);
}

.home-hero {
  background:
    linear-gradient(135deg, #fff7da 0%, #ffdf8f 54%, #ffd15f 100%);
  color: #3a2b10;
  box-shadow: 0 14px 30px rgba(174, 106, 20, 0.17);
}

.home-hero strong {
  color: var(--market-red-dark);
}

.home-hero span {
  color: #705a22;
}

.home-hero button {
  background: var(--market-red);
  color: white;
  box-shadow: 0 8px 18px rgba(216, 58, 46, 0.2);
}

.category-card,
.product-card,
.cart-panel {
  background: var(--market-card);
  box-shadow: 0 5px 16px rgba(88, 63, 31, 0.07);
}

.category-card.active {
  border-color: var(--market-red);
  background: var(--market-red-soft);
}

.category-icon {
  background: var(--market-red-soft);
  color: var(--market-red);
}

.chip {
  background: #f6eddf;
  color: #735f3e;
}

.add-button,
.send-button {
  background: var(--market-green);
  color: white;
}

.add-button:hover,
.send-button:hover {
  background: var(--market-green-dark);
}

.price {
  color: var(--market-green-dark);
}

.promo-card {
  background: #fffaf0;
}

.promo-badge {
  background: var(--market-red);
}

.promo-price {
  color: var(--market-red);
}

.bottom-nav {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(234, 223, 206, 0.9);
  box-shadow: 0 14px 42px rgba(88, 63, 31, 0.16);
}

.bottom-nav-item.active {
  color: var(--market-red);
}

.bottom-nav-item.active::after {
  background: var(--market-red);
}

.floating-cart {
  background: var(--market-green);
  box-shadow: 0 12px 24px rgba(22, 138, 82, 0.24);
}

.floating-cart em,
.cart-total {
  background: linear-gradient(135deg, var(--market-green) 0%, var(--market-green-dark) 100%);
}

.checkout-title,
.cart-empty {
  background: var(--market-green-soft);
}

.cart-empty-icon,
.cart-empty h3 {
  color: var(--market-green);
  border-color: var(--market-green);
}

/* Homepage service refresh */
main {
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

.service-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(234, 223, 206, 0.92);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 8px 22px rgba(88, 63, 31, 0.08);
}

.service-copy {
  display: grid;
  gap: 4px;
}

.service-copy strong {
  color: var(--market-ink);
  font-size: 17px;
  line-height: 1.16;
}

.service-copy span,
.service-panel small {
  color: var(--market-muted);
  font-weight: 750;
  line-height: 1.35;
}

.service-panel small {
  font-size: 12px;
}

.service-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-options span {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 14px;
  background: #f6eddf;
  color: #684f2d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.home-hero {
  margin-top: 10px;
  padding: 16px;
}

.home-hero strong {
  font-size: clamp(21px, 4vw, 30px);
}

.home-hero span {
  max-width: 560px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.quick-actions button,
.quick-actions a {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid rgba(216, 58, 46, 0.16);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--market-red);
  font: 850 13px/1.15 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(88, 63, 31, 0.06);
}

.quick-actions button:active,
.quick-actions a:active {
  transform: scale(0.98);
}

.weekend-offer {
  margin-top: 10px;
  padding: 14px;
  border-radius: 18px;
}

@media (max-width: 640px) {
  main {
    padding-bottom: calc(140px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  .search-panel {
    padding: 10px;
  }

  .service-panel {
    gap: 9px;
    padding: 13px;
  }

  .service-options {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .service-options span {
    min-height: 36px;
  }

  .weekend-offer .wo-main {
    font-size: 21px;
  }

  .quick-actions {
    gap: 7px;
  }

  .quick-actions button,
  .quick-actions a {
    min-height: 40px;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .quick-actions button,
  .quick-actions a {
    font-size: 11px;
  }
}

/* Mobile homepage alignment: one content width, no card-driven overflow. */
@media (max-width: 640px) {
  body,
  #app {
    width: 100%;
    max-width: 100%;
  }

  main {
    width: 100%;
    max-width: 100%;
    padding-right: 10px;
    padding-left: 10px;
  }

  .search-panel,
  .service-panel,
  .weekend-offer,
  .home-hero,
  .quick-actions,
  .status-row,
  .product-grid,
  .pager {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .service-panel,
  .weekend-offer,
  .home-hero {
    overflow: hidden;
  }

  .home-hero {
    padding-right: 14px;
    padding-left: 14px;
  }

  .home-hero div,
  .home-hero strong,
  .home-hero span {
    width: 100%;
    max-width: 100%;
  }

  .home-hero span,
  .service-copy span,
  .service-panel small,
  .service-options span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-actions button,
  .quick-actions a {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

/* Home simplification: short cards and two prominent actions. */
.service-panel {
  padding: 12px 14px;
}

.service-copy {
  gap: 0;
}

.service-copy strong {
  font-size: 16px;
}

.home-hero {
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
}

.home-hero strong {
  font-size: clamp(22px, 4vw, 30px);
}

.quick-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions button,
.quick-actions a {
  min-height: 54px;
  border: 0;
  color: white;
  font-size: 15px;
  box-shadow: 0 10px 22px rgba(88, 63, 31, 0.13);
}

.quick-actions button {
  background: var(--market-red);
}

.quick-actions a {
  background: linear-gradient(135deg, var(--market-green) 0%, var(--market-green-dark) 100%);
}

@media (max-width: 640px) {
  .service-panel {
    padding: 12px 13px;
  }

  .home-hero {
    min-height: 64px;
    padding: 13px 14px;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .quick-actions button,
  .quick-actions a {
    min-height: 50px;
    font-size: 14px;
  }
}

/* Center the two short homepage message cards. */
.service-panel,
.home-hero {
  justify-content: center;
  text-align: center;
}

.service-copy,
.home-hero div {
  width: 100%;
  justify-items: center;
  text-align: center;
}

.service-copy strong,
.home-hero strong {
  text-align: center;
  font-weight: 900;
}

/* Brand-red home header, aligned with Puntos Genova. */
.topbar {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, #df3029 0%, #c9211d 100%);
  border-bottom: 0;
  color: #fff;
  box-shadow: 0 14px 32px rgba(159, 26, 22, 0.24);
}

.brand-copy p {
  display: none;
}

.topbar h1,
.welcome-copy span,
.welcome-copy strong {
  color: #fff;
}

.welcome-copy strong {
  text-shadow: 0 2px 10px rgba(91, 12, 10, 0.18);
}

.menu-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
}

.menu-button span {
  background: #fff;
}

.cart-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.cart-button span {
  color: #fff;
}

.cart-button strong {
  background: var(--market-yellow);
  color: #4a170d;
}

.delivery-minimum-note {
  margin: -2px 0 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff3df;
  color: #8a4b12;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.delivery-minimum-note.ready {
  background: var(--market-green-soft);
  color: var(--market-green-dark);
}

/* Launch discount pricing and softer yellow home header. */
#app {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

main {
  width: 100%;
  max-width: 1180px;
}

.topbar {
  background:
    linear-gradient(135deg, #fff7da 0%, #ffdf8f 54%, #ffd15f 100%);
  border-bottom: 1px solid rgba(216, 58, 46, 0.08);
  color: #3a2b10;
  box-shadow: 0 14px 30px rgba(174, 106, 20, 0.17);
}

.topbar h1 {
  color: var(--market-red-dark);
}

.welcome-copy span {
  color: #705a22;
}

.welcome-copy strong {
  color: var(--market-ink);
  text-shadow: none;
}

.menu-button {
  border: 1px solid rgba(216, 58, 46, 0.14);
  background: rgba(255, 253, 248, 0.62);
}

.menu-button span {
  background: var(--market-red);
}

.cart-button {
  border-color: rgba(22, 138, 82, 0.18);
  background: rgba(255, 253, 248, 0.82);
  color: var(--market-ink);
}

.cart-button span {
  color: var(--market-ink);
}

.price-block {
  display: grid;
  justify-items: end;
  align-content: end;
  min-width: 0;
  gap: 2px;
}

.price-main-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
  gap: 6px;
  white-space: nowrap;
}

.price-block .price {
  max-width: 100%;
  text-align: right;
  line-height: 1.05;
}

.price-main-line .price,
.price-main-line .original-price,
.price-main-line .discount-badge {
  font-size: 14px;
}

.price-main-line .price {
  font-size: 22px;
  font-weight: 950;
}

.price-main-line .original-price,
.price-main-line .discount-badge {
  font-size: 15px;
}

.original-price {
  color: #766957;
  font-weight: 850;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  font-style: normal;
  white-space: nowrap;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 3px 8px;
  border: 1.5px solid var(--market-red);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--market-red);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.promo-price {
  color: var(--market-green-dark);
}

.weight-card .product-meta {
  align-items: center;
}

.weight-card .product-meta .price {
  width: 100%;
  margin-top: 4px;
  font-size: 17px;
}

@media (max-width: 640px) {
  main {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    padding-right: 10px;
    padding-left: 10px;
  }

  .service-panel,
  .home-hero,
  .quick-actions,
  .status-row,
  .product-grid,
  .pager {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin-right: 0;
    margin-left: 0;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions button,
  .quick-actions a {
    min-width: 0;
    max-width: 100%;
  }

  .price-row {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin-top: 5px;
  }

  .price-block {
    justify-items: end !important;
    max-width: 100%;
    gap: 2px;
  }

  .price-main-line {
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
  }

  .price-main-line .price {
    font-size: 21px;
    text-align: right;
  }

  .price-main-line .original-price,
  .price-main-line .discount-badge {
    font-size: 14px;
  }

  .product-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden;
  }

  .product-grid .product-card {
    position: relative;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 78px minmax(0, 1fr) !important;
    padding-right: 58px !important;
    overflow: hidden;
  }

  .product-grid .product-card .product-info {
    min-width: 0;
    max-width: 100%;
  }

  .product-grid .add-button-circle {
    position: absolute;
    right: 10px !important;
    bottom: 11px !important;
  }

  .discount-badge {
    min-height: 24px;
    padding: 3px 7px;
  }
}
