:root {
  --bg-0: #070814;
  --bg-1: #0c1024;
  --bg-2: #131331;
  --bg-3: #1b1440;

  --surface-0: rgba(11, 13, 30, 0.92);
  --surface-1: rgba(18, 18, 42, 0.84);
  --surface-2: rgba(28, 20, 58, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.04);

  --stroke-0: rgba(255, 255, 255, 0.08);
  --stroke-1: rgba(171, 123, 255, 0.18);
  --stroke-2: rgba(255, 255, 255, 0.14);

  --accent-1: #8b5cf6;
  --accent-2: #a855f7;
  --accent-3: #c084fc;
  --accent-4: #f472b6;

  --text-main: #f7f4ff;
  --text-soft: rgba(247, 244, 255, 0.74);
  --text-dim: rgba(247, 244, 255, 0.52);

  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.16);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;

  --nav-height: 76px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  color: var(--text-main);
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(168, 85, 247, 0.14), transparent 58%),
    radial-gradient(700px 420px at 100% 10%, rgba(244, 114, 182, 0.08), transparent 52%),
    radial-gradient(900px 700px at 50% 100%, rgba(99, 102, 241, 0.08), transparent 58%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 28%, var(--bg-2) 68%, var(--bg-3) 100%);
  background-attachment: scroll;
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.012)),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px);
  background-size: auto, 140px 140px, 180px 180px;
  opacity: 0.22;
  z-index: -1;
}

.anime-bg,
.theme-bg {
  min-height: 100vh;
}

a,
button,
input,
select,
textarea {
  transition: all 0.22s ease;
}

img {
  display: block;
  max-width: 100%;
}

input,
select,
textarea {
  color: var(--text-main) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(8, 10, 25, 0.86) !important;
  border: 1px solid var(--stroke-0) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim) !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: rgba(192, 132, 252, 0.42) !important;
  box-shadow:
    0 0 0 3px rgba(168, 85, 247, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

header {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

header.fixed,
header.sticky,
header.hidden.md\:block {
  background:
    linear-gradient(180deg, rgba(10, 11, 25, 0.92), rgba(14, 14, 34, 0.84)) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: var(--shadow-sm);
}

footer {
  color: var(--text-soft);
  border-color: rgba(255, 255, 255, 0.07) !important;
}

.bottom-safe {
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

.bottom-safe-lg {
  padding-bottom: calc(var(--nav-height) + 8rem + env(safe-area-inset-bottom));
}

.glass,
.glass-soft,
.section {
  border: 1px solid var(--stroke-0);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    linear-gradient(180deg, rgba(27, 20, 64, 0.52), rgba(10, 12, 28, 0.78));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.glass {
  border-radius: var(--radius-xl);
}

.glass-soft {
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(8, 10, 25, 0.82);
}

.section {
  border-radius: var(--radius-xl);
  padding: 1.4rem;
}

.heading-xl {
  font-size: clamp(1.9rem, 2vw + 1.3rem, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.heading-lg {
  font-size: clamp(1.45rem, 1.2vw + 1.1rem, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.text-muted {
  color: var(--text-soft);
}

header nav a {
  color: var(--text-soft) !important;
}

header nav a:hover {
  color: var(--text-main) !important;
}

.neon-btn,
.pill-btn,
button.bg-white,
a.bg-white {
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3)) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    0 8px 18px rgba(139, 92, 246, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.neon-btn:hover,
.pill-btn:hover,
button.bg-white:hover,
a.bg-white:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

button.border,
a.border {
  border-radius: 999px !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-main) !important;
}

#searchInputHome,
#searchInputIndex {
  min-height: 52px;
  border-radius: 18px !important;
}

#searchClearHome {
  min-height: 52px;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

.carousel {
  position: relative;
  overflow: hidden;
}

.track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.35rem 0.1rem 0.8rem;
  scrollbar-width: none;
}

.track::-webkit-scrollbar {
  display: none;
}

.slide,
.promo-slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.slide {
  width: clamp(220px, 88vw, 460px);
}

.dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.dot.active {
  width: 22px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .cat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cat-pill {
  min-height: 54px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(10, 12, 28, 0.82);
  border: 1px solid rgba(110, 78, 190, 0.38);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.cat-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 132, 252, 0.42);
  background:
    linear-gradient(180deg, rgba(168, 85, 247, 0.12), rgba(255, 255, 255, 0.015)),
    rgba(10, 12, 28, 0.88);
}

.cat-label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-main);
}

.cat-ico {
  font-size: 0.95rem;
  line-height: 1;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-grid {
  display: grid;
  grid-auto-rows: max-content;
}

.product-card {
  position: relative;
  display: block;
  padding: 0.85rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, rgba(26, 16, 56, 0.75), rgba(8, 10, 25, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.28);
}

.product-media,
.pc-media {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  aspect-ratio: 4 / 4.2;
}

.product-media img,
.pc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-body {
  display: block;
  margin-top: 0.75rem;
}

.product-title,
.pc-title {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta,
.pc-cat {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.product-price,
.pc-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.pc-old,
.product-card del {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.78rem;
  text-decoration: line-through;
}

.pc-priceRow {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.pc-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.pc-btn {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
}

.pc-btn.primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  border-color: transparent;
  color: #fff;
}

.pc-pill,
.pc-badge,
.badge-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 28px;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: rgba(8, 10, 25, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
}

.badge-pending {
  color: #ffe7a6;
  border-color: rgba(255, 208, 89, 0.34);
}

.badge-approved {
  color: #a7ffd1;
  border-color: rgba(102, 255, 178, 0.24);
}

.badge-rejected {
  color: #ffb5c9;
  border-color: rgba(255, 115, 146, 0.26);
}

/* ===== DETAIL PAGE ===== */

#detail-wrapper {
  display: grid;
  gap: 0.9rem;
  width: 100%;
}

@media (min-width: 1024px) {
  #detail-wrapper {
    grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.98fr);
    align-items: start;
    gap: 1.1rem;
  }
}

#detail-wrapper > * {
  min-width: 0;
}

#detail-wrapper,
#detail-wrapper * {
  word-break: break-word;
  overflow-wrap: anywhere;
}

#detail-wrapper .glass,
#detail-wrapper .section,
#detail-wrapper > section {
  border-radius: 22px;
}

