:root {
  --primary-color: #0076ff;
  --primary-gradient: linear-gradient(135deg, #0076ff 0%, #00c6ff 100%);
  --hover-color: #005f99;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --inner-glow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
  --bg-gradient: linear-gradient(135deg, #f0f7ff 0%, #e1eefc 100%);
  --text-color: #1d1d1f;
  --input-bg: rgba(255, 255, 255, 0.9);
  --subtext-color: #86868b;
  --glow-1: rgba(0, 118, 255, 0.15);
  --glow-2: rgba(0, 198, 255, 0.1);
  --glow-3: rgba(125, 0, 255, 0.05);
}

body.dark {
  --primary-color: #0a84ff;
  --primary-gradient: linear-gradient(135deg, #0a84ff 0%, #4096ff 100%);
  --bg-gradient: linear-gradient(135deg, #000000 0%, #1c1c1e 100%);
  --glass-bg: rgba(28, 28, 30, 0.75);
  --glass-border: rgba(255, 255, 255, 0.1);
  --inner-glow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  --text-color: #f5f5f7;
  --input-bg: rgba(44, 44, 46, 0.8);
  --subtext-color: #a1a1a6;
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.4);
  --glow-1: rgba(10, 132, 255, 0.12);
  --glow-2: rgba(64, 150, 255, 0.08);
  --glow-3: rgba(191, 90, 242, 0.06);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-color);
  padding: 0 16px 40px; /* Navbar sababli top paddingni olib tashladik */
  max-width: 620px;
  margin: auto;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.3s ease;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2500;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--inner-glow), 0 4px 20px rgba(0,0,0,0.04);
  padding: 14px 20px;
  margin-bottom: 25px;
}

@media (max-width: 560px) {
  .navbar { display: none !important; }
}
.nav-container {
  max-width: 620px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--primary-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Nav Basket Button */
.nav-basket-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}
.nav-basket-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(217, 119, 6, 0.35);
}
.nav-basket-btn:active { transform: scale(0.96); }

.nav-basket-btn .basket-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #f43f5e;
  border: 2.5px solid var(--input-bg);
}

/* Menu Dropdown */
.menu-trigger {
  background: rgba(0,0,0,0.05);
  color: var(--text-color);
  border: 1px solid var(--glass-border);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.menu-trigger:hover {
  background: rgba(0,0,0,0.1);
  border-color: var(--primary-color);
}
.menu-wrapper { position: relative; }


.menu-header {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--subtext-color);
  margin: 10px 14px 6px;
  letter-spacing: 1px;
}
.menu-item {
  width: 100%;
  background: var(--input-bg);
  color: var(--text-color);
  text-align: left;
  padding: 18px 20px;
  border-radius: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), var(--inner-glow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}
.menu-item::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.menu-item:hover::after {
  transform: translateX(100%);
}
.menu-item:hover {
  transform: translateY(-3px) scale(1.01) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 12px 25px rgba(0, 118, 255, 0.12) !important;
  background: rgba(0, 118, 255, 0.03) !important;
}

/* Profile Section in Menu */
.menu-profile-section {
  padding: 8px;
  border-bottom: 1.5px solid var(--glass-border);
  margin-bottom: 10px;
}
.profile-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px;
  border-radius: 28px;
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--shadow-md), var(--inner-glow);
  transition: all 0.3s ease;
}
body.dark .profile-card {
  background: rgba(44, 44, 46, 0.35) !important;
}
.profile-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--inner-glow) !important;
}

.profile-main-row {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
}

.profile-avatar {
  width: 50px !important;
  height: 50px !important;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 22px !important;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
  flex-shrink: 0 !important;
}

