/**
 * VAV Mobile UI — portal PWA / mobil kart ve buton sistemi
 * Vav kırmızı #C31313, yeşil gelir #10b981 (manifesto)
 */
:root {
  --vav-mobile-red: #C31313;
  --vav-mobile-red-hover: #a10f0f;
  --vav-mobile-red-soft: rgba(195, 19, 19, 0.08);
  --vav-mobile-surface: #ffffff;
  --vav-mobile-surface-2: #f8fafc;
  --vav-mobile-border: #e2e8f0;
  --vav-mobile-text: #0f172a;
  --vav-mobile-muted: #64748b;
  --vav-mobile-radius: 16px;
  --vav-mobile-radius-sm: 12px;
  --vav-mobile-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --vav-mobile-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --vav-mobile-touch: 44px;
}

/* ── Modern butonlar ── */
.vav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--vav-mobile-touch);
  padding: 0.55rem 1.15rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.vav-btn:active {
  transform: scale(0.97);
}

.vav-btn-primary {
  background: linear-gradient(135deg, var(--vav-mobile-red) 0%, #e63946 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(195, 19, 19, 0.35);
}

.vav-btn-primary:hover,
.vav-btn-primary:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--vav-mobile-red-hover) 0%, var(--vav-mobile-red) 100%);
  box-shadow: 0 6px 20px rgba(195, 19, 19, 0.4);
}

.vav-btn-outline {
  background: var(--vav-mobile-surface);
  color: var(--vav-mobile-red);
  border: 1.5px solid var(--vav-mobile-border);
  box-shadow: var(--vav-mobile-shadow);
}

.vav-btn-outline:hover {
  border-color: var(--vav-mobile-red);
  background: var(--vav-mobile-red-soft);
  color: var(--vav-mobile-red);
}

.vav-btn-ghost {
  background: transparent;
  color: var(--vav-mobile-muted);
  min-height: 36px;
  padding: 0.35rem 0.75rem;
}

.vav-btn-block {
  width: 100%;
}

.vav-btn-sm {
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
}

/* Bootstrap uyumu */
.btn.vav-btn-mobile-primary {
  min-height: var(--vav-mobile-touch);
  border-radius: 999px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--vav-mobile-red) 0%, #e63946 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(195, 19, 19, 0.3);
}

/* ── Modern kartlar ── */
.vav-mobile-card,
.global-product-card.card {
  border: 1px solid var(--vav-mobile-border) !important;
  border-radius: var(--vav-mobile-radius) !important;
  background: var(--vav-mobile-surface) !important;
  box-shadow: var(--vav-mobile-shadow) !important;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.vav-mobile-card:active,
.global-product-card.card:active {
  transform: scale(0.985);
}

.vav-mobile-card__body {
  padding: 1rem;
}

.vav-mobile-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vav-mobile-text);
  line-height: 1.35;
  margin: 0 0 0.35rem;
}

.vav-mobile-card__meta {
  font-size: 0.75rem;
  color: var(--vav-mobile-muted);
}

.vav-mobile-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: #10b981;
}

.vav-mobile-card--elevated {
  box-shadow: var(--vav-mobile-shadow-lg) !important;
}

/* Ürün kartı görsel alanı */
.global-product-card .card-img-top,
.global-product-card img.img-fluid {
  border-radius: var(--vav-mobile-radius-sm) var(--vav-mobile-radius-sm) 0 0;
}

/* PWA güncelleme banner */
#pwa-update-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 100005;
  max-width: 480px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  background: var(--vav-mobile-text);
  color: #fff;
  border-radius: var(--vav-mobile-radius);
  box-shadow: var(--vav-mobile-shadow-lg);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

#pwa-update-banner.is-visible {
  display: flex;
}

#pwa-update-banner .vav-btn-primary {
  min-height: 36px;
  padding: 0.35rem 1rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  #pwa-update-banner {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px) + 8px);
  }
}

@media (min-width: 768px) {
  #pwa-update-banner {
    bottom: 24px;
  }
}
