/* =========================================================
   K-MAGIC BEAUTY
   TELEGRAM MINI APP — FINAL MARKETPLACE UI
   ========================================================= */

:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-soft: #f3f3f6;
  --surface-2: #ededf2;

  --text: #16161c;
  --text-soft: #70707b;
  --text-faint: #9b9ba5;

  --line: #e8e8ee;
  --line-strong: #ddddE5;

  --brand: #7c3aed;
  --brand-2: #9554ff;
  --brand-dark: #6527d4;
  --brand-soft: #f1e9ff;

  --success: #159668;
  --success-soft: #e9f8f2;

  --danger: #e5485b;
  --danger-soft: #fff0f2;

  --warning: #f0a31a;
  --warning-soft: #fff7e4;

  --shadow-xs:
    0 2px 10px rgba(22, 17, 35, 0.035);

  --shadow-sm:
    0 8px 24px rgba(22, 17, 35, 0.06);

  --shadow-md:
    0 16px 42px rgba(22, 17, 35, 0.1);

  --shadow-lg:
    0 24px 70px rgba(22, 17, 35, 0.16);

  --radius-xs: 10px;
  --radius-sm: 13px;
  --radius-md: 17px;
  --radius-lg: 22px;
  --radius-xl: 27px;

  --page-max: 720px;

  --safe-top:
    env(safe-area-inset-top, 0px);

  --safe-bottom:
    env(safe-area-inset-bottom, 0px);

  --nav-height: 73px;
}


/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;

  background: var(--bg);

  scroll-behavior: smooth;

  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;

  min-width: 320px;
  min-height: 100vh;

  overflow-x: hidden;

  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;

  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
  appearance: none;
  -webkit-appearance: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}


/* =========================================================
   APP
   ========================================================= */

.app-shell {
  position: relative;

  width: 100%;
  max-width: var(--page-max);

  min-height: 100vh;

  margin: 0 auto;

  background: var(--bg);
}

.page-content {
  padding:
    0
    12px
    calc(
      var(--nav-height)
      + var(--safe-bottom)
      + 28px
    );
}

.page {
  animation: pageFade 0.18s ease;
}

