/* Ápe! — Página pública do estabelecimento */
.public-page { padding-bottom: 88px; }

.public-tabs {
  display: flex;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 40;
}
.public-tabs__item {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.public-tabs__item.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

/* Status + serviços lado a lado */
.public-status-row {
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 16px 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.public-service-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Endereço / horário / contato discretos */
.public-meta-discreet {
  max-width: 640px;
  margin: 0 auto 8px;
  padding: 0 16px 10px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}
.public-meta-discreet a { color: var(--color-text-muted); text-decoration: underline; }
.public-meta-discreet__more {
  margin-left: auto;
  font-weight: 600;
  color: var(--color-primary) !important;
  text-decoration: none !important;
}

.public-info-bar {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.public-info-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.public-info-chip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  text-decoration: none;
  color: inherit;
}
.public-info-chip--link:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-soft);
}
.public-info-chip__icon { font-size: 20px; flex-shrink: 0; }

.public-delivery-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.public-delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.public-open-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-success-bg);
  color: #166534;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.public-open-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
}

.card-product { cursor: default; }
.card-product__media {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  display: block;
  width: 100%;
}
.card-product__title-btn {
  border: none;
  background: none;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: left;
  cursor: pointer;
  margin: 0;
}
.card-product__title-btn:hover { color: var(--color-accent-dark); }
.card-product__desc {
  font-size: 12px;
  margin: 4px 0 8px;
  line-height: 1.35;
}

/* Opções no modal de detalhe — chips simples */
.pm-options-wrap {
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}
.pm-options-wrap.hidden { display: none; }
.pm-options-group { margin-bottom: 14px; }
.pm-options-group:last-child { margin-bottom: 0; }
.pm-options-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pm-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pm-option-chip {
  padding: 10px 18px;
  border: 2px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pm-option-chip:hover {
  border-color: var(--color-accent);
}
.pm-option-chip.selected {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}
.pm-add-btn {
  margin-top: 8px;
  position: sticky;
  bottom: 0;
}
.product-modal__img {
  transition: opacity 0.2s ease;
}

/* Carrinho com imagem */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.cart-item__thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-soft);
}
.cart-item__info { flex: 1; min-width: 0; }

/* Modal produto */
.product-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.product-modal.open { display: flex; }
.product-modal__panel {
  background: var(--color-surface);
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.product-modal__img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--color-surface-soft);
}
.product-modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.95);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.product-modal__body { padding: 20px 16px 24px; }
.product-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  font-size: 13px;
}
.product-modal__meta span {
  padding: 4px 10px;
  background: var(--color-surface-soft);
  border-radius: 999px;
  color: var(--color-text-muted);
}

.product-options { margin: 16px 0; }
.product-options__group { margin-bottom: 14px; }
.product-options__label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  display: block;
}
.product-options__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-option-btn {
  padding: 10px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.product-option-btn.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

.cart-delivery {
  margin: 16px 0;
  padding: 14px;
  background: var(--color-surface-soft);
  border-radius: var(--radius-md);
}
.cart-delivery__label { font-weight: 600; font-size: 14px; margin-bottom: 10px; display: block; }
.cart-delivery__options { display: flex; gap: 10px; flex-wrap: wrap; }
.cart-delivery__opt {
  flex: 1;
  min-width: 120px;
  padding: 12px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}
.cart-delivery__opt.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.checkout-phone {
  margin-top: 16px;
  padding: 14px;
  background: var(--color-surface-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.checkout-phone__title { font-weight: 700; font-size: 15px; display: block; margin-bottom: 4px; }
.checkout-phone__lead { font-size: 13px; margin: 0 0 12px; line-height: 1.4; }
.checkout-phone__status {
  font-size: 13px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}
.checkout-phone__status.is-new {
  background: #f0f4f8;
  color: var(--color-text-muted);
}
.checkout-details { margin-top: 12px; }
.checkout-known {
  font-size: 13px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-weight: 600;
}

.phone-input {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.phone-input__country-wrap { position: relative; flex: 0 0 auto; }
.phone-input__country {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 12px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  min-height: 48px;
}
.phone-input__flag {
  display: flex;
  align-items: center;
  line-height: 0;
}
.phone-input__flag-img {
  display: block;
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.phone-input__caret { font-size: 10px; opacity: 0.6; margin-left: 2px; }
.phone-input__national {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.phone-input__national::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
.phone-input__countries {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 50;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 220px;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.phone-input__country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}
.phone-input__country-option:hover,
.phone-input__country-option.selected { background: var(--color-surface-soft); }
.phone-input__dial-opt { margin-left: auto; color: var(--color-text-muted); font-size: 13px; }
.phone-input__country-option .phone-input__flag-img {
  width: 24px;
  height: 18px;
  flex-shrink: 0;
}

.cart-address {
  margin: 12px 0 0;
  padding: 14px;
  background: var(--color-surface-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.cart-address__hint {
  font-size: 12px;
  margin: 6px 0 0;
  color: var(--color-accent-dark);
}
.cart-address__map-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cart-address__map-tip { font-size: 12px; }
.delivery-map {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  z-index: 0;
}
.delivery-map.leaflet-container { font-family: inherit; }

/* Sobre / galeria */
.public-about__hero {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 16/9;
  object-fit: cover;
}
.public-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.public-gallery__item {
  border: none;
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.public-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.public-gallery__item:hover img { transform: scale(1.03); }
.public-gallery__item:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16/9;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-md);
}
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
}

.public-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--color-text-muted);
}