#detail-wrapper img {
  max-width: 100%;
  display: block;
}

/* action bar */
#detail-action-bar {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(var(--nav-height) + 14px);
  z-index: 70;
  max-width: 720px;
  margin: 0 auto;
  pointer-events: none;
}

#detail-action-bar .detail-bar-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    linear-gradient(180deg, rgba(27, 20, 64, 0.88), rgba(8, 10, 25, 0.96));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}

.detail-price-box {
  min-height: 44px;
  height: 44px;
  padding: 5px 7px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(9, 10, 24, 0.58);
  border: 1px solid rgba(255,255,255,0.08);
}

.detail-price-label {
  margin: 0 0 2px;
  font-size: 8px;
  line-height: 1;
  color: rgba(247, 244, 255, 0.58);
}

.detail-price-value {
  margin: 0;
  font-size: 11px;
  line-height: 1.08;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

#detail-action-buy,
#detail-action-cart {
  min-height: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}

#detail-action-buy {
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow:
    0 8px 18px rgba(139, 92, 246, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.16);
}

#detail-action-cart {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.045);
  color: var(--text-main);
}

/* similar */
.similar-grid,
#detail-wrapper .products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.similar-grid .product-card,
#detail-wrapper .products-grid .product-card {
  padding: 0.65rem;
  border-radius: 18px;
}

.similar-grid .product-media,
#detail-wrapper .products-grid .product-media,
.similar-grid .pc-media,
#detail-wrapper .products-grid .pc-media {
  aspect-ratio: 4 / 4.1;
  border-radius: 14px;
}

.similar-grid .product-title,
#detail-wrapper .products-grid .product-title,
.similar-grid .pc-title,
#detail-wrapper .products-grid .pc-title {
  font-size: 0.84rem;
  line-height: 1.25;
}

.similar-grid .pc-actions,
#detail-wrapper .products-grid .pc-actions {
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

@media (min-width: 768px) {
  .similar-grid,
  #detail-wrapper .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
  }

  .similar-grid .pc-actions,
  #detail-wrapper .products-grid .pc-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* mobile detail hard fix */