.page--active {
  display: block;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;

  z-index: 60;

  width: 100%;

  padding:
    calc(8px + var(--safe-top))
    12px
    10px;

  border-bottom:
    1px solid rgba(226, 226, 233, 0.82);

  background:
    rgba(255, 255, 255, 0.97);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar__main {
  min-height: 39px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 8px;
}


/* =========================================================
   LOCATION
   ========================================================= */

.location-button {
  min-width: 0;

  display: inline-flex;
  align-items: center;

  gap: 7px;

  padding: 5px 3px;

  border-radius: 11px;

  background: transparent;
  color: var(--text);

  text-align: left;

  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.location-button:active {
  transform: scale(0.97);
  background: var(--surface-soft);
}

.location-button__svg {
  width: 22px;
  height: 22px;

  flex: 0 0 auto;
}

.location-button__chevron-svg {
  width: 16px;
  height: 16px;

  flex: 0 0 auto;

  color: var(--text-soft);
}

.location-button--simple strong {
  max-width: 180px;

  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;

  font-size: 15px;
  font-weight: 780;
}


/* =========================================================
   ICON BUTTON
   ========================================================= */

.icon-button {
  position: relative;

  width: 40px;
  height: 40px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 50%;

  background: var(--surface-soft);
  color: var(--text);

  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.icon-button:active {
  transform: scale(0.92);
}

.icon-button--clean {
  background: var(--surface-soft);
}

.icon-button__dot {
  position: absolute;

  top: 7px;
  right: 7px;

  width: 8px;
  height: 8px;

  border:
    2px solid
    var(--surface);

  border-radius: 50%;

  background: var(--danger);
}


/* =========================================================
   SEARCH
   ========================================================= */

.search-row {
  display: flex;
  align-items: center;

  gap: 8px;
}

.search-box {
  min-width: 0;

  height: 46px;

  flex: 1;

  display: flex;
  align-items: center;

  gap: 9px;

  padding: 0 13px;

  border-radius: 14px;

  background: #efeff3;
  color: var(--text-soft);

  text-align: left;

  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.search-box:active {
  transform: scale(0.99);
  background: #e9e9ee;
}

.search-box__svg {
  width: 20px;
  height: 20px;

  flex: 0 0 auto;

  color: #85858f;
}

.search-box__placeholder {
  min-width: 0;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 13px;
}

.favorite-button {
  width: 43px;
  height: 43px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 50%;

  background: transparent;
  color: var(--text);
}

.favorite-button svg {
  width: 25px;
  height: 25px;
}

.favorite-button:active {
  background: var(--surface-soft);
  transform: scale(0.92);
}


/* =========================================================
   SKELETON
   ========================================================= */

.home-skeleton {
  padding-top: 11px;
}

.skeleton {
  position: relative;
  overflow: hidden;

  background: #e9e9ec;
}

.skeleton::after {
  content: "";

  position: absolute;
  inset: 0;

  transform: translateX(-100%);

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.72),
      transparent
    );

  animation: skeletonShine 1.3s infinite;
}

@keyframes skeletonShine {
  to {
    transform: translateX(100%);
  }
}

.skeleton--banner {
  width: 100%;

  aspect-ratio: 2.25 / 1;

  border-radius: 20px;
}

.skeleton-grid {
  display: grid;

  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  gap: 9px;

  padding: 18px 3px;
}

.skeleton--circle {
  width: 100%;

  aspect-ratio: 1;

  border-radius: 17px;
}

.skeleton--title {
  width: 44%;
  height: 20px;

  margin: 8px 0 12px;

  border-radius: 7px;
}

.skeleton-products {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 8px;
}

.skeleton--product {
  aspect-ratio: 0.72;

  border-radius: 16px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero-section {
  padding-top: 10px;
}

.hero-carousel {
  position: relative;

  width: 100%;

  overflow: hidden;

  border-radius: 21px;

  background: var(--surface-2);

  box-shadow: var(--shadow-xs);
}

.hero-carousel__track {
  display: flex;

  transition:
    transform 0.48s cubic-bezier(0.22, 0.8, 0.25, 1);

  will-change: transform;
}

.hero-slide {
  position: relative;

  min-width: 100%;

  aspect-ratio: 2.22 / 1;

  overflow: hidden;

  background:
    linear-gradient(
      135deg,
      #9556ff,
      #6529d6
    );

  color: #ffffff;
}

.hero-slide__image {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.hero-slide__overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: flex-end;

  padding: 17px;

  background:
    linear-gradient(
      to top,
      rgba(19, 10, 34, 0.7),
      rgba(19, 10, 34, 0.02) 70%
    );
}

.hero-slide__content {
  width: min(82%, 400px);
}

.hero-slide__badge {
  display: inline-flex;
  align-items: center;

  margin-bottom: 6px;

  padding: 4px 8px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-dark);

  font-size: 8px;
  font-weight: 850;
}

.hero-slide__title {
  font-size: 21px;
  line-height: 1.08;

  font-weight: 850;

  letter-spacing: -0.03em;
}

.hero-slide__subtitle {
  margin-top: 5px;

  color: rgba(255, 255, 255, 0.9);

  font-size: 10px;
  line-height: 1.4;
}

.hero-slide__button {
  display: inline-flex;

  margin-top: 9px;

  padding: 7px 10px;

  border-radius: 999px;

  background: #ffffff;
  color: var(--text);

  font-size: 9px;
  font-weight: 800;
}

.hero-carousel__dots {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 8px;

  display: flex;
  justify-content: center;

  gap: 5px;

  pointer-events: none;
}

.hero-dot {
  width: 5px;
  height: 5px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.52);

  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.hero-dot--active {
  width: 18px;

  background: #ffffff;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 11px;
}

.section-heading__eyebrow,
.page-header__eyebrow {
  display: block;

  margin-bottom: 3px;

  color: var(--brand);

  font-size: 8px;
  font-weight: 850;

  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.section-heading h2 {
  font-size: 18px;
  line-height: 1.15;

  font-weight: 830;

  letter-spacing: -0.025em;
}

.text-button {
  padding: 5px 0;

  background: transparent;
  color: var(--brand);

  font-size: 10px;
  font-weight: 760;
}

.text-button--danger {
  color: var(--danger);
}


/* =========================================================
   CATEGORIES — PROFESSIONAL
   ========================================================= */

.category-section {
  margin-top: 20px;
}

.category-grid {
  display: grid;

  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  gap: 13px 7px;
}

.category-card {
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 6px;

  padding: 0;

  background: transparent;
  color: var(--text);

  text-align: center;
}

.category-card__image {
  position: relative;

  width: 56px;
  height: 56px;

  display: grid;
  place-items: center;

  overflow: hidden;

  border:
    1px solid
    rgba(124, 58, 237, 0.08);

  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      #f7f2ff,
      #eee4ff
    );

  box-shadow:
    0 5px 14px
    rgba(80, 50, 120, 0.06);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.category-card:active
.category-card__image {
  transform: scale(0.93);
}

.category-card__image img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.category-card__fallback {
  width: 100%;
  height: 100%;

  display: grid;
  place-items: center;

  color: var(--brand);
}

/*
  app.js kategoriya fallback uchun SVG bersa
  aynan shu blok ichida chiroyli ko‘rinadi.
*/
.category-card__fallback svg {
  width: 29px;
  height: 29px;

  stroke-width: 1.65;
}

.category-card__fallback {
  font-size: 22px;
}

.category-card__name {
  width: 100%;

  min-height: 25px;

  display: -webkit-box;

  overflow: hidden;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  color: var(--text);

  font-size: 9px;
  line-height: 1.25;

  font-weight: 580;
}


/* =========================================================
   PROMO
   ========================================================= */

.promo-strip {
  margin-top: 20px;

  display: flex;
  align-items: center;

  gap: 9px;

  padding: 11px;

  border:
    1px solid
    rgba(124, 58, 237, 0.1);

  border-radius: 17px;

  background:
    linear-gradient(
      135deg,
      #efe5ff,
      #f8f4ff
    );
}

.promo-strip__icon {
  width: 38px;
  height: 38px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background:
    linear-gradient(
      135deg,
      var(--brand),
      var(--brand-2)
    );

  color: #ffffff;
}

.promo-strip__icon svg {
  width: 20px;
  height: 20px;
}

.promo-strip__content {
  min-width: 0;

  flex: 1;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.promo-strip__content strong {
  font-size: 10.5px;
}

.promo-strip__content span {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--text-soft);

  font-size: 8.5px;
}

.promo-strip__button {
  flex: 0 0 auto;

  padding: 7px 9px;

  border-radius: 10px;

  background: #ffffff;
  color: var(--brand);

  font-size: 8.5px;
  font-weight: 800;
}


/* =========================================================
   FLASH SALE
   ========================================================= */

.sale-panel {
  position: relative;

  overflow: hidden;

  padding:
    15px
    11px
    12px;

  border-radius: 22px;

  background:
    radial-gradient(
      circle at 88% 8%,
      rgba(255, 255, 255, 0.18),
      transparent 33%
    ),
    linear-gradient(
      145deg,
      #9151ff,
      #702de3
    );

  color: #ffffff;
}

.sale-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 8px;

  margin-bottom: 11px;
}

.sale-panel__title-row {
  display: flex;
  align-items: center;

  gap: 5px;
}

.sale-panel__title-row h2 {
  font-size: 18px;
}

.sale-panel__icon {
  font-size: 15px;
}

.sale-panel__header p {
  margin-top: 3px;

  max-width: 220px;

  color: rgba(255, 255, 255, 0.82);

  font-size: 8px;
  line-height: 1.35;
}

.countdown {
  display: flex;
  align-items: center;

  gap: 2px;
}

.countdown__item {
  min-width: 30px;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 4px;

  border-radius: 8px;

  background: rgba(255, 255, 255, 0.15);
}

.countdown__item strong {
  font-size: 10px;
}

.countdown__item small {
  font-size: 6px;
  opacity: 0.75;
}

.countdown__separator {
  font-size: 10px;
  font-weight: 850;
}

.horizontal-products {
  display: grid;

  grid-auto-flow: column;

  grid-auto-columns:
    minmax(142px, 43%);

  gap: 8px;

  overflow-x: auto;

  padding-bottom: 2px;

  scroll-snap-type: x proximity;

  scrollbar-width: none;
}

.horizontal-products::-webkit-scrollbar {
  display: none;
}


/* =========================================================
   PRODUCT CARDS
   ========================================================= */

.product-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 9px 8px;
}

.product-card {
  position: relative;

  min-width: 0;

  overflow: hidden;

  border:
    1px solid
    rgba(30, 25, 40, 0.035);

  border-radius: 16px;

  background: var(--surface);

  box-shadow: var(--shadow-xs);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

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

.product-card__image-wrap {
  position: relative;

  width: 100%;

  aspect-ratio: 1 / 1.04;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      #f5f5f7,
      #ececf1
    );
}

.product-card__image {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.24s ease;
}

.product-card:hover
.product-card__image {
  transform: scale(1.02);
}

.product-card__badge {
  position: absolute;

  top: 7px;
  left: 7px;

  z-index: 2;

  min-height: 21px;

  display: inline-flex;
  align-items: center;

  padding: 3px 7px;

  border-radius: 999px;

  background: var(--brand);
  color: #ffffff;

  font-size: 7.5px;
  font-weight: 850;
}

.product-card__badge--sale {
  background: #ff426b;
}

.product-card__favorite {
  position: absolute;

  top: 6px;
  right: 6px;

  z-index: 2;

  width: 31px;
  height: 31px;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.92);
  color: #222228;

  font-size: 20px;

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.product-card__favorite--active {
  color: #ff4f9e;
}

.product-card__body {
  padding: 8px 8px 9px;
}

.product-card__category {
  display: block;

  margin-bottom: 3px;

  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;

  color: var(--text-faint);

  font-size: 7.5px;
}

.product-card__title {
  min-height: 31px;

  display: -webkit-box;

  overflow: hidden;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  font-size: 10.5px;
  line-height: 1.3;

  font-weight: 650;
}

.product-card__price-row {
  margin-top: 7px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 6px;
}

.product-card__prices {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 1px;
}

.product-card__old-price {
  color: var(--text-faint);

  font-size: 7.5px;

  text-decoration: line-through;
}

.product-card__price {
  color: var(--text);

  font-size: 11.5px;
  line-height: 1.1;

  font-weight: 830;
}

.product-card__add {
  width: 31px;
  height: 31px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 9px;

  background:
    linear-gradient(
      135deg,
      var(--brand),
      var(--brand-2)
    );

  color: #ffffff;

  font-size: 18px;
}

.product-card__add:active {
  transform: scale(0.9);
}


/* =========================================================
   RECOMMENDED
   ========================================================= */

#recommendedSection {
  position: relative;
}

#recommendedSection .section-heading {
  margin-bottom: 11px;
}

#recommendedProducts .product-card {
  border:
    1px solid
    rgba(124, 58, 237, 0.055);
}


/* =========================================================
   EVENTS
   ========================================================= */

.event-list {
  display: grid;

  gap: 9px;
}

.event-card {
  position: relative;

  min-height: 112px;

  display: flex;
  align-items: flex-end;

  overflow: hidden;

  padding: 14px;

  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      #a35fff,
      #7234e6
    );

  color: #ffffff;

  text-align: left;
}

.event-card__image {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.event-card__shade {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to right,
      rgba(19, 12, 32, 0.7),
      rgba(19, 12, 32, 0.06)
    );
}

.event-card__content {
  position: relative;

  z-index: 2;

  max-width: 76%;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.event-card__badge {
  margin-bottom: 5px;

  padding: 4px 7px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-dark);

  font-size: 7px;
  font-weight: 850;
}

.event-card__title {
  font-size: 15px;
  font-weight: 820;
}

.event-card__subtitle {
  margin-top: 3px;

  font-size: 8.5px;
  line-height: 1.4;

  opacity: 0.9;
}


/* =========================================================
   BENEFITS
   ========================================================= */

.benefit-section {
  display: grid;

  gap: 8px;

  margin: 23px 0 7px;
}

