/* =====================================================================
   style-app.css — Interface Premium para o App do Cliente
   Inspirado em design de barbearia de luxo
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,700&family=Inter:wght@300;400;600;700&display=swap');

:root {
  --bg-primary: #0B0B0B;
  --bg-secondary: #1A1A1A;
  --bg-card: #232323;
  --bg-card-hover: #2A2A2A;
  --text-primary: #F5F0EB;
  --text-secondary: #B8AFA6;
  --accent-gold: #C8923A;
  --accent-gold-soft: #E7C98A;
  --border-subtle: rgba(255,255,255,0.06);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.5);
  --radius-card: 16px;
  --radius-btn: 30px;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-secondary);
  position: relative;
  overflow-x: hidden;
}

/* ── Cabeçalho ────────────────────────────────────────────── */
.app-header {
  padding: 20px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.app-header .logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header .logo-area .logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #0B0B0B;
}

.app-header .brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.app-header .brand-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  font-weight: 600;
}

.app-header .header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.app-header .header-actions button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.2s;
}

.app-header .header-actions button:hover {
  background: rgba(255,255,255,0.06);
}

/* ── Tabs de navegação principal ──────────────────────────── */
.app-tabs {
  display: flex;
  padding: 0 20px 12px;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.app-tabs button {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.app-tabs button.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

.app-tabs button:hover {
  color: var(--text-primary);
}

/* ── Conteúdo principal ────────────────────────────────────── */
.app-content {
  padding: 20px 20px 100px;
}

/* ── Cards de seleção (filial, serviço, etc) ──────────────── */
.card-select {
  position: relative;
  padding: 16px 18px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-select::after {
  content: '→';
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.card-select:hover::after {
  transform: translateX(4px);
}
.card-select.selected {
  border-color: var(--accent-gold);
  background: rgba(200, 146, 58, 0.08);
}
.card-select.selected::after {
  content: '✓';
  color: var(--accent-gold);
}

.card-select .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-select .info .title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.card-select .info .sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.card-select .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-gold);
}

.card-select .badge {
  background: var(--accent-gold);
  color: #0B0B0B;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Grade de produtos (loja) ──────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 14px;
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
  cursor: pointer;
  text-align: center;
}

.product-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.product-card .name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.product-card .price {
  font-family: var(--font-display);
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 4px;
}

.product-card .out-of-stock {
  font-size: 0.65rem;
  color: #e74c3c;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ── Botão principal ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-gold);
  color: #0B0B0B;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-primary:hover {
  background: var(--accent-gold-soft);
  transform: scale(1.02);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

/* ── Modal (bottom sheet) ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  background: var(--bg-secondary);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  padding: 24px 20px 32px;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-sheet .handle {
  width: 40px;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 4px;
  margin: 0 auto 16px;
}

.modal-sheet h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.modal-sheet .subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* ── Formulários ────────────────────────────────────────────── */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border 0.2s;
  font-family: var(--font-body);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent-gold);
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Carrinho flutuante ─────────────────────────────────────── */
.cart-float {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 440px;
  background: var(--bg-card);
  border-radius: var(--radius-btn);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  z-index: 50;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cart-float:hover {
  border-color: var(--accent-gold);
}

.cart-float .cart-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-float .cart-info .count {
  background: var(--accent-gold);
  color: #0B0B0B;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 20px;
}

.cart-float .cart-info .label {
  font-weight: 600;
  color: var(--text-primary);
}

.cart-float .total {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-gold);
}

/* ── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 4px;
}

/* adicione ao style-app.css */
.chip-dia {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chip-dia.active {
  background: var(--accent-gold);
  color: #0B0B0B;
  border-color: var(--accent-gold);
}

.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 4px;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 60%;
  width: 80%;
  height: 2px;
  background: var(--border-subtle);
}
.step-item.completed:not(:last-child)::after {
  background: var(--accent-gold);
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
  z-index: 1;
}
.step-item.active .step-circle {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(200, 146, 58, 0.1);
}
.step-item.completed .step-circle {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #0B0B0B;
}
.step-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.step-item.active .step-label {
  color: var(--accent-gold);
}

.resumo-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  margin: 16px 0;
  border: 1px solid var(--border-subtle);
}
.resumo-linha {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.resumo-linha:last-child {
  border-bottom: none;
}
.resumo-linha .rotulo {
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.resumo-linha .valor {
  font-weight: 600;
  text-align: right;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-decoration: none;
}
.btn-whatsapp:hover {
  background: #1ebe5c;
  transform: scale(1.02);
}

.app-header .logo-area img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}