@media (max-width: 640px) {
  main.bottom-safe-lg {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 56px !important;
    padding-bottom: calc(var(--nav-height) + 7.9rem + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
  }

  #detail-wrapper,
  #detail-wrapper > section,
  #detail-wrapper .section,
  #detail-wrapper .glass,
  #detail-wrapper > * {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  #detail-wrapper {
    gap: 10px !important;
  }

  #detail-wrapper > section,
  #detail-wrapper .section,
  #detail-wrapper .glass,
  #detail-wrapper > * {
    border-radius: 18px !important;
  }

  #detail-wrapper h1,
  #detail-wrapper .heading-xl,
  #detail-wrapper [class*="title"] {
    font-size: 0.98rem !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  #detail-wrapper .heading-lg {
    font-size: 0.92rem !important;
    line-height: 1.18 !important;
  }

  #detail-wrapper p,
  #detail-wrapper li,
  #detail-wrapper span {
    font-size: 0.84rem !important;
    line-height: 1.42 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  #detail-wrapper .glass,
  #detail-wrapper .section {
    padding: 14px !important;
  }

  #detail-wrapper .price-row,
  #detail-wrapper [class*="priceRow"],
  #detail-wrapper [class*="price-row"] {
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  #detail-wrapper .product-price,
  #detail-wrapper .pc-price,
  #detail-wrapper .price-row .current {
    font-size: 1rem !important;
    line-height: 1.1 !important;
  }

  #detail-wrapper del,
  #detail-wrapper .pc-old {
    font-size: 0.72rem !important;
  }

  #detail-action-bar {
    left: 6px !important;
    right: 6px !important;
    bottom: calc(var(--nav-height) + 14px) !important;
    max-width: none !important;
    z-index: 70 !important;
  }

  #detail-action-bar .detail-bar-inner {
    grid-template-columns: 0.95fr 1fr 1fr !important;
    gap: 5px !important;
    padding: 5px !important;
    border-radius: 13px !important;
  }

  .detail-price-box,
  #detail-action-buy,
  #detail-action-cart {
    min-height: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
  }

  .detail-price-box {
    padding: 4px 6px !important;
  }

  .detail-price-label {
    font-size: 8px !important;
  }

  .detail-price-value {
    font-size: 10px !important;
  }

  #detail-action-buy,
  #detail-action-cart {
    font-size: 10px !important;
    padding: 0 4px !important;
    white-space: nowrap !important;
  }
}

/* ultra mobile */
@media (max-width: 370px) {
  main.bottom-safe-lg {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: 54px !important;
    padding-bottom: calc(var(--nav-height) + 7.4rem + env(safe-area-inset-bottom)) !important;
  }

  #detail-wrapper {
    gap: 8px !important;
  }

  #detail-wrapper > section,
  #detail-wrapper .section,
  #detail-wrapper .glass,
  #detail-wrapper > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border-radius: 16px !important;
  }

  #detail-wrapper h1,
  #detail-wrapper .heading-xl,
  #detail-wrapper [class*="title"] {
    font-size: 0.92rem !important;
    line-height: 1.18 !important;
    margin-bottom: 6px !important;
  }

  #detail-wrapper .heading-lg {
    font-size: 0.86rem !important;
    line-height: 1.15 !important;
  }

  #detail-wrapper p,
  #detail-wrapper li,
  #detail-wrapper span {
    font-size: 0.8rem !important;
    line-height: 1.36 !important;
  }

  #detail-wrapper .product-price,
  #detail-wrapper .pc-price,
  #detail-wrapper .price-row .current {
    font-size: 0.92rem !important;
    line-height: 1.05 !important;
  }

  #detail-wrapper del,
  #detail-wrapper .pc-old {
    font-size: 0.68rem !important;
  }

  #detail-action-bar {
    left: 5px !important;
    right: 5px !important;
    bottom: calc(var(--nav-height) + 12px) !important;
  }

  #detail-action-bar .detail-bar-inner {
    grid-template-columns: 0.92fr 1fr 1fr !important;
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 12px !important;
  }

  .detail-price-box,
  #detail-action-buy,
  #detail-action-cart {
    min-height: 39px !important;
    height: 39px !important;
    border-radius: 9px !important;
  }

  .detail-price-box {
    padding: 4px 5px !important;
  }

  .detail-price-label {
    font-size: 7px !important;
    margin-bottom: 1px !important;
  }

  .detail-price-value {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  #detail-action-buy,
  #detail-action-cart {
    font-size: 9px !important;
    padding: 0 2px !important;
    white-space: nowrap !important;
  }

  .bottom-nav,
  nav.fixed.bottom-0.left-0.right-0.z-50 {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    border-radius: 20px !important;
  }

  .bottom-nav .mx-auto,
  nav.fixed.bottom-0.left-0.right-0.z-50 .mx-auto {
    min-height: 68px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .bottom-nav .nav-item,
  nav.fixed.bottom-0.left-0.right-0.z-50 a {
    min-width: 48px !important;
    gap: 2px !important;
    font-size: 11px !important;
  }
}

/* ===== ACCOUNT / AUTH ===== */

#auth-section > div,
#profile-section > div,
#profile-section section,
#user-settings,
#admin-shortcuts {
  position: relative;
}

