:root {
  --bg: #020817;
  --surface: #071426;
  --surface-2: #0b1b34;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(0, 212, 255, 0.15);
  --accent: #00d4ff;
  --accent-strong: #22e3ff;
  --accent-soft: rgba(0, 212, 255, 0.12);
  --success: #10b981;
  --warn: #38bdf8;
  --danger: #ef4444;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] {
  --bg: #020817;
  --surface: #071426;
  --surface-2: #0b1b34;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(0, 212, 255, 0.15);
  --accent: #00d4ff;
  --accent-strong: #22e3ff;
  --accent-soft: rgba(0, 212, 255, 0.12);
  --success: #10b981;
  --warn: #38bdf8;
  --danger: #ef4444;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
}

body[data-theme="light"] {
  --bg: #020817;
  --surface: #061224;
  --surface-2: #0b1b34;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(0, 212, 255, 0.18);
  --accent: #00d4ff;
  --accent-strong: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --success: #10b981;
  --warn: #38bdf8;
  --danger: #ef4444;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.48);
  background:
    radial-gradient(circle at 16% 0%, rgba(0, 212, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #020817 0%, #061224 46%, #020817 100%);
}

body[data-theme="light"] .site-header {
  background: rgba(2, 8, 23, 0.82);
}

body[data-theme="light"] .search input,
body[data-theme="light"] .chatbot-form input {
  background: rgba(7, 20, 38, 0.92);
  border-color: var(--border);
  color: var(--text);
}

body[data-theme="light"] .shop-hero {
  background: linear-gradient(135deg, rgba(7, 20, 38, 0.94) 0%, rgba(2, 8, 23, 0.96) 58%, rgba(11, 27, 52, 0.9) 100%);
}

body[data-theme="light"] .product-card,
body[data-theme="light"] .community-reviews,
body[data-theme="light"] .trust-strip div {
  background: rgba(11, 27, 52, 0.86);
}

body[data-theme="light"] .site-footer {
  background: #071022;
}

body[data-theme="dark"] .search-category-select-wrapper {
  background: linear-gradient(135deg, rgba(103, 244, 255, 0.26), rgba(33, 212, 223, 0.1));
  border-right-color: rgba(103, 244, 255, 0.34);
}

body[data-theme="dark"] .search-category-select {
  background-color: rgba(8, 30, 44, 0.98);
  color: #d9fbff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367f4ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

body[data-theme="dark"] .search-category-select option {
  background: #06111f;
  color: #d9fbff;
}

body[data-theme="dark"] .search-input-field {
  color: #f8fbff !important;
}

body[data-theme="dark"] .search-input-field::placeholder {
  color: #9aa8bd;
}

body[data-theme="dark"] .store-header .brand-text strong {
  background: linear-gradient(135deg, #f8fbff 0%, #67f4ff 48%, #21d4df 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

body[data-theme="dark"] .store-header .brand,
body[data-theme="dark"] .toolbar {
  background: linear-gradient(135deg, rgba(103, 244, 255, 0.08), rgba(33, 212, 223, 0.04));
  border-color: rgba(103, 244, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at 14% 2%, rgba(0, 212, 255, 0.18), transparent 26%),
    radial-gradient(circle at 82% 0%, rgba(56, 189, 248, 0.12), transparent 30%),
    linear-gradient(180deg, #020817 0%, #071426 48%, #020817 100%);
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(33, 212, 223, 0.14), transparent 28%),
    linear-gradient(180deg, #020613 0%, #04091a 46%, #020613 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
}

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

button {
  cursor: pointer;
}

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

a {
  color: inherit;
}

i[data-lucide] {
  align-items: center;
  display: inline-flex;
  font-style: normal;
  justify-content: center;
}

i[data-lucide="search"]::before { content: "\2315"; }
i[data-lucide="menu"]::before { content: "\2630"; }
i[data-lucide="map-pin"]::before { content: "\25C9"; }
i[data-lucide="chevron-down"]::before { content: "\02C5"; }
i[data-lucide="heart"]::before { content: "\2661"; }
i[data-lucide="shopping-cart"]::before { content: "\25F1"; }
i[data-lucide="sun"]::before { content: "\2600"; }
i[data-lucide="moon"]::before { content: "\263E"; }
i[data-lucide="user"]::before { content: "\25CE"; }
i[data-lucide="pen-line"]::before { content: "\270E"; }
i[data-lucide="gift"]::before { content: "\25A3"; }

.hidden {
  display: none !important;
}

.site-header {
  align-items: center;
  background: rgba(5, 9, 24, 0.92);
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(210px, auto) minmax(220px, 1fr) auto;
  left: 0;
  padding: 14px clamp(16px, 4vw, 42px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand,
.brand-lockup {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand small {
  color: var(--accent-strong);
  display: block;
  font-size: 12px;
  line-height: 1.2;
}

.brand-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 8px;
  color: #020613;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.search input,
label input,
label textarea,
select {
  background: #e8eefc;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: #071022;
  outline: none;
  padding: 11px 13px;
  width: 100%;
}

.search {
  position: relative;
}

.search input {
  background: #0b1326;
  border-color: #26344f;
  color: #f8fbff;
  border-radius: 22px;
}

.search input::placeholder {
  color: #8f9caf;
}

.search-suggestions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  left: 0;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
}

.search-suggestions button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 8px;
  text-align: left;
}

.search-suggestions button:hover {
  background: var(--surface-2);
}

.search-suggestions img {
  aspect-ratio: 1;
  background: var(--surface-2);
  border-radius: 12px;
  object-fit: contain;
  padding: 5px;
}

.search-suggestions strong,
.search-suggestions small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggestions small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.search input:focus,
label input:focus,
label textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(33, 212, 223, 0.2);
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: relative;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-actions a {
  text-decoration: none;
}

.section-title {
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.icon-btn,
.text-btn,
.cart-btn,
.wishlist-btn,
.primary-btn,
.secondary-btn {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
}

.icon-btn {
  aspect-ratio: 1;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  width: 40px;
}

.text-btn {
  background: var(--surface-2);
  color: var(--text);
}

.cart-btn,
.wishlist-btn,
.primary-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #020613;
}

.wishlist-btn {
  background: var(--surface-2);
  color: var(--text);
}

.secondary-btn {
  background: #121a2d;
  color: var(--text);
}

.cart-btn strong,
.wishlist-btn strong {
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
}

.wishlist-btn strong {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.profile-menu {
  position: relative;
}

.account-menu {
  position: relative;
}

.account-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: none;
  min-width: 280px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 70;
}

.account-menu.open .account-dropdown {
  display: grid;
  gap: 6px;
}

.account-dropdown button {
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  min-height: 58px;
  padding: 10px;
  text-align: left;
}

.account-dropdown button:hover {
  background: var(--surface-2);
}

.account-dropdown span,
.account-dropdown small {
  display: block;
}

.account-dropdown span {
  font-weight: 800;
}

.account-dropdown small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}

.account-dropdown [id="guestBusinessBtn"] {
  border-top: 1px solid var(--border);
  color: var(--accent-strong);
  margin-top: 4px;
}

.profile-trigger {
  align-items: center;
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 999px;
  color: var(--surface);
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.profile-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: none;
  min-width: 310px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 70;
}

.profile-menu.open .profile-dropdown {
  display: grid;
}

.profile-summary {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr);
  margin-bottom: 6px;
  padding: 8px 10px 10px;
}

.profile-summary > span {
  align-items: center;
  background: var(--text);
  border-radius: 999px;
  color: var(--surface);
  display: inline-flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.profile-summary small {
  color: var(--muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px 0;
}

.profile-dropdown button {
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  font-weight: 750;
  min-height: 56px;
  padding: 10px;
  text-align: left;
}

.profile-dropdown button:hover {
  background: var(--surface-2);
}

.profile-dropdown button span,
.profile-dropdown button small {
  display: block;
}

.profile-dropdown button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  margin-top: 3px;
}

.profile-dropdown .profile-logout {
  border-top: 1px solid var(--border);
  color: var(--danger);
  margin-top: 4px;
  min-height: 42px;
  width: 100%;
}

main {
  margin: 0 auto;
  max-width: 1240px;
  padding: 24px clamp(16px, 4vw, 42px) 64px;
}

.shop-hero {
  align-items: end;
  background: linear-gradient(135deg, #082138 0%, #081022 55%, #070b1a 100%);
  border: 1px solid var(--border);
  border-radius: 26px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px) auto;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 38px);
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.shop-hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
  margin: 0;
  max-width: 720px;
  color: #ffffff;
}

.shop-hero p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 14px 0 0;
  max-width: 680px;
}

.hero-metrics {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.popular-hero-panel {
  align-self: stretch;
  display: grid;
  min-width: 0;
}

.popular-hero-card {
  background: rgba(17, 26, 46, 0.8);
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 132px;
  padding: 12px;
  text-align: left;
}

.popular-hero-card img {
  align-self: center;
  aspect-ratio: 1;
  background: #04091a;
  border-radius: 16px;
  object-fit: contain;
  padding: 8px;
}

.popular-hero-card span {
  align-self: center;
  display: grid;
  gap: 6px;
}

.popular-hero-card strong {
  line-height: 1.25;
}

.popular-hero-card small {
  color: var(--muted);
  line-height: 1.45;
}

.hero-metrics span {
  align-items: center;
  background: rgba(17, 26, 46, 0.8);
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.hero-metrics strong {
  color: var(--text);
}

.trust-strip {
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
}

.trust-strip div {
  background: rgba(8, 16, 35, 0.92);
  display: grid;
  gap: 5px;
  padding: 14px;
  position: relative;
}

.trust-strip div::before {
  background: var(--accent);
  border-radius: 999px;
  content: "";
  height: 8px;
  position: absolute;
  right: 14px;
  top: 16px;
  width: 8px;
}

.trust-strip strong {
  font-size: 14px;
}

.trust-strip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 18px 0;
  padding: 14px;
  background: linear-gradient(135deg, rgba(11, 27, 52, 0.7), rgba(7, 20, 38, 0.54));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 212, 255, 0.04));
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  padding: 9px 13px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.segmented button:hover {
  background: rgba(0, 212, 255, 0.14);
  border-color: rgba(0, 212, 255, 0.5);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.segmented button.active {
  background: linear-gradient(135deg, var(--accent), #075985);
  border-color: var(--accent-strong);
  color: #020817;
  box-shadow: 0 10px 24px rgba(0, 212, 255, 0.22);
}

.sample-note {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: 18px;
  color: var(--accent-strong);
  margin-bottom: 18px;
  padding: 12px 14px;
}

.product-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.community-reviews {
  background: rgba(8, 16, 35, 0.96);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 0.55fr) minmax(240px, 0.75fr) minmax(260px, 1fr);
  margin-top: 22px;
  padding: 16px;
}

.review-panel-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0 0;
}

.review-panel-form {
  display: grid;
  gap: 10px;
}

.review-panel-form textarea {
  min-height: 76px;
  resize: vertical;
}

.community-review-list {
  display: grid;
  gap: 10px;
}

.community-review {
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  padding: 11px;
}

.community-review div {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.community-review span {
  color: #b97713;
  letter-spacing: 0;
}

.community-review p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.community-review .secondary-btn {
  justify-self: start;
  min-height: 36px;
  padding: 8px 12px;
}

.product-card {
  background: rgba(8, 16, 35, 0.96);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.product-card:hover {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--border));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
  transform: translateY(-2px);
}

.wishlist-heart {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 22px;
  height: 38px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  z-index: 2;
}

.wishlist-heart.active {
  background: #fff1f3;
  border-color: #e8a9b5;
  color: #c22945;
}

.product-image {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #050b1a;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  height: 100%;
  object-fit: contain;
  padding: 16px;
  width: 100%;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.product-title {
  font-size: 17px;
  line-height: 1.35;
  margin: 0;
}

.product-description {
  color: var(--muted);
  display: -webkit-box;
  line-height: 1.45;
  margin: 0;
  min-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: #121a2d;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
  padding: 6px 9px;
}

.deal-pill {
  background: rgba(33, 212, 223, 0.14);
  color: var(--accent-strong);
}

.rating {
  color: #b97713;
  font-weight: 800;
}

.price-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.price {
  font-size: 22px;
  font-weight: 850;
  color: #ffffff;
}

.commerce-row {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 750;
  gap: 8px;
}

.commerce-row span {
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-strong);
  padding: 6px 8px;
}

.stock {
  color: var(--muted);
  font-size: 13px;
}

.card-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.cart-drawer {
  background: var(--surface);
  border-left: 1px solid var(--border);
  bottom: 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  max-width: 480px;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(110%);
  transition: transform 180ms ease;
  width: min(100vw, 480px);
  z-index: 45;
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.drawer-head h2,
.modal h2 {
  margin: 0;
}

.cart-items {
  display: grid;
  flex: 1;
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.cart-item {
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: 84px minmax(0, 1fr);
  padding: 12px;
}

.cart-item img {
  aspect-ratio: 1;
  background: var(--surface-2);
  border-radius: 14px;
  object-fit: contain;
  padding: 8px;
}

.cart-item h3 {
  font-size: 14px;
  line-height: 1.3;
  margin: 0 0 6px;
}

.cart-item-top,
.cart-line-total {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.cart-line-total {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.qty-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 30px minmax(28px, auto) 30px minmax(72px, 1fr);
  margin-top: 8px;
}

.qty-row button {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.qty-row [data-cart-remove] {
  justify-self: end;
  min-width: 72px;
  padding: 0 10px;
  width: auto;
}

.cart-summary {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
}

.cart-summary .total {
  font-size: 19px;
}

.scrim {
  background: rgba(0, 0, 0, 0.42);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 40;
}

.scrim.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  color: var(--text);
  max-height: min(820px, 92vh);
  max-width: min(720px, calc(100vw - 28px));
  overflow: auto;
  padding: 22px;
  scrollbar-color: rgba(0, 198, 224, 0.5) rgba(5, 18, 34, 0.92);
  scrollbar-width: thin;
  width: 520px;
}

.modal::-webkit-scrollbar {
  width: 10px;
}

.modal::-webkit-scrollbar-track {
  background: rgba(5, 18, 34, 0.92);
  border-radius: 999px;
}

.modal::-webkit-scrollbar-thumb {
  background: rgba(0, 198, 224, 0.5);
  border: 2px solid rgba(5, 18, 34, 0.92);
  border-radius: 999px;
}

.modal::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 198, 224, 0.72);
}

.modal::backdrop {
  background: rgba(2, 12, 24, 0.78);
}

.modal-close-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.modal-close-row button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  min-height: 36px;
  width: 36px;
}

.auth-mode-switch,
.auth-tabs {
  background: var(--surface-2);
  border-radius: 18px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
  padding: 4px;
}

.auth-mode-switch {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 10px;
}

.auth-tabs {
  grid-template-columns: repeat(2, 1fr);
}

.auth-mode-switch button,
.auth-tabs button {
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 800;
  padding: 10px;
}

.auth-mode-switch button.active,
.auth-tabs button.active {
  background: var(--surface);
  color: var(--text);
}

.auth-panel,
.checkout-form {
  display: none;
  gap: 14px;
}

.auth-panel.active,
.checkout-form {
  display: grid;
}

.profile-setup-intro {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.profile-setup-icon {
  align-items: center;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.12);
  display: grid;
  gap: 5px;
  height: 62px;
  justify-items: center;
  justify-self: center;
  margin-bottom: 2px;
  padding: 10px;
  transform: rotate(5deg);
  width: 48px;
}

.profile-setup-card-line {
  background: var(--accent);
  border-radius: 999px;
  height: 4px;
  opacity: 0.85;
  width: 22px;
}

.profile-setup-card-line.short {
  width: 16px;
}

.profile-setup-avatar {
  background:
    radial-gradient(circle at 50% 34%, #ffe0cc 0 18%, transparent 19%),
    radial-gradient(circle at 50% 74%, #7dd3fc 0 30%, transparent 31%),
    linear-gradient(135deg, #1e3a8a, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  height: 22px;
  width: 22px;
}

.profile-setup-kicker {
  color: var(--text);
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.1;
  margin: 0;
}

.profile-setup-intro h2 {
  font-size: clamp(22px, 4.5vw, 30px);
  line-height: 1.18;
  margin: 0;
}

.profile-setup-intro small {
  color: var(--muted);
  font-size: 14px;
}

.social-auth-btn,
.email-signup-heading {
  align-items: center;
  background: rgba(2, 8, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  font-size: 18px;
  font-weight: 800;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  min-height: 58px;
  padding: 12px 16px;
  text-align: center;
  width: 100%;
}

.social-auth-btn {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  margin-top: 10px;
}

.social-auth-btn::after {
  content: "";
}

.social-auth-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.google-mark {
  align-items: center;
  background: #ffffff;
  border-radius: 50%;
  color: #4285f4;
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.auth-divider {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
  letter-spacing: 0;
  margin: 2px 0;
}

.auth-divider::before,
.auth-divider::after {
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.42), transparent);
  content: "";
  height: 1px;
}

.email-signup-heading {
  cursor: default;
}

.email-signup-heading:disabled {
  opacity: 1;
}

.email-signup-heading i {
  color: var(--accent);
}

.referral-code-block {
  display: grid;
  gap: 10px;
}

.referral-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--accent-strong);
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  justify-self: start;
  min-height: 40px;
  padding: 0;
}

.referral-toggle:hover {
  color: var(--text);
}

.referral-toggle i {
  color: var(--accent);
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 750;
  gap: 7px;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  position: relative;
}

.password-field input {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  min-width: 0;
}

.password-toggle {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 16px 16px 0;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  font-size: 17px;
  justify-content: center;
  min-height: 48px;
  padding: 0;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--text);
  outline: none;
}

.two-col {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.product-modal {
  width: min(940px, calc(100vw - 28px));
}

.detail-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
}

.detail-image {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border-radius: 8px;
  display: flex;
  justify-content: center;
}

.detail-image img {
  height: 100%;
  object-fit: contain;
  padding: 18px;
  width: 100%;
}

.spec-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}

.spec-grid div {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 10px;
}

.spec-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.review-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.review {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}

.review strong {
  display: block;
  margin-bottom: 4px;
}

.review p {
  color: var(--muted);
  margin: 0;
}

.payment-options,
.account-options {
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
}

.payment-options legend,
.account-options legend {
  color: var(--muted);
  font-weight: 800;
  padding: 0 6px;
}

.payment-options label,
.account-options label,
.check-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.payment-options input,
.account-options input,
.check-row input {
  width: auto;
}

.business-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.orders-list {
  display: grid;
  gap: 12px;
}

.wishlist-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.wishlist-item {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
  padding: 10px;
}

.wishlist-item img {
  aspect-ratio: 1;
  background: var(--surface-2);
  border-radius: 14px;
  object-fit: contain;
  padding: 7px;
}

.wishlist-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wishlist-item strong,
.wishlist-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wishlist-item span {
  color: var(--muted);
  font-size: 13px;
}

.settings-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.settings-list div {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.settings-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.help-content {
  display: grid;
  gap: 12px;
}

.help-topic-body {
  display: grid;
  gap: 10px;
}

.help-topic-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.settings-modal {
  width: min(820px, calc(100vw - 28px));
}

.settings-shell {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.settings-tabs {
  background: var(--surface-2);
  border-radius: 18px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 4px;
}

.settings-tabs button {
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 800;
  min-height: 40px;
  padding: 9px 8px;
}

.settings-tabs button.active {
  background: var(--surface);
  color: var(--text);
}

.settings-panel {
  display: none;
  gap: 14px;
}

.settings-panel.active {
  display: grid;
}

.privacy-panel {
  gap: 12px;
}

.privacy-panel section,
.danger-panel form {
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.privacy-panel h3,
.danger-panel h3 {
  font-size: 15px;
  margin: 0;
}

.privacy-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.danger-panel {
  align-items: start;
}

.danger-btn {
  align-items: center;
  background: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 18px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
}

.order-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.order-card header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.order-items {
  display: grid;
  gap: 8px;
}

.order-item-row,
.order-total-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.order-total-row {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.order-business {
  color: var(--muted);
  font-size: 13px;
}

.toast {
  background: var(--text);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--surface);
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: fixed;
  text-align: center;
  top: 18px;
  transform: translate(-50%, -12px);
  transition: 160ms ease;
  z-index: 2147483647;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal > .toast {
  left: auto;
  margin: 0 auto 14px;
  max-width: 100%;
  position: sticky;
  top: 0;
  transform: translateY(-8px);
  width: fit-content;
  z-index: 20;
}

.modal > .toast.show {
  transform: translateY(0);
}

.chatbot-widget {
  bottom: 20px;
  display: grid;
  justify-items: end;
  position: fixed;
  right: 20px;
  z-index: 75;
}

.chatbot-launcher {
  align-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #16c7d5 100%);
  border: none;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(22, 199, 213, 0.3);
  color: #ffffff;
  display: inline-flex;
  gap: 9px;
  min-height: 50px;
  padding: 8px 20px 8px 12px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}

.chatbot-launcher:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 30px rgba(22, 199, 213, 0.45);
}

.chatbot-launcher span {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: gentle-wiggle 3s infinite ease-in-out;
}

@keyframes gentle-wiggle {
  0%, 100% { transform: rotate(0deg); }
  85% { transform: rotate(0deg); }
  90% { transform: rotate(-10deg); }
  95% { transform: rotate(10deg); }
}

.chatbot-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.15);
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  max-height: min(680px, calc(100vh - 96px));
  overflow: hidden;
  padding: 16px;
  width: min(400px, calc(100vw - 32px));
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.chatbot-panel header {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
}

.chatbot-panel h2 {
  font-size: 18px;
  margin: 0;
}

.chatbot-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(45, 212, 191, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

.chatbot-messages {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.chat-message {
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 4px;
  max-width: 88%;
  padding: 10px 14px;
  line-height: 1.5;
  animation: message-in 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-message.user {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border));
  color: var(--text);
  justify-self: end;
  border-bottom-right-radius: 4px;
}

.chat-message.bot {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
  justify-self: start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.chat-message strong {
  font-size: 12px;
}

.chat-message p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.chat-product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent-strong) !important;
  text-decoration: none !important;
  font-weight: 750;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 12px;
  margin: 6px 0;
  width: fit-content;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(22, 199, 213, 0.1);
}

.chat-product-link::before {
  content: "🔌";
  font-size: 11px;
}

.chat-product-link:hover {
  background: var(--accent);
  color: #ffffff !important;
  transform: translateY(-1.5px) scale(1.03);
  box-shadow: 0 4px 12px rgba(22, 199, 213, 0.25);
}

.chat-product-link:active {
  transform: translateY(0) scale(1);
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chatbot-suggestions button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.chatbot-suggestions button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.chatbot-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.chatbot-form input {
  background: #e8eefc;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: #071022;
  outline: none;
  padding: 11px 12px;
  width: 100%;
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.site-footer {
  background: #040817;
  border-top: 1px solid var(--border);
  color: var(--text);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.4fr) minmax(180px, 0.8fr);
  padding: 34px clamp(16px, 4vw, 42px);
}

.site-footer h2 {
  font-size: 15px;
  margin: 0 0 12px;
}

.site-footer a,
.site-footer button,
.site-footer p {
  color: #aebbd0;
  display: block;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 8px;
  text-decoration: none;
}

.site-footer button {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.site-footer button:hover {
  color: var(--accent-strong);
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
  }

  .shop-hero {
    grid-template-columns: 1fr;
  }

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .community-reviews,
  .settings-tabs,
  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 12px;
  }

  .brand small {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .cart-btn span,
  .wishlist-btn span {
    display: none;
  }

  .profile-dropdown {
    min-width: min(310px, calc(100vw - 24px));
    right: -52px;
  }

  .account-dropdown {
    min-width: min(280px, calc(100vw - 24px));
    right: -88px;
  }

  .profile-menu-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding: 14px 12px 44px;
  }

  .shop-hero {
    padding: 20px;
  }

  .hero-metrics,
  .trust-strip,
  .two-col,
  .business-fields,
  .spec-grid,
  .card-actions {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .wishlist-item {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .wishlist-item .icon-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: auto;
  }

  .cart-item-top,
  .order-card header,
  .order-item-row,
  .order-total-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .qty-row {
    grid-template-columns: 30px auto 30px;
  }

  .qty-row [data-cart-remove] {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .chatbot-widget {
    bottom: 12px;
    right: 12px;
  }

  .chatbot-form {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   STOREFRONT ENHANCEMENTS & DISCUSSION BOARD
   ───────────────────────────────────────────────────────────────────────────── */

/* Page-level view control */
body[data-page="products"] .shop-hero,
body[data-page="products"] .trust-strip,
body[data-page="products"] .community-reviews {
  display: none !important;
}

/* Search Dropdown & History Suggestions */
.search-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 4px;
}

.search-suggestions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.clear-all-history {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 120ms ease, color 120ms ease;
}

.clear-all-history:hover {
  background: rgba(240, 100, 114, 0.08);
}

.search-history-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.search-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  padding: 2px 8px;
  transition: background 120ms ease;
}

.search-history-item:hover {
  background: var(--surface-2);
}

.history-term-btn {
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  flex-grow: 1;
  padding: 6px 0;
  cursor: pointer;
}

.history-clock-icon {
  color: var(--muted);
  font-size: 12px;
}

.delete-history-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}

.delete-history-btn:hover {
  color: var(--danger);
  background: rgba(240, 100, 114, 0.08);
}

/* Popular search chips */
.search-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-chip-badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 120ms ease;
}

.search-chip-badge:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: scale(1.03);
}

/* Premium Hero Panel Background & Styling */
.shop-hero {
  position: relative;
  background: linear-gradient(110deg, rgba(3, 8, 22, 0.94) 35%, rgba(3, 8, 22, 0.4) 100%), url("/static/images/hero_banner.png") no-repeat center center / cover !important;
  border: 1px solid var(--border);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Drifting holographic gradient effect */
.shop-hero::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(33, 212, 223, 0.04) 0%, transparent 65%);
  pointer-events: none;
  animation: drift 20s infinite linear;
  z-index: 1;
}

@keyframes drift {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.shop-hero > div {
  position: relative;
  z-index: 2;
}

.shop-hero h1 {
  background: linear-gradient(135deg, #ffffff 60%, var(--accent-strong) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 850;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.shop-hero .hero-actions .primary-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #16aab7 100%);
  box-shadow: 0 4px 18px rgba(33, 212, 223, 0.35);
  transition: transform 150ms ease, box-shadow 150ms ease;
  color: #020613;
}

.shop-hero .hero-actions .primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(33, 212, 223, 0.5);
}

.shop-hero .hero-actions .secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #ffffff;
  transition: background 150ms ease, border-color 150ms ease;
}

.shop-hero .hero-actions .secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
}

.popular-hero-card {
  background: rgba(8, 16, 35, 0.65) !important;
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease !important;
}

.popular-hero-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--accent) !important;
  box-shadow: 0 15px 35px rgba(33, 212, 223, 0.2);
}