.benefit-card {
  display: flex;
  align-items: center;

  gap: 10px;

  padding: 11px;

  border-radius: 15px;

  background: var(--surface);

  box-shadow: var(--shadow-xs);
}

.benefit-card__icon {
  width: 35px;
  height: 35px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 10px;

  background: var(--brand-soft);
  color: var(--brand);

  font-size: 15px;
  font-weight: 850;
}

.benefit-card div {
  display: flex;
  flex-direction: column;

  gap: 2px;
}

.benefit-card strong {
  font-size: 10.5px;
}

.benefit-card span:last-child {
  color: var(--text-soft);

  font-size: 8.5px;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 17px 1px 12px;
}

.page-header h1 {
  font-size: 21px;
  line-height: 1.1;

  letter-spacing: -0.03em;
}


/* =========================================================
   FILTER BUTTON
   ========================================================= */

.filter-button {
  display: inline-flex;
  align-items: center;

  gap: 5px;

  padding: 8px 10px;

  border:
    1px solid
    var(--line);

  border-radius: 11px;

  background: var(--surface);
  color: var(--text);

  font-size: 9.5px;
  font-weight: 720;

  box-shadow: var(--shadow-xs);
}

.filter-button svg {
  width: 16px;
  height: 16px;
}

.filter-button--active {
  border-color:
    rgba(124, 58, 237, 0.4);

  background: var(--brand-soft);
  color: var(--brand);
}


/* =========================================================
   CATEGORY CHIPS
   ========================================================= */

.chip-scroll {
  display: flex;

  gap: 6px;

  overflow-x: auto;

  padding: 1px 0 11px;

  scrollbar-width: none;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;

  padding: 8px 11px;

  border:
    1px solid
    var(--line);

  border-radius: 999px;

  background: var(--surface);
  color: var(--text-soft);

  font-size: 9.5px;
  font-weight: 650;
}

.category-chip--active {
  border-color: var(--brand);

  background: var(--brand);
  color: #ffffff;
}


/* =========================================================
   CART
   ========================================================= */

.cart-list {
  display: grid;

  gap: 8px;
}

.cart-item {
  display: grid;

  grid-template-columns:
    75px
    minmax(0, 1fr);

  gap: 9px;

  padding: 9px;

  border-radius: 15px;

  background: var(--surface);

  box-shadow: var(--shadow-xs);
}

.cart-item__image {
  width: 75px;
  height: 83px;

  border-radius: 11px;

  object-fit: cover;

  background: var(--surface-soft);
}

.cart-item__content {
  min-width: 0;
}

.cart-item__title {
  padding-right: 10px;

  display: -webkit-box;

  overflow: hidden;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  font-size: 10.5px;
  line-height: 1.3;

  font-weight: 700;
}

.cart-item__price {
  margin-top: 5px;

  font-size: 11.5px;
  font-weight: 820;
}

.cart-item__bottom {
  margin-top: 8px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 7px;
}

.cart-item__remove {
  padding: 0;

  background: transparent;
  color: var(--danger);

  font-size: 8.5px;
}


/* =========================================================
   QUANTITY
   ========================================================= */

.quantity-control {
  display: inline-flex;
  align-items: center;

  overflow: hidden;

  border:
    1px solid
    var(--line);

  border-radius: 10px;

  background: var(--surface);
}

.quantity-control button {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  padding: 0;

  background: transparent;
  color: var(--text);

  font-size: 16px;
}

.quantity-control strong {
  min-width: 25px;

  text-align: center;

  font-size: 9.5px;
}


/* =========================================================
   CART SUMMARY
   ========================================================= */

.checkout-card {
  margin-top: 15px;

  padding: 14px;

  border-radius: 18px;

  background: var(--surface);

  box-shadow: var(--shadow-sm);
}

.checkout-card__promo label,
.checkout-section label > span {
  display: block;

  margin-bottom: 6px;

  color: var(--text-soft);

  font-size: 8.5px;
  font-weight: 650;
}

.promo-input-row {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 7px;
}

.promo-input-row input {
  width: 100%;
  height: 43px;

  min-width: 0;

  padding: 0 11px;

  border:
    1px solid
    var(--line);

  outline: none;

  border-radius: 12px;

  background: var(--surface-soft);
  color: var(--text);

  font-size: 10.5px;
}

.promo-input-row button {
  padding: 0 12px;

  border-radius: 11px;

  background: var(--brand-soft);
  color: var(--brand);

  font-size: 9.5px;
  font-weight: 760;
}

.checkout-card__rows {
  display: grid;

  gap: 9px;

  margin-top: 13px;
  padding-top: 12px;

  border-top:
    1px solid
    var(--line);
}

.checkout-card__rows > div,
.checkout-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  color: var(--text-soft);

  font-size: 9.5px;
}

.checkout-card__rows strong,
.checkout-summary strong {
  color: var(--text);
}

.checkout-card__total,
.checkout-summary__total {
  margin-top: 2px;
  padding-top: 9px;

  border-top:
    1px dashed
    var(--line);

  font-size: 11px !important;
}

.checkout-card__total strong,
.checkout-summary__total strong {
  color: var(--brand);

  font-size: 15px;
}

.cart-security-note {
  display: flex;
  align-items: flex-start;

  gap: 8px;

  margin-top: 13px;
  padding: 10px;

  border-radius: 12px;

  background: var(--surface-soft);
  color: var(--text-soft);
}

.cart-security-note svg {
  width: 18px;
  height: 18px;

  flex: 0 0 auto;

  color: var(--brand);
}

.cart-security-note span {
  font-size: 8.5px;
  line-height: 1.4;
}


/* =========================================================
   STICKY CART CHECKOUT
   ========================================================= */

#cartPage {
  padding-bottom: 92px;
}