#login-box,
#register-box,
#profile-section > .glass,
#admin-shortcuts,
#user-settings,
#wishlist-empty,
#wishlist-list > *,
#comments-empty,
#empty-state,
#summary-box,
#checkout-summary,
#receipt-step,
#admin-login-box,
#pending-empty,
#admin-products-empty {
  border-radius: 26px !important;
}

#profile-section .glass:first-child {
  overflow: hidden;
}

[data-profile-name],
[data-profile-email],
[data-profile-phone] {
  color: #fff;
  font-weight: 700;
}

#profile-section a.rounded-full,
#profile-section button.rounded-full {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main) !important;
  padding: 0.85rem 1rem !important;
}

/* ===== CART / SUMMARY / ADMIN CARDS ===== */
#cart-list > *,
#checkout-summary,
#summary-box,
#adminProducts > *,
#pending-orders > article,
#admin-comments > article {
  border-radius: 26px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, rgba(18, 14, 42, 0.94), rgba(5, 7, 20, 0.99)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: var(--shadow-md);
}

#admin-product-form input,
#admin-product-form textarea,
#admin-product-form select,
#checkout-form input,
#checkout-form textarea,
#checkout-form select,
#settings-form select,
#login-form input,
#register-form input {
  min-height: 48px;
  border-radius: 16px !important;
}

#admin-product-form textarea,
#checkout-form textarea {
  min-height: 110px;
}

#variant-list > *,
#image-preview > *,
.reply-form textarea,
#receipt-preview {
  border-radius: 18px !important;
}

#loader > div {
  border-color: rgba(255, 255, 255, 0.14) !important;
  border-top-color: #c084fc !important;
}

.bottom-nav,
nav.fixed.bottom-0.left-0.right-0.z-50 {
  left: 12px !important;
  right: 12px !important;
  bottom: 10px !important;
  border-radius: 26px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(9, 10, 24, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bottom-nav .nav-item,
nav.fixed.bottom-0.left-0.right-0.z-50 a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  color: var(--text-soft);
  min-width: 58px;
}

.bottom-nav .nav-item.active,
nav.fixed.bottom-0.left-0.right-0.z-50 a.text-white {
  color: #fff !important;
}

.bottom-nav .nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-4));
}

.bottom-nav .mx-auto,
nav.fixed.bottom-0.left-0.right-0.z-50 .mx-auto {
  min-height: var(--nav-height);
}

.copy-btn,
#payment-done,
#receipt-submit,
#apply-promo,
#btnSave,
#admin-login-btn,
#logout-btn {
  border-radius: 14px !important;
}

#promo-code {
  min-height: 48px;
}

#promo-track,
#new-drops-row {
  align-items: stretch;
}

#new-drops-row > *,
#wishlist-list > *,
#adminProducts > * {
  height: 100%;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#receipt-modal {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#receipt-modal > div {
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

@media (max-width: 640px) {
  .cat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .cat-pill {
    min-height: 50px;
    padding: 0.45rem 0.35rem;
  }

  .cat-label {
    font-size: 0.68rem;
    line-height: 1.12;
  }

  .products-grid {
    gap: 0.8rem;
  }

  .product-card {
    padding: 0.72rem;
    border-radius: 22px;
  }

  .pc-actions {
    grid-template-columns: 1fr;
  }

  main {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .glass,
  .glass-soft,
  .section,
  header,
  .bottom-nav,
  nav.fixed.bottom-0.left-0.right-0.z-50,
  #detail-action-bar .detail-bar-inner {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body::before {
    display: none;
  }
}

@media (min-width: 768px) {
  .bottom-nav,
  nav.fixed.bottom-0.left-0.right-0.z-50 {
    left: 20px !important;
    right: 20px !important;
  }
}

.skeleton,
.detail-skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
}

.skeleton::after,
.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  animation: shimmerMove 1.3s infinite;
}

@keyframes shimmerMove {
  100% {
    transform: translateX(100%);
  }
}

/* ===== DETAIL GALLERY FINAL FIX ===== */
.detail-gallery-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.detail-main-media {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 420px !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05), rgba(255,255,255,0.015) 70%),
    linear-gradient(180deg, rgba(20,16,48,0.96), rgba(8,10,25,0.98));
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: var(--shadow-md);
}

.detail-main-media #main-image,
.detail-main-media #main-img,
.detail-main-media img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  margin: 0 auto !important;
  border-radius: 18px !important;
}

.detail-thumbs {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  margin-top: 10px !important;
  padding: 0 0 2px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(192, 132, 252, 0.45) transparent;
}

.detail-thumbs::-webkit-scrollbar {
  height: 6px;
}

.detail-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.detail-thumbs::-webkit-scrollbar-thumb {
  background: rgba(192, 132, 252, 0.45);
  border-radius: 999px;
}