/* Discussion Board Layout */
.community-reviews {
  grid-template-columns: 280px 1fr !important;
  gap: 24px !important;
  align-items: start;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 24px !important;
  padding: 24px !important;
}

.community-left-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 90px;
}

.community-left-panel .subtext {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.community-categories {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.category-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  text-align: left;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.category-tab:hover {
  background: var(--surface-2);
  color: var(--text);
}

.category-tab.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(33, 212, 223, 0.15);
}

.start-post-btn {
  margin-top: 12px;
  width: 100%;
  box-shadow: 0 4px 14px rgba(33, 212, 223, 0.2);
}

/* Post Submission Form Card */
.post-form-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  animation: slideDown 250ms ease;
}

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

.post-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.post-form-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.close-form-btn {
  min-height: 28px !important;
  width: 28px !important;
  border-radius: 999px !important;
  padding: 0 !important;
  font-size: 18px !important;
}

.community-post-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.community-post-form label {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.community-post-form input,
.community-post-form textarea,
.community-post-form select {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  outline: none;
}

.community-post-form input:focus,
.community-post-form textarea:focus,
.community-post-form select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(33, 212, 223, 0.15);
}

.community-post-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa8bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}

.login-notice {
  margin: 0;
  font-size: 12px;
}

.text-link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.auth-inline-link {
  align-self: flex-start;
  margin-top: -4px;
}