.profile-details {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.profile-name {
  font-weight: 800;
  font-size: 16px !important;
  color: var(--text-color);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.profile-phone {
  font-size: 13px !important;
  color: var(--subtext-color);
  font-weight: 500;
}

.profile-edit-trigger {
  background: rgba(0,0,0,0.06);
  border: none !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  color: var(--subtext-color);
  flex-shrink: 0 !important;
}

.profile-edit-trigger:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: scale(1.05);
}

.profile-logout-btn {
  margin-top: 15px !important;
  width: 100% !important;
  padding: 16px !important;
  background: rgba(255, 59, 48, 0.06) !important;
  color: #ff3b30 !important;
  border: 1.5px solid rgba(255, 59, 48, 0.15) !important;
  border-radius: 20px !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  letter-spacing: 1.2px !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.profile-logout-btn:hover {
  background: #ff3b30 !important;
  color: white !important;
  border-color: #ff3b30 !important;
  box-shadow: 0 10px 25px rgba(255, 59, 48, 0.35) !important;
  transform: translateY(-2px);
}

.login-prompt-btn {
  width: 100% !important;
  padding: 16px !important;
  background: var(--primary-gradient) !important;
  color: white !important;
  font-weight: 800 !important;
  border-radius: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  margin-top: 5px !important;
  border: none !important;
  box-shadow: 0 10px 25px rgba(0, 118, 255, 0.3) !important;
  transition: all 0.3s ease !important;
}
.login-prompt-btn:hover { 
  transform: translateY(-3px) scale(1.02); 
  box-shadow: 0 15px 35px rgba(0, 118, 255, 0.4) !important;
}

/* Profile Form */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 5px;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom Navigation (Mobile Only) */
.bottom-nav {
  display: none; /* Desktopda yopiq */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 68px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1.5px solid var(--glass-border);
  z-index: 3000;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0 -4px 25px rgba(0,0,0,0.08);
}

/* App Views (SPA) */
.app-view {
  display: none;
  width: 100%;
  animation: viewFadeIn 0.4s ease forwards;
}

.active-view {
  display: block !important;
}

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

.view-container {
  margin-top: 10px !important;
  min-height: calc(100vh - 100px);
}

.view-header {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  margin-bottom: 25px !important;
  padding-bottom: 15px !important;
  border-bottom: 1.5px solid var(--glass-border) !important;
}

.view-header h2 {
  margin-bottom: 0 !important;
  text-align: left !important;
  flex: 1 !important;
}

.back-btn {
  background: rgba(0, 122, 204, 0.08) !important;
  color: var(--primary-color) !important;
  border: none !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.back-btn:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: translateX(-3px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: var(--subtext-color) !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 11px;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 !important;
  margin: 0 !important;
}

.nav-item .nav-icon {
  font-size: 22px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active {
  color: var(--primary-color) !important;
}

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

.nav-icon-wrapper {
  position: relative;
  display: flex;
}

.nav-item .basket-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #f43f5e;
  border: 2px solid var(--input-bg);
  font-size: 9px;
  width: 16px;
  height: 16px;
}

@media (max-width: 560px) {
  body { padding-bottom: 85px !important; }
  .bottom-nav { display: flex; }
}

@media (max-width: 480px) {
  .nav-basket-text { display: none; }
  .nav-basket-btn { padding: 10px; }
  .nav-logo { font-size: 18px; }
}


/* Glass Card Container */
.container {
  background: rgba(255, 255, 255, 0.65); /* Doiralar ko'rinishi uchun biroz shaffofroq */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--inner-glow), var(--shadow-lg);
  border-radius: 32px;
  padding: 32px 28px;
  margin-top: 10px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

body.dark .container {
  background: rgba(28, 28, 30, 0.6);
}

/* Banner */
.banner {
  background: linear-gradient(135deg, #007acc, #00c6ff);
  color: white;
  text-align: center;
  padding: 28px 15px 18px;
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 122, 204, 0.25);
  overflow: hidden;
  position: relative;
}
.banner::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -40%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 65%);
  animation: bannerPulse 6s ease-in-out infinite alternate;
}
@keyframes bannerPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}
.banner-text > span:first-child {
  display: block;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.banner-text .sub {
  font-size: 16px;
  font-style: italic;
  opacity: 0.88;
  margin-top: 4px;
  display: block;
}

/* Scrolling text */
.scrolling-wrapper {
  max-width: 100%;
  overflow: hidden;
  position: relative;
  height: 30px;
  margin-top: 10px;
}
.scrolling-text {
  font-size: 16px;
  font-style: italic;
  white-space: nowrap;
  display: inline-block;
  animation: scroll-left 20s linear 1;
  padding-left: 100%;
}
.scrolling-text.telegram { color: #ffe600; }
@keyframes scroll-left {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-200%); }
}

/* Heading */
h2 {
  text-align: center;
  color: var(--text-color);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

/* Hint / Info boxes */
#izoh {
  font-style: italic;
  color: var(--primary-color);
  border-left: 4px solid var(--primary-color);
  background: rgba(0, 122, 204, 0.06);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 10px;
  min-height: 0;
  transition: all 0.3s ease;
}
#qogoz {
  font-size: 13px;
  color: var(--subtext-color);
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 122, 204, 0.04);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  line-height: 1.5;
  display: block;
  min-height: 0;
}

#qogoz.warning {
  background: rgba(255, 143, 0, 0.08);
  border-color: rgba(255, 143, 0, 0.3);
  color: #c2410c;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 143, 0, 0.1);
}

body.dark #qogoz.warning {
  background: rgba(255, 143, 0, 0.12);
  color: #fbbf24;
  border-color: rgba(255, 143, 0, 0.4);
}

/* Row layout */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}
.row > div { flex: 1 1 200px; }

/* Labels */
label {
  font-weight: 600;
  color: var(--text-color);
  display: block;
  margin-top: 14px;
  font-size: 14px;
}

/* Number input */
input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  border: 1.5px solid var(--glass-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
input[type="number"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 122, 204, 0.12);
}

/* Floating select button */
.f-field { margin-top: 12px; }

