* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --tab-height: 64px;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: #fafafa;
  color: #4b000b;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fafafa;
  position: relative;
}

.status-bar {
  height: 24px;
  flex-shrink: 0;
}

.app-header {
  height: 68px;
  flex-shrink: 0;
}

.viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.view {
  min-height: 100%;
}

#tab-bar {
  flex-shrink: 0;
  height: var(--tab-height);
  padding-bottom: var(--safe-bottom);
}

.tab-btn svg {
  transition: color 0.2s ease;
}

.tab-btn.active {
  color: #a10117;
}

.hero-carousel {
  position: relative;
  width: 100%;
}

.hero-slide {
  transition: opacity 0.7s ease-in-out;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-up 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.animate-slide-up {
  animation: slide-up 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scale-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.pulse-badge {
  animation: pulse-badge 0.4s ease-in-out;
}

.video-icon-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 5;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.toast {
  pointer-events: none;
}

.cat-chip {
  transition: all 0.2s ease;
}

.cat-chip:active {
  transform: scale(0.95);
}

.btn-add-cart, #btn-checkout, #btn-login {
  transition: all 0.2s ease;
}

.btn-add-cart:active, #btn-checkout:active {
  transform: scale(0.97);
}

#search-input:focus {
  outline: none;
}

#view-product {
  background: #fafafa;
}

.viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@media (display-mode: standalone) {
  .status-bar {
    padding-top: var(--safe-top);
  }
}