/* Discussion Board Feed list */
.community-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card-board {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.post-card-board:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.post-header-board {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-initial {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  font-size: 14px;
}

.small-avatar {
  width: 24px !important;
  height: 24px !important;
  font-size: 10px !important;
}

.post-author-info div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}

.post-time {
  font-size: 11px;
  color: var(--muted);
}

.category-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-general { background: rgba(33, 150, 243, 0.12); color: #2196f3; }
.badge-problem { background: rgba(240, 100, 114, 0.12); color: #f06472; }
.badge-experience { background: rgba(76, 175, 80, 0.12); color: #4caf50; }
.badge-project { background: rgba(255, 152, 0, 0.12); color: #ff9800; }
.badge-eyes { background: rgba(14, 165, 233, 0.14); color: #38bdf8; }
.badge-win { background: rgba(34, 197, 94, 0.14); color: #4ade80; }
.badge-hunt { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.badge-build { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.post-card-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.post-body-board {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-title-board {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.post-content-board {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.post-footer-board {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

.post-action-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 150ms ease, color 150ms ease;
}

.post-action-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.like-btn.liked {
  color: var(--danger);
  background: rgba(240, 100, 114, 0.08);
}

.like-btn.liked .heart-icon {
  transform: scale(1.15);
  display: inline-block;
  transition: transform 120ms ease;
}

.like-btn.liked:hover {
  background: rgba(240, 100, 114, 0.12);
}

.delete-community-btn,
.reply-delete-btn {
  display: inline-flex;
  align-items: center;
  width: 28px;
  height: 28px;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(240, 100, 114, 0.2);
  color: #f06472;
  background: rgba(240, 100, 114, 0.08);
}

.delete-community-btn:hover,
.reply-delete-btn:hover {
  background: rgba(240, 100, 114, 0.16);
  color: #fecdd3;
}

/* Replies Comment section styling */
.post-replies-section {
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Replies list custom scrollbar */
.replies-list::-webkit-scrollbar {
  width: 4px;
}
.replies-list::-webkit-scrollbar-track {
  background: transparent;
}
.replies-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.reply-card-board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reply-header-board {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.reply-header-board strong {
  color: var(--text);
}

.reply-header-board small {
  color: var(--muted);
  margin-left: auto;
}

.reply-delete-btn {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
}

.reply-content-board {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  padding-left: 32px;
}

.post-reply-form {
  margin-top: 8px;
}

.reply-input-row {
  display: flex;
  gap: 8px;
}

.reply-guest-name {
  width: 100px !important;
  flex-shrink: 0;
}

.reply-text-input {
  flex-grow: 1;
}

.reply-input-row input {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  outline: none;
}

.reply-input-row input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(33, 212, 223, 0.15);
}

.reply-submit-btn {
  min-height: 34px !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

/* Footer description info */
.footer-desc {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 500;
}

/* Responsive community grid override */
@media (max-width: 768px) {
  .community-reviews {
    grid-template-columns: 1fr !important;
  }
  .community-left-panel {
    position: static;
  }
}

/* ==========================================================================
   MICROCHIP CART HEADER SYSTEM
   ========================================================================== */

/* Header Root Styles */
.site-header.store-header {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  gap: 8px;
}

.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

/* Logo Block */
.store-header .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 255, 0.18);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(0, 212, 255, 0.04));
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.store-header .brand:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(0, 212, 255, 0.08));
  border-color: rgba(0, 212, 255, 0.38);
  transform: translateY(-1px);
}

.store-header .brand-mark {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #020613;
  font-weight: 900;
  font-size: 16px;
  height: 36px;
  width: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.25);
}

.store-header .brand-text {
  display: flex;
  flex-direction: column;
}

.store-header .brand-text strong {
  background: linear-gradient(135deg, #f8fafc 0%, #00d4ff 52%, #22e3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: 0 8px 28px rgba(0, 212, 255, 0.22);
  white-space: nowrap;
}

.store-header .brand-text small {
  display: none;
}

/* Deliver To Location Selector */
.header-location {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 150ms ease;
  user-select: none;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.header-location:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.header-location .location-pin-icon {
  color: var(--accent);
  width: 20px;
  height: 20px;
}

.header-location .location-text {
  display: flex;
  flex-direction: column;
}

.header-location .deliver-to {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.header-location .location-name {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.header-location .location-locality,
.header-location .location-pincode {
  display: block;
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-location .location-pincode {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.location-lookup-status {
  min-height: 18px;
}

/* Center Section: Smart Search Bar */
.header-search-container {
  position: relative;
  flex-grow: 1;
  max-width: 680px;
  min-width: 200px;
}

.search-bar-form {
  display: flex;
  align-items: stretch;
  background: rgba(7, 20, 38, 0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 150ms ease;
  height: 40px;
}

.search-bar-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.22);
  background: rgba(2, 8, 23, 0.94);
}

.search-category-select-wrapper {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(0, 212, 255, 0.1));
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(0, 212, 255, 0.32);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.18);
}

.search-category-select {
  background-color: rgba(7, 20, 38, 0.98);
  color: #e0f7ff;
  border: none;
  font-size: 12px;
  font-weight: 850;
  padding: 0 30px 0 14px !important;
  height: 100%;
  cursor: pointer;
  appearance: none;
  outline: none;
  width: auto;
  border-radius: 0;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322e3ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}

.search-category-select option {
  background: #020817;
  color: #e0f7ff;
}

.search-category-select:focus {
  box-shadow: none !important;
  border: none !important;
}

.search-input-field {
  flex-grow: 1;
  background: transparent !important;
  border: none !important;
  color: #f8fafc !important;
  font-size: 14px;
  padding: 0 12px !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 100%;
}

.search-input-field::placeholder {
  color: #94a3b8;
}

.search-submit-btn {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #020817;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}

.search-submit-btn:hover {
  background: var(--accent-strong);
}

.search-submit-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

/* Right Nav Actions & Hover Dropdown Menus */
.store-header .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-nav-item {
  position: relative;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 150ms ease;
  border: 1px solid transparent;
}

.header-nav-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.nav-item-btn {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.nav-item-text {
  display: flex;
  flex-direction: column;
}

.nav-item-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.nav-item-main {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-arrow {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* Dropdown Menu Container */
.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  background: rgba(7, 20, 38, 0.96);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  width: max-content;
  min-width: 200px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 160ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
  pointer-events: none;
}

/* The visual bridge to prevent early mouseout */
.header-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

/* Show Dropdown on Hover */
.dropdown-trigger:hover .header-dropdown-menu,
.dropdown-trigger:focus-within .header-dropdown-menu,
.dropdown-trigger.open .header-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Dropdown Items styling */
.dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease;
}

.dropdown-item:hover {
  background: var(--surface-2);
  color: var(--accent-strong);
}

/* Orders Dropdown special sizing */
.orders-dropdown {
  min-width: 180px;
}

/* Auth Dropdown styling */
.auth-dropdown {
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-dropdown button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease;
}

.auth-dropdown button:hover {
  background: var(--surface-2);
}

.auth-dropdown button span {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.auth-dropdown button small {
  font-size: 11px;
  color: var(--muted);
}

.auth-dropdown #guestBusinessBtn {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 6px;
  border-radius: 0 0 6px 6px;
  color: var(--accent-strong);
}

/* Logged-In Profile Summary in dropdown */
.profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

#profileDropdownInitial {
  height: 38px;
  width: 38px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
  font-size: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-summary div {
  display: flex;
  flex-direction: column;
}

.profile-summary strong {
  font-size: 14px;
  color: var(--text);
}

.profile-summary small {
  font-size: 11px;
  color: var(--muted);
}

.profile-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.profile-menu-grid button {
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 150ms ease;
}

.profile-menu-grid button:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.profile-menu-grid button span {
  font-size: 12px;
  font-weight: 750;
}

.profile-menu-grid button small {
  font-size: 10px;
  color: var(--muted);
}

.profile-logout {
  width: 100%;
  padding: 8px;
  background: rgba(240, 100, 114, 0.08) !important;
  color: var(--danger) !important;
  border: 1px solid var(--border) !important;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 150ms ease;
}

.profile-logout:hover {
  background: rgba(240, 100, 114, 0.16) !important;
  border-color: var(--danger) !important;
}

.profile-avatar-mini {
  align-items: center;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border: 1px solid rgba(34, 227, 255, 0.45);
  border-radius: 999px;
  color: #020817;
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.nav-item-btn.profile-trigger {
  background: transparent;
  border: none;
  border-radius: 0;
  color: inherit;
  height: auto;
  justify-content: flex-start;
  padding: 0;
  width: auto;
}

/* Wishlist & Cart trigger layout */
.nav-item-btn.wishlist-btn-trigger,
.nav-item-btn.cart-btn-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.badge-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
}

.badge-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--accent);
  color: #020613;
  font-size: 10px;
  font-weight: 900;
  border-radius: 999px;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.wishlist-btn-trigger .badge-count {
  background: var(--warn);
}

/* Rich Preview Hover Dropdowns (Mini Cart / Wishlist) */
.preview-dropdown {
  width: 320px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dropdown-preview-header {
  background: var(--surface-2);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.dropdown-preview-items {
  max-height: 240px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-preview-items::-webkit-scrollbar {
  width: 4px;
}
.dropdown-preview-items::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.preview-empty {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 24px 10px;
  margin: 0;
}

/* Preview items layout */
.preview-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.preview-item img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #04091a;
  border-radius: 4px;
  padding: 3px;
}

.preview-item-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-item-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-item-meta {
  font-size: 10.5px;
  color: var(--muted);
}

.preview-item-price {
  font-size: 11.5px;
  font-weight: 750;
  color: var(--accent-strong);
  white-space: nowrap;
}

.dropdown-preview-footer {
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.preview-total-row span {
  color: var(--muted);
  font-weight: 600;
}

.preview-total-row strong {
  color: var(--text);
  font-weight: 800;
}

.preview-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preview-btn-row button {
  min-height: 34px !important;
  font-size: 12px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
}

.view-all-btn {
  margin: 10px;
  min-height: 34px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
}

/* Theme Toggle Button placement */
.theme-toggle-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  height: 36px !important;
  width: 36px !important;
  padding: 0;
  border-radius: 6px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-toggle-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* Smart Search Dropdown Listbox */
.search-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  z-index: 110;
  overflow: hidden;
}

.search-dropdown-menu {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
}

.search-suggestions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.search-suggestions-header span {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clear-all-history {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.clear-all-history:hover {
  background: rgba(240, 100, 114, 0.1);
}

.search-history-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  transition: background 150ms ease;
}

.search-history-item:hover {
  background: var(--surface-2);
}

.history-term-btn {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.history-clock-icon {
  opacity: 0.6;
}

.delete-history-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
}

.delete-history-btn:hover {
  color: var(--danger);
}

/* Popular search chips container */
.popular-chips-container {
  padding: 6px;
}

.search-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.search-chip-badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 150ms ease;
}

.search-chip-badge:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent-strong);
}

/* Autocomplete item style */
.search-suggestions-dropdown button[data-suggestion-product] {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background 150ms ease;
}

.search-suggestions-dropdown button[data-suggestion-product]:hover,
.search-suggestions-dropdown button[data-suggestion-product].selected {
  background: var(--surface-2);
}

.search-suggestions-dropdown button[data-suggestion-product] img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #04091a;
  border-radius: 4px;
  padding: 2px;
}

.search-suggestions-dropdown button[data-suggestion-product] span {
  display: flex;
  flex-direction: column;
}

.search-suggestions-dropdown button[data-suggestion-product] strong {
  font-size: 13.5px;
  color: var(--text);
}

.search-suggestions-dropdown button[data-suggestion-product] small {
  font-size: 11px;
  color: var(--muted);
}

.highlight-match {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: underline;
}

/* Mobile search secondary row layout */
.header-search-container.mobile-search {
  display: none;
  width: 100%;
}

/* Mobile Hamburger Sidebar & Backdrop */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.mobile-menu-toggle:hover {
  background: var(--surface-2);
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: auto;
  width: min(380px, 92vw);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 5px 0 25px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.mobile-sidebar.open {
  transform: translateX(0);
}

.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  height: 100vh;
  height: 100dvh;
  background: rgba(2, 6, 19, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 240ms ease;
  z-index: 999;
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 212, 255, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(11, 27, 52, 0.98), rgba(2, 8, 23, 0.98));
  border-bottom: 1px solid var(--border);
  padding: 18px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.sidebar-user-info:hover,
.sidebar-user-info:focus-visible {
  color: var(--accent-strong);
}

.sidebar-user-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex: 0 0 auto;
}

.sidebar-user-info strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.sidebar-close-btn {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 10px;
  color: var(--text);
  flex: 0 0 auto;
  font-size: 26px;
  height: 42px;
  line-height: 1;
  width: 42px;
  cursor: pointer;
}

.sidebar-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-account-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.03)),
    rgba(2, 8, 23, 0.56);
}

.sidebar-account-card .sidebar-link {
  min-height: 44px;
  text-align: center;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.sidebar-account-card .sidebar-link:first-child {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: var(--accent-strong);
  color: #020817;
  font-weight: 850;
}

.sidebar-account-card .sidebar-link:first-child:hover {
  color: #020817;
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.22);
}

.sidebar-section h3 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-strong);
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}

.sidebar-links-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  font-size: 13.5px;
  font-weight: 650;
  border-radius: 6px;
  cursor: pointer;
  transition: all 150ms ease;
}

.sidebar-link:hover, .sidebar-link.active {
  background: var(--surface-2);
  color: var(--accent);
}

/* ==========================================================================
   RESPONSIVENESS AND COLLAPSIBILITY OVERRIDES
   ========================================================================== */

/* Tablet Layout adjustments */
@media (max-width: 992px) {
  .header-location {
    display: none; /* Hide location box on smaller tablet screen sizes */
  }
}

/* Mobile Screen Layout adjustments */
@media (max-width: 768px) {
  .site-header.store-header {
    padding: 8px 12px;
  }
  
  .desktop-search {
    display: none !important; /* Hide desktop search */
  }
  
  .header-search-container.mobile-search {
    display: block; /* Show mobile search bar underneath logo row */
  }
  
  .desktop-only {
    display: none !important; /* Hide desktop orders nav */
  }
  
  .mobile-menu-toggle {
    display: flex; /* Show Hamburger button */
    align-items: center;
    justify-content: center;
  }
  
  .store-header .brand-text strong {
    font-size: 18px;
  }
  .store-header .brand-text small {
    display: none; /* Hide secondary tagline on mobile */
  }
  
  /* Make mini cart and wishlist trigger icons compact on mobile */
  .badge-icon-wrapper {
    height: 28px;
    width: 28px;
  }
  .badge-icon-wrapper svg {
    width: 18px;
    height: 18px;
  }
  
  .preview-dropdown {
    width: 290px;
    position: fixed;
    top: 54px;
    right: 12px;
  }
}

/* Theme Icons rules */
body[data-theme="light"] .theme-icon-sun {
  display: none !important;
}
body[data-theme="light"] .theme-icon-moon {
  display: block !important;
  color: var(--text);
}
body[data-theme="dark"] .theme-icon-sun {
  display: block !important;
  color: var(--accent);
}
body[data-theme="dark"] .theme-icon-moon {
  display: none !important;
}

/* Cyber Blue marketplace system */
body,
body[data-theme="dark"],
body[data-theme="light"] {
  background:
    radial-gradient(circle at 14% 2%, rgba(0, 212, 255, 0.18), transparent 26%),
    radial-gradient(circle at 82% 0%, rgba(56, 189, 248, 0.12), transparent 30%),
    linear-gradient(180deg, #020817 0%, #071426 48%, #020817 100%);
  color: #f8fafc;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

button,
a,
input,
select,
textarea {
  transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease, color 300ms ease, transform 300ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 3px;
}

.site-header.store-header {
  background: rgba(2, 8, 23, 0.82);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px) saturate(145%);
}

.header-main-row {
  gap: 18px;
}

.store-header .brand {
  background: rgba(7, 20, 38, 0.52);
  border: 1px solid rgba(0, 212, 255, 0.16);
  border-radius: 12px;
  gap: 10px;
  min-height: 44px;
}

.store-header .brand:hover {
  background: rgba(11, 27, 52, 0.82);
  border-color: rgba(0, 212, 255, 0.42);
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.16);
}

.chip-logo-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background:
    linear-gradient(#00d4ff 0 0) center / 12px 2px no-repeat,
    linear-gradient(90deg, #00d4ff 0 0) center / 2px 12px no-repeat,
    rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.36);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.24);
}

.chip-logo-icon::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1px solid #22e3ff;
  border-radius: 3px;
  box-shadow: inset 0 0 8px rgba(0, 212, 255, 0.28);
}

.store-header .brand-text strong,
body[data-theme="dark"] .store-header .brand-text strong {
  background: none;
  color: #f8fafc;
  display: flex;
  gap: 4px;
  font-size: clamp(18px, 1.65vw, 24px);
  font-weight: 900;
  text-shadow: 0 0 22px rgba(0, 212, 255, 0.16);
}

.store-header .brand-text strong span:last-child {
  color: #00d4ff;
}

.header-location,
.header-nav-item {
  border: 1px solid transparent;
}

.header-location:hover,
.header-nav-item:hover,
.header-nav-item.open {
  background: rgba(11, 27, 52, 0.78);
  border-color: rgba(0, 212, 255, 0.22);
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.1);
}

.search-bar-form {
  height: 44px;
  background: rgba(7, 20, 38, 0.82);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.04);
}

.search-bar-form:focus-within {
  background: rgba(2, 8, 23, 0.94);
  border-color: #00d4ff;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.16), 0 0 34px rgba(0, 212, 255, 0.16);
}

.search-category-select-wrapper,
body[data-theme="dark"] .search-category-select-wrapper {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(56, 189, 248, 0.08));
  border-right: 1px solid rgba(0, 212, 255, 0.24);
}

.search-category-select,
body[data-theme="dark"] .search-category-select {
  background-color: rgba(7, 20, 38, 0.98);
  color: #e0f7ff;
  font-weight: 800;
}

.search-category-select option,
body[data-theme="dark"] .search-category-select option {
  background: #020817;
  color: #f8fafc;
}

.search-submit-btn,
.primary-btn {
  background: linear-gradient(135deg, #00d4ff, #38bdf8);
  color: #020817;
  border: 1px solid rgba(0, 212, 255, 0.48);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.18);
  font-weight: 850;
}

.search-submit-btn:hover,
.primary-btn:hover {
  background: linear-gradient(135deg, #22e3ff, #00d4ff);
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.25);
}

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(0, 212, 255, 0.42);
  color: #e0f7ff;
}