.select-button {
  width: 100%;
  background: var(--input-bg);
  color: var(--text-color);
  border: 1.5px solid var(--glass-border);
  border-radius: 12px;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  position: relative;
}
.select-button:hover {
  border-color: var(--primary-color);
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0,122,204,0.12);
}

.float-btn {
  min-height: 58px;
  padding: 18px 42px 10px 48px;
  line-height: 1.2;
}
.btn-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  transition: all 0.3s ease;
}
.float-btn .float-label {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: var(--subtext-color);
  font-size: 15px;
  pointer-events: none;
  transition: all 0.18s ease;
}
.float-btn .float-value {
  display: block;
  font-weight: 700;
  color: var(--text-color);
  font-size: 15px;
  opacity: 0;
  margin-top: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.18s ease;
}
.float-btn.filled, .muqova-wrapper.filled { 
  border-color: var(--primary-color) !important;
  background: rgba(0, 118, 255, 0.07) !important;
  box-shadow: 0 0 20px rgba(0, 118, 255, 0.25) !important;
}
.float-btn.filled .float-label, .muqova-wrapper.filled .float-label {
  top: 10px;
  transform: none;
  font-size: 11px;
  color: var(--primary-color);
  left: 48px;
}
.float-btn.filled .btn-icon, .muqova-wrapper.filled .btn-icon {
  font-size: 16px;
  top: 14px;
  transform: none;
}
.float-btn.filled .float-value, .muqova-wrapper.filled .float-value { opacity: 1; }
.float-btn:focus-visible {
  outline: 3px solid rgba(0, 118, 255, 0.28);
  outline-offset: 2px;
}
.float-btn .help {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  opacity: 0.5;
  pointer-events: auto;
  cursor: help;
  transition: all 0.2s ease;
  z-index: 5;
}
.float-btn .help:hover {
  opacity: 1;
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-50%) scale(1.1);
}

/* Sahifa soni — float input */
.float-input-wrap {
  position: relative;
  margin-top: 0;
}
.float-input {
  width: 100%;
  min-height: 54px;
  padding: 22px 40px 8px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color);
  background: var(--input-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: 12px;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
  cursor: text;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.float-input::-webkit-inner-spin-button,
.float-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.float-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 122, 204, 0.12);
}
.float-input-wrap .float-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: var(--subtext-color);
  font-size: 15px;
  pointer-events: none;
  transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.float-input:focus ~ .float-label,
.float-input:not(:placeholder-shown) ~ .float-label {
  top: 10px;
  transform: none;
  font-size: 11px;
  color: var(--primary-color);
}

/* Qalam ikonkasi */
.input-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtext-color);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
}
.float-input:focus ~ .input-icon {
  color: var(--primary-color);
  opacity: 1;
}

.price-banner {
  margin-top: 25px;
  padding: 22px 24px;
  border-radius: 24px;
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 15px 40px rgba(0, 118, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  user-select: none;
  border: 1px solid rgba(255,255,255,0.25);
  position: relative;
  overflow: hidden;
}

.price-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}
.add-basket-btn {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 6px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}
.add-basket-btn:hover {
  background: white;
  color: var(--primary-color);
  transform: scale(1.05);
}
.add-basket-btn:active { transform: scale(0.95); }

/* Telegram Button & Loading */
.telegram-btn {
  background: #0088cc !important;
  color: white !important;
  border: none !important;
  transition: all 0.3s ease !important;
}
.telegram-btn:hover {
  background: #0077b5 !important;
  box-shadow: 0 6px 15px rgba(0, 136, 204, 0.4) !important;
}

.btn-loading {
  position: relative !important;
  pointer-events: none !important;
  opacity: 0.8 !important;
}
.btn-loading > * { visibility: hidden !important; }
.btn-loading::after {
  content: "" !important;
  position: absolute !important;
  width: 20px !important;
  height: 20px !important;
  top: 50% !important;
  left: 50% !important;
  margin: -10px 0 0 -10px !important;
  border: 3px solid rgba(255,255,255,0.3) !important;
  border-top-color: white !important;
  border-radius: 50% !important;
  animation: btnSpin 0.6s linear infinite !important;
  visibility: visible !important;
}
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

.order-now-btn {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}
.order-now-btn:hover {
  background: #2e7d32 !important;
  color: #fff !important;
  border-color: #2e7d32 !important;
}

/* Disabled holati uchun */
.add-basket-btn:disabled, .add-basket-btn:disabled:hover {
  background: #cbd5e1 !important;
  color: #64748b !important;
  border-color: #94a3b8 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.7;
}

body.dark .add-basket-btn:disabled {
  background: #334155 !important;
  color: #94a3b8 !important;
  border-color: #475569 !important;
}

