/* Layout da loja (storefront). */

.store-header {
  background: var(--store-header-bg, var(--surface));
  border-bottom: 1px solid var(--border);
}
.store-header-top {
  max-width: 1100px; margin: 0 auto; padding: 0.75rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.store-logo { font-size: 1.25rem; font-weight: 700; color: var(--store-header-text, rgb(var(--brand-600))); display: flex; align-items: center; }
.store-logo img { height: 2rem; max-width: 10rem; object-fit: contain; }
.store-nav { display: flex; align-items: center; gap: 1rem; font-size: 0.8125rem; color: var(--store-header-text, var(--text-primary)); }
.store-nav a { color: inherit; }
.store-nav a:hover { color: rgb(var(--brand-600)); }
.store-header .btn-ghost { color: var(--store-header-text, var(--text-secondary)); }
.store-header .text-muted { color: var(--store-header-text, var(--text-muted)); opacity: 0.75; }

.store-trustbar { border-top: 1px solid var(--border); background: rgb(var(--brand-50)); }
[data-theme='dark'] .store-trustbar { background: rgba(var(--brand-950), 0.35); }
.store-trustbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 0.45rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.5rem;
  font-size: 0.72rem; color: var(--text-secondary);
}
.store-trustbar-item { display: flex; align-items: center; gap: 0.35rem; }

.store-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }

/* Grade de produtos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease;
}
.product-card:hover { box-shadow: var(--shadow-lg); }
.product-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgb(var(--brand-50));
}
[data-theme='dark'] .product-card-image { background: rgba(var(--brand-950), 0.4); }
.product-card-image img { width: 100%; height: 100%; object-fit: contain; }
.product-card-image .no-image {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.8125rem;
}
.product-card-badge {
  position: absolute; top: 0.5rem; left: 0.5rem;
  background: rgb(var(--red-600)); color: #fff;
  font-size: 0.7rem; font-weight: 600;
  padding: 0.2rem 0.5rem; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 0.25rem;
}
.product-card-category {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: rgba(255,255,255,0.9); color: var(--gray-700, #374151);
  font-size: 0.68rem; padding: 0.2rem 0.5rem; border-radius: var(--radius-sm);
}
.product-card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; gap: 0.25rem; }
.product-card-price { font-size: 1.1rem; font-weight: 600; color: rgb(var(--brand-700)); margin-top: 0.25rem; }
[data-theme='dark'] .product-card-price { color: rgb(var(--brand-400)); }

/* Faixa de segmentos (Locação, Restaurante, Mercado, Serviços...) */
.segment-tabs {
  display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}
.segment-tabs::-webkit-scrollbar { height: 5px; }
.segment-tab {
  flex: 0 0 auto; padding: 0.4rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.8125rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  color: var(--text-secondary); transition: background 0.15s ease, color 0.15s ease;
}
.segment-tab:hover { border-color: rgb(var(--brand-400)); }
.segment-tab.active { background: rgb(var(--brand-600)); border-color: rgb(var(--brand-600)); color: #fff; }

/* Faixa de categorias do segmento selecionado: rolagem horizontal, ícones redondos */
.category-rail {
  display: flex; gap: 1.1rem; overflow-x: auto; padding: 0.25rem 0.25rem 1rem;
  margin-bottom: 1rem; -webkit-overflow-scrolling: touch;
}
.category-rail::-webkit-scrollbar { height: 5px; }
.category-rail-item {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  cursor: pointer; width: 4.5rem; text-align: center;
}
.category-rail-avatar {
  width: 4rem; height: 4rem; border-radius: 50%; overflow: hidden;
  background: rgb(var(--brand-50)); display: flex; align-items: center; justify-content: center;
  border: 2px solid transparent; transition: border-color 0.15s ease;
}
[data-theme='dark'] .category-rail-avatar { background: rgba(var(--brand-950), 0.4); }
.category-rail-item.active .category-rail-avatar { border-color: rgb(var(--brand-600)); }
.category-rail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.category-rail-avatar i { font-size: 1.4rem; color: rgb(var(--brand-600)); }
.category-rail-label { font-size: 0.7rem; color: var(--text-secondary); line-height: 1.2; }
.category-rail-item.active .category-rail-label { color: rgb(var(--brand-700)); font-weight: 600; }

/* Produtos em destaque: rolagem horizontal acima da grade principal */
.featured-row {
  display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; margin-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.featured-row .product-card { flex: 0 0 200px; }

.cart-line { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; }
.cart-summary { padding: 1rem 1.25rem; background: rgb(var(--brand-50)); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
[data-theme='dark'] .cart-summary { background: rgba(var(--brand-950), 0.35); }