.secondary-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: #22e3ff;
  color: #f8fafc;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.14);
}

.header-dropdown-menu,
.search-suggestions-dropdown,
.profile-dropdown,
.account-dropdown {
  background: rgba(7, 20, 38, 0.9);
  border: 1px solid rgba(0, 212, 255, 0.18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42), 0 0 26px rgba(0, 212, 255, 0.08);
  backdrop-filter: blur(22px) saturate(145%);
  border-radius: 14px;
}

.dropdown-item:hover,
.auth-dropdown button:hover,
.profile-menu-grid button:hover,
.search-suggestions-dropdown button[data-suggestion-product]:hover,
.search-suggestions-dropdown button[data-suggestion-product].selected,
.search-history-item:hover,
.search-chip-badge:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.34);
  color: #22e3ff;
}

.shop-hero {
  position: relative;
  overflow: hidden;
  align-items: center;
  min-height: 420px;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(rgba(0, 212, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 16% 18%, rgba(0, 212, 255, 0.2), transparent 26%),
    radial-gradient(circle at 84% 18%, rgba(56, 189, 248, 0.14), transparent 24%),
    linear-gradient(135deg, #071426 0%, #020817 60%, #0b1b34 100%) !important;
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.05), 0 0 56px rgba(0, 212, 255, 0.08);
}

.shop-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(0, 212, 255, 0.12) 18.4%, transparent 19% 52%, rgba(56, 189, 248, 0.1) 52.4%, transparent 53%),
    radial-gradient(circle at 42% 38%, rgba(0, 212, 255, 0.18), transparent 2px);
  background-size: auto, 34px 34px;
  opacity: 0.5;
  pointer-events: none;
}

.shop-hero > * {
  position: relative;
  z-index: 1;
}

.shop-hero h1 {
  color: #f8fafc;
  font-size: clamp(34px, 5vw, 64px);
  max-width: 780px;
}

.shop-hero p:not(.eyebrow) {
  color: #b6c3d4;
  font-size: clamp(16px, 1.4vw, 19px);
  max-width: 720px;
}

.popular-hero-card,
.hero-metrics span,
.trust-strip div,
.toolbar,
.community-reviews,
.post-form-card,
.settings-shell,
.modal {
  background: rgba(11, 27, 52, 0.68);
  border: 1px solid rgba(0, 212, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.04), 0 16px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.toolbar {
  border-radius: 18px;
}

.segmented button,
.category-tab,
.search-chip-badge,
.sidebar-link {
  background: rgba(7, 20, 38, 0.72);
  border: 1px solid rgba(0, 212, 255, 0.16);
  color: #f8fafc;
}

.segmented button:hover,
.category-tab:hover,
.sidebar-link:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.36);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.14);
  color: #22e3ff;
}