.cart-checkout-bar {
  position: fixed;

  left: 50%;
  bottom:
    calc(
      var(--nav-height)
      + var(--safe-bottom)
    );

  z-index: 75;

  width: 100%;
  max-width: var(--page-max);

  transform: translateX(-50%);

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(155px, 44%);

  align-items: center;

  gap: 12px;

  padding: 10px 13px;

  border-top:
    1px solid
    var(--line);

  background:
    rgba(255, 255, 255, 0.98);

  box-shadow:
    0 -8px 28px
    rgba(24, 18, 38, 0.07);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.cart-checkout-bar__total {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.cart-checkout-bar__total span {
  color: var(--text-soft);

  font-size: 8px;
}

.cart-checkout-bar__total strong {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--text);

  font-size: 16px;
  font-weight: 850;
}

.cart-checkout-bar__button {
  width: 100%;
  min-height: 45px;
}


/* =========================================================
   FORM
   ========================================================= */

.form-grid {
  display: grid;

  gap: 10px;
}

.form-grid input,
.form-grid textarea,
.form-grid select,
.checkout-section textarea,
.checkout-section select,
.filter-price-row input {
  width: 100%;

  border:
    1px solid
    var(--line);

  outline: none;

  border-radius: 12px;

  background: var(--surface-soft);
  color: var(--text);

  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

.form-grid input,
.form-grid select,
.checkout-section select,
.filter-price-row input {
  height: 44px;

  padding: 0 11px;
}

.form-grid textarea,
.checkout-section textarea {
  min-height: 83px;

  padding: 11px;

  resize: vertical;
}

.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus,
.checkout-section textarea:focus,
.checkout-section select:focus,
.promo-input-row input:focus,
.filter-price-row input:focus {
  border-color:
    rgba(124, 58, 237, 0.52);

  background: var(--surface);
}

select {
  background-image:
    linear-gradient(
      45deg,
      transparent 50%,
      var(--text-soft) 50%
    ),
    linear-gradient(
      135deg,
      var(--text-soft) 50%,
      transparent 50%
    );

  background-position:
    calc(100% - 15px) 18px,
    calc(100% - 11px) 18px;

  background-size:
    4px 4px,
    4px 4px;

  background-repeat: no-repeat;

  padding-right: 31px !important;
}

.form-message {
  min-height: 15px;

  margin-top: 6px;

  color: var(--text-soft);

  font-size: 8.5px;
  line-height: 1.4;
}

.form-message--success {
  color: var(--success);
}

.form-message--error {
  color: var(--danger);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-button {
  min-height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 15px;

  border-radius: 13px;

  background:
    linear-gradient(
      135deg,
      var(--brand),
      var(--brand-dark)
    );

  color: #ffffff;

  font-size: 10.5px;
  font-weight: 780;

  box-shadow:
    0 8px 20px
    rgba(124, 58, 237, 0.19);

  transition:
    transform 0.14s ease,
    opacity 0.14s ease;
}

.primary-button:active {
  transform: scale(0.98);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.primary-button--large {
  width: 100%;

  min-height: 49px;

  margin-top: 14px;

  font-size: 11.5px;
}

.secondary-button {
  min-height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 15px;

  border:
    1px solid
    var(--line);

  border-radius: 13px;

  background: var(--surface-soft);
  color: var(--text);

  font-size: 10.5px;
  font-weight: 700;
}

.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 10px;

  padding: 8px;

  background: transparent;
  color: var(--brand);

  font-size: 10.5px;
  font-weight: 760;
}


/* =========================================================
   EMPTY
   ========================================================= */

.empty-state {
  min-height: 290px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 28px 22px;

  text-align: center;
}

.empty-state__icon {
  width: 60px;
  height: 60px;

  display: grid;
  place-items: center;

  margin-bottom: 12px;

  border-radius: 19px;

  background: var(--brand-soft);

  font-size: 26px;
}

.empty-state h3 {
  font-size: 15px;
}

.empty-state p {
  max-width: 260px;

  margin-top: 5px;

  color: var(--text-soft);

  font-size: 9.5px;
  line-height: 1.45;
}

.empty-state .primary-button {
  margin-top: 15px;
}


/* =========================================================
   ORDERS
   ========================================================= */

.order-list {
  display: grid;

  gap: 8px;
}

.order-card {
  padding: 13px;

  border-radius: 16px;

  background: var(--surface);

  box-shadow: var(--shadow-xs);
}

.order-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;
}

.order-card__header strong {
  font-size: 11.5px;
}

.order-status {
  padding: 4px 7px;

  border-radius: 999px;

  background: var(--brand-soft);
  color: var(--brand);

  font-size: 7.5px;
  font-weight: 780;
}

.order-card__meta {
  display: flex;
  justify-content: space-between;

  gap: 10px;

  margin-top: 10px;
  padding-top: 9px;

  border-top:
    1px solid
    var(--line);

  color: var(--text-soft);

  font-size: 8.5px;
}

.order-card__meta strong {
  color: var(--text);
}


/* =========================================================
   PROFILE
   ========================================================= */

.profile-card {
  position: relative;

  display: flex;
  align-items: center;

  gap: 12px;

  margin-top: 16px;
  padding: 15px;

  border:
    1px solid
    rgba(124, 58, 237, 0.08);

  border-radius: 20px;

  background:
    linear-gradient(
      135deg,
      #f2eaff,
      #ffffff
    );
}

.profile-avatar {
  width: 52px;
  height: 52px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      var(--brand),
      #aa6aff
    );

  color: #ffffff;

  font-size: 20px;
  font-weight: 850;
}

.profile-card__info {
  min-width: 0;

  flex: 1;
}

.profile-card__eyebrow {
  display: block;

  color: var(--brand);

  font-size: 7.5px;
  font-weight: 850;

  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.profile-card h1 {
  margin-top: 2px;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 16px;
}

.profile-card p {
  margin-top: 2px;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--text-soft);

  font-size: 8.5px;
}

.profile-edit-button {
  width: 36px;
  height: 36px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background: rgba(255, 255, 255, 0.82);
  color: var(--brand);
}

.profile-edit-button svg {
  width: 18px;
  height: 18px;
}

.profile-incomplete-card {
  margin-top: 11px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 11px;

  padding: 12px;

  border:
    1px solid
    rgba(240, 163, 26, 0.18);

  border-radius: 15px;

  background: var(--warning-soft);
}

.profile-incomplete-card div {
  min-width: 0;
}

.profile-incomplete-card strong {
  display: block;

  font-size: 10.5px;
}

.profile-incomplete-card p {
  margin-top: 3px;

  color: var(--text-soft);

  font-size: 8px;
  line-height: 1.4;
}

.profile-incomplete-card button {
  flex: 0 0 auto;

  padding: 7px 9px;

  border-radius: 9px;

  background: var(--warning);
  color: #ffffff;

  font-size: 8px;
  font-weight: 760;
}


/* =========================================================
   PROFILE MENU
   ========================================================= */

.profile-menu {
  display: grid;

  gap: 7px;

  margin-top: 13px;
}

.profile-menu__item {
  width: 100%;

  display: grid;

  grid-template-columns:
    39px
    minmax(0, 1fr)
    auto;

  align-items: center;

  gap: 9px;

  padding: 10px;

  border:
    1px solid
    rgba(30, 25, 40, 0.025);

  border-radius: 14px;

  background: var(--surface);
  color: var(--text);

  text-align: left;

  box-shadow: var(--shadow-xs);

  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.profile-menu__item:active {
  transform: scale(0.99);
  background: var(--surface-soft);
}

.profile-menu__icon {
  width: 39px;
  height: 39px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background: var(--brand-soft);
  color: var(--brand);
}

.profile-menu__icon svg {
  width: 19px;
  height: 19px;
}

.profile-menu__content {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.profile-menu__content strong {
  font-size: 10.5px;
}

.profile-menu__content small {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--text-soft);

  font-size: 8px;
}

.profile-menu__arrow {
  color: var(--text-faint);

  font-size: 18px;
}


/* =========================================================
   DEVELOPER CREDIT
   ========================================================= */

.developer-credit {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 3px;

  margin:
    18px
    0
    8px;

  padding: 12px;

  color: var(--text-faint);

  text-align: center;
}

.developer-credit span {
  font-size: 7.5px;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}

.developer-credit button {
  padding: 4px 8px;

  border-radius: 999px;

  background: transparent;
  color: var(--brand);

  font-size: 9px;
  font-weight: 760;
}


/* =========================================================
   BOTTOM NAV
   ========================================================= */

.bottom-nav {
  position: fixed;

  left: 50%;
  bottom: 0;

  z-index: 80;

  width: 100%;
  max-width: var(--page-max);

  transform: translateX(-50%);

  display: grid;

  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  padding:
    6px
    5px
    calc(
      6px
      + var(--safe-bottom)
    );

  border-top:
    1px solid
    rgba(220, 220, 228, 0.92);

  background:
    rgba(255, 255, 255, 0.98);

  box-shadow:
    0 -5px 22px
    rgba(20, 16, 30, 0.035);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bottom-nav__item {
  position: relative;

  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 2px;

  padding: 3px 1px;

  background: transparent;
  color: #898994;

  font-size: 7.5px;
  font-weight: 610;

  transition:
    color 0.16s ease,
    transform 0.16s ease;
}

.bottom-nav__item:active {
  transform: scale(0.94);
}

.bottom-nav__icon {
  width: 25px;
  height: 25px;

  display: grid;
  place-items: center;
}

.bottom-nav__icon svg {
  width: 22px;
  height: 22px;
}

.bottom-nav__item--active {
  color: var(--brand);

  font-weight: 760;
}

.bottom-nav__item--active
.bottom-nav__icon {
  transform: translateY(-1px);
}

.cart-badge {
  position: absolute;

  top: -1px;

  left:
    calc(
      50%
      + 8px
    );

  min-width: 16px;
  height: 16px;

  display: grid;
  place-items: center;

  padding: 0 3px;

  border:
    2px solid
    #ffffff;

  border-radius: 999px;

  background: var(--brand);
  color: #ffffff;

  font-size: 7px;
  font-weight: 850;
}


/* =========================================================
   MODALS
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;

  z-index: 120;

  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;

  background:
    rgba(17, 14, 25, 0.48);

  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal__sheet {
  position: relative;

  z-index: 1;

  width: 100%;
  max-width: var(--page-max);

  max-height: 92vh;

  overflow-y: auto;

  overscroll-behavior: contain;

  border-radius:
    24px
    24px
    0
    0;

  background: var(--surface);

  box-shadow: var(--shadow-lg);

  animation:
    sheetIn
    0.24s
    cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sheetIn {
  from {
    opacity: 0.85;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal__handle {
  position: sticky;

  top: 0;

  z-index: 5;

  width: 38px;
  height: 4px;

  margin: 7px auto;

  border-radius: 999px;

  background: #d5d5dc;
}

.modal__close {
  position: absolute;

  top: 12px;
  right: 12px;

  z-index: 6;

  width: 33px;
  height: 33px;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.94);
  color: var(--text);

  font-size: 20px;
}

.modal__close--inline {
  position: static;

  flex: 0 0 auto;

  background: var(--surface-soft);
}


/* =========================================================
   FILTER MODAL
   ========================================================= */

.filter-sheet {
  padding-bottom:
    calc(
      12px
      + var(--safe-bottom)
    );
}

.filter-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 7px 14px 12px;
}

.filter-sheet__header span {
  color: var(--brand);

  font-size: 7.5px;
  font-weight: 800;
}

.filter-sheet__header h2 {
  margin-top: 2px;

  font-size: 17px;
}

.filter-sheet__content {
  display: grid;

  gap: 16px;

  padding: 0 13px 14px;
}

.filter-group {
  padding: 13px;

  border:
    1px solid
    var(--line);

  border-radius: 15px;

  background: var(--surface);
}

.filter-group h3 {
  margin-bottom: 10px;

  font-size: 11px;
}

.filter-radio-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 7px;
}

.filter-radio {
  position: relative;

  cursor: pointer;
}

.filter-radio input {
  position: absolute;

  opacity: 0;
  pointer-events: none;
}

.filter-radio span {
  min-height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 8px;

  border:
    1px solid
    var(--line);

  border-radius: 11px;

  background: var(--surface-soft);
  color: var(--text-soft);

  font-size: 8.5px;
  font-weight: 650;

  text-align: center;
}

.filter-radio input:checked + span {
  border-color: var(--brand);

  background: var(--brand-soft);
  color: var(--brand);

  font-weight: 780;
}

.filter-switch-list {
  display: grid;

  gap: 7px;
}

.filter-switch {
  position: relative;

  min-height: 43px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 0 3px;

  cursor: pointer;
}

.filter-switch > span:first-of-type {
  font-size: 9.5px;
  font-weight: 620;
}

.filter-switch input {
  position: absolute;

  opacity: 0;
}

.filter-switch::after {
  content: "";

  width: 40px;
  height: 23px;

  flex: 0 0 auto;

  border-radius: 999px;

  background: #dcdce2;

  box-shadow:
    inset
    0
    0
    0
    1px
    rgba(0, 0, 0, 0.04);

  transition: background 0.18s ease;
}

.filter-switch::before {
  content: "";

  position: absolute;

  right: 20px;

  width: 19px;
  height: 19px;

  z-index: 2;

  border-radius: 50%;

  background: #ffffff;

  box-shadow:
    0 2px 5px
    rgba(20, 20, 25, 0.15);

  transition: transform 0.18s ease;
}

.filter-switch:has(input:checked)::after {
  background: var(--brand);
}

.filter-switch:has(input:checked)::before {
  transform: translateX(17px);
}

.filter-price-row {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 8px;
}

.filter-price-row input {
  font-size: 9.5px;
}

.filter-sheet__actions {
  position: sticky;

  bottom: 0;

  display: grid;

  grid-template-columns:
    1fr
    1.4fr;

  gap: 8px;

  padding:
    11px
    13px
    calc(
      11px
      + var(--safe-bottom)
    );

  border-top:
    1px solid
    var(--line);

  background:
    rgba(255, 255, 255, 0.98);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}


/* =========================================================
   PRODUCT MODAL
   ========================================================= */

.product-sheet__image-wrap {
  position: relative;

  width: 100%;

  aspect-ratio: 1.3 / 1;

  overflow: hidden;

  background: var(--surface-soft);
}

.product-sheet__image {
  width: 100%;
  height: 100%;

  object-fit: contain;
}

.product-sheet__badge {
  position: absolute;

  top: 13px;
  left: 13px;

  padding: 5px 8px;

  border-radius: 999px;

  background: #ff426b;
  color: #ffffff;

  font-size: 8px;
  font-weight: 850;
}

.product-sheet__favorite {
  position: absolute;

  right: 13px;
  bottom: 13px;

  width: 39px;
  height: 39px;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.94);
  color: var(--text);

  font-size: 23px;
}

