/* ─────────────────────────────────────────────
   5. MODAL OVERLAYS & REGISTRATION
───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-lg);
  animation: fadeIn 0.3s ease;
}

.register-modal {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--r-2xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s var(--t-spring);
}

.register-header {
  text-align: center;
  margin-bottom: 28px;
}

.register-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.register-header h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.register-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text-primary);
  transition: all var(--t-base);
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-elevated);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--grad-accent);
  color: white;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--r-md);
  transition: all var(--t-base);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.97); }

.btn-large {
  padding: 18px;
  font-size: 16px;
}

.btn-primary svg {
  width: 20px;
  height: 20px;
}

/* ─────────────────────────────────────────────
   6. APP LAYOUT
───────────────────────────────────────────── */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-h) + var(--safe-top));
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  position: relative;
}

/* ─────────────────────────────────────────────
   7. HEADER
───────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: transform var(--t-base);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  max-width: 600px;
  margin: 0 auto;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--grad-accent);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-sm);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.logo-tag {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 6px;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--t-base);
  color: var(--text-primary);
}

.header-btn:active {
  transform: scale(0.92);
  background: var(--bg-elevated);
}

.header-btn svg {
  width: 20px;
  height: 20px;
}

.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-tertiary);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--accent);
  color: white;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg-primary);
  transition: transform var(--t-spring);
}

.cart-badge.bump {
  animation: cartBump 0.5s var(--t-spring);
}

@keyframes cartBump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* ─────────────────────────────────────────────
   8. PAGES & MAIN
───────────────────────────────────────────── */
.app-main {
  flex: 1;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.page {
  display: none;
  animation: pageIn 0.35s ease;
  padding-bottom: 24px;
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  padding: 16px 16px 8px;
}

.page-title {
  font-family: 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 2px;
}

/* ─────────────────────────────────────────────
   14. BOTTOM NAVIGATION
───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
}

.nav-item {
  flex: 1;
  height: var(--bottom-nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-tertiary);
  position: relative;
  transition: color var(--t-base);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--t-spring);
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item.active svg {
  transform: translateY(-2px) scale(1.1);
}

.nav-item:active svg {
  transform: scale(0.85);
}

.nav-center {
  position: relative;
}

.nav-center-btn {
  width: 52px;
  height: 52px;
  background: var(--grad-accent);
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-glow);
  margin-top: -16px;
  transition: all var(--t-spring);
}

.nav-center-btn svg {
  width: 24px;
  height: 24px;
}

.nav-item.nav-center:active .nav-center-btn {
  transform: scale(0.88) rotate(-15deg);
}

/* ─────────────────────────────────────────────
   18. BOTTOM SHEET
───────────────────────────────────────────── */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.25s ease;
}

.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  max-height: 88vh;
  overflow-y: auto;
  border-top: 1px solid var(--border-default);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.6);
  animation: sheetUp 0.4s var(--t-spring);
  padding-bottom: var(--safe-bottom);
}

.sheet-content.tall {
  max-height: 92vh;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--r-full);
  margin: 12px auto 8px;
}

.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  z-index: 5;
}

.sheet-header {
  padding: 8px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.sheet-header h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
}

/* PRODUCT DETAIL */
.product-detail-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-detail-info {
  padding: 20px 24px 24px;
}

.product-detail-title {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.product-detail-material {
  display: inline-block;
  background: var(--grad-accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--r-full);
  margin-bottom: 16px;
}

.product-spec-list {
  background: var(--bg-tertiary);
  border-radius: var(--r-lg);
  padding: 4px 16px;
  margin-bottom: 20px;
}

.product-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.product-spec-row:last-child {
  border-bottom: none;
}

.product-spec-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.product-spec-value {
  font-size: 14px;
  font-weight: 600;
}

.product-detail-actions {
  display: flex;
  gap: 10px;
  padding: 0 24px 24px;
}

.btn-secondary {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--r-lg);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--t-base);
}

.btn-secondary:active { transform: scale(0.9); }
.btn-secondary.liked { color: var(--accent); border-color: var(--accent); }
.btn-secondary.liked svg { fill: var(--accent); }

.btn-add-to-cart-full {
  flex: 1;
  height: 52px;
  background: var(--grad-accent);
  color: white;
  font-weight: 700;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-glow);
}

/* Eski markaziy video tugmasi olib tashlangan — endi thumbnail orqali ochiladi */
.btn-video-play { display: none !important; }
.video-play-circle { display: none !important; }

/* Video uchun thumbnail tugma (boshqa rasmlar yonida) */
.gallery-thumb-video {
  position: relative;
}
.gallery-thumb-video img {
  filter: brightness(0.55);
}
.thumb-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.thumb-video-play svg {
  width: 22px;
  height: 22px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}
