:root {
  --pm-purple: #5516b7;
  --pm-orange: #ff6846;
  --pm-ink: #1f1b25;
  --pm-muted: #716d76;
  --pm-line: #ece9ef;
  --pm-soft: #f7f5fa;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }

body.marketplace-location {
  margin: 0;
  background: #fff;
  color: var(--pm-ink);
  font-family: "Poppins", sans-serif;
}

.market-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; padding: 12px clamp(20px,5vw,72px); border-bottom: 1px solid var(--pm-line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.market-header .location-brand { justify-self: start; }
.location-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 15px; border: 1px solid #e6dff0; border-radius: 999px; background: #f8f5fc; color: var(--pm-purple); font-weight: 700; cursor: pointer; }
.location-chip span { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-button { justify-self:end; display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:0 15px;border:1px solid #e9e4ed;border-radius:13px;background:#fff;color:var(--pm-purple);font-weight:700;cursor:pointer; }
.marketplace { width: min(1180px,calc(100% - 40px)); min-height: calc(100vh - 140px); margin: 0 auto; padding: 28px 0 72px; }
.market-hero { margin-top:20px;padding:0;background:transparent;color:var(--pm-ink);box-shadow:none; }
.market-hero .location-kicker,.market-hero h1,.market-hero p{display:none}
.market-search { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 19px; border: 1px solid #e8e2ec; border-radius: 16px; background: #f8f6fa; box-shadow:none; color: var(--pm-purple); }
.market-search input { width: 100%; border: 0; outline: 0; color: var(--pm-ink); font: 500 14px Poppins,sans-serif; }
.banner-carousel { position:relative;margin:0;overflow:hidden;border-radius:22px;background:#eee;box-shadow:0 12px 30px rgba(35,18,48,.09); }.banner-track{display:flex;transition:transform .45s cubic-bezier(.22,.7,.22,1)}.banner-track>a,.banner-track>div{flex:0 0 100%;display:block}.banner-track picture,.banner-track img{display:block;width:100%}.banner-track img{aspect-ratio:3.4/1;object-fit:cover}.banner-dots{position:absolute;right:16px;bottom:12px;display:flex;gap:6px}.banner-dots button{width:7px;height:7px;padding:0;border:0;border-radius:9px;background:rgba(255,255,255,.6);box-shadow:0 1px 5px rgba(0,0,0,.2)}.banner-dots button.active{width:22px;background:#fff}
.category-list { display: flex; gap: 10px; margin: 27px 0 38px; padding: 2px 0 8px; overflow-x: auto; scrollbar-width: thin; }
.category-list button { flex: 0 0 auto; min-height: 42px; padding: 0 18px; border: 1px solid #e6e0ea; border-radius: 999px; background: #fff; color: #595360; font-weight: 600; cursor: pointer; }.category-list button.active { border-color: var(--pm-purple); background: var(--pm-purple); color: #fff; box-shadow: 0 8px 20px rgba(85,22,183,.18); }
.market-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }.market-section-head h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }.market-section-head p { margin: 5px 0 0; color: var(--pm-muted); font-size: 13px; }.market-section-head button { padding: 9px 0; border: 0; background: transparent; color: var(--pm-purple); font-weight: 700; cursor: pointer; }
.store-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }.store-card { min-width: 0; overflow: hidden; border: 1px solid #ebe7ef; border-radius: 20px; background: #fff; box-shadow: 0 10px 32px rgba(32,20,42,.07); transition: transform .2s,box-shadow .2s; }.store-card:hover { transform: translateY(-3px); box-shadow: 0 17px 38px rgba(48,25,67,.12); }.store-card a { color: inherit; text-decoration: none; }.store-cover { position: relative; height: 150px; background-position: center; background-size: cover; }.store-cover:after { position:absolute;inset:45% 0 0;content:"";background:linear-gradient(transparent,rgba(20,8,27,.35)); }.store-status { position: absolute; z-index: 2; top: 13px; right: 13px; padding: 6px 10px; border-radius: 999px; background: #fff; font-size: 10px; font-weight: 800; }.store-status.open { color: #07834f; }.store-status.closed { color: #a14343; }
.store-body { position: relative; display: flex; gap: 13px; padding: 19px; }.store-body>img { flex: 0 0 55px; width: 55px; height: 55px; margin-top: -44px; z-index: 3; border: 3px solid #fff; border-radius: 16px; background:#fff; object-fit:cover; box-shadow:0 6px 18px rgba(0,0,0,.12); }.store-copy { min-width:0; }.store-copy>span { display:block; overflow:hidden; color:var(--pm-muted); font-size:10px; white-space:nowrap; text-overflow:ellipsis; }.store-copy h3 { margin:4px 0 7px; overflow:hidden; font-size:16px; line-height:1.25; white-space:nowrap; text-overflow:ellipsis; }.store-copy p { display:-webkit-box; min-height:38px; margin:0 0 12px; overflow:hidden; color:var(--pm-muted); font-size:11px; line-height:1.65; -webkit-line-clamp:2; -webkit-box-orient:vertical; }.store-copy strong { color:var(--pm-purple); font-size:12px; }
.empty-results { padding:64px 20px; text-align:center; color:var(--pm-muted); }.empty-results>i { font-size:40px;color:#c6bdce; }.empty-results h2 { margin:15px 0 5px;color:var(--pm-ink); }
.app-nav{display:none}.account-modal[hidden]{display:none!important}.account-modal{position:fixed;z-index:100;inset:0}.account-backdrop{position:absolute;inset:0;width:100%;border:0;background:rgba(22,9,31,.48);backdrop-filter:blur(3px)}.account-sheet{position:absolute;top:0;right:0;width:min(460px,100%);height:100%;padding:54px 38px;overflow:auto;background:#fff;box-shadow:-20px 0 60px rgba(24,10,34,.18);animation:sheetIn .25s ease-out}.sheet-close{position:absolute;top:18px;right:18px;display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--pm-line);border-radius:12px;background:#fff;color:var(--pm-ink);cursor:pointer}.account-sheet h2{margin:0;font-size:28px;letter-spacing:-.04em}.account-sheet h2+p{margin:8px 0 24px;color:var(--pm-muted);font-size:13px;line-height:1.6}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;margin-bottom:20px;padding:4px;border-radius:13px;background:var(--pm-soft)}.auth-tabs button{min-height:40px;border:0;border-radius:10px;background:transparent;color:var(--pm-muted);font-weight:700}.auth-tabs button.active{background:#fff;color:var(--pm-purple);box-shadow:0 4px 14px rgba(35,20,48,.08)}#account-form label{display:block;margin:13px 0;color:var(--pm-ink);font-size:12px;font-weight:700}#account-form label small{color:var(--pm-muted);font-weight:500}#account-form input{display:block;width:100%;height:52px;margin-top:7px;padding:0 14px;border:1px solid #e5dfe9;border-radius:12px;outline:0;font:500 14px Poppins,sans-serif}#account-form input:focus{border-color:var(--pm-purple);box-shadow:0 0 0 4px rgba(85,22,183,.08)}.account-submit,.account-secondary{width:100%;min-height:52px;margin-top:10px;border:0;border-radius:13px;background:var(--pm-purple);color:#fff;font-weight:700;cursor:pointer}.account-submit:disabled{opacity:.55}.account-message{min-height:20px;margin:5px 0;color:#c43b3b;font-size:12px}.profile-avatar{display:grid;place-items:center;width:74px;height:74px;margin-bottom:24px;border-radius:24px;background:#efe6fb;color:var(--pm-purple);font-size:29px}.account-secondary{border:1px solid #e8e1ed;background:#fff;color:#a53b3b}.sheet-open{overflow:hidden}@keyframes sheetIn{from{transform:translateX(100%)}to{transform:none}}

button, select { font: inherit; }

.location-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.location-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--pm-line);
  background: #fff;
}

.location-brand img { display: block; width: auto; max-width: 170px; max-height: 48px; }

.location-content {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 42px 20px;
}

.location-state,
.manual-location { width: 100%; max-width: 480px; text-align: center; }

.location-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 0 auto 28px;
}

.location-pin {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 26px;
  background: var(--pm-purple);
  box-shadow: 0 16px 36px rgba(85, 22, 183, .25);
  color: #fff;
  font-size: 34px;
}

.location-pulse {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(85, 22, 183, .18);
  border-radius: 50%;
}

.pulse-one { width: 112px; height: 112px; }
.pulse-two { width: 150px; height: 150px; }
.is-loading .location-pulse { animation: locationPulse 1.8s ease-out infinite; }
.is-loading .pulse-two { animation-delay: .5s; }

.location-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--pm-orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.location-state h1,
.manual-location h2 {
  margin: 0;
  color: var(--pm-ink);
  font-size: clamp(27px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.location-state p,
.manual-location > p {
  margin: 15px auto 0;
  color: var(--pm-muted);
  font-size: 14px;
  line-height: 1.7;
}

.location-progress {
  width: 180px;
  height: 5px;
  margin: 29px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeaf2;
}

.location-progress span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pm-purple), var(--pm-orange));
  animation: locationLoading 1.25s ease-in-out infinite alternate;
}

.is-success .location-progress,
.is-empty .location-progress,
.is-error .location-progress { display: none; }
.is-success .location-pin { background: #17a566; }
.is-empty .location-pin, .is-error .location-pin { background: var(--pm-orange); }
.is-empty .location-pulse, .is-error .location-pulse { border-color: rgba(255,104,70,.2); }

.location-primary,
.location-secondary,
.manual-back {
  border: 0;
  cursor: pointer;
}

.location-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  margin-top: 25px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--pm-purple);
  box-shadow: 0 12px 24px rgba(85,22,183,.18);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.location-primary:hover { background: #461098; }
.location-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.location-secondary {
  margin-top: 14px;
  padding: 9px 14px;
  background: transparent;
  color: var(--pm-purple);
  font-size: 13px;
  font-weight: 700;
}

.manual-location { text-align: left; }
.manual-location .location-kicker { margin-top: 26px; }
.manual-location h2 { font-size: 30px; }

.manual-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  background: transparent;
  color: var(--pm-purple);
  font-size: 13px;
  font-weight: 700;
}

.location-field { margin-top: 21px; }
.location-field + .location-field { margin-top: 13px; }
.location-field label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 700; }
.location-select { position: relative; }

.location-select select {
  width: 100%;
  min-height: 55px;
  padding: 0 48px 0 16px;
  border: 1px solid var(--pm-line);
  border-radius: 13px;
  outline: none;
  appearance: none;
  background: var(--pm-soft);
  color: var(--pm-ink);
}

.location-select select:focus { border-color: var(--pm-purple); box-shadow: 0 0 0 4px rgba(85,22,183,.09); }
.location-select select:disabled { color: #aaa5ae; }
.location-select i { position: absolute; top: 50%; right: 17px; color: var(--pm-purple); transform: translateY(-50%); pointer-events: none; }

.location-footer {
  padding: 18px 20px 24px;
  color: #918c96;
  font-size: 11px;
  text-align: center;
}
.location-footer i { margin-right: 5px; color: var(--pm-purple); }

button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(255,104,70,.35); outline-offset: 3px; }

@keyframes locationPulse {
  0% { opacity: .9; transform: scale(.75); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes locationLoading {
  from { transform: translateX(-20%); }
  to { transform: translateX(140%); }
}

@media (max-width: 600px) {
  body.marketplace-location{padding-bottom:calc(72px + env(safe-area-inset-bottom))}.market-header{grid-template-columns:104px minmax(0,1fr) 40px;gap:8px;min-height:62px;padding:8px 12px}.market-header .location-brand img{max-width:104px}.location-chip{justify-self:stretch;justify-content:center;max-width:none;min-width:0;min-height:38px;padding:0 8px;font-size:10px}.location-chip span{max-width:108px}.account-button{width:38px;height:38px;min-height:0;padding:0;justify-content:center}.account-button span{display:none}.marketplace{width:calc(100% - 24px);padding:12px 0 30px}.market-hero{margin-top:14px;padding:0}.market-search{min-height:50px;border-radius:14px}.banner-carousel{margin:0;border-radius:17px}.banner-track img{aspect-ratio:1.9/1}.category-list{margin:15px 0 24px}.market-section-head{align-items:flex-start}.market-section-head h2{font-size:20px}.market-section-head button{font-size:0}.market-section-head button i{font-size:21px}.store-grid{grid-template-columns:1fr;gap:15px}.store-cover{height:132px}.app-nav{position:fixed!important;z-index:60!important;right:0!important;bottom:0!important;left:0!important;display:grid!important;grid-template-columns:repeat(4,1fr)!important;height:calc(64px + env(safe-area-inset-bottom))!important;padding:0 4px env(safe-area-inset-bottom)!important;border:0!important;border-top:1px solid #eae5ed!important;background:rgba(255,255,255,.98)!important;box-shadow:0 -7px 24px rgba(25,12,35,.08)!important;backdrop-filter:blur(15px)}.app-nav button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#88808e!important;font:600 9px Poppins,sans-serif!important}.app-nav button i{font-size:19px!important}.app-nav button.active{color:var(--pm-purple)!important}.location-footer{display:none}.account-sheet{top:auto;bottom:0;width:100%;height:auto;max-height:92vh;padding:48px 22px calc(26px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;animation:sheetUp .25s ease-out}.account-sheet h2{font-size:25px}@keyframes sheetUp{from{transform:translateY(100%)}to{transform:none}}
  .location-header { min-height: 68px; }
  .location-brand img { max-width: 145px; max-height: 42px; }
  .location-content { align-items: flex-start; padding: 56px 22px 30px; }
  .location-visual { width: 130px; height: 130px; margin-bottom: 24px; }
  .pulse-one { width: 100px; height: 100px; }
  .pulse-two { width: 130px; height: 130px; }
  .location-pin { width: 68px; height: 68px; border-radius: 23px; font-size: 30px; }
}

@media (min-width:601px) and (max-width:920px){.store-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media (prefers-reduced-motion: reduce) {
  .location-pulse, .location-progress span { animation: none; }
}

/* Cards-vitrine: a capa é a própria entrada da loja. */
.store-grid { grid-template-columns:repeat(4,minmax(0,1fr));gap:16px }
.store-card { border:0;border-radius:17px;background:#eee;box-shadow:0 7px 22px rgba(32,20,42,.09) }
.store-card a { display:block;color:#fff }
.store-cover { height:auto;aspect-ratio:1.45/1 }
.store-cover:after { z-index:1;inset:30% 0 0;background:linear-gradient(transparent,rgba(13,6,18,.86)) }
.store-status { z-index:3;top:10px;right:10px;padding:5px 8px;font-size:9px }
.store-overlay { position:absolute;z-index:2;right:13px;bottom:12px;left:13px;min-width:0 }
.store-overlay span { display:block;overflow:hidden;color:rgba(255,255,255,.78);font-size:9px;white-space:nowrap;text-overflow:ellipsis }
.store-overlay h3 { margin:3px 0 0;overflow:hidden;color:#fff;font-size:15px;line-height:1.25;white-space:nowrap;text-overflow:ellipsis;text-shadow:0 2px 8px rgba(0,0,0,.35) }

@media (max-width:600px) {
  .store-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px }
  .store-cover { height:auto;aspect-ratio:1.18/1 }
  .store-status { top:7px;right:7px;padding:4px 7px;font-size:8px }
  .store-overlay { right:10px;bottom:9px;left:10px }
  .store-overlay h3 { font-size:12px }
  .store-overlay span { font-size:8px }
}

@media (min-width:601px) and (max-width:920px) {
  .store-grid { grid-template-columns:repeat(3,minmax(0,1fr)) }
}

/* Lista de lojas: uma linha por estabelecimento, usando somente a logomarca. */
.store-grid { display:grid;grid-template-columns:1fr;gap:10px }
.store-list-card { overflow:visible;border:1px solid #eee9f1;border-radius:16px;background:#fff;box-shadow:0 5px 18px rgba(35,20,45,.05) }
.store-list-card:hover { transform:translateY(-1px);box-shadow:0 9px 24px rgba(35,20,45,.09) }
.store-list-card a { display:grid;grid-template-columns:72px minmax(0,1fr) 24px;align-items:center;gap:15px;min-height:96px;padding:11px 15px;color:var(--pm-ink) }
.store-logo { display:grid;place-items:center;width:72px;height:72px;overflow:hidden;border:1px solid #eee8f1;border-radius:15px;background:#f7f5f9 }
.store-logo img { display:block;width:100%;height:100%;object-fit:cover }
.store-list-copy { min-width:0 }
.store-list-copy h3 { margin:0 0 5px;overflow:hidden;color:var(--pm-ink);font-size:15px;font-weight:700;line-height:1.3;white-space:nowrap;text-overflow:ellipsis }
.store-list-copy p { margin:0 0 8px;overflow:hidden;color:var(--pm-muted);font-size:10px;white-space:nowrap;text-overflow:ellipsis }
.store-list-status { display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:700 }
.store-list-status i { width:6px;height:6px;border-radius:50%;background:currentColor }
.store-list-status.open { color:#098355 }
.store-list-status.closed { color:#9b5860 }
.store-list-arrow { justify-self:end;color:#9b91a2;font-size:14px }

@media (max-width:600px) {
  .store-grid { grid-template-columns:1fr;gap:9px }
  .store-list-card { border-radius:15px }
  .store-list-card a { grid-template-columns:64px minmax(0,1fr) 18px;gap:12px;min-height:86px;padding:10px 12px }
  .store-logo { width:64px;height:64px;border-radius:14px }
  .store-list-copy h3 { font-size:14px }
}

@media (min-width:601px) and (max-width:920px) {
  .store-grid { grid-template-columns:1fr }
}

/* Cabeçalho enxuto: conta somente na navegação inferior. */
.sr-only { position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important }
.market-header { grid-template-columns:1fr auto }
.header-location-button { justify-self:end;display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid #e6dff0;border-radius:13px;background:#f7f3fb;color:var(--pm-purple);font-size:20px;cursor:pointer }
.header-location-button:hover { border-color:#d4c5e5;background:#f0e8f8 }

@media (max-width:600px) {
  .market-header { grid-template-columns:1fr 40px;gap:10px }
  .header-location-button { width:38px;height:38px;border-radius:12px;font-size:19px }
}