.product-sheet__body {
  padding:
    15px
    14px
    calc(
      18px
      + var(--safe-bottom)
    );
}

.product-sheet__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 8px;

  margin-bottom: 7px;
}

.product-sheet__category {
  color: var(--brand);

  font-size: 8px;
  font-weight: 760;
}

.stock-badge {
  padding: 4px 7px;

  border-radius: 999px;

  background: var(--success-soft);
  color: var(--success);

  font-size: 7.5px;
  font-weight: 760;
}

.product-sheet h2 {
  font-size: 18px;
  line-height: 1.2;

  letter-spacing: -0.025em;
}

.product-sheet__price {
  margin-top: 9px;
}

.product-sheet__price-main {
  color: var(--brand);

  font-size: 19px;
  font-weight: 850;
}

.product-sheet__price-old {
  margin-left: 6px;

  color: var(--text-faint);

  font-size: 9.5px;

  text-decoration: line-through;
}

.product-sheet__description {
  margin-top: 11px;

  color: var(--text-soft);

  font-size: 10.5px;
  line-height: 1.5;
}

.product-sheet__actions {
  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr);

  gap: 8px;

  margin-top: 17px;
}

.product-sheet__add {
  width: 100%;
}


/* =========================================================
   FULL PAGES
   ========================================================= */

.modal--full {
  align-items: stretch;

  background: var(--surface);
}

.search-page,
.checkout-page,
.profile-editor-page,
.success-page {
  width: 100%;
  max-width: var(--page-max);

  min-height: 100vh;

  margin: 0 auto;

  background: var(--bg);

  animation: fullPageIn 0.18s ease;
}

@keyframes fullPageIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* =========================================================
   SEARCH PAGE
   ========================================================= */

.search-page__header {
  position: sticky;

  top: 0;

  z-index: 5;

  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr);

  align-items: center;

  gap: 8px;

  padding:
    calc(
      8px
      + var(--safe-top)
    )
    12px
    8px;

  border-bottom:
    1px solid
    var(--line);

  background:
    rgba(255, 255, 255, 0.98);

  backdrop-filter: blur(16px);
}

.search-page__input-wrap {
  min-width: 0;
  height: 41px;

  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;

  align-items: center;

  gap: 7px;

  padding: 0 10px;

  border-radius: 12px;

  background: var(--surface-soft);
}

.search-page__input-wrap svg {
  width: 18px;
  height: 18px;

  color: var(--text-soft);
}

.search-page__input-wrap input {
  min-width: 0;

  width: 100%;

  border: 0;
  outline: 0;

  background: transparent;
  color: var(--text);

  font-size: 11.5px;
}

.search-page__clear {
  width: 25px;
  height: 25px;

  display: grid;
  place-items: center;

  padding: 0;

  border-radius: 50%;

  background: #dedee4;
  color: var(--text-soft);
}

.search-page__content {
  padding:
    15px
    12px
    calc(
      23px
      + var(--safe-bottom)
    );
}

.search-page__content h3 {
  margin-bottom: 9px;

  font-size: 11.5px;
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;

  gap: 6px;
}

.popular-search-button {
  padding: 7px 9px;

  border:
    1px solid
    var(--line);

  border-radius: 999px;

  background: var(--surface);
  color: var(--text-soft);

  font-size: 8.5px;
}


/* =========================================================
   LOCATION
   ========================================================= */

.location-sheet {
  padding-bottom:
    calc(
      11px
      + var(--safe-bottom)
    );
}

.location-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 7px 14px 12px;
}

.location-sheet__header span {
  color: var(--text-soft);

  font-size: 7.5px;
}

.location-sheet__header h2 {
  margin-top: 2px;

  font-size: 16px;
}

.location-list {
  display: grid;

  padding: 0 11px;
}

.location-option {
  width: 100%;

  min-height: 48px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 0 11px;

  border-bottom:
    1px solid
    var(--line);

  background: transparent;
  color: var(--text);

  text-align: left;

  font-size: 10.5px;
}