.segmented button.active,
.category-tab.active,
.sidebar-link.active {
  background: linear-gradient(135deg, #00d4ff, #38bdf8);
  border-color: rgba(34, 227, 255, 0.72);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.18);
  color: #ffffff;
}

.product-card {
  background: rgba(11, 27, 52, 0.72);
  border: 1px solid rgba(0, 212, 255, 0.14);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.04), 0 18px 44px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.42);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.15), 0 22px 54px rgba(0, 0, 0, 0.34);
}

.product-image,
.detail-image,
.popular-hero-card img,
.preview-item img,
.search-suggestions-dropdown button[data-suggestion-product] img {
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(56, 189, 248, 0.03)),
    #020817;
  border: 1px solid rgba(0, 212, 255, 0.14);
  box-shadow: inset 0 0 24px rgba(0, 212, 255, 0.06);
}

.pill,
.badge-count,
.role-badge {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.18);
  color: #22e3ff;
}

.role-badge {
  align-self: flex-start;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  margin-top: 5px;
  padding: 3px 8px;
  text-transform: uppercase;
}

.stock {
  color: #10b981;
}

.rating {
  color: #38bdf8;
}

.profile-avatar-mini,
#profileDropdownInitial {
  background: linear-gradient(135deg, #00d4ff, #38bdf8);
  border: 1px solid rgba(34, 227, 255, 0.45);
  color: #020817;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.18);
}

.theme-toggle-btn {
  background: rgba(7, 20, 38, 0.74);
  border: 1px solid rgba(0, 212, 255, 0.18);
  color: #00d4ff;
}

.theme-toggle-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.42);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.16);
}

.mobile-sidebar {
  background: rgba(2, 8, 23, 0.96);
  border-right: 1px solid rgba(0, 212, 255, 0.18);
  backdrop-filter: blur(18px);
}

@media (max-width: 768px) {
  .shop-hero {
    min-height: auto;
    padding: 28px 18px;
  }

  .store-header .brand-text strong {
    font-size: 18px;
  }

  .chip-logo-icon {
    width: 28px;
    height: 28px;
  }
}

/* Microchip marketplace hero panel, cyber-blue edition */
.marketplace-category-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(104px, 1fr);
  gap: 10px;
  align-items: stretch;
  margin: 0 0 14px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 18px;
  background: rgba(7, 20, 38, 0.72);
  box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.04), 0 16px 38px rgba(0, 0, 0, 0.2);
  scrollbar-width: none;
}

.marketplace-category-strip::-webkit-scrollbar {
  display: none;
}

.marketplace-category-strip button {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 76px;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #94a3b8;
  white-space: nowrap;
}

.marketplace-category-strip button span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.16);
  color: #22e3ff;
  font-size: 11px;
  font-weight: 900;
}

.marketplace-category-strip button strong {
  font-size: 12px;
  font-weight: 800;
}

.marketplace-category-strip button:hover,
.marketplace-category-strip button.active {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.28);
  color: #f8fafc;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.12);
}

.marketplace-category-strip button.active span {
  background: linear-gradient(135deg, #00d4ff, #38bdf8);
  color: #020817;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.22);
}

.marketplace-hero {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(320px, 0.8fr);
  gap: 20px;
  min-height: 420px;
  height: 420px;
  margin-bottom: 14px;
  padding: 14px;
  background:
    linear-gradient(rgba(0, 212, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, rgba(7, 20, 38, 0.96), rgba(2, 8, 23, 0.98)) !important;
  background-size: 38px 38px, 38px 38px, auto !important;
}

.promo-carousel-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
}

.promo-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  grid-auto-rows: 100%;
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: 22px;
  height: 100%;
}

.promo-carousel::-webkit-scrollbar {
  display: none;
}

.promo-slide {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(300px, 1.14fr);
  gap: 24px;
  align-items: center;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 28px 42px 42px;
  scroll-snap-align: start;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgba(0, 212, 255, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(11, 27, 52, 0.92), rgba(2, 8, 23, 0.92));
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 22px;
}

.promo-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 22%, rgba(0, 212, 255, 0.1) 22.5%, transparent 23% 62%, rgba(56, 189, 248, 0.08) 62.5%, transparent 63%),
    radial-gradient(circle, rgba(0, 212, 255, 0.2) 0 2px, transparent 2px);
  background-size: auto, 34px 34px;
  opacity: 0.46;
  pointer-events: none;
}

.promo-copy,
.promo-visual {
  position: relative;
  z-index: 1;
}

.promo-kicker {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 999px;
  color: #22e3ff;
  background: rgba(0, 212, 255, 0.08);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 12px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.promo-copy h1 {
  margin: 0;
  max-width: 430px;
  color: #f8fafc;
  font-size: clamp(2.15rem, 3.2vw, 3.45rem);
  line-height: 1.02;
}

.promo-copy p {
  max-width: 420px;
  color: #b6c3d4;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.55;
  margin: 12px 0 20px;
}

.promo-product-showcase {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.promo-product-showcase article {
  display: grid;
  grid-template-rows: minmax(130px, 1fr) auto auto auto;
  gap: 8px;
  min-height: 258px;
  padding: 14px;
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 24%, rgba(0, 212, 255, 0.14), transparent 42%),
    rgba(2, 8, 23, 0.72);
  box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.04), 0 20px 48px rgba(0, 0, 0, 0.28);
}

.promo-product-showcase img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  padding: 12px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(56, 189, 248, 0.03)),
    #020817;
  border: 1px solid rgba(0, 212, 255, 0.14);
}

.promo-product-showcase span {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.promo-product-showcase strong {
  color: #22e3ff;
  font-size: 17px;
}

.promo-product-showcase small {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.18);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.promo-visual {
  display: grid;
  gap: 12px;
  transform: rotate(-3deg);
}

.promo-visual span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-height: 64px;
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(56, 189, 248, 0.04)),
    rgba(2, 8, 23, 0.76);
  color: #e0f7ff;
  font-weight: 900;
  padding: 12px;
  box-shadow: inset 0 0 24px rgba(0, 212, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.promo-visual small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 750;
}

.promo-visual strong {
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.1;
}

.promo-visual em {
  color: #22e3ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.promo-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 38px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 14px;
  background: rgba(2, 8, 23, 0.78);
  color: #e0f7ff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28), 0 0 24px rgba(0, 212, 255, 0.1);
  backdrop-filter: blur(16px);
}

.promo-nav:hover {
  background: rgba(0, 212, 255, 0.16);
  border-color: rgba(34, 227, 255, 0.5);
  color: #ffffff;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

.promo-prev {
  left: 10px;
}

.promo-next {
  right: 10px;
}

.promo-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.promo-dots button {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(0, 212, 255, 0.36);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  padding: 0;
}

.promo-dots button.active {
  width: 28px;
  background: #00d4ff;
  border-color: #22e3ff;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.28);
}

.marketplace-rail {
  display: grid;
  gap: 12px;
  align-self: stretch;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.marketplace-rail .popular-hero-panel,
.marketplace-rail .hero-metrics {
  min-width: 0;
}

.marketplace-rail .popular-hero-panel {
  display: grid;
  gap: 8px;
}

.marketplace-rail .popular-hero-card,
.marketplace-rail .hero-metrics span {
  background: rgba(11, 27, 52, 0.74);
  border-color: rgba(0, 212, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.04);
}

.marketplace-rail .popular-hero-card {
  align-content: center;
  min-height: 0;
  height: 100%;
}

.marketplace-rail .hero-metrics {
  gap: 8px;
}

.marketplace-rail .hero-metrics span {
  min-height: 50px;
  padding: 10px 12px;
}

.trust-strip {
  margin-top: 0;
  margin-bottom: 16px;
  border-color: rgba(0, 212, 255, 0.15);
  background: rgba(7, 20, 38, 0.68);
}

.trust-strip div {
  min-height: 82px;
  padding: 13px 16px;
  background: rgba(11, 27, 52, 0.62);
}

@media (max-width: 900px) {
  .marketplace-hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    gap: 12px;
    padding: 12px;
  }

  .promo-slide {
    grid-template-columns: 1fr;
    min-height: 0;
    height: 100%;
    padding: 24px 20px 48px;
  }

  .promo-carousel-shell {
    height: 340px;
  }

  .promo-copy h1 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .promo-copy p {
    font-size: 0.95rem;
    margin: 8px 0 14px;
  }

  .promo-visual {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    transform: none;
    gap: 8px;
  }

  .promo-product-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .promo-product-showcase article {
    min-height: 142px;
    padding: 9px;
    grid-template-rows: 64px auto auto;
  }

  .promo-product-showcase img {
    height: 64px;
    padding: 6px;
  }

  .promo-product-showcase span {
    font-size: 11px;
  }

  .promo-product-showcase strong {
    font-size: 12px;
  }

  .promo-product-showcase small {
    display: none;
  }

  .promo-visual span {
    min-height: 48px;
    font-size: 12px;
    padding: 8px;
  }

  .promo-visual small,
  .promo-visual em {
    display: none;
  }

  .marketplace-rail {
    gap: 10px;
  }

  .marketplace-rail .popular-hero-card {
    grid-template-columns: 56px minmax(0, 1fr);
    min-height: 88px;
  }

  .marketplace-rail .popular-hero-card img {
    border-radius: 12px;
    padding: 6px;
  }

  .marketplace-rail .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketplace-rail .hero-metrics span {
    display: grid;
    justify-items: start;
    min-height: 58px;
    padding: 10px;
  }

  .promo-nav {
    width: 34px;
    height: 44px;
    font-size: 26px;
  }

  .promo-prev {
    left: 8px;
  }

  .promo-next {
    right: 8px;
  }
}

/* Live Community Hub overrides */
.community-live-hub {
  display: grid !important;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr) !important;
  gap: 20px !important;
  align-items: stretch;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 212, 255, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(7, 20, 38, 0.96), rgba(2, 8, 23, 0.98)) !important;
  border: 1px solid rgba(0, 212, 255, 0.18) !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 0;
}

.community-live-hub .community-left-panel,
.community-live-panel {
  min-width: 0;
}

.community-pulse {
  display: grid;
  gap: 8px;
  margin: 4px 0;
}

.community-pulse span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 212, 255, 0.14);
  border-radius: 14px;
  background: rgba(11, 27, 52, 0.68);
  color: var(--muted);
  font-size: 12px;
}

.community-pulse strong {
  color: #00d4ff;
}

.community-live-panel {
  border: 1px solid rgba(0, 212, 255, 0.16);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(11, 27, 52, 0.82), rgba(7, 20, 38, 0.72));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

.community-live-head h3 {
  margin: 0;
  color: var(--text);
}

.community-live-panel {
  display: flex;
  flex-direction: column;
  max-height: 600px;
  overflow: hidden;
}

.community-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.12);
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.12);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.live-status span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.85);
}

.live-thought-feed {
  gap: 12px;
  overflow-y: auto;
  padding: 16px 14px 18px 18px;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}

.community-live-panel .post-form-card {
  margin: 14px 16px 0;
  flex-shrink: 0;
}

.thought-live-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 212, 255, 0.14);
  border-radius: 18px;
  background: rgba(0, 212, 255, 0.05);
}

.thought-live-preview .eyebrow {
  margin: 0;
}

.preview-post-card {
  padding: 14px !important;
  border-style: dashed !important;
  background: rgba(2, 8, 23, 0.44) !important;
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.08);
}

.preview-post-card .post-footer-board {
  padding-top: 10px;
}

.preview-action {
  cursor: default;
  padding-left: 0;
}

.preview-action:hover {
  background: transparent;
  color: var(--muted);
}

.live-thought-feed::-webkit-scrollbar {
  width: 6px;
}

.live-thought-feed::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.32);
  border-radius: 999px;
}

.live-thought-feed .post-card-board {
  padding: 15px;
  border-radius: 18px;
  background: rgba(2, 8, 23, 0.46);
  border-color: rgba(0, 212, 255, 0.14);
}

.live-thought-feed .post-card-board:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.34);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.13);
}

.live-thought-feed .post-action-btn:disabled {
  cursor: default;
  opacity: 0.82;
}

.live-thought-feed .post-action-btn:disabled:hover {
  background: transparent;
  color: var(--muted);
}

