/* AI Operator & Smart Store - Next-Gen E-Commerce Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #5046e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --accent: #ff4757;
  --accent-light: #ffebee;
  --success: #10b981;
  --bg-page: #f4f6fa;
  --card-bg: #ffffff;
  --card-border: #e8ecf4;
  --text-title: #111827;
  --text-body: #4b5563;
  --text-muted: #9ca3af;
  --radius-card: 16px;
  --radius-btn: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden; /* Scroll faqat app container ichida bo'ladi */
  background-color: var(--bg-page);
  color: var(--text-title);
}

/* Telegram Desktop & Mobile silliq scroll konteyneri */
#app-viewport {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 110px; /* Pastki menyu uchun yetarli joy */
}

/* E-Commerce Product Card */
.store-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.store-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

.store-card:active {
  transform: scale(0.985);
}

/* Tovar rasmi konteyneri */
.product-image-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f1f4f9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.store-card:hover .product-image-box img {
  transform: scale(1.04);
}

/* Chegirma va aksiya badge'lari */
.badge-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff385c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(255, 56, 92, 0.35);
}

.badge-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
}

/* Nasiya (Bo'lib to'lash) nishoni - Uzum Market uslubida */
.badge-installment {
  background: #fff8e6;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 4px;
}

/* Stories / Categories slider */
.story-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.story-chip:active {
  transform: scale(0.93);
}

.story-icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.story-chip.active .story-icon-ring {
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.story-icon-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Sticky Bottom Cart Bar */
.floating-cart-bar {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 440px;
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 18px;
  box-shadow: 0 10px 25px -4px rgba(79, 70, 229, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 45;
  animation: slideUpCart 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpCart {
  from { transform: translate(-50%, 40px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Glass navigation bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  z-index: 40;
}

.nav-link.active {
  color: var(--primary);
}
.nav-link.active .nav-icon {
  background: #eef2ff;
  color: var(--primary);
  transform: translateY(-2px);
}

/* Modals */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.app-modal-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 460px;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Silliq scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}