.add-basket-btn.pulse-once {
  animation: btnSuccess 0.5s ease;
}
@keyframes btnSuccess {
  0% { transform: scale(1); background: rgba(255,255,255,0.2); }
  50% { transform: scale(1.1); background: #4caf50; }
  100% { transform: scale(1); background: rgba(255,255,255,0.2); }
}
.price-banner .left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.price-banner .title {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.9;
}
.price-banner .hint {
  font-size: 12px;
  opacity: 0.8;
}
.price-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.price-banner .value {
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.price-per {
  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
}
.price-banner.warn {
  background: linear-gradient(135deg, #ff8f00, #ffca28);
  color: #1f1f1f;
  box-shadow: 0 12px 30px rgba(255,143,0,0.3);
}
.price-banner.err {
  background: linear-gradient(135deg, #e53935, #ff5252);
  box-shadow: 0 12px 30px rgba(229,57,53,0.3);
}
.price-banner.success {
  background: linear-gradient(135deg, #2e7d32, #4caf50);
  box-shadow: 0 12px 30px rgba(46,125,50,0.3);
}
@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.015); }
  100% { transform: scale(1); }
}

/* Kitob soni counter */
.kitob-soni-field {
  margin-top: 14px;
}
.kitob-soni-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--input-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px 18px;
  gap: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.kitob-soni-wrap:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0,122,204,0.10);
}

.small-counter {
  margin-top: 0 !important;
  height: 54px; /* O'ng tarafdagi kabi */
  padding: 8px 14px !important;
}
.small-counter .kitob-counter {
  height: 38px;
}
.small-counter .counter-btn {
  width: 36px;
  height: 36px;
}
.small-counter .counter-value {
  font-size: 16px;
  min-width: 35px;
}
.kitob-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-color);
  white-space: nowrap;
}
.kitob-counter {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(0,122,204,0.08);
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(0,122,204,0.18);
}
.counter-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
  line-height: 1;
  padding: 0;
}
.counter-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.08);
}
.counter-btn:active { transform: scale(0.95); }
.counter-value {
  min-width: 45px;
  max-width: 80px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-color);
  user-select: none;
  padding: 0 4px;
  background: transparent;
  border: none;
  outline: none;
  appearance: none;
  -moz-appearance: textfield;
}
.input-no-spinner::-webkit-inner-spin-button,
.input-no-spinner::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Muqova va Qism birlashtirilgan wrapper */
.muqova-wrapper {
  flex: 1 1 240px;
  display: flex !important;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--glass-border);
  border-radius: 16px;
  margin-top: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible !important; /* Dropdown ko'rinishi uchun */
  min-height: 56px;
  position: relative; /* Dropdown uchun */
}
body.dark .muqova-wrapper {
  background: rgba(44, 44, 46, 0.5);
}
.muqova-wrapper.filled {
  border-color: var(--primary-color);
  box-shadow: 0 8px 30px rgba(0, 118, 255, 0.15);
  background: rgba(255, 255, 255, 0.9);
}
body.dark .muqova-wrapper.filled {
  background: rgba(44, 44, 46, 0.85);
}
.muqova-wrapper:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(0,122,204,0.1);
}
.muqova-main-btn {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  height: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
  padding: 18px 14px 10px 48px !important;
  position: relative;
}
.qism-select-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-left: none; /* Ajratuvchi chiziq olib tashlandi */
  background: rgba(0, 118, 255, 0.04); 
  border-radius: 0 14px 14px 0; /* O'ng burchaklar yumaloq */
  min-width: 85px;
  align-self: stretch;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}
.qism-select-area.hidden {
  display: none !important;
}
.qism-select-area:hover {
  background: rgba(0, 122, 204, 0.15);
}
.qism-title {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}
.qism-current-val {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-color);
  font-size: 16px;
  font-weight: 900;
}
.qism-current-val svg {
  opacity: 0.6;
}

/* Qism Dropdown */
.qism-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--modal-bg);
  backdrop-filter: blur(15px);
  border: 1.5px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  z-index: 2000;
  display: none;
  min-width: 220px;
  animation: slideDown 0.25s ease;
}
.qism-dropdown.show {
  display: block;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.qism-grid-mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  min-width: 140px;
}
.qism-num-btn {
  width: auto;
  min-width: 60px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 122, 204, 0.05);
  color: var(--text-color);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.qism-num-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* Action row: kichik tugmalar qatori */