.community-live-hub .category-tab {
  border-color: rgba(0, 212, 255, 0.12);
  background: rgba(2, 8, 23, 0.34);
  position: relative;
}

.community-live-hub .category-tab:hover,
.community-live-hub .category-tab:focus-visible {
  border-color: rgba(0, 212, 255, 0.34);
  background: rgba(0, 212, 255, 0.09);
  color: var(--text);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.1);
}

.community-live-hub .category-tab::after {
  background: rgba(2, 8, 23, 0.96);
  border: 1px solid rgba(0, 212, 255, 0.34);
  border-radius: 8px;
  bottom: calc(100% + 8px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
  color: #e5faff;
  content: attr(data-help);
  font-size: 12px;
  font-weight: 650;
  left: 50%;
  line-height: 1.35;
  max-width: min(240px, 72vw);
  min-width: 180px;
  opacity: 0;
  padding: 9px 10px;
  pointer-events: none;
  position: absolute;
  text-align: left;
  transform: translate(-50%, 6px);
  transition: opacity 140ms ease, transform 140ms ease;
  visibility: hidden;
  white-space: normal;
  z-index: 30;
}

.community-live-hub .category-tab:hover::after,
.community-live-hub .category-tab:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.community-live-hub .category-tab.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.9), rgba(56, 189, 248, 0.76));
  color: #020817;
  border-color: rgba(0, 212, 255, 0.72);
}

@media (max-width: 1100px) {
  .community-live-hub {
    grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .community-live-hub {
    grid-template-columns: 1fr !important;
    padding: 16px !important;
  }

  .community-live-hub .community-left-panel {
    position: static;
  }

  .community-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-live-panel {
    max-height: 430px;
  }
}

/* Responsive safety layer: layout only, desktop styles above remain unchanged. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

.site-header,
.main-shell,
.marketplace-hero,
.product-card,
.modal,
.header-dropdown-menu,
.search-suggestions-dropdown,
.mobile-sidebar,
.cart-drawer,
.site-footer {
  max-width: 100%;
}

.modal,
.product-modal,
.settings-modal {
  width: min(var(--modal-width, 520px), calc(100vw - 24px));
  max-height: min(92vh, 820px);
}

.checkout-form,
.auth-panel,
.settings-grid,
.business-fields,
.two-col,
.detail-grid,
.spec-grid,
.order-card,
.cart-row,
.wishlist-row {
  min-width: 0;
}

.table-wrap,
.orders-list,
.cart-items,
.wishlist-list,
.dropdown-preview-items {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .header-main-row {
    gap: 10px;
  }

  .store-header .header-actions {
    gap: 6px;
  }

  .header-nav-item {
    padding-inline: 8px;
  }

  .marketplace-hero,
  .shop-hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr) !important;
  }

  .marketplace-rail {
    min-width: 0;
  }

  .main-shell,
  .featured-products,
  .community-reviews,
  .site-footer {
    width: min(100%, calc(100vw - 24px));
  }

  .products-grid,
  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  }
}

@media (max-width: 768px) {
  .site-header.store-header {
    position: sticky;
    top: 0;
    width: 100%;
  }

  .header-main-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .store-header .brand {
    min-width: 0;
  }

  .store-header .brand-text strong {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .store-header .header-actions {
    justify-content: flex-end;
    min-width: 0;
  }

  .header-nav-item:not(#cartNavTrigger):not(#wishlistNavTrigger):not(#profileMenu):not(#guestAccountMenu),
  .desktop-only,
  .desktop-search {
    display: none !important;
  }

  .header-search-container.mobile-search {
    display: block;
    width: 100%;
    padding: 8px 12px 10px;
  }

  .search-suggestions-dropdown {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: min(70vh, 520px);
  }

  .header-dropdown-menu,
  .preview-dropdown,
  .auth-dropdown,
  .profile-dropdown,
  .account-dropdown {
    position: fixed;
    left: 12px !important;
    right: 12px !important;
    top: 76px;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .mobile-sidebar {
    width: min(320px, 86vw);
  }

  .marketplace-hero,
  .shop-hero {
    grid-template-columns: 1fr !important;
    min-height: auto;
    padding: 18px !important;
  }

  .shop-hero h1,
  .marketplace-hero h1 {
    font-size: clamp(34px, 10vw, 54px);
    line-height: 1.02;
  }

  .hero-actions,
  .product-actions,
  .form-actions,
  .order-actions,
  .dropdown-preview-footer {
    flex-wrap: wrap;
  }

  .hero-actions a,
  .hero-actions button,
  .product-actions button,
  .form-actions button,
  .dropdown-preview-footer button,
  .dropdown-preview-footer a {
    flex: 1 1 min(180px, 100%);
  }

  .hero-metrics,
  .marketplace-rail .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: auto;
  }

  .category-grid,
  .product-grid,
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)) !important;
  }

  .product-card {
    min-width: 0;
  }

  .detail-grid,
  .checkout-form .two-col,
  .business-fields,
  .settings-grid,
  .spec-grid,
  .cart-row,
  .wishlist-row {
    grid-template-columns: 1fr !important;
  }

  .cart-drawer {
    width: min(420px, 100vw);
  }

  .modal {
    border-radius: 16px;
    padding: 18px;
  }

  .auth-tabs,
  .auth-mode-switch,
  .settings-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .chatbot-widget {
    right: 12px;
    bottom: 12px;
  }

  .chatbot-panel {
    width: min(380px, calc(100vw - 24px));
    max-height: min(72vh, 560px);
  }
}

@media (max-width: 620px) {
  .main-shell,
  .featured-products,
  .community-reviews,
  .site-footer {
    width: min(100%, calc(100vw - 16px));
  }

  .store-header .brand-mark {
    width: 32px;
    height: 32px;
  }

  .store-header .brand-text strong {
    max-width: 52vw;
    font-size: 18px;
  }

  .header-actions .nav-item-text,
  .wishlist-nav .nav-item-text {
    display: none;
  }

  .header-nav-item {
    min-height: 42px;
    min-width: 42px;
    justify-content: center;
  }

  .shop-hero h1,
  .marketplace-hero h1 {
    font-size: clamp(32px, 12vw, 44px);
  }

  .hero-metrics,
  .marketplace-rail .hero-metrics,
  .community-categories {
    grid-template-columns: 1fr !important;
  }

  .popular-hero-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .popular-hero-card img {
    width: 54px;
    height: 54px;
  }

  .category-grid,
  .product-grid,
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(148px, 100%), 1fr)) !important;
    gap: 12px;
  }

  .product-card,
  .card,
  .order-card,
  .post-card-board {
    border-radius: 8px;
  }

  .modal,
  .product-modal,
  .settings-modal {
    width: calc(100vw - 16px);
    padding: 14px;
  }

  .modal h2 {
    font-size: 20px;
  }

  .checkout-form,
  .auth-panel {
    gap: 12px;
  }

  label {
    font-size: 12px;
  }

  input,
  select,
  textarea,
  button,
  .primary-btn,
  .secondary-btn {
    min-height: 44px;
  }

  .order-card header,
  .post-header-board,
  .reply-header-board,
  .community-live-head,
  .trust-strip {
    align-items: flex-start;
  }

  .order-card header,
  .post-header-board,
  .reply-header-board,
  .community-live-head {
    flex-direction: column;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .toast {
    width: calc(100vw - 24px);
  }
}

@media (max-width: 480px) {
  .header-main-row {
    grid-template-columns: auto 1fr auto;
    padding-inline: 10px;
  }

  .store-header .brand-text strong {
    max-width: 46vw;
  }

  .header-search-container.mobile-search {
    padding-inline: 10px;
  }

  .shop-hero,
  .marketplace-hero,
  .featured-products,
  .community-reviews {
    padding-inline: 12px !important;
  }

  .category-grid,
  .product-grid,
  .products-grid,
  .settings-tabs,
  .auth-tabs {
    grid-template-columns: 1fr !important;
  }

  .product-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .product-card .product-image,
  .product-card img {
    width: 92px;
    max-height: 92px;
  }

  .product-card .product-actions {
    grid-column: 1 / -1;
  }

  .preview-dropdown-item,
  .cart-row,
  .wishlist-row {
    grid-template-columns: 52px minmax(0, 1fr) !important;
  }

  .preview-dropdown-item > :last-child,
  .cart-row > :last-child,
  .wishlist-row > :last-child {
    grid-column: 1 / -1;
  }

  .chatbot-panel {
    width: calc(100vw - 18px);
  }
}

@media (max-width: 360px) {
  .store-header .brand-text strong {
    max-width: 40vw;
    font-size: 16px;
  }

  .header-nav-item {
    min-width: 38px;
    padding-inline: 6px;
  }

  .shop-hero h1,
  .marketplace-hero h1 {
    font-size: 30px;
  }

  .modal,
  .product-modal,
  .settings-modal {
    width: calc(100vw - 10px);
    padding: 12px;
  }
}

/* Mobile visual alignment polish. Keeps the Microchip Cart theme intact. */
@media (max-width: 620px) {
  body {
    padding-bottom: 92px;
  }

  .site-header.store-header {
    padding: 10px 8px;
  }

  .header-main-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
    padding-inline: 0;
  }

  .mobile-menu-toggle {
    min-width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .store-header .brand {
    justify-self: start;
    gap: 8px;
    min-width: 0;
    max-width: min(48vw, 190px);
    padding: 8px 9px;
  }

  .chip-logo-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
  }

  .store-header .brand-text {
    min-width: 0;
  }

  .store-header .brand-text strong {
    display: block;
    max-width: 100% !important;
    font-size: 19px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .store-header .header-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 40px;
    gap: 6px;
    align-items: center;
    justify-content: end;
  }

  #wishlistNavTrigger {
    display: none !important;
  }

  #profileMenu,
  #guestAccountMenu,
  #cartNavTrigger {
    display: inline-flex !important;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }

  .theme-toggle-btn {
    display: none !important;
  }

  #cartNavTrigger {
    order: 1;
  }

  #profileMenu {
    order: 2;
  }

  #guestAccountMenu {
    order: 2;
  }

  #profileMenu.hidden,
  #guestAccountMenu.hidden {
    display: none !important;
  }

  #authBtn.account-trigger {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
    width: 40px;
  }

  #authBtn.account-trigger::before {
    align-items: center;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border-radius: 14px;
    color: #020817;
    content: "\1F464";
    display: inline-flex;
    font-size: 17px;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
  }

  #authBtn .nav-item-text,
  #guestBusinessBtn {
    display: none !important;
  }

  #profileBtn.profile-trigger,
  .nav-item-btn.profile-trigger {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }

  #profileBtn .profile-avatar-mini {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  #profileBtn .nav-item-text {
    display: none !important;
  }

  .badge-icon-wrapper {
    width: 30px;
    height: 30px;
  }

  .badge-count {
    right: -5px;
    top: -6px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .header-search-container.mobile-search {
    padding: 8px 0 0;
  }

  main {
    padding-inline: 10px;
  }

  .marketplace-category-strip {
    grid-auto-columns: minmax(92px, 28vw);
    gap: 8px;
    margin-inline: -4px;
    padding: 10px 8px;
    border-radius: 14px;
  }

  .marketplace-category-strip button {
    min-height: 66px;
    padding: 8px 6px;
  }

  .marketplace-category-strip button strong {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
  }

  .marketplace-hero,
  .shop-hero {
    margin-inline: -2px;
    padding: 10px !important;
    border-radius: 18px;
  }

  .promo-carousel-shell {
    height: clamp(510px, 142vw, 600px);
    border-radius: 16px;
  }

  .promo-slide {
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 18px;
    padding: 22px clamp(52px, 13vw, 60px) 50px;
    border-radius: 16px;
  }

  .promo-kicker {
    margin-bottom: 10px;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.1;
  }

  .promo-copy h1 {
    max-width: min(100%, 13ch);
    font-size: clamp(31px, 10.2vw, 41px);
    line-height: 1.06;
  }

  .promo-copy p {
    max-width: 28ch;
    font-size: 15px;
    line-height: 1.42;
    margin: 12px 0 14px;
  }

  .promo-copy .primary-btn {
    width: fit-content;
    min-height: 46px;
    padding-inline: 18px;
  }

  .promo-nav {
    top: 35%;
    width: 40px;
    height: 48px;
    border-radius: 13px;
    font-size: 28px;
  }

  .promo-prev {
    left: 14px;
  }

  .promo-next {
    right: 14px;
  }

  .promo-product-showcase {
    width: 100%;
    align-self: end;
    gap: 12px;
  }

  .promo-product-showcase article {
    min-height: 154px;
    padding: 10px;
    grid-template-rows: 72px auto auto;
    border-radius: 16px;
  }

  .promo-product-showcase img {
    height: 72px;
    padding: 7px;
    border-radius: 12px;
  }

  .promo-product-showcase span {
    font-size: 12px;
    line-height: 1.25;
  }

  .promo-product-showcase strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .promo-dots {
    bottom: 16px;
  }

  .marketplace-rail {
    gap: 10px;
  }

  .marketplace-rail .hero-metrics {
    grid-template-columns: 1fr !important;
    overflow: visible;
  }

  .marketplace-rail .hero-metrics span {
    min-height: 72px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .toolbar #sortSelect {
    width: 100%;
  }

  .product-grid,
  .products-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .product-card {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    border-radius: 14px;
  }

  .product-card .product-image {
    width: 100% !important;
    max-height: none !important;
    aspect-ratio: 16 / 9;
  }

  .product-card .product-image img,
  .product-card img {
    width: 100% !important;
    max-height: none !important;
  }

  .product-body {
    padding: 14px;
  }

  .price-row {
    align-items: flex-start;
    gap: 8px;
  }

  .card-actions {
    grid-template-columns: 1fr !important;
  }

  .card-actions .primary-btn,
  .card-actions .secondary-btn {
    width: 100%;
  }

  .community-live-hub {
    gap: 14px !important;
    margin-inline: -2px;
    padding: 14px !important;
  }

  .community-categories {
    grid-template-columns: 1fr !important;
  }

  .community-live-hub .category-tab::after {
    display: none;
  }

  .community-live-panel {
    max-height: none;
  }

  .live-thought-feed {
    max-height: 520px;
    padding: 14px;
  }

  .site-footer {
    margin-top: 22px;
    padding-bottom: 116px;
  }

  .chatbot-widget {
    right: 12px;
    bottom: 16px;
    z-index: 80;
  }

  .chatbot-launcher {
    min-height: 56px;
    padding: 12px 18px;
    border-radius: 999px;
  }
}