.location-option:last-child {
  border-bottom: 0;
}

.location-option span:last-child {
  color: var(--text-faint);

  font-size: 17px;
}

.location-option--active {
  color: var(--brand);

  font-weight: 760;
}


/* =========================================================
   PROFILE EDITOR
   ========================================================= */

.profile-editor-page__header {
  position: sticky;

  top: 0;

  z-index: 5;

  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr);

  align-items: center;

  gap: 8px;

  padding:
    calc(
      8px
      + var(--safe-top)
    )
    12px
    8px;

  border-bottom:
    1px solid
    var(--line);

  background:
    rgba(255, 255, 255, 0.98);
}

.profile-editor-page__header span {
  color: var(--text-soft);

  font-size: 7.5px;
}

.profile-editor-page__header h2 {
  margin-top: 1px;

  font-size: 14px;
}

.profile-editor-page__content {
  padding:
    13px
    12px
    calc(
      26px
      + var(--safe-bottom)
    );
}

.profile-register-intro {
  display: flex;
  align-items: center;

  gap: 11px;

  margin-bottom: 11px;
  padding: 13px;

  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      #f0e6ff,
      #ffffff
    );
}

.profile-register-intro__icon {
  width: 44px;
  height: 44px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 13px;

  background:
    linear-gradient(
      135deg,
      var(--brand),
      #a765ff
    );

  color: #ffffff;

  font-size: 17px;
  font-weight: 850;
}

.profile-register-intro strong {
  display: block;

  font-size: 10.5px;
}

.profile-register-intro p {
  margin-top: 3px;

  color: var(--text-soft);

  font-size: 8px;
  line-height: 1.4;
}


/* =========================================================
   CHECKOUT
   ========================================================= */

.checkout-page {
  position: relative;

  padding-bottom: 96px;
}

.checkout-page__header {
  position: sticky;

  top: 0;

  z-index: 7;

  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr);

  align-items: center;

  gap: 8px;

  padding:
    calc(
      8px
      + var(--safe-top)
    )
    12px
    8px;

  border-bottom:
    1px solid
    var(--line);

  background:
    rgba(255, 255, 255, 0.98);

  backdrop-filter: blur(16px);
}

.checkout-page__header span {
  color: var(--text-soft);

  font-size: 7.5px;
}

.checkout-page__header h2 {
  margin-top: 1px;

  font-size: 14px;
}

.checkout-page__content {
  padding: 13px 12px 15px;
}

.checkout-section {
  margin-bottom: 10px;

  padding: 13px;

  border-radius: 16px;

  background: var(--surface);

  box-shadow: var(--shadow-xs);
}

.checkout-section h3 {
  margin-bottom: 11px;

  font-size: 11.5px;
}

.checkout-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 9px;
}

.checkout-section__heading h3 {
  margin-bottom: 0;
}

.checkout-profile-preview {
  display: flex;
  align-items: center;

  gap: 9px;

  margin-top: 11px;
  padding: 10px;

  border-radius: 13px;

  background: var(--surface-soft);
}

.checkout-profile-preview__avatar {
  width: 37px;
  height: 37px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background: var(--brand-soft);
  color: var(--brand);

  font-size: 14px;
  font-weight: 850;
}

.checkout-profile-preview div:last-child {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.checkout-profile-preview strong {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 10.5px;
}

.checkout-profile-preview span {
  color: var(--text-soft);

  font-size: 8.5px;
}

.checkout-summary {
  display: grid;

  gap: 9px;
}


/* =========================================================
   DELIVERY TEXT
   ========================================================= */

#cartDelivery,
#checkoutDelivery {
  max-width: 180px;

  color: var(--text);

  text-align: right;

  font-size: 9px;
  line-height: 1.3;

  font-weight: 700;
}


/* =========================================================
   CHECKOUT RULES
   ========================================================= */

.checkout-rules-section {
  border:
    1px solid
    rgba(124, 58, 237, 0.1);
}

.checkout-rules-section__title {
  display: flex;
  align-items: flex-start;

  gap: 9px;
}

.checkout-rules-section__title svg {
  width: 23px;
  height: 23px;

  flex: 0 0 auto;

  color: var(--brand);
}

.checkout-rules-section__title strong {
  display: block;

  font-size: 10.5px;
}

.checkout-rules-section__title span {
  display: block;

  margin-top: 2px;

  color: var(--text-soft);

  font-size: 7.5px;
  line-height: 1.4;
}

.checkout-rules-list {
  display: grid;

  gap: 5px;

  margin-top: 10px;
  padding: 9px;

  border-radius: 11px;

  background: var(--surface-soft);
}

.checkout-rules-list p {
  color: var(--text-soft);

  font-size: 8px;
  line-height: 1.42;
}

.rules-checkbox {
  position: relative;

  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr);

  align-items: center;

  gap: 8px;

  margin-top: 11px;

  cursor: pointer;
}

.rules-checkbox input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}