.action-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.action-btn {
  border: none;
  border-radius: 13px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* Rasm saqlash tugmasi */
.basket-btn {
  flex: 1.2;
  padding: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 5px 14px rgba(217, 119, 6, 0.28);
  position: relative;
}
.basket-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--input-bg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.save-btn {
  flex: 1.2;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary-color), #00c6ff);
  color: white;
  box-shadow: 0 5px 14px rgba(0, 122, 204, 0.28);
}
.reset-btn {
  flex: 1;
  padding: 12px;
  background: rgba(0,0,0,0.08); /* Bir oz quyuqroq fon */
  color: var(--text-color);
  border: 1px solid var(--glass-border);
}
.telegram-btn {
  flex: 1.2;
  padding: 12px;
  background: linear-gradient(135deg, #229ED9, #34B7F1);
  color: white;
  box-shadow: 0 5px 14px rgba(34, 158, 217, 0.28);
}
.save-btn:hover, .reset-btn:hover, .telegram-btn:hover, .basket-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.reset-btn:hover { background: rgba(0,0,0,0.15); } /* Hoverda yorqinroq */
.basket-btn:hover { box-shadow: 0 8px 20px rgba(217, 119, 6, 0.38); }
.telegram-btn:hover { box-shadow: 0 8px 20px rgba(34, 158, 217, 0.38); }

/* Tarix ikonkasi tugmasi */
.history-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--glass-border);
  color: var(--primary-color);
  box-shadow: var(--shadow);
  border-radius: 13px;
  flex-shrink: 0;
}
.history-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 122, 204, 0.3);
}

/* History modal ichidagi "Yopish" tugma */
.modal-content button[style*="background:#eee"] {
  background: rgba(0,0,0,0.07) !important;
  color: var(--text-color) !important;
  font-weight: 600;
}

/* History */
.history-container {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(0,122,204,0.04);
  border-radius: 14px;
  border: 1px solid var(--glass-border);
}
.history-container h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--subtext-color);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 10px;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-border);
}
.history-item:last-child { border-bottom: none; }

.history-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  padding-right: 15px;
}
.history-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-color);
  display: block;
}
.history-subtitle {
  font-size: 12.5px;
  color: var(--subtext-color);
  line-height: 1.3;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-price {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--primary-color);
  white-space: nowrap;
}
.history-btns-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.restore-history-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 122, 204, 0.08); /* primary light */
  color: var(--primary-color);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0 !important;
  padding: 0 !important;
}
.restore-history-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.08) rotate(15deg);
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.25);
}
.restore-history-btn:active {
  transform: scale(0.95);
}

.add-again-history-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(46, 125, 50, 0.08); /* success light */
  color: #2e7d32;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0 !important;
  padding: 0 !important;
}
.add-again-history-btn:hover {
  background: #2e7d32;
  color: white;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}
.add-again-history-btn:active {
  transform: scale(0.95);
}

.remove-history-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08); /* danger light */
  color: #ef4444;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0 !important;
  padding: 0 !important;
}
.remove-history-btn:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.remove-history-btn:active {
  transform: scale(0.95);
}

.clear-history-btn {
  flex: 0.6;
  border-radius: 12px;
  transition: all 0.2s;
}
.clear-history-btn:hover {
  background: #ff5252 !important;
  color: white !important;
  border-color: #ff5252 !important;
  box-shadow: 0 4px 12px rgba(255, 82, 82, 0.2);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
  justify-content: center;
  align-items: center;
  z-index: 4000 !important; /* SPA ustida turishi uchun balandroq */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* Tashqarida bosib yopish uchun to'liq ekranni qoplovchi overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: pointer;
  z-index: 0;
  background: transparent;
}
.modal-content {
  position: relative;
  z-index: 1;
  background: var(--input-bg);
  padding: 32px;
  border-radius: 32px;
  animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 92%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
}
.modal-header {
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 24px;
  text-align: center;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}
.modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  width: 100%;
}

/* Address Detail Styles */
.address-photo-wrap {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border: 1px solid var(--glass-border);
}
.address-photo {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.address-photo:hover { transform: scale(1.05); }

.address-details-card {
  background: rgba(0, 118, 255, 0.05);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  margin-bottom: 20px;
}
.address-text, .address-hint {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-color);
}
.address-text { margin-bottom: 8px; }
.address-hint { opacity: 0.85; font-size: 13px; }

.map-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.map-btn.yandex {
  background: #ffdb4d;
  color: #000;
}
.map-btn.google {
  background: #fff;
  color: #4285F4;
  border: 1.5px solid #4285F420;
}
.map-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.map-btn:active { transform: scale(0.97); }

body.dark .map-btn.google {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.1);
}
.modal-content button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
}
.modal-content button:hover {
  background: var(--hover-color);
  transform: scale(1.02);
}
/* Savat modali uchun maxsus */
.basket-modal-content {
  max-width: 380px;
}
.basket-items-list {
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: 20px;
}
.basket-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(0, 122, 204, 0.05);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  margin-bottom: 8px;
  position: relative;
}
.basket-item-info {
  flex: 1;
  min-width: 0;
}
.basket-item-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 122, 204, 0.2);
}

.basket-item-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  word-break: break-all;
}
.basket-item-subtitle {
  font-size: 11px;
  color: var(--subtext-color);
  display: block;
  margin-top: 2px;
}
.basket-item-price {
  font-weight: 800;
  font-size: 14px;
  color: var(--primary-color);
  white-space: nowrap;
}
.basket-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 15px;
}
.remove-basket-item {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 10px !important;
  margin-left: 12px !important;
  margin-top: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}