@media (max-width: 380px) {
  .store-header .brand {
    max-width: 44vw;
  }

  .store-header .brand-text strong {
    font-size: 17px;
  }

  .store-header .header-actions {
    grid-auto-columns: 38px;
    gap: 5px;
  }

  #profileMenu,
  #guestAccountMenu,
  #cartNavTrigger {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  #profileBtn.profile-trigger,
  #authBtn.account-trigger,
  .nav-item-btn.profile-trigger,
  #profileBtn .profile-avatar-mini {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .promo-carousel-shell {
    height: 540px;
  }

  .promo-copy h1 {
    font-size: 30px;
    max-width: 12ch;
  }

  .promo-copy p {
    max-width: 24ch;
    font-size: 14px;
  }

  .promo-slide {
    padding-inline: 48px;
  }

  .promo-nav {
    top: 36%;
    width: 38px;
    height: 46px;
  }

  .promo-prev {
    left: 10px;
  }

  .promo-next {
    right: 10px;
  }

  .promo-product-showcase {
    gap: 8px;
  }

  .promo-product-showcase article {
    min-height: 148px;
    padding: 9px;
  }

  .chatbot-launcher strong {
    display: none;
  }

  .chatbot-launcher {
    width: 58px;
    padding: 0;
  }
}

/* Mobile responsiveness audit fixes: layout-only, preserves desktop design. */
@media (max-width: 992px) {
  .header-location {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .site-header.store-header {
    overflow-x: clip;
  }

  .site-header.store-header .header-main-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }

  .mobile-menu-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header.store-header .brand {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header.store-header .header-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .header-location {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    background: rgba(11, 27, 52, 0.72);
    border-color: var(--border);
  }

  .header-location .location-text,
  .header-location .location-name {
    min-width: 0;
  }

  .header-location .location-locality,
  .header-location .location-pincode {
    max-width: calc(100vw - 76px);
  }

  .modal,
  .product-modal,
  .settings-modal {
    max-height: calc(100dvh - 18px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .auth-mode-switch button,
  .auth-tabs button,
  .settings-tabs button,
  .payment-options label,
  .account-options label,
  .checkout-form button,
  .checkout-form input,
  .checkout-form select,
  .checkout-form textarea {
    min-height: 44px;
  }

  .product-card h3,
  .product-card p,
  .order-card,
  .cart-item h3,
  .wishlist-item strong,
  .wishlist-item span,
  .settings-panel,
  .privacy-panel p {
    overflow-wrap: anywhere;
  }

  .settings-modal .two-col,
  .settings-modal .business-fields,
  .checkout-form .two-col,
  #locationForm {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .header-dropdown-menu,
  .preview-dropdown,
  .auth-dropdown,
  .profile-dropdown,
  .account-dropdown {
    top: 118px;
    max-height: calc(100dvh - 132px);
    overflow-y: auto;
  }

  .mobile-sidebar {
    width: min(300px, 92vw);
  }

  .cart-drawer {
    width: 100vw;
    padding: 14px;
  }

  .cart-item {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 10px;
  }

  .cart-item-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .cart-line-total {
    white-space: normal;
  }

  .qty-row {
    display: flex;
    flex-wrap: wrap;
  }

  .qty-row button {
    min-height: 36px;
    min-width: 36px;
  }

  .qty-row [data-cart-remove] {
    flex: 1 1 100%;
    justify-content: center;
    min-height: 40px;
  }

  .wishlist-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .wishlist-item .secondary-btn,
  .wishlist-item .icon-btn {
    grid-column: span 1;
    width: 100%;
  }

  .modal,
  .product-modal,
  .settings-modal {
    width: calc(100vw - 12px) !important;
    padding: 12px;
  }

  .modal-close-row .icon-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .settings-tabs,
  .auth-tabs,
  .auth-mode-switch {
    gap: 6px;
  }

  .settings-tabs button,
  .auth-tabs button,
  .auth-mode-switch button {
    padding-inline: 8px;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .site-header.store-header .header-main-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .header-location {
    padding-inline: 8px;
  }

  .cart-drawer,
  .modal,
  .product-modal,
  .settings-modal {
    padding: 10px;
  }

  .product-body,
  .checkout-form,
  .auth-panel,
  .settings-panel.active {
    gap: 10px;
  }
}

/* Compact mobile ecommerce polish. Breakpoint-only refinements. */
@media (max-width: 768px) {
  .header-main-row {
    padding-inline: 10px;
  }

  .store-header .brand {
    max-width: none;
  }

  .store-header .brand-text strong {
    font-size: clamp(17px, 5vw, 22px);
    max-width: 100%;
  }

  .store-header .header-actions {
    grid-auto-columns: 42px;
  }

  #cartNavTrigger,
  .theme-toggle-btn,
  .mobile-menu-toggle {
    min-width: 42px;
    min-height: 42px;
  }

  .search-bar-form {
    min-height: 44px;
  }

  .search-input-field {
    min-width: 0;
    font-size: 14px;
  }

  .search-submit-btn {
    min-width: 44px;
  }

  .marketplace-category-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(92px, 30vw);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 10px;
    scroll-snap-type: x proximity;
  }

  .marketplace-category-strip button {
    scroll-snap-align: start;
  }

  .promo-carousel-shell {
    height: clamp(420px, 112vw, 520px);
  }

  .promo-slide {
    padding: 20px clamp(44px, 12vw, 56px) 48px;
  }

  .promo-copy h1 {
    font-size: clamp(28px, 8.7vw, 38px);
  }

  .promo-copy p {
    font-size: clamp(13px, 3.8vw, 15px);
  }

  .promo-product-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .promo-product-showcase article {
    min-width: 0;
  }

  .product-title {
    display: -webkit-box;
    min-height: auto;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-description {
    font-size: 13px;
    min-height: 0;
  }

  .meta-row {
    gap: 6px;
  }

  .pill,
  .commerce-row span {
    font-size: 11px;
    line-height: 1.2;
    padding: 5px 7px;
  }

  .price-row {
    align-items: flex-start;
    gap: 4px;
  }

  .price {
    font-size: clamp(18px, 5.6vw, 22px);
  }

  .stock {
    font-size: 12px;
    text-align: right;
  }

  .card-actions button {
    min-height: 44px;
  }

  .community-live-hub {
    grid-template-columns: 1fr !important;
  }

  .community-live-head,
  .post-header-board,
  .post-footer-board {
    gap: 8px;
  }

  .post-card-board,
  .preview-post-card {
    padding: 12px;
  }

  .post-title-board {
    font-size: 15px;
  }

  .post-content-board {
    font-size: 13px;
  }

  .site-footer {
    gap: 18px;
  }

  .site-footer h2 {
    margin-bottom: 8px;
  }
}

@media (max-width: 414px) {
  .site-header.store-header {
    padding-inline: 8px;
  }

  .store-header .brand {
    padding-inline: 7px;
  }

  .chip-logo-icon {
    width: 26px;
    height: 26px;
  }

  .header-location {
    min-height: 42px;
  }

  .header-location .deliver-to,
  .header-location .location-pincode {
    font-size: 10px;
  }

  .header-location .location-locality {
    font-size: 12px;
  }

  .marketplace-category-strip {
    grid-auto-columns: minmax(88px, 31vw);
  }

  .marketplace-category-strip button {
    min-height: 58px;
  }

  .marketplace-category-strip button span {
    font-size: 11px;
  }

  .marketplace-category-strip button strong {
    font-size: 11px;
  }

  .promo-carousel-shell {
    height: clamp(390px, 108vw, 470px);
  }

  .promo-slide {
    gap: 12px;
    padding: 18px 42px 42px;
  }

  .promo-product-showcase article {
    min-height: 124px;
  }

  .promo-product-showcase img {
    height: 56px;
  }

  .product-card {
    border-radius: 12px;
  }

  .product-card .product-image {
    aspect-ratio: 1.45 / 1;
  }

  .product-image img {
    padding: 10px;
  }

  .product-body {
    padding: 12px;
  }

  .commerce-row {
    gap: 5px;
  }

  .chatbot-widget {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .chatbot-launcher {
    width: 54px;
    min-height: 54px;
  }

  .site-footer {
    padding: 18px 12px 108px;
  }
}

@media (max-width: 390px) {
  .store-header .brand-text strong {
    font-size: 17px;
  }

  .promo-carousel-shell {
    height: 400px;
  }

  .promo-copy h1 {
    font-size: 28px;
  }

  .promo-copy p {
    max-width: 22ch;
  }

  .promo-product-showcase article {
    padding: 8px;
  }
}

@media (max-width: 375px) {
  .header-main-row {
    gap: 6px;
    padding-inline: 8px;
  }

  .store-header .header-actions {
    grid-auto-columns: 38px;
  }

  #profileMenu,
  #guestAccountMenu,
  #cartNavTrigger,
  .mobile-menu-toggle {
    min-width: 38px;
    min-height: 38px;
  }

  .badge-count {
    right: -3px;
  }

  .promo-slide {
    padding-inline: 38px;
  }

  .promo-product-showcase span,
  .promo-product-showcase strong,
  .promo-product-showcase small {
    font-size: 11px;
  }
}

@media (max-width: 320px) {
  .site-header.store-header {
    padding-inline: 6px;
  }

  .header-main-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .store-header .brand {
    gap: 5px;
    padding-inline: 6px;
  }

  .store-header .brand-text strong {
    font-size: 16px;
  }

  .store-header .header-actions {
    grid-auto-columns: 36px;
    gap: 4px;
  }

  #profileMenu,
  #guestAccountMenu,
  #cartNavTrigger,
  .mobile-menu-toggle {
    min-width: 36px;
    min-height: 36px;
  }

  #profileBtn.profile-trigger,
  .nav-item-btn.profile-trigger,
  #profileBtn .profile-avatar-mini {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    font-size: 15px;
  }

  .marketplace-category-strip {
    grid-auto-columns: minmax(82px, 34vw);
  }

  .promo-carousel-shell {
    height: 382px;
  }

  .promo-slide {
    padding: 16px 34px 38px;
  }

  .promo-nav {
    width: 32px;
  }

  .promo-prev {
    left: 5px;
  }

  .promo-next {
    right: 5px;
  }

  .product-body {
    padding: 10px;
  }

  .price-row {
    flex-direction: column;
  }

  .stock {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .theme-toggle-btn {
    display: none !important;
  }

  #profileMenu {
    display: inline-flex !important;
    justify-self: end;
  }

  input,
  select,
  textarea,
  .search-input-field,
  .search-category-select,
  .chatbot-form input,
  .community-post-form input,
  .community-post-form textarea,
  .community-post-form select,
  .reply-input-row input,
  .reply-text-input {
    font-size: 16px !important;
  }

  label,
  .form-help {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* Mobile hero polish: compact ecommerce layout only, desktop remains unchanged. */
@media (max-width: 768px) {
  .marketplace-hero,
  .shop-hero {
    gap: 12px !important;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 12px;
    padding: 12px !important;
  }

  .promo-carousel-shell {
    height: clamp(372px, 97vw, 430px) !important;
    border-radius: 18px;
  }

  .promo-carousel {
    height: 100%;
    border-radius: 18px;
  }

  .promo-slide {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: 10px !important;
    height: 100%;
    min-height: 0 !important;
    padding: 18px 44px 34px !important;
    border-radius: 18px;
  }

  .promo-kicker {
    margin-bottom: 8px;
    padding: 5px 10px;
    font-size: 11px;
  }

  .promo-copy h1,
  .shop-hero h1,
  .marketplace-hero h1 {
    max-width: 11.5ch;
    font-size: clamp(28px, 9vw, 42px) !important;
    line-height: 1.06 !important;
  }

  .promo-copy p {
    max-width: 24ch;
    margin: 8px 0 12px;
    font-size: 15px;
    line-height: 1.35;
  }

  .promo-copy .primary-btn {
    width: fit-content;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 15px;
  }

  .promo-product-showcase {
    align-self: end;
    gap: 8px !important;
    min-width: 0;
  }

  .promo-product-showcase article {
    grid-template-rows: 52px auto auto;
    gap: 6px;
    min-height: 122px !important;
    padding: 8px !important;
    border-radius: 14px;
    overflow: hidden;
  }

  .promo-product-showcase img {
    height: 52px !important;
    padding: 7px;
    border-radius: 10px;
  }

  .promo-product-showcase span {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px !important;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .promo-product-showcase strong {
    font-size: 14px !important;
    line-height: 1.1;
  }

  .promo-product-showcase small {
    display: none;
  }

  .promo-nav {
    top: 48% !important;
    width: 34px !important;
    height: 44px !important;
    border-radius: 12px;
    font-size: 28px;
  }

  .promo-prev {
    left: 8px !important;
  }

  .promo-next {
    right: 8px !important;
  }

  .promo-dots {
    bottom: 10px;
  }

  .marketplace-rail {
    gap: 10px !important;
  }

  .marketplace-rail .popular-hero-card {
    grid-template-columns: 56px minmax(0, 1fr);
    min-height: 0;
    padding: 10px;
    border-radius: 16px;
  }

  .marketplace-rail .popular-hero-card img {
    width: 52px;
    height: 52px;
  }

  .marketplace-rail .popular-hero-card h3 {
    font-size: 17px;
    line-height: 1.2;
  }

  .marketplace-rail .popular-hero-card p {
    font-size: 13px;
    line-height: 1.3;
  }

  .marketplace-rail .hero-metrics {
    gap: 8px;
  }

  .marketplace-rail .hero-metrics span {
    min-height: 58px !important;
    padding: 12px;
    border-radius: 14px;
  }

  .chatbot-widget {
    right: 12px !important;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 80;
  }

  .chatbot-launcher {
    width: 54px !important;
    min-width: 54px;
    height: 54px;
    min-height: 54px !important;
    padding: 0 !important;
  }

  .chatbot-launcher strong {
    display: none;
  }

  .chatbot-panel {
    right: 0;
    bottom: 66px;
    width: calc(100vw - 20px);
    max-height: min(70dvh, 520px);
  }
}

@media (max-width: 414px) {
  .promo-carousel-shell {
    height: 376px !important;
  }

  .promo-slide {
    padding: 16px 38px 32px !important;
  }

  .promo-copy h1,
  .shop-hero h1,
  .marketplace-hero h1 {
    font-size: 32px !important;
  }

  .promo-copy p {
    max-width: 23ch;
    font-size: 14px;
  }

  .promo-product-showcase article {
    min-height: 116px !important;
  }

  .promo-nav {
    top: 50% !important;
    width: 32px !important;
    height: 42px !important;
  }
}

@media (max-width: 375px) {
  .promo-carousel-shell {
    height: 360px !important;
  }

  .promo-slide {
    padding: 14px 34px 30px !important;
  }

  .promo-kicker {
    font-size: 10px;
  }

  .promo-copy h1,
  .shop-hero h1,
  .marketplace-hero h1 {
    font-size: 29px !important;
  }

  .promo-copy p {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .promo-copy .primary-btn {
    min-height: 42px;
    padding: 9px 15px;
    font-size: 14px;
  }

  .promo-product-showcase img {
    height: 46px !important;
  }

  .promo-product-showcase article {
    grid-template-rows: 46px auto auto;
    min-height: 108px !important;
  }
}

@media (max-width: 320px) {
  .promo-carousel-shell {
    height: 340px !important;
  }

  .promo-slide {
    padding: 12px 30px 28px !important;
  }

  .promo-copy h1,
  .shop-hero h1,
  .marketplace-hero h1 {
    font-size: 26px !important;
  }

  .promo-copy p {
    max-width: 22ch;
    font-size: 12px;
  }

  .promo-product-showcase {
    gap: 6px !important;
  }

  .promo-product-showcase article {
    min-height: 100px !important;
    padding: 7px !important;
  }

  .promo-product-showcase span {
    font-size: 11px !important;
  }

  .promo-product-showcase strong {
    font-size: 13px !important;
  }

  .promo-nav {
    width: 28px !important;
    height: 38px !important;
    font-size: 24px;
  }

  .promo-prev {
    left: 5px !important;
  }

  .promo-next {
    right: 5px !important;
  }
}

/* Final mobile hero fit: fluid height, no overlap, no desktop impact. */
@media (max-width: 768px) {
  body[data-page="home"] {
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
  }

  body[data-page="home"] .main-shell {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .marketplace-hero,
  .shop-hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
  }

  .promo-carousel-shell {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
  }

  .promo-carousel {
    display: flex !important;
    align-items: stretch;
    height: auto !important;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
  }

  .promo-slide {
    flex: 0 0 100%;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
    padding: 18px 42px 34px !important;
  }

  .promo-copy {
    display: grid;
    justify-items: start;
    gap: 0;
    min-width: 0;
  }

  .promo-copy h1 {
    max-width: min(100%, 12ch);
    overflow-wrap: anywhere;
  }

  .promo-copy p {
    max-width: min(100%, 25ch);
    overflow-wrap: anywhere;
  }

  .promo-copy .primary-btn {
    justify-self: center;
    margin: 0 auto 4px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .promo-product-showcase {
    width: 100%;
    margin-top: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .promo-product-showcase article {
    min-width: 0;
    box-shadow: none;
  }

  .promo-nav {
    top: 42% !important;
  }

  .marketplace-rail {
    min-height: 0;
  }

  .marketplace-rail .popular-hero-panel {
    min-height: 0;
  }

  .marketplace-rail .popular-hero-card {
    align-items: center;
    gap: 10px;
  }

  .marketplace-rail .popular-hero-card div {
    min-width: 0;
  }

  .marketplace-rail .popular-hero-card h3,
  .marketplace-rail .popular-hero-card p {
    overflow-wrap: anywhere;
  }

  .marketplace-rail .hero-metrics {
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }

  .marketplace-rail .hero-metrics span {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .chatbot-widget {
    right: 16px !important;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 999 !important;
  }

  .chatbot-launcher {
    width: 56px !important;
    min-width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
    border-radius: 999px;
  }
}

@media (max-width: 480px) {
  .marketplace-hero,
  .shop-hero {
    gap: 10px !important;
    padding: 10px !important;
  }

  .promo-slide {
    padding: 16px 34px 30px !important;
  }

  .promo-kicker {
    margin-bottom: 7px;
    font-size: 10px;
    line-height: 1.1;
  }

  .promo-copy h1 {
    font-size: clamp(25px, 8.2vw, 32px) !important;
    line-height: 1.08 !important;
  }

  .promo-copy p {
    margin: 7px 0 10px;
    font-size: 13px;
    line-height: 1.35;
  }

  .promo-copy .primary-btn {
    min-height: 42px;
    padding: 9px 15px;
    font-size: 14px;
  }

  .promo-product-showcase {
    gap: 7px !important;
  }

  .promo-product-showcase article {
    grid-template-rows: 44px auto auto;
    min-height: 104px !important;
    padding: 7px !important;
  }

  .promo-product-showcase img {
    height: 44px !important;
    padding: 6px;
  }

  .promo-product-showcase span {
    font-size: 11px !important;
  }

  .promo-product-showcase strong {
    font-size: 13px !important;
  }

  .promo-nav {
    top: 43% !important;
    width: 30px !important;
    height: 40px !important;
    font-size: 24px;
  }

  .promo-prev {
    left: 4px !important;
  }

  .promo-next {
    right: 4px !important;
  }

  .promo-dots {
    bottom: 8px;
  }

  .marketplace-rail .popular-hero-card {
    grid-template-columns: 50px minmax(0, 1fr);
    padding: 9px;
  }

  .marketplace-rail .popular-hero-card img {
    width: 48px;
    height: 48px;
  }

  .marketplace-rail .popular-hero-card h3 {
    font-size: 15px;
  }

  .marketplace-rail .popular-hero-card p {
    font-size: 12px;
  }

  .marketplace-rail .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .marketplace-rail .hero-metrics span {
    min-height: 48px !important;
    padding: 8px;
  }

  .marketplace-rail .hero-metrics strong {
    font-size: 14px;
    line-height: 1.1;
  }

  .marketplace-rail .hero-metrics small {
    font-size: 12px;
    line-height: 1.15;
  }
}

@media (max-width: 360px) {
  .promo-slide {
    padding: 14px 30px 28px !important;
  }

  .promo-copy h1 {
    font-size: 24px !important;
  }

  .promo-copy p {
    font-size: 12px;
  }

  .promo-product-showcase {
    grid-template-columns: 1fr !important;
  }

  .promo-product-showcase article {
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    min-height: 76px !important;
  }

  .promo-product-showcase img {
    grid-row: 1 / 3;
    width: 46px !important;
    height: 46px !important;
  }

  .promo-product-showcase span {
    -webkit-line-clamp: 1;
  }

  .marketplace-rail .hero-metrics span {
    min-height: 42px !important;
    padding: 6px;
  }

  .marketplace-rail .hero-metrics strong {
    font-size: 13px;
  }

  .marketplace-rail .hero-metrics small {
    font-size: 11px;
  }
}

/* Mobile-only carousel dot and assistant alignment polish. */
@media (max-width: 768px) {
  .promo-dots {
    bottom: 8px !important;
    gap: 5px;
    align-items: center;
  }

  .promo-dots button {
    width: 5px !important;
    height: 5px !important;
    min-width: 5px;
    min-height: 5px;
    border-width: 1px;
  }

  .promo-dots button.active {
    width: 13px !important;
    height: 5px !important;
  }

  .chatbot-widget {
    right: 16px !important;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .chatbot-launcher {
    display: grid !important;
    place-items: center;
    width: 56px !important;
    min-width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 !important;
  }
}

@media (max-width: 480px) {
  .promo-dots {
    bottom: 7px !important;
    gap: 4px;
  }

  .promo-dots button {
    width: 4px !important;
    height: 4px !important;
    min-width: 4px;
    min-height: 4px;
  }

  .promo-dots button.active {
    width: 11px !important;
    height: 4px !important;
  }
}

/* Keep Microman at the lower mobile edge without changing desktop. */
@media (max-width: 768px) {
  .chatbot-widget {
    right: 16px !important;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 999 !important;
  }
}

/* Profile Setup Modal custom styles */
#profileSetupModal {
  max-width: min(520px, calc(100vw - 24px));
}

#profileSetupModal .auth-divider {
  margin: 10px 0;
}

#profileSetupModal .social-auth-btn {
  font-size: 15px;
  min-height: 48px;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
}

#profileSetupModal .social-auth-btn .google-mark {
  height: 24px;
  width: 24px;
  font-size: 11px;
}

#profileSetupModal .checkout-form {
  gap: 12px;
}

#profileSetupModal label {
  gap: 4px;
}

#profileSetupModal input {
  min-height: 42px;
}
