:root {
  --bg: #09090b;
  --card: #17171c;
  --card2: #202027;
  --text: #ffffff;
  --muted: #b7b3bf;
  --accent: #ff3b30;
  --accent2: #ff8a00;
  --line: #303038;
  --success: #22d66f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255, 85, 0, .16), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  padding-bottom: 92px;
}

.loading {
  position: fixed;
  inset: 0;
  background: #09090b;
  display: grid;
  place-items: center;
  z-index: 999;
  text-align: center;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #333;
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(5,5,6,.92);
  backdrop-filter: blur(14px);
  z-index: 30;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.topbar strong { display: block; font-size: 19px; }
.topbar small { color: var(--muted); font-size: 12px; }

.icon-btn {
  border: 1px solid rgba(255,255,255,.08);
  background: #15151a;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  font-size: 21px;
}

.hero {
  min-height: 145px !important;
  height: 145px !important;
  max-height: 145px !important;
  background:
    linear-gradient(160deg, rgba(0,0,0,.28), rgba(0,0,0,.96)),
    url("imagens/banner.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 12px 18px 18px !important;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-block;
  background: rgba(255,138,0,.18);
  color: #ffd2a3;
  border: 1px solid rgba(255,138,0,.28);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: bold;
  font-size: 13px;
}

.hero h1 {
  font-size: 28px !important;
  margin: 6px 0 2px !important;
  letter-spacing: -1px;
  line-height: 1 !important;
}

.hero p {
  color: #dedbe3;
  margin: 0;
  max-width: 450px;
  line-height: 1.4;
}

main {
  max-width: 780px;
  margin: 8px auto 0 !important;
  padding: 0 16px;
}

.store-card, .address-card, .product, .modal-box, .search-box {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 26px;
  box-shadow: 0 16px 38px rgba(0,0,0,.28);
}

.store-card {
  display: flex;
  gap: 17px;
  align-items: center;
  padding: 19px;
}

.store-logo {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid;
  place-items: center;
  font-size: 38px;
  box-shadow: 0 14px 25px rgba(255,90,0,.18);
}

.store-card h2 { margin: 0 0 8px; font-size: 26px; }
.store-card p { margin: 4px 0; color: var(--muted); }
.online {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
  margin-right: 4px;
}

.muted { color: var(--muted) !important; }

.address-card {
  margin-top: 14px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.address-card small { display: block; color: var(--muted); margin-bottom: 5px; }
.address-card strong { font-size: 17px; }
.address-card span { color: var(--muted); font-size: 30px; }

.search-box {
  margin-top: 14px;
  padding: 10px;
}

.search-box input {
  background: transparent;
  border: 0;
  color: #fff;
  width: 100%;
  padding: 10px;
  font-size: 16px;
  outline: none;
}

.categories {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  padding: 24px 0 13px;
  position: sticky;
  top: 74px;
  background: rgba(9,9,11,.94);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.categories button {
  background: #19191f;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.08);
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  padding: 11px 15px;
  border-radius: 999px;
}

.categories button.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
}

.category-title {
  margin: 25px 0 14px;
  font-size: 23px;
}

.product {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 14px;
  padding: 14px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease;
}

.product:active { transform: scale(.99); }
.product:hover { border-color: rgba(255,138,0,.32); }

.product h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.2;
}

.product p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.product strong { font-size: 17px; color: #ffd2a3; }

.product-img {
  width: 104px;
  min-height: 104px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2a1c18, #3f2418);
  display: grid;
  place-items: center;
  font-size: 36px;
  overflow: hidden;
}

.product-img img, .item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-floating {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 18px;
  max-width: 740px;
  margin: auto;
  display: none;
  justify-content: space-between;
  align-items: center;
  border: 0;
  border-radius: 19px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  z-index: 60;
  box-shadow: 0 18px 34px rgba(255, 82, 0, .28);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  width: 100%;
  max-width: 740px;
  max-height: 89vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: 28px 28px 0 0;
  position: relative;
}

.close {
  position: absolute;
  right: 18px;
  top: 12px;
  border: 0;
  color: white;
  background: rgba(0,0,0,.32);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  z-index: 2;
}

.item-photo {
  height: 190px;
  border-radius: 23px;
  background: linear-gradient(135deg, #2a1c18, #3f2418);
  display: grid;
  place-items: center;
  font-size: 58px;
  margin-bottom: 18px;
  overflow: hidden;
}

.modal-price {
  display: block;
  color: #ffd2a3;
  font-size: 22px;
  margin-top: 12px;
}

label {
  display: block;
  margin: 17px 0 8px;
  color: var(--muted);
}

input, textarea, select {
  width: 100%;
  background: #101014;
  color: white;
  border: 1px solid #3b3b44;
  border-radius: 15px;
  padding: 14px;
  font-size: 16px;
  outline: none;
}

textarea { min-height: 78px; resize: vertical; }

.primary, .secondary {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 17px;
  padding: 17px;
  font-size: 17px;
  font-weight: bold;
}

.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
}

.secondary {
  background: #24242b;
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
}

.qty {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
  margin-top: 20px;
}

.qty button {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 0;
  font-size: 24px;
  background: #292931;
  color: white;
}

.qty span { font-size: 22px; font-weight: bold; }

.cart-line {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

.cart-line small { color: var(--muted); }

.remove {
  color: #ffb08a;
  background: transparent;
  border: 0;
  padding: 8px 0;
  font-weight: bold;
}

.coupon-box {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
  margin: 14px 0;
}

.coupon-box button {
  border: 0;
  border-radius: 15px;
  background: #2b2b33;
  color: white;
  font-weight: bold;
}

.totals {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.totals p, .totals h3 {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.empty {
  color: var(--muted);
  padding: 18px 0;
  text-align: center;
}

@media (min-width: 768px) {
  .modal { align-items: center; }
  .modal-box { border-radius: 28px; }
  .hero h1 { font-size: 54px; }
}

/* BANNER AUTOMÁTICO DO DASHBOARD - NÃO ALTERA O RESTANTE DO APP */
.hero.has-custom-banner {
  background: #09090b !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.hero.has-custom-banner .hero-content {
  display: none !important;
}

.soberbo-hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #09090b;
  z-index: 1;
  cursor: pointer;
}

.hero::after {
  z-index: 3 !important;
}

@media (min-width: 768px) {
  .hero {
    min-height: 170px !important;
    height: 170px !important;
    max-height: 170px !important;
  }

  .hero h1 {
    font-size: 36px !important;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 145px !important;
    height: 145px !important;
    max-height: 145px !important;
  }
}

/* SOBERBO - LAYOUT VISUAL ESTILO IFOOD */
/* Somente visual: não altera Firebase, carrinho, pedidos, tracking ou dashboard */

body {
  background:
    radial-gradient(circle at top, rgba(255, 85, 0, .10), transparent 30rem),
    #08080a;
}

.topbar {
  height: 66px;
  background: rgba(8,8,10,.96);
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.topbar strong {
  font-size: 18px;
  letter-spacing: -.2px;
}

.icon-btn {
  width: 43px;
  height: 43px;
  border-radius: 15px;
  background: #16161b;
}

main {
  max-width: 760px;
  margin: 8px auto 0 !important;
}

.address-card {
  margin-top: 12px;
  padding: 15px 17px;
  border-radius: 20px;
  background: #15151a;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}

.address-card small::before {
  content: "📍 ";
}

.address-card strong {
  font-size: 16px;
}

.search-box {
  margin-top: 12px;
  border-radius: 20px;
  background: #141419;
  box-shadow: none;
}

.search-box input {
  font-size: 15px;
}

.search-box::before {
  content: "🔎";
  position: absolute;
  margin: 18px 0 0 17px;
  opacity: .7;
}

.search-box input {
  padding-left: 42px;
}

.categories {
  top: 66px;
  padding: 17px 0 11px;
  gap: 9px;
  scrollbar-width: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.categories button {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  background: #15151b;
  color: #d5d2da;
  border: 1px solid rgba(255,255,255,.08);
}

.categories button.active,
.categories button:hover {
  color: #111;
  background: linear-gradient(135deg, #ffb347, #ff8a00);
  border-color: transparent;
}

#menu {
  display: grid;
  gap: 10px;
  padding-bottom: 92px;
}

.ifood-product-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) 112px;
  gap: 13px;
  align-items: stretch;
  padding: 14px;
  background: #141419;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(0,0,0,.20);
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.ifood-product-card:hover {
  border-color: rgba(255,138,0,.28);
  background: #17171d;
}

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

.ifood-product-card.locked {
  opacity: .72;
}

.ifood-product-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ifood-badge {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  margin-bottom: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffcf99;
  background: rgba(255,138,0,.13);
  border: 1px solid rgba(255,138,0,.22);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ifood-badge.subtle {
  color: #c9c6cf;
  background: #202027;
  border-color: rgba(255,255,255,.07);
}

.ifood-product-card h3 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -.25px;
}

.ifood-product-card p {
  margin: 0;
  color: #aaa6b1;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ifood-product-footer {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ifood-product-footer strong {
  color: #ffcf99;
  font-size: 18px;
  font-weight: 950;
}

.ifood-add-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffb347, #ff8a00);
  color: #111;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(255,138,0,.22);
}

.ifood-product-card.locked .ifood-add-btn {
  background: #383840;
  color: #fff;
  font-size: 18px;
  box-shadow: none;
}

.ifood-product-photo-wrap {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  overflow: hidden;
  background: #050505;
  align-self: center;
}

.soberbo-product-img.ifood-product-photo {
  width: 112px !important;
  height: 112px !important;
  object-fit: cover !important;
  object-position: center !important;
  margin: 0 !important;
  border-radius: 18px !important;
  display: block;
}

.ifood-product-placeholder {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  font-size: 42px;
  background: linear-gradient(135deg, #241a15, #3b2117);
}

.soberbo-floating {
  left: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  align-items: center;
}

#soberboCartBtn {
  width: min(760px, calc(100vw - 24px)) !important;
  min-height: 58px;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #ff3b30, #ff8a00) !important;
  color: #fff !important;
  font-size: 16px !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

#soberboTrackBtn {
  width: min(760px, calc(100vw - 24px)) !important;
  border-radius: 16px !important;
}

.soberbo-modal {
  backdrop-filter: blur(5px);
}

.soberbo-card {
  border-radius: 24px !important;
}

@media (max-width: 480px) {
  main {
    padding: 0 12px;
  }

  .ifood-product-card {
    grid-template-columns: minmax(0,1fr) 104px;
    padding: 13px;
    border-radius: 18px;
  }

  .ifood-product-photo-wrap,
  .soberbo-product-img.ifood-product-photo,
  .ifood-product-placeholder {
    width: 104px !important;
    height: 104px !important;
  }

  .ifood-product-card h3 {
    font-size: 17px;
  }

  .ifood-product-card p {
    font-size: 12.5px;
    -webkit-line-clamp: 2;
  }

  .ifood-product-footer strong {
    font-size: 17px;
  }
}

/* SOBERBO - loja aberta/fechada automática */
.store-status-card {
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: #141419;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}

.store-status-card strong {
  display: block;
  font-size: 15px;
}

.store-status-card small {
  color: #aaa6b1;
}

.store-status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.store-status-pill.open {
  background: rgba(34,214,111,.16);
  color: #7ef5a8;
  border: 1px solid rgba(34,214,111,.28);
}

.store-status-pill.closed {
  background: rgba(255,59,48,.15);
  color: #ff9a92;
  border: 1px solid rgba(255,59,48,.28);
}

.ifood-product-card.store-closed {
  opacity: .58;
}

.ifood-product-card.store-closed .ifood-add-btn {
  background: #34343b !important;
  color: #fff !important;
  box-shadow: none !important;
  font-size: 16px !important;
}