.remove-basket-item:hover {
  background: #ef4444 !important;
  color: white !important;
  transform: scale(1.1);
}

/* Basket Quantity Controls */
.basket-item-qty-controls {
  display: flex !important;
  align-items: center !important;
  background: rgba(0,0,0,0.03) !important;
  border-radius: 10px !important;
  padding: 2px !important;
  gap: 8px !important;
  margin-left: 10px !important;
}
body.dark .basket-item-qty-controls { background: rgba(255,255,255,0.05) !important; }

.qty-btn {
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: white !important;
  color: var(--text-color) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.15s !important;
}
body.dark .qty-btn { background: rgba(255,255,255,0.1) !important; }

.qty-btn:hover { background: var(--primary-color) !important; color: white !important; }
.qty-btn:active { transform: scale(0.9) !important; }

.qty-value {
  font-weight: 800 !important;
  font-size: 14px !important;
  min-width: 15px !important;
  text-align: center !important;
}

.basket-total {
  border-top: 2px dashed var(--glass-border);
  padding-top: 15px;
  margin-top: 10px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.total-label {
  font-weight: 800;
  font-size: 15px;
  color: var(--subtext-color);
  text-transform: uppercase;
}
.total-value {
  font-weight: 900;
  font-size: 20px;
  color: var(--primary-color);
}
.basket-footer-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.basket-footer-buttons button {
  flex: 1;
  margin-top: 0 !important;
  font-size: 13.5px !important;
  padding: 11px !important;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.clear-basket-btn {
  background: rgba(255, 59, 48, 0.08) !important;
  color: #ff3b30 !important;
  border: 1.5px solid rgba(255, 59, 48, 0.2) !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.1);
}
.clear-basket-btn:hover {
  background: #ff3b30 !important;
  color: white !important;
  border-color: #ff3b30 !important;
  box-shadow: 0 8px 25px rgba(255, 59, 48, 0.4) !important;
  transform: translateY(-2px);
}
.close-basket-btn {
  background: rgba(0, 0, 0, 0.05) !important;
  color: var(--text-color) !important;
  border: 1.5px solid var(--glass-border) !important;
}
.close-basket-btn:hover {
  background: rgba(0, 0, 0, 0.1) !important;
  transform: scale(1.02);
}

body.dark .close-basket-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

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

/* Footer */
footer {
  margin-top: 40px;
  padding: 24px 0 16px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}
footer .brand {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-color);
  letter-spacing: 1px;
}
.contact-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.contact-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--glass-border);
  color: var(--text-color);
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-banner img, .contact-banner svg {
  height: 20px !important;
  width: 20px !important;
  object-fit: contain;
  border-radius: 4px;
}
.contact-banner:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,122,204,0.25);
}

