:root {
  --blue: #0628ff;
  --blue-dark: #001dc5;
  --green: #35b84f;
  --gold: #ffd400;
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #151922;
  --muted: #69707d;
  --line: #e5e8ef;
  --soft-blue: #eef3ff;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.page {
  min-height: 100vh;
  padding-bottom: 92px;
}

.hero {
  position: relative;
  height: 138px;
  overflow: hidden;
  background: #dfe8f9;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.open-pill {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.open-pill::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.store-card {
  position: relative;
  z-index: 2;
  margin: -18px 16px 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.store-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.store-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.store-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.2;
}

.verified {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid #86b9db;
  border-radius: 50%;
  color: #0c83be;
  font-size: 10px;
  font-weight: 900;
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #222936;
  font-size: 12px;
}

.free {
  color: #1fa545;
  font-weight: 700;
}

.address-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid #d5dcf6;
  border-radius: 8px;
  background: #f0f4ff;
  color: #3c4351;
  font-size: 12px;
}

.change-address {
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-size: 12px;
  text-decoration: underline;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 10px;
  margin-top: 13px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  background: #f2f3f6;
  color: #707782;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f2f3f6;
  color: #1e2530;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
}

.tab-btn {
  height: 36px;
  min-width: 74px;
  border: 0;
  border-radius: 8px;
  background: #eceef2;
  color: #101723;
  padding: 0 18px;
}

.tab-btn.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 40, 255, 0.25);
}

.content {
  padding: 10px 16px 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 16px;
  font-size: 22px;
  line-height: 1.15;
}

.title-icon {
  color: #071a78;
  text-shadow: 0 1px 0 #ffdc00;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.featured-card {
  overflow: hidden;
  min-height: 212px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.featured-img {
  position: relative;
  height: 128px;
  overflow: hidden;
  background: #fff;
}

.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge {
  position: absolute;
  top: 11px;
  left: 12px;
  z-index: 1;
  border-radius: 999px;
  background: var(--gold);
  color: #2c2300;
  padding: 6px 9px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

.featured-info {
  padding: 12px;
  background: #fff;
}

.featured-info h3,
.product-info h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.desc {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.price {
  color: var(--blue-dark);
  font-size: 17px;
  font-weight: 900;
}

.product-list {
  display: grid;
  gap: 14px;
}

.product-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.product-item img {
  width: 104px;
  height: 88px;
  border-radius: 8px;
  background: #f7f8fb;
  object-fit: contain;
}

.add-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(6, 40, 255, 0.25);
}

.footer {
  margin-top: 28px;
  padding: 22px 12px 90px;
  color: #7d8490;
  text-align: center;
  font-size: 12px;
}

.footer a {
  color: #4b5563;
  text-decoration: none;
}

.floating-cart {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(400px, calc(100vw - 28px));
  min-height: 58px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  transform: translateX(-50%);
  padding: 10px 18px;
  box-shadow: 0 10px 25px rgba(6, 40, 255, 0.38), 0 0 28px rgba(255, 89, 0, 0.18);
  text-align: left;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -15px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.cart-label {
  font-size: 16px;
  font-weight: 900;
}

.cart-total-pill {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.17);
  padding: 9px 13px;
  font-weight: 900;
}

.app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.back-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f3f6ff;
  color: var(--blue-dark);
  font-size: 24px;
}

.app-bar h1 {
  margin: 0;
  font-size: 22px;
}

.cart-badge {
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.cart-page,
.checkout-page,
.pix-page {
  min-height: 100vh;
  background: #f7f8fb;
  padding-bottom: 100px;
}

.cart-body,
.checkout-body,
.pix-body {
  padding: 16px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.05);
}

.cart-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 88px;
  height: 78px;
  border-radius: 8px;
  object-fit: contain;
  background: #f8f9fb;
}

.cart-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.note-label {
  display: block;
  margin-top: 12px;
  color: #606977;
  font-size: 12px;
}

.note-field {
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  outline: 0;
  resize: vertical;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-control button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.qty-control strong {
  min-width: 20px;
  text-align: center;
}

.remove-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff1f1;
  color: #d93025;
  font-size: 18px;
}

.summary {
  padding: 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: #414856;
}

.summary-line.discount {
  color: #169447;
}