.rules-checkbox__box {
  width: 21px;
  height: 21px;

  display: grid;
  place-items: center;

  border:
    1.5px solid
    var(--line-strong);

  border-radius: 7px;

  background: var(--surface);
  color: transparent;

  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.rules-checkbox__box svg {
  width: 14px;
  height: 14px;
}

.rules-checkbox input:checked
+
.rules-checkbox__box {
  border-color: var(--brand);

  background: var(--brand);
  color: #ffffff;
}

.rules-checkbox > span:last-child {
  color: var(--text);

  font-size: 8.5px;
  line-height: 1.4;
}


/* =========================================================
   CHECKOUT STICKY BAR
   ========================================================= */

.checkout-sticky-bar {
  position: fixed;

  left: 50%;
  bottom: 0;

  z-index: 140;

  width: 100%;
  max-width: var(--page-max);

  transform: translateX(-50%);

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(175px, 48%);

  align-items: center;

  gap: 12px;

  padding:
    10px
    13px
    calc(
      10px
      + var(--safe-bottom)
    );

  border-top:
    1px solid
    var(--line);

  background:
    rgba(255, 255, 255, 0.98);

  box-shadow:
    0 -8px 28px
    rgba(24, 18, 38, 0.07);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.checkout-sticky-bar__total {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.checkout-sticky-bar__total span {
  color: var(--text-soft);

  font-size: 8px;
}

.checkout-sticky-bar__total strong {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 16px;
  font-weight: 850;
}

.checkout-sticky-bar__button {
  width: 100%;
  min-height: 45px;
}


/* =========================================================
   FINAL CONFIRM
   ========================================================= */

.order-confirm-sheet {
  padding:
    9px
    15px
    calc(
      17px
      + var(--safe-bottom)
    );

  text-align: center;
}

.order-confirm-sheet__icon {
  width: 58px;
  height: 58px;

  display: grid;
  place-items: center;

  margin: 8px auto 10px;

  border-radius: 19px;

  background: var(--brand-soft);
  color: var(--brand);
}

.order-confirm-sheet__icon svg {
  width: 30px;
  height: 30px;
}

.order-confirm-sheet h2 {
  font-size: 17px;
}

.order-confirm-sheet > p {
  max-width: 300px;

  margin: 6px auto 0;

  color: var(--text-soft);

  font-size: 9px;
  line-height: 1.45;
}

.order-confirm-summary {
  display: grid;

  gap: 7px;

  margin-top: 13px;
  padding: 11px;

  border-radius: 13px;

  background: var(--surface-soft);

  text-align: left;
}

.order-confirm-summary > div {
  display: flex;
  justify-content: space-between;

  gap: 10px;

  color: var(--text-soft);

  font-size: 8.5px;
}

.order-confirm-summary strong {
  color: var(--text);
}

.order-confirm-actions {
  display: grid;

  grid-template-columns:
    1fr
    1.3fr;

  gap: 8px;

  margin-top: 13px;
}


/* =========================================================
   SUCCESS
   ========================================================= */

.success-page {
  display: grid;
  place-items: center;

  background: var(--surface);
}

.success-page__content {
  width: 100%;

  padding:
    calc(
      35px
      + var(--safe-top)
    )
    24px
    calc(
      35px
      + var(--safe-bottom)
    );

  text-align: center;
}

.success-page__icon {
  width: 82px;
  height: 82px;

  display: grid;
  place-items: center;

  margin: 0 auto 17px;

  border-radius: 50%;

  background: var(--success-soft);
  color: var(--success);

  animation: successPop 0.35s ease;
}

.success-page__icon svg {
  width: 47px;
  height: 47px;
}

@keyframes successPop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-page__eyebrow {
  display: block;

  color: var(--success);

  font-size: 8px;
  font-weight: 850;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.success-page h1 {
  margin-top: 5px;

  font-size: 26px;
}

.success-page p {
  max-width: 300px;

  margin: 8px auto 0;

  color: var(--text-soft);

  font-size: 9.5px;
  line-height: 1.5;
}

.success-order-number {
  display: inline-flex;

  margin-top: 16px;
  padding: 8px 12px;

  border-radius: 999px;

  background: var(--surface-soft);
  color: var(--text);

  font-size: 9.5px;
  font-weight: 760;
}


/* =========================================================
   RULES
   ========================================================= */

.rules-sheet {
  padding-bottom:
    calc(
      15px
      + var(--safe-bottom)
    );
}

.rules-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 7px 14px 12px;
}

.rules-sheet__header span {
  color: var(--brand);

  font-size: 7.5px;
  font-weight: 760;
}

.rules-sheet__header h2 {
  margin-top: 2px;

  font-size: 16px;
}

.rules-sheet__content {
  display: grid;

  gap: 7px;

  padding: 0 12px;
}

.rules-sheet__content article {
  padding: 11px;

  border-radius: 13px;

  background: var(--surface-soft);
}

.rules-sheet__content strong {
  display: block;

  font-size: 9.5px;
}

.rules-sheet__content p {
  margin-top: 3px;

  color: var(--text-soft);

  font-size: 8px;
  line-height: 1.45;
}


/* =========================================================
   ABOUT
   ========================================================= */

.about-sheet {
  padding-bottom:
    calc(
      15px
      + var(--safe-bottom)
    );
}

.about-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 7px 14px 12px;
}

.about-sheet__header span {
  color: var(--brand);

  font-size: 7.5px;
  font-weight: 800;
}

.about-sheet__header h2 {
  margin-top: 2px;

  font-size: 17px;
}

.about-sheet__content {
  display: grid;

  gap: 11px;

  padding: 0 12px;
}

.about-brand-card {
  display: grid;

  grid-template-columns:
    50px
    minmax(0, 1fr);

  align-items: center;

  gap: 11px;

  padding: 13px;

  border:
    1px solid
    rgba(124, 58, 237, 0.08);

  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      #f2eaff,
      #ffffff
    );
}

.about-brand-card__logo {
  width: 50px;
  height: 50px;

  display: grid;
  place-items: center;

  border-radius: 15px;

  background:
    linear-gradient(
      135deg,
      var(--brand),
      #a865ff
    );

  color: #ffffff;

  font-size: 19px;
  font-weight: 850;
}

.about-brand-card strong {
  display: block;

  font-size: 11px;
}

.about-brand-card p {
  margin-top: 4px;

  color: var(--text-soft);

  font-size: 8.5px;
  line-height: 1.45;
}

.about-contact-list {
  display: grid;

  gap: 7px;
}

.about-contact {
  width: 100%;

  min-height: 52px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 10px 12px;

  border:
    1px solid
    var(--line);

  border-radius: 13px;

  background: var(--surface);
  color: var(--text);

  text-align: left;
}

.about-contact span {
  color: var(--text-soft);

  font-size: 8px;
}

.about-contact strong {
  max-width: 58%;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--brand);

  font-size: 9px;
}

.about-developer-card {
  padding: 15px;

  border:
    1px solid
    rgba(124, 58, 237, 0.12);

  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      #f8f5ff,
      #efe7ff
    );

  text-align: center;
}

.about-developer-card > span {
  display: block;

  color: var(--text-soft);

  font-size: 7.5px;

  text-transform: uppercase;

  letter-spacing: 0.07em;
}

.about-developer-card button {
  margin-top: 5px;

  padding: 7px 12px;

  border-radius: 999px;

  background: #ffffff;
  color: var(--brand);

  font-size: 10px;
  font-weight: 820;

  box-shadow: var(--shadow-xs);
}


/* =========================================================
   TOAST
   ========================================================= */

.toast {
  position: fixed;

  left: 50%;

  bottom:
    calc(
      var(--nav-height)
      + var(--safe-bottom)
      + 14px
    );

  z-index: 300;

  width:
    calc(
      100%
      - 30px
    );

  max-width: 390px;

  transform: translateX(-50%);

  padding: 10px 12px;

  border-radius: 13px;

  background:
    rgba(23, 23, 28, 0.96);

  color: #ffffff;

  box-shadow: var(--shadow-lg);

  font-size: 9.5px;
  line-height: 1.4;

  text-align: center;

  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;

    transform:
      translate(
        -50%,
        7px
      );
  }

  to {
    opacity: 1;

    transform:
      translate(
        -50%,
        0
      );
  }
}


/* =========================================================
   DARK MODE
   ========================================================= */

body.telegram-dark {
  --bg: #151519;

  --surface: #202025;
  --surface-soft: #29292f;
  --surface-2: #303037;

  --text: #f6f6f8;
  --text-soft: #b4b4bc;
  --text-faint: #888891;

  --line: #34343c;
  --line-strong: #414149;

  --brand-soft: #34224f;

  --success-soft: #173c30;
  --warning-soft: #413719;
  --danger-soft: #402328;
}

body.telegram-dark .topbar,
body.telegram-dark .bottom-nav,
body.telegram-dark .search-page__header,
body.telegram-dark .checkout-page__header,
body.telegram-dark .profile-editor-page__header,
body.telegram-dark .cart-checkout-bar,
body.telegram-dark .checkout-sticky-bar,
body.telegram-dark .filter-sheet__actions {
  background:
    rgba(31, 31, 36, 0.98);
}

body.telegram-dark .search-box {
  background: #29292f;
}

body.telegram-dark .cart-badge {
  border-color: #202025;
}

body.telegram-dark .product-card__favorite,
body.telegram-dark .product-sheet__favorite,
body.telegram-dark .modal__close,
body.telegram-dark .profile-edit-button {
  background:
    rgba(35, 35, 40, 0.94);

  color: #ffffff;
}

body.telegram-dark .profile-card,
body.telegram-dark .profile-register-intro,
body.telegram-dark .about-brand-card {
  background:
    linear-gradient(
      135deg,
      #2d2340,
      #202025
    );
}

body.telegram-dark .about-developer-card {
  background:
    linear-gradient(
      135deg,
      #2c233a,
      #25202e
    );
}

body.telegram-dark .promo-strip {
  background:
    linear-gradient(
      135deg,
      #312246,
      #28222f
    );
}

body.telegram-dark .category-card__image {
  background:
    linear-gradient(
      145deg,
      #30283d,
      #28232f
    );
}

body.telegram-dark .success-page {
  background: var(--surface);
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {
  .page-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .topbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .category-grid {
    gap: 12px 5px;
  }

  .category-card__image {
    width: 51px;
    height: 51px;
  }

  .category-card__name {
    font-size: 8.5px;
  }

  .product-grid {
    gap: 8px 7px;
  }

  .product-card__body {
    padding: 7px 7px 8px;
  }

  .product-card__title {
    font-size: 10px;
  }

  .product-card__price {
    font-size: 10.5px;
  }

  .horizontal-products {
    grid-auto-columns:
      minmax(137px, 44%);
  }

  .hero-slide__title {
    font-size: 19px;
  }

  .hero-slide__subtitle {
    font-size: 9px;
  }

  .section-heading h2 {
    font-size: 17px;
  }

  .bottom-nav__item {
    font-size: 7px;
  }

  .bottom-nav__icon svg {
    width: 21px;
    height: 21px;
  }

  .cart-checkout-bar,
  .checkout-sticky-bar {
    padding-left: 10px;
    padding-right: 10px;
  }
}


/* =========================================================
   VERY SMALL
   ========================================================= */

@media (max-width: 350px) {
  .location-button--simple strong {
    max-width: 130px;

    font-size: 14px;
  }

  .search-box__placeholder {
    font-size: 11.5px;
  }

  .category-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .hero-slide__content {
    width: 88%;
  }

  .countdown__item {
    min-width: 28px;
  }

  .cart-checkout-bar {
    grid-template-columns:
      minmax(0, 1fr)
      145px;
  }

  .checkout-sticky-bar {
    grid-template-columns:
      minmax(0, 1fr)
      160px;
  }

  .filter-radio-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 560px) {
  .page-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .product-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));

    gap: 12px;
  }

  .category-grid {
    grid-template-columns:
      repeat(6, minmax(0, 1fr));
  }

  .horizontal-products {
    grid-auto-columns:
      minmax(150px, 31%);
  }
}