/* Responsive */
@media (max-width: 560px) {
  .row > div { flex: 1 1 100%; }
  .price-banner { flex-direction: column; align-items: center; text-align: center; }
  .price-right { align-items: center; }
  .price-banner .value { font-size: 26px; }
  body { padding: 14px 12px; }
  .container { padding: 20px 16px; }
  .muqova-wrapper { 
    flex-direction: row !important; 
    align-items: center !important; 
    background: rgba(255, 255, 255, 0.5) !important; /* Glow ko'rinishi uchun */
    border: 1.5px solid var(--glass-border) !important;
    border-radius: 14px !important;
    padding: 0 4px 0 0 !important; 
    justify-content: space-between !important;
    height: 54px !important; 
    margin-top: 14px !important;
    transition: all 0.3s ease !important;
  }
  body.dark .muqova-wrapper {
    background: rgba(44, 44, 46, 0.4) !important;
  }
  .muqova-wrapper.filled {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px rgba(0, 118, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.8) !important;
  }
  body.dark .muqova-wrapper.filled {
    background: rgba(44, 44, 46, 0.7) !important;
  }
  /* .muqova-wrapper.filled qoidalari global qismga ko'chirildi */
  .muqova-main-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    flex: 1 !important;
    position: relative !important; /* Absolute elementlarni ichiga qulflash (Bug FIX) */
    height: 100% !important;
    padding: 0 !important;
  }
  .muqova-main-btn:active {
    transform: none !important;
  }
  
  /* Absolute Offsets (Sticker va Overlap 100% tuzatish) */
  .muqova-main-btn .btn-icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 16px !important;
    margin: 0 !important;
  }
  .muqova-main-btn .float-label {
    position: absolute !important;
    left: 44px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 15px !important;
    color: var(--subtext-color) !important;
    transition: all 0.18s ease !important;
  }
  .muqova-main-btn.filled .float-label {
    top: 8px !important;
    transform: none !important;
    font-size: 11px !important;
    color: var(--primary-color) !important;
  }
  .muqova-main-btn .float-value {
    position: absolute !important;
    left: 44px !important;
    top: 25px !important; /* Label dan keyingi silliq joy */
    margin: 0 !important;
    font-size: 15px !important;
    opacity: 1 !important;
  }

  .qism-select-area { 
    border: none !important; /* Border Wrapper'dan olyapti */
    border-radius: 0 14px 14px 0 !important;
    padding: 0 12px !important; 
    width: auto !important;
    margin: 0 !important; 
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: rgba(0, 118, 255, 0.04) !important; 
    height: 100% !important;
    align-self: stretch !important; 
  }



  .qism-title {
    font-size: 13px !important;
    text-transform: none !important; /* Qism holatida capital emas */
    color: var(--text-color) !important;
    font-weight: 600 !important;
  }
  .qism-title::after {
    content: ":";
  }
  .qism-current-val {
    font-size: 16px !important;
    color: var(--text-color) !important;
  }
  .qism-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; }
  .qism-select-area.hidden { display: none !important; }

  /* --- Yangi Mobil Dizayn --- */

  /* Floating Card Modallar (Mobile) */
  .modal {
    align-items: center !important;
    background: rgba(0,0,0,0.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }
  .modal-content {
    width: 90% !important;
    max-width: 400px !important;
    height: auto !important;
    max-height: 85vh !important;
    border-radius: 28px !important;
    animation: fadeInUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25) !important;
    padding: 24px 20px !important;
    margin: 0 !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4) !important;
    border: 1px solid var(--glass-border) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
  }
  @keyframes fadeInModal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }  /* Modallardagi tugmalarni 2-ta ustunga joylash (Grid) - Ma'lumot beruvchi modallarni istisno qilamiz */
  .modal:not(#historyModal):not(#basketModal):not(#phoneModal):not(#cabinetModal):not(#helpModal):not(#profileModal):not(#alertModal):not(#confirmModal):not(#addressModal) .modal-content {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    align-content: start !important;
  }
  
  /* Ma'lumot beruvchi modallar uchun standard flex layout */
  #helpModal .modal-content, #profileModal .modal-content, #alertModal .modal-content, #confirmModal .modal-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Form va Footer elementlari grid modallarda ham to'liq kenglik bo'lishi kerak */
  .profile-form, .modal-footer {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .modal-footer {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important; /* Tugmalarni bir-birining ostiga qo'yish */
    gap: 8px !important;
    margin-top: 15px !important;
  }
  
  .modal-footer button {
    width: 100% !important; /* Tugmalar to'liq kenglikda */
    margin: 0 !important;
  }
  
  .profile-form {
    margin-bottom: 10px;
  }
  /* Header sarlavhasi to'liq uzunlik bo'lishi uchun */
  .modal:not(#historyModal):not(#basketModal):not(#phoneModal):not(#cabinetModal) .modal-header {
    grid-column: 1 / -1 !important;
    margin-bottom: 8px !important;
  }
  /* Tugmalarni silliqlash */
  .modal:not(#historyModal):not(#basketModal):not(#phoneModal):not(#cabinetModal) .modal-content button {
    margin-top: 0 !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
  }

  /* Savat va Kabinet uchun maxsus padding va silliqlik */
  #basketModal .modal-content, #cabinetModal .modal-content {
    gap: 10px !important;
  }
  .basket-item {
    margin-bottom: 15px !important;
    padding: 16px 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    position: relative !important;
  }
  .basket-item-info {
    width: 100% !important;
    padding-right: 35px !important; /* X tugmasi uchun joy */
  }
  .basket-item-title {
    font-size: 15.5px !important;
    line-height: 1.3 !important;
  }
  .basket-item-actions {
    width: 100% !important;
    margin: 0 !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--glass-border) !important;
    justify-content: space-between !important;
  }
  .remove-basket-item {
    position: absolute !important;
    top: 14px !important;
    right: 12px !important;
    margin: 0 !important;
    background: rgba(239, 68, 68, 0.08) !important;
  }
  .basket-item-qty-controls {
    margin-left: 0 !important;
  }
}

/* Manzil Sahifasi (SPA View) Optimallashtirish */
#addressView .view-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  padding: 0 5px !important; /* View-container ichidagi ichki padding */
}

.address-photo-wrap {
  width: 100% !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm);
  background: #eee;
  aspect-ratio: 4 / 3;
}

.address-photo {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.address-details-card {
  background: rgba(0, 122, 204, 0.05);
  padding: 16px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(0, 122, 204, 0.1);
}

.address-text {
  font-size: 15px !important;
  margin-bottom: 8px !important;
}

.address-hint {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: var(--subtext-color);
}

.map-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-top: 5px !important;
}

.map-btn {
  padding: 14px 10px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: transform 0.2s;
}
.map-btn:active { transform: scale(0.96); }

.map-btn.yandex {
  background: #ffcc00 !important;
  color: #000 !important;
}
.map-btn.google {
  background: #fff !important;
  border: 1.5px solid #eee !important;
  color: #4285F4 !important;
}