.summary-line.total {
  margin: 16px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.old-fee {
  color: #8a919d;
  text-decoration: line-through;
}

.free-fee {
  color: #169447;
  font-weight: 900;
}

.upsell-title {
  margin: 20px 0 10px;
  color: #333b48;
  font-size: 13px;
  font-weight: 900;
}

.upsell-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.upsell-card:last-child {
  border-bottom: 0;
}

.upsell-card img {
  width: 78px;
  height: 66px;
  object-fit: contain;
}

.upsell-card p {
  margin: 0 0 5px;
  font-size: 13px;
}

.upsell-btn {
  min-width: 132px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.reviews {
  margin-top: 16px;
}

.review-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.rating-big {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.stars {
  color: #ffd000;
  letter-spacing: 1px;
}

.review {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.review:last-child {
  border-bottom: 0;
}

.review img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.review strong {
  display: block;
  margin-bottom: 5px;
}

.review p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.review-time {
  color: #999faa;
  white-space: nowrap;
  font-size: 12px;
}

.cart-actions {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.outline-btn,
.primary-btn {
  min-height: 50px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
}

.outline-btn {
  border: 2px solid var(--blue);
  background: #fff;
  color: var(--blue);
}

.primary-btn {
  border: 0;
  background: var(--blue);
  color: #fff;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 16px;
  align-items: start;
}

.checkout-section {
  padding: 18px 20px;
  margin-bottom: 16px;
}

.checkout-section h2 {
  margin: 0 0 18px;
  color: var(--blue-dark);
  font-size: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #404756;
  font-size: 13px;
}

.field input {
  width: 100%;
  height: 44px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  outline: 0;
  padding: 0;
  color: #111827;
}

.payment-card,
.payment-info {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 2px solid #31bf59;
  border-radius: 12px;
  background: #effbf4;
  padding: 16px;
}

.payment-info {
  align-items: flex-start;
  margin-top: 12px;
}

.payment-card strong,
.payment-info strong {
  display: block;
  margin-bottom: 4px;
}

.payment-check {
  margin-left: auto;
  color: #27a747;
  font-size: 22px;
}

.trust-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.trust-card:last-child {
  border-bottom: 0;
}

.trust-card img {
  max-width: 58px;
  max-height: 44px;
  object-fit: contain;
}

.trust-card p {
  margin: 4px 0 0;
  color: #47505f;
  line-height: 1.45;
}

.secure-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: #606977;
  font-size: 12px;
}

.secure-row img {
  max-height: 32px;
  max-width: 170px;
  object-fit: contain;
}

.confirm-wrap {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 6, 12, 0.58);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(360px, calc(100vw - 32px));
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  padding: 28px 24px;
  text-align: center;
}

.modal.wide {
  width: min(460px, calc(100vw - 32px));
  text-align: left;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--blue);
  font-size: 38px;
}

.modal h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.modal p {
  margin: 0 0 22px;
  color: #3e4654;
  line-height: 1.45;
}

.cep-input {
  width: 100%;
  height: 54px;
  border: 1px solid #d8dce5;
  border-radius: 8px;
  outline: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
}

.modal .primary-btn {
  width: 100%;
  margin-top: 14px;
}

.coverage-line {
  display: grid;
  gap: 8px;
  margin: 12px 0 18px;
  color: #2c3340;
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border: 4px solid #e9edff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

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

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 9, 20, 0.5);
}

.product-sheet {
  width: min(470px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
}

.product-modal-head {
  position: relative;
  padding: 18px 18px 0;
}

.product-modal-head img {
  display: block;
  width: 100%;
  height: 180px;
  border-radius: 10px;
  object-fit: contain;
  background: #f7f8fb;
}

.close-btn {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 24px;
}

.product-modal-body {
  padding: 18px;
}

.product-modal-body h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.option-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  border: 2px solid var(--blue);
  border-radius: 10px;
  background: #f3f6ff;
  color: #111827;
  padding: 12px 14px;
  font-weight: 800;
}

.obs-field {
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  resize: vertical;
  padding: 12px;
}

.modal-bottom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.modal-bottom .primary-btn {
  margin: 0;
}

#toast {
  position: fixed;
  left: 50%;
  top: 16px;
  z-index: 70;
  border-radius: 8px;
  background: #101828;
  color: #fff;
  padding: 12px 16px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity 0.2s, transform 0.2s;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.order-pop {
  position: fixed;
  right: 14px;
  top: 72px;
  z-index: 25;
  width: min(330px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.order-pop img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: contain;
}

.order-pop small {
  color: #1ab650;
  font-weight: 900;
  font-size: 11px;
}

.order-pop strong,
.order-pop span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-pop em {
  color: #cc1731;
  font-style: normal;
  font-weight: 900;
}

.order-close {
  align-self: start;
  border: 0;
  background: transparent;
  color: #9aa1ad;
  font-size: 18px;
}

.empty {
  padding: 34px 16px;
  text-align: center;
}

.qr-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
}

.fake-qr {
  display: grid;
  place-items: center;
  width: 210px;
  height: 210px;
  border: 10px solid #fff;
  outline: 1px solid var(--line);
  background:
    linear-gradient(90deg, #111 10px, transparent 10px) 0 0 / 24px 24px,
    linear-gradient(#111 10px, transparent 10px) 0 0 / 24px 24px,
    #fff;
}

.fake-qr span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.pix-code {
  width: 100%;
  min-height: 72px;
  border: 1px dashed #b7bdca;
  border-radius: 8px;
  background: #fafbfc;
  padding: 12px;
  color: #3f4755;
  word-break: break-word;
}

@media (max-width: 820px) {
  .featured-grid,
  .checkout-grid,
  .form-grid,
  .qr-card {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 120px;
  }

  .product-item {
    grid-template-columns: 86px minmax(0, 1fr) 42px;
    gap: 10px;
  }

  .product-item img {
    width: 86px;
    height: 76px;
  }

  .cart-item,
  .upsell-card,
  .review {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .cart-item .qty-control,
  .cart-item .remove-btn,
  .upsell-btn,
  .review-time {
    grid-column: 2;
  }

  .upsell-btn {
    width: 100%;
  }

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

@media (max-width: 520px) {
  .store-row {
    align-items: flex-start;
  }

  .store-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .store-title,
  .section-title {
    font-size: 18px;
  }

  .featured-img {
    height: 112px;
  }

  .modal-bottom {
    grid-template-columns: 1fr;
  }
}