/* =========================================================
   DESKTOP PREVIEW
   ========================================================= */

@media (min-width: 760px) {
  body {
    background: #ededf1;
  }

  .app-shell {
    box-shadow:
      0 0 40px
      rgba(20, 17, 30, 0.045);
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   CHECKOUT SCROLL FIX
   ========================================================= */

#checkoutModal {
  overflow: hidden;
}

#checkoutModal .checkout-page {
  height: 100dvh;
  min-height: 100dvh;

  overflow-y: auto;
  overflow-x: hidden;

  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;

  padding-bottom: 0;
}

#checkoutModal .checkout-page__content {
  padding-bottom:
    calc(
      135px
      + env(safe-area-inset-bottom, 0px)
    );
}

#checkoutModal .checkout-rules-section {
  margin-bottom: 22px;
}

#checkoutModal .rules-checkbox {
  min-height: 44px;
  padding: 5px 0;
}

#checkoutModal .checkout-sticky-bar {
  z-index: 150;
}

/* =========================================================
   K-MAGIC FLASH SALE — FINAL
   ========================================================= */

#flashSaleSection {
  margin-top: 20px;
}

#flashSaleSection .sale-panel {
  padding: 15px 11px 12px;

  overflow: hidden;

  border-radius: 22px;

  background:
    radial-gradient(
      circle at 95% 0%,
      rgba(255,255,255,.22),
      transparent 32%
    ),
    linear-gradient(
      135deg,
      #9852ff 0%,
      #7636ef 52%,
      #6426d4 100%
    );

  box-shadow:
    0 12px 30px
    rgba(112, 45, 220, .18);
}


/* HEADER */

#flashSaleSection
.sale-panel__header {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 10px;

  margin-bottom: 13px;
}

#flashSaleSection
.sale-panel__title-row {
  display: flex;
  align-items: center;

  gap: 6px;
}

#flashSaleSection
.sale-panel__title-row h2 {
  color: #ffffff;

  font-size: 18px;
  line-height: 1.1;

  font-weight: 850;
}

#flashSaleSection
.sale-panel__icon {
  font-size: 17px;
}

#flashSaleSection
.sale-panel__header p {
  max-width: 220px;

  margin-top: 4px;

  color:
    rgba(255,255,255,.83);

  font-size: 8.5px;
  line-height: 1.4;
}


/* COUNTDOWN */

#flashSaleSection
.countdown {
  display: flex;
  align-items: center;

  gap: 3px;

  flex: 0 0 auto;
}

#flashSaleSection
.countdown__item {
  min-width: 30px;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 5px 4px;

  border:
    1px solid
    rgba(255,255,255,.15);

  border-radius: 9px;

  background:
    rgba(255,255,255,.14);

  color: #ffffff;

  backdrop-filter: blur(7px);
}

#flashSaleSection
.countdown__item strong {
  font-size: 10px;
  line-height: 1;
}

#flashSaleSection
.countdown__item small {
  margin-top: 2px;

  font-size: 5.5px;

  opacity: .76;
}

#flashSaleSection
.countdown__separator {
  color: #ffffff;

  font-size: 10px;
  font-weight: 900;
}


/* PRODUCT CAROUSEL */

#flashSaleProducts {
  display: grid;

  grid-auto-flow: column;

  grid-auto-columns:
    minmax(
      138px,
      43%
    );

  gap: 8px;

  overflow-x: auto;
  overflow-y: hidden;

  padding:
    1px
    1px
    3px;

  scroll-snap-type:
    x proximity;

  scrollbar-width: none;

  -webkit-overflow-scrolling:
    touch;
}

#flashSaleProducts::-webkit-scrollbar {
  display: none;
}


/* FLASH SALE PRODUCT CARD */

#flashSaleProducts
.product-card {
  scroll-snap-align: start;

  border: 0;

  border-radius: 15px;

  background: #ffffff;

  box-shadow:
    0 5px 18px
    rgba(45, 18, 77, .12);
}

#flashSaleProducts
.product-card__image-wrap {
  aspect-ratio: 1 / 1;

  background: #f5f4f7;
}

#flashSaleProducts
.product-card__body {
  padding: 8px;
}

#flashSaleProducts
.product-card__category {
  font-size: 7px;
}

#flashSaleProducts
.product-card__title {
  min-height: 29px;

  font-size: 9.5px;
}

#flashSaleProducts
.product-card__old-price {
  font-size: 7px;
}

#flashSaleProducts
.product-card__price {
  color: #5f20cf;

  font-size: 10.5px;
  font-weight: 850;
}

#flashSaleProducts
.product-card__badge--sale {
  background:
    linear-gradient(
      135deg,
      #ff356c,
      #ff5c86
    );
}

#flashSaleProducts
.product-card__add {
  width: 29px;
  height: 29px;

  border-radius: 9px;

  background:
    linear-gradient(
      135deg,
      #7d32f5,
      #9c57ff
    );
}


/* ADMIN MAHSULOT TANLAMAGAN HOLAT */

.flash-sale-empty {
  grid-column: 1 / -1;

  min-width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 3px;

  padding: 14px;

  border:
    1px dashed
    rgba(255,255,255,.3);

  border-radius: 13px;

  background:
    rgba(255,255,255,.1);

  color: #ffffff;

  text-align: center;
}

.flash-sale-empty strong {
  font-size: 10px;
}

.flash-sale-empty span {
  color:
    rgba(255,255,255,.75);

  font-size: 7.5px;
}


/* SMALL PHONE */

@media (max-width: 390px) {
  #flashSaleProducts {
    grid-auto-columns:
      minmax(
        132px,
        44%
      );
  }

  #flashSaleSection
  .sale-panel__title-row h2 {
    font-size: 16px;
  }

  #flashSaleSection
  .countdown__item {
    min-width: 27px;
  }
}

/* =========================================================
   TELEGRAM MOBILE KEYBOARD FIX
   ========================================================= */

#profileModal {
  overflow: hidden;
}

#profileModal .profile-editor-page {
  height: 100dvh;
  max-height: 100dvh;

  display: flex;
  flex-direction: column;

  overflow: hidden;
}

#profileModal .profile-editor-page__header {
  flex: 0 0 auto;
}

#profileModal .profile-editor-page__content {
  flex: 1 1 auto;

  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  -webkit-overflow-scrolling: touch;

  overscroll-behavior: contain;

  padding-bottom:
    calc(
      32px
      + env(safe-area-inset-bottom, 0px)
    );

  scroll-padding-top: 90px;
  scroll-padding-bottom: 180px;
}

#profileModal input,
#profileModal textarea,
#profileModal select {
  scroll-margin-top: 90px;
  scroll-margin-bottom: 190px;
}

#profileModal textarea {
  resize: none;
}

/* Klaviatura ochilganda pastki tugma
   ekran ustiga chiqib ketmasligi uchun */
body.keyboard-open #profileModal .profile-editor-page__content {
  padding-bottom: 24px;
}

/* Agar save button sticky/fixed qilib yozilgan bo‘lsa
   profil modalida uni normal oqimga qaytaramiz */
#profileModal #saveProfileButton {
  position: relative !important;

  left: auto !important;
  right: auto !important;
  bottom: auto !important;

  width: 100%;

  margin-top: 14px;
}

/* Mobil Telegram uchun */
@media (max-width: 768px) {
  #profileModal .profile-editor-page {
    height: 100dvh;
    min-height: 100dvh;
  }

  #profileModal input,
  #profileModal textarea,
  #profileModal select {
    font-size: 16px;
  }
}