/* Glow Background Animatsiyasi (Dinamik ranglar) */
.glow-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: floatGlow 15s infinite ease-in-out;
}

.glow-1 {
  width: 450px; height: 450px;
  background: var(--glow-1);
  top: -100px; right: -100px;
  animation-duration: 18s;
}

.glow-2 {
  width: 400px; height: 400px;
  background: var(--glow-2);
  bottom: -80px; left: -120px;
  animation-duration: 22s;
  animation-delay: -5s;
}

.glow-3 {
  width: 350px; height: 350px;
  background: var(--glow-3);
  top: 35%; left: 25%;
  animation-duration: 20s;
  animation-delay: -3s;
}


@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-15px, 30px) scale(0.95); }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--input-bg);
  color: var(--text-color);
  padding: 12px 22px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid var(--glass-border);
  backdrop-filter: blur(10px);
  animation: slideDownToast 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
@keyframes slideDownToast {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Interaktiv effektlar */
.pulse-on-select {
  animation: pulseSelect 0.4s ease-out;
}

@keyframes pulseSelect {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 118, 255, 0.4); }
  50% { transform: scale(0.96); box-shadow: 0 0 0 15px rgba(0, 118, 255, 0); }
  100% { transform: scale(1); }
}

.btn-success {
  background: linear-gradient(135deg, #2e7d32, #4caf50) !important;
  color: white !important;
  border-color: #2e7d32 !important;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4) !important;
}

/* Desktop Layout (Large Screens) */
@media (min-width: 992px) {
  body {
    max-width: 1200px !important;
    padding-top: 20px !important;
  }
  
  .container {
    max-width: 1100px !important;
    padding: 40px !important;
  }

  .calc-layout {
    display: grid !important;
    grid-template-columns: 1.1fr 0.9fr !important;
    gap: 40px !important;
    align-items: start !important;
  }

  .calc-sidebar {
    position: sticky !important;
    top: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* Price Banner Vertical for Sidebar */
  .price-banner {
    flex-direction: column !important;
    height: auto !important;
    padding: 25px !important;
    text-align: center !important;
    margin-bottom: 0 !important;
    min-height: 280px !important;
    justify-content: center !important;
    margin-top: 0 !important;
  }

  .price-banner .left {
    border-right: none !important;
    border-bottom: 2px dashed rgba(255,255,255,0.2) !important;
    padding-right: 0 !important;
    padding-bottom: 25px !important;
    margin-bottom: 25px !important;
    width: 100% !important;
  }

  .price-banner .title {
    font-size: 18px !important;
  }

  .price-banner .value {
    font-size: 48px !important;
    margin: 15px 0 !important;
  }

  .price-right {
    width: 100% !important;
    padding-left: 0 !important;
  }

  .sidebar-add-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 15px !important;
  }

  .add-basket-btn {
    width: 100% !important;
    padding: 18px !important;
    font-size: 16px !important;
  }

  .action-row {
    margin-top: 0 !important;
    flex-direction: row !important;
    gap: 10px !important;
  }

  .action-btn {
    flex: 1 !important;
    padding: 14px 8px !important;
    font-size: 13px !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  .history-btn svg {
    margin-right: 5px !important;
    width: 18px !important;
    height: 18px !important;
  }
  .history-btn::after {
    content: "Tarix";
    font-weight: 700;
  }

  /* Inputs sizing for desktop */
  .calc-main .row {
    gap: 20px !important;
    margin-top: 20px !important;
  }

  .calc-main .f-field {
    margin-bottom: 5px !important;
  }

  .select-button, .float-input {
    min-height: 64px !important;
    font-size: 17px !important;
  }
  
  .float-label {
    font-size: 16px !important;
  }
  
  .float-btn.filled .float-label, .muqova-wrapper.filled .float-label {
    font-size: 12px !important;
  }
  /* Navbar Desktop Optimization */
  .navbar {
    padding: 16px 0 !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    margin-bottom: 35px !important;
  }

  .nav-container {
    max-width: 1100px !important;
    padding: 0 40px !important;
  }

  .nav-logo {
    font-size: 28px !important;
    letter-spacing: 1.5px !important;
  }

  .nav-basket-btn {
    padding: 12px 22px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
    gap: 10px !important;
  }

  .nav-basket-icon {
    font-size: 20px !important;
  }

  .menu-trigger {
    width: 48px !important;
    height: 48px !important;
    background: rgba(0, 122, 204, 0.08) !important;
    border: 1.5px solid rgba(0, 122, 204, 0.15) !important;
    border-radius: 14px !important;
    color: var(--primary-color) !important;
  }

  .bottom-nav {
    display: none !important;
  }
}

.shake-error {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Empty State styling */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  opacity: 0.7;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

.action-btn.disabled {
  opacity: 0.3 !important;
  pointer-events: none !important;
  filter: grayscale(1) !important;
  box-shadow: none !important;
  transform: none !important;
}