.detail-thumbs .detail-thumb,
.detail-thumbs button {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  background: rgba(255,255,255,0.04) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  box-shadow: var(--shadow-sm);
}

.detail-thumbs .detail-thumb img,
.detail-thumbs button img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 14px !important;
}

.detail-thumbs .detail-thumb.active,
.detail-thumbs button.active {
  border: 2px solid var(--accent-2) !important;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.18) !important;
}

@media (max-width: 640px) {
  .detail-main-media {
    height: 320px !important;
    padding: 8px !important;
    border-radius: 20px !important;
  }

  .detail-main-media #main-image,
  .detail-main-media #main-img,
  .detail-main-media img {
    border-radius: 16px !important;
  }

  .detail-thumbs .detail-thumb,
  .detail-thumbs button {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
  }
}

@media (max-width: 370px) {
  .detail-main-media {
    height: 280px !important;
    padding: 7px !important;
    border-radius: 18px !important;
  }

  .detail-main-media #main-image,
  .detail-main-media #main-img,
  .detail-main-media img {
    border-radius: 14px !important;
  }

  .detail-thumbs .detail-thumb,
  .detail-thumbs button {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 10px !important;
  }

  .detail-thumbs .detail-thumb img,
  .detail-thumbs button img {
    border-radius: 10px !important;
  }
}

/* ===== CART PAGE DARK BACKGROUND FIX ===== */
body.theme-bg:has(#cart-list) main,
body.theme-bg:has(#checkout-summary) main,
body.theme-bg:has(#summary-box) main {
  background:
    radial-gradient(700px 380px at 10% 0%, rgba(168, 85, 247, 0.08), transparent 58%),
    radial-gradient(520px 320px at 100% 10%, rgba(244, 114, 182, 0.04), transparent 52%),
    linear-gradient(180deg, #08101f 0%, #081427 38%, #081225 68%, #070d1a 100%) !important;
}

body.theme-bg:has(#cart-list) #empty-state,
body.theme-bg:has(#cart-list) #checkout-summary,
body.theme-bg:has(#cart-list) #summary-box,
body.theme-bg:has(#cart-list) #cart-list > * {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, rgba(18, 14, 42, 0.94), rgba(5, 7, 20, 0.99)) !important;
}

body.theme-bg:has(#cart-list) #promo-code,
body.theme-bg:has(#cart-list) #apply-promo {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    rgba(8, 10, 25, 0.90) !important;
}

body.theme-bg:has(#cart-list),
body.theme-bg:has(#checkout-summary),
body.theme-bg:has(#summary-box) {
  background: #08101f !important;
}

body.theme-bg:has(#cart-list)::before,
body.theme-bg:has(#checkout-summary)::before,
body.theme-bg:has(#summary-box)::before {
  display: none !important;
}

body.theme-bg:has(#cart-list) main,
body.theme-bg:has(#checkout-summary) main,
body.theme-bg:has(#summary-box) main {
  background:
    radial-gradient(700px 380px at 10% 0%, rgba(168, 85, 247, 0.08), transparent 58%),
    radial-gradient(520px 320px at 100% 10%, rgba(244, 114, 182, 0.04), transparent 52%),
    linear-gradient(180deg, #08101f 0%, #08101f 38%, #08101f 68%, #08101f 100%) !important;
  min-height: calc(100vh - 120px) !important;
}

body.theme-bg:has(#cart-list) .bottom-nav,
body.theme-bg:has(#checkout-summary) .bottom-nav,
body.theme-bg:has(#summary-box) .bottom-nav,
body.theme-bg:has(#cart-list) nav.fixed.bottom-0.left-0.right-0.z-50,
body.theme-bg:has(#checkout-summary) nav.fixed.bottom-0.left-0.right-0.z-50,
body.theme-bg:has(#summary-box) nav.fixed.bottom-0.left-0.right-0.z-50 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(8, 10, 25, 0.92) !important;
}

/* ===== HOME PROMO CLEAN FINAL ===== */
.promo-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    linear-gradient(180deg, rgba(18, 14, 42, 0.92), rgba(8, 10, 25, 0.96));
  box-shadow: var(--shadow-md);
}

#promo-track {
  display: flex;
  width: 100%;
  gap: 0 !important;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

#promo-track .promo-slide {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
}

.promo-link {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
}

.promo-banner-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  background: #0b1020;
}

#promo-dots {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .promo-shell {
    border-radius: 22px;
    padding: 0;
  }

  #promo-track .promo-slide,
  .promo-link,
  .promo-banner-img {
    border-radius: 22px;
  }
}