:root {
  --accent: #45f5c6;
  --accent-dark: #19b790;
  --danger: #f27575;
  --text: #f6f7fb;
  --muted: #98a2c3;
  --bg: #03050a;
  --panel: #0c111d;
  --card-bg: #11182a;
  --header-height: 70px;
  --search-height: 56px;
  --category-height: 56px;
  --max-content-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  overscroll-behavior: auto;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% -10%, rgba(69, 245, 198, 0.1), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(87, 132, 255, 0.15), transparent 50%), var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}

body.no-scroll {
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select {
  font: inherit;
}

button.primary {
  background: var(--accent);
  color: #03130f;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  cursor: pointer;
}

button.secondary {
  background: #efefef;
  color: #03130f;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  cursor: pointer;
}

/* Generic icon-only button (used for share) */
.icon-btn {
  height: 40px;
  width: 40px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  color: inherit;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.icon-btn:hover,
.icon-btn:focus {
  opacity: 0.8;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 9, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  height: var(--header-height);
}

.site-header__left {
  position: absolute;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.developer-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(69, 245, 198, 0.5);
  color: var(--accent);
  background: rgba(5, 8, 14, 0.75);
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-actions {
  position: absolute;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  height: 40px;
  width: auto;
}

.menu-toggle {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--accent);
}

.basket-btn,
.quick-action {
  background: transparent;
  border: none;
  position: relative;
  cursor: pointer;
  padding: 0.25rem;
}
.basket-btn img {
  width: 26px;
  height: 26px;
  display: block;
  color: var(--accent);
}

.basket-count {
  position: absolute;
  top: 0;
  right: -0.2rem;
  background: var(--accent);
  color: #000;
  border-radius: 999px;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  line-height: 1.3;
  display: none;
}

.avatar-chip {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(69, 245, 198, 0.15);
  border: 1px solid rgba(69, 245, 198, 0.4);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.avatar-chip--small {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.avatar-chip--xl {
  width: 88px;
  height: 88px;
  font-size: 1.5rem;
  border-width: 2px;
}

.header-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(69, 245, 198, 0.35);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-profile svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  stroke-width: 1.6;
  fill: none;
}

.header-profile .avatar-chip {
  display: none;
  border-color: rgba(69, 245, 198, 0.9);
  background: rgba(69, 245, 198, 0.2);
  color: #03130f;
}

.header-profile.has-user .avatar-chip {
  display: inline-flex;
}

.header-profile.has-user svg {
  stroke: rgba(255, 255, 255, 0.65);
}

/* HIDDEN UNTIL SUPABASE TABLE SETUP */
.auth-disabled {
  display: none !important;
}

[data-developer-only] {
  display: none !important;
}

[data-developer-only].dev-visible {
  display: unset !important;
}

.profile-card-link[data-developer-only].dev-visible {
  display: block !important;
}

.dropdown-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(7, 10, 18, 0.9);
  box-shadow: 0 20px 60px rgba(3, 6, 12, 0.75);
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 1.2rem 1.2rem;
  backdrop-filter: blur(16px);
}

.dropdown-nav.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-nav a {
  padding: 0.85rem 0.95rem;
  border-radius: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dropdown-nav a.active,
.dropdown-nav a:hover {
  color: var(--accent);
  background: rgba(69, 245, 198, 0.08);
  transform: translateX(4px);
}

.sticky-controls {
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 1rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sticky-controls.hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

.search-bar {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.search-bar input {
  width: 100%;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: border 0.2s ease, background 0.2s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.category-bar-wrapper {
  width: 100%;
  margin-top: 0.05rem;
  padding-top: 0.05rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  padding-bottom: 0.05rem;
}

.category-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 5, 10, 0.7);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.category-nav:hover {
  border-color: var(--accent);
  background: rgba(3, 5, 10, 0.85);
}

.category-nav--left {
  left: 0.35rem;
}

.category-nav--right {
  right: 0.35rem;
}

.category-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.category-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.6rem 0 0.4rem;
  scrollbar-width: thin;
  height: var(--category-height);
  padding-right: 0;
  position: relative;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-bar-wrapper::before,
.category-bar-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  pointer-events: none;
  z-index: 1;
}

.category-bar-wrapper::before {
  left: 0;
  background: linear-gradient(
    90deg,
    rgba(3, 5, 10, 0.95) 0%,
    rgba(3, 5, 10, 0.7) 40%,
    rgba(3, 5, 10, 0.35) 70%,
    rgba(3, 5, 10, 0) 100%
  );
}

.category-bar-wrapper::after {
  right: 0;
  background: linear-gradient(
    270deg,
    rgba(3, 5, 10, 0.95) 0%,
    rgba(3, 5, 10, 0.7) 40%,
    rgba(3, 5, 10, 0.35) 70%,
    rgba(3, 5, 10, 0) 100%
  );
}

.category-bar button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.2s ease, border 0.2s ease;
}

.category-bar button.active {
  background: var(--accent);
  color: #03120f;
  border-color: transparent;
}

.category-bar::after {
  content: '';
  position: absolute;
  inset: 0.2rem 0 0.2rem 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 45%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0.08) 55%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  transform: translateX(-40%);
  animation: scroll-hint-slide 2.2s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes scroll-hint-slide {
  0% {
    transform: translateX(-40%);
    opacity: 0.12;
  }
  30% {
    opacity: 0.3;
  }
  70% {
    transform: translateX(40%);
    opacity: 0.22;
  }
  100% {
    transform: translateX(40%);
    opacity: 0.05;
  }
}

@media (max-width: 768px) {
  .category-nav {
    display: none;
  }
}

main {
  padding: 1rem;
  margin: 0 auto 5rem;
  max-width: var(--max-content-width);
  color: var(--text);
}

.results-meta {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.page-products .results-meta {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .page-products .results-meta {
    flex-direction: row;
    align-items: center;
  }
}

.results-meta .quick-action {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.results-toggle.sort-toggle svg {
  display: block;
}

.results-meta__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sort-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.sort-options button {
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.sort-options button:hover,
.sort-options button.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.sort-option__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.sort-option__icon--asc {
  color: var(--accent);
}

.sort-option__icon--desc {
  color: var(--danger);
}

.sort-option__icon--discount {
  color: var(--danger);
  font-weight: 700;
}

.inline-category-select {
  display: none;
}

@media (min-width: 768px) {
  .inline-category-select {
    display: flex;
    position: relative;
  }

  .inline-category-select__trigger {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 999px;
    padding: 0.35rem 2.6rem 0.35rem 0.85rem;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 180px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
    background-position: right 1.1rem center, right 0.85rem center;
    background-size: 10px 10px, 10px 10px;
    background-repeat: no-repeat;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s ease, background 0.2s ease;
  }

  .inline-category-select__trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
    background-color: rgba(255, 255, 255, 0.12);
  }

  .inline-category-select__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    min-width: 200px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.9rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    padding: 0.35rem;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    z-index: 5;
  }

  .inline-category-select.open .inline-category-select__menu {
    display: flex;
  }

  .inline-category-select__menu button {
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s ease, border-color 0.15s ease;
  }

  .inline-category-select__menu::-webkit-scrollbar {
    width: 8px;
  }

  .inline-category-select__menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
  }

  .inline-category-select__menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
  }

  .inline-category-select__menu button:hover,
  .inline-category-select__menu button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    outline: none;
  }

  .inline-category-select__menu button.active {
    background: var(--accent);
    color: #03120f;
    border-color: transparent;
  }

}

.filter-select {
  position: relative;
  width: 100%;
}

.filter-select__trigger {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 0.9rem;
  padding: 0.6rem 2.6rem 0.6rem 0.85rem;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: right 1rem center, right 0.75rem center;
  background-size: 10px 10px, 10px 10px;
  background-repeat: no-repeat;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.filter-select__trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, 0.12);
}

.filter-select__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  padding: 0.35rem;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 15;
}

.filter-select.open .filter-select__menu {
  display: flex;
}

.filter-select__menu button {
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.filter-select__menu button:hover,
.filter-select__menu button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  outline: none;
}

.filter-select__menu button.active {
  background: var(--accent);
  color: #03120f;
  border-color: transparent;
}

.filter-select__menu::-webkit-scrollbar {
  width: 8px;
}

.filter-select__menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.filter-select__menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.results-meta__info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.favorites-notice {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text);
}

.favorites-notice.visible {
  display: inline-flex;
}

.favorites-notice button {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
}

.results-toggle {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  position: relative;
  pointer-events: auto;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.results-toggle.active {
  background: var(--accent);
  color: #03130f;
  border-color: transparent;
}

.results-toggle > * {
  pointer-events: none;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  justify-content: center;
  gap: 0.65rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 18px 35px rgba(2, 4, 8, 0.65);
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
  animation: cardRise 0.45s ease;
}

.product-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 45px rgba(2, 4, 8, 0.8);
  border-color: rgba(69, 245, 198, 0.5);
}

/* --- CRUCIAL FIX: Make card-link-overlay cover the entire product-card --- */
.card-link-overlay {
    /* This forces the element to cover the entire area of its parent */
    position: absolute; 
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    
    /* Ensures the link layer is above other elements like images and text */
    z-index: 10;
}

.favorite-toggle {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.6);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.discount-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.421);
  border: 1px solid rgba(255, 0, 0, 0.257);
  color: #ff6b6b;
  font-size: 0.56rem;
  line-height: 1;
  padding: 0.15rem;
}

.discount-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
}

.discount-badge__value {
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.favorite-toggle.active {
  color: #ff5c8d;
  background: rgba(255, 255, 255, 0.1);
}

.product-card.selected {
  border: 1px solid rgba(15, 140, 127, 0.6);
  box-shadow: 0 12px 28px rgba(15, 140, 127, 0.25);
}

.product-card.selected::after {
  content: "Selected";
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--accent);
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card h3 {
  font-size: 0.9rem;
  margin: 0 0 .15rem;
  font-weight: 600;
}

.product-description {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.price-and-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.price-and-action .price-row {
  margin: 0;
}

.price-row .sale {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.price-row .rrp {
  color: var(--danger);
  text-decoration: line-through;
  font-size: 0.8rem;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  background: var(--accent);
  color: #02140f;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 20px rgba(69, 245, 198, 0.2);
}

.add-btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.add-btn__text {
  display: inline;
}

.add-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

@media (max-width: 640px) {
  .price-and-action {
    gap: 0.4rem;
  }

  .price-and-action .price-row {
    flex: 1;
    min-width: 0;
  }

  .price-row .sale {
    font-size: 0.82rem;
  }

  .price-row .rrp {
    font-size: .48em;
  }

  .add-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
    font-size: 0;
    justify-content: center;
    align-items: center;
  }

  .add-btn__text {
    display: none;
  }

  .add-btn__icon svg {
    width: 16px;
    height: 16px;
    display: block;
  }

  .add-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.add-btn:active {
  transform: scale(0.97);
}

.add-btn.is-selected {
  background: #0f2922;
  color: var(--accent);
  border: 1px solid rgba(69, 245, 198, 0.6);
}

.add-btn:disabled {
  background: rgba(0, 0, 0, 0.08);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

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

.floating-controls {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 980;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.floating-controls.visible {
  opacity: 1;
  pointer-events: auto;
}

.floating-filter-btn,
.floating-scroll-top {
  background: #0e182c;
  color: var(--accent);
  border: 1px solid rgba(69, 245, 198, 0.2);
  padding: 0.45rem 0.9rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  font-size: 0.9rem;
}

.floating-scroll-top {
  padding: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.floating-sort-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  background: #0e182c;
  color: var(--accent);
  border: 1px solid rgba(69, 245, 198, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-sort-btn svg {
  stroke-width: 2.2;
}


.basket-summary {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 14, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  transform: translateY(110%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.2s ease;
  z-index: 960;
  flex-direction: row;
}

.basket-summary.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.basket-freebie {
  width: 100%;
  flex: 1 0 100%;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0.25rem 1rem;
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}

.basket-freebie.visible {
  display: flex;
}

.basket-freebie__actions {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: auto;
}

.basket-freebie__cta {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--accent);
  color: #03130f;
  border-radius: 8px;
  padding: 0.12rem 0.45rem;
  cursor: pointer;
  font-size: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  height: 26px;
  min-height: 26px;
  line-height: 1;
}

.basket-freebie__cta.visible {
  display: inline-flex;
}

.basket-freebie__cta:not(.visible) {
  display: none;
}

.basket-freebie::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(69, 245, 198, 0) 0%, rgba(69, 245, 198, 0.08) 35%, rgba(69, 245, 198, 0.18) 50%, rgba(69, 245, 198, 0.08) 65%, rgba(69, 245, 198, 0) 100%);
  transform: translateX(-100%);
  animation: freebie-swipe 2.2s ease-in-out infinite;
  pointer-events: none;
}

.basket-freebie.eligible::after {
  animation-duration: 1.6s;
  background: linear-gradient(120deg, rgba(69, 245, 198, 0) 0%, rgba(69, 245, 198, 0.12) 35%, rgba(69, 245, 198, 0.25) 50%, rgba(69, 245, 198, 0.12) 65%, rgba(69, 245, 198, 0) 100%);
}

.basket-freebie__cta.glow {
  box-shadow: 0 0 14px rgba(69, 245, 198, 0.9), 0 0 24px rgba(0, 180, 255, 0.7), 0 0 34px rgba(255, 0, 128, 0.6);
  animation: freebie-glow 1.4s ease-in-out infinite alternate;
  border-color: rgba(255, 255, 255, 0.5);
}

@keyframes freebie-swipe {
  0% {
    transform: translateX(-120%);
    opacity: 0.2;
  }
  40% {
    opacity: 0.7;
  }
  100% {
    transform: translateX(120%);
    opacity: 0.2;
  }
}

@keyframes freebie-glow {
  0% {
    box-shadow: 0 0 10px rgba(69, 245, 198, 0.6), 0 0 18px rgba(0, 180, 255, 0.5), 0 0 26px rgba(255, 0, 128, 0.4);
  }
  100% {
    box-shadow: 0 0 18px rgba(255, 0, 128, 0.8), 0 0 28px rgba(69, 245, 198, 0.9), 0 0 36px rgba(0, 180, 255, 0.6);
  }
}

.page-checkout .basket-summary,
.page-basket .basket-summary,
.page-profile .basket-summary,
.page-developer .basket-summary {
  display: none;
}

.basket-summary button {
  background: var(--accent);
  color: #03130f;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(69, 245, 198, 0.25);
  margin-left: auto;
  white-space: nowrap;
}

.basket-summary__details {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 auto;
}

.basket-summary__counts {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.summary-selected-toggle {
  background: rgba(15, 140, 127, 0.08);
  border: 1px solid rgba(15, 140, 127, 0.25);
  color: var(--accent);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.summary-selected-toggle.active {
  background: var(--accent);
  color: #fff;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding:
    calc(2.25rem + env(safe-area-inset-top, 0px))
    calc(1.75rem + env(safe-area-inset-right, 0px))
    calc(2.25rem + env(safe-area-inset-bottom, 0px))
    calc(1.75rem + env(safe-area-inset-left, 0px));
  z-index: 1100;
  overscroll-behavior: contain;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  touch-action: none;
}

.overlay.open {
  display: flex;
}

.overlay__panel {
  background: var(--panel);
  width: min(600px, 100%);
  max-height: calc(85vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
  max-height: calc(85svh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
  max-height: calc(85dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
  border-radius: 1.5rem;
  padding: 0.75rem 0.65rem 0.85rem;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65);
  overscroll-behavior: contain;
  margin-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  position: relative;
}

.overlay__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

.filter-group {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.6rem;
}

.filter-actions button {
  flex: 1;
  padding: 0.8rem;
  border-radius: 0.9rem;
  border: none;
  cursor: pointer;
}

.filter-actions .apply {
  background: var(--accent);
  color: #000;
}

.filter-actions .reset {
  background: #f1f1f1;
}

.filter-group label {
  font-size: 0.9rem;
  color: var(--muted);
}

.price-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.price-chip-group button {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}

.price-chip-group button.active {
  background: var(--accent);
  color: #03130f;
  border-color: transparent;
}

.sale-chip-group button {
  border-color: rgba(255, 255, 255, 0.2);
}

.sale-chip-group button.active {
  background: #ff8ab5;
  color: #1f0010;
  border-color: transparent;
}

.filter-group input,
.filter-group select {
  padding: 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: right 1rem center, right 0.75rem center;
  background-size: 10px 10px, 10px 10px;
  background-repeat: no-repeat;
}

.filter-group select::-webkit-scrollbar {
  width: 8px;
}

.filter-group select::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.filter-group select::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.filter-group select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, 0.08);
}

.filter-group select option {
  background: #090c12;
  color: var(--text);
}

.basket-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.basket-line {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.basket-line__remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(214, 69, 69, 0.5);
  background: #fff;
  color: var(--danger);
  font-size: 1.4rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding-bottom: 0.2rem;
}

.basket-line__remove:active {
  transform: scale(0.95);
}

.basket-line img {
  width: 52px;
  height: 52px;
  border-radius: 0.6rem;
  object-fit: cover;
}

.basket-line__info {
  flex: 1;
}

.overlay__footer {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.overlay__footer button {
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 0.9rem;
  cursor: pointer;
}

.preview-overlay .overlay__panel {
    width: min(520px, 100%);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    /* 1. Lighter Pop-up Panel Background (Point 1) */
    /* background-color: var(--card-bg); */
    background-color: #232425;
    /* Use the slightly lighter theme color */
    position: relative !important; /* <--- CRITICAL FIX: FORCE RELATIVE POSITIONING */
    /* Essential for positioning the close button */
    /* Add extra space at the top to prevent the X from overlapping content */
    padding-top: 10px; 
    padding-right: 25px; 
    padding-left: 25px; 
}

/* --- 2. Close Button Styling (FINAL FIX) --- */
.product-modal-close {
    position: absolute;
    top: 10px; /* Snug top position */
    right: 10px; /* Snug right position */
    background: rgba(255, 0, 0, 0.427);
    border: 1px solid rgb(0, 255, 157);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* hide native text */
    color: transparent;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 0;
    transform: none;
    transition: color 0.2s, text-shadow 0.2s, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.product-modal-close::after {
    content: '×';
    font-size: 2rem;
    color: #4dffc4;
    line-height: 1;
    display: block;
    transform: translateY(-2px);
}

/* 3. Ensure the hover effect is clear */
.product-modal-close:hover {
    color: #fff !important; /* <--- FORCE HOVER EFFECT */
    background: rgba(255, 0, 0, 0.65);
    border-color: rgba(255, 0, 0, 0.85);
    transform: scale(1.05);
}


/* --- 3. Button Text Color (Final Fix) --- */
/* Ensures the primary button inside the modal uses a dark text color */
.preview-overlay .preview-actions .primary {
    /* Set the text color to a dark shade for contrast against the green button */
    color: #111 !important; /* Forces dark gray text, guaranteeing visibility */
    /* If you have a --dark-text variable, you could use: color: var(--dark-text) !important; */
}

.preview-overlay {
  align-items: center;
  justify-content: center;
}

.preview-hero {
  background: #ffffff;
  border-radius: 1rem;
  padding: 0.75rem;
}

.preview-hero img {
  width: 100%;
  height: clamp(220px, 30vh, 320px);
  object-fit: contain;
  background: transparent;
  border-radius: 0.75rem;
}

.preview-headline {
  margin: 0.2rem 0 0.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.preview-title-btn {
  width: 100%;
  padding: 0.2rem 0;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.preview-title {
  flex: 1;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-title-btn[aria-expanded="true"] .preview-title {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

.preview-title__chevron {
  width: 0.8rem;
  height: 0.8rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.preview-title-btn[aria-expanded="true"] .preview-title__chevron {
  transform: rotate(135deg);
}

.preview-description {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  display: none;
  overflow: hidden;
}

.preview-description.is-hidden {
  display: none;
}

.preview-title-btn[aria-expanded="true"] + .preview-description {
  display: -webkit-box;
  -webkit-line-clamp: unset;
  -webkit-box-orient: vertical;
}

.preview-title-btn[aria-disabled="true"] {
  cursor: default;
}

.preview-title-btn[aria-disabled="true"] .preview-title__chevron {
  display: none;
}

.preview-content {
  position: relative;
  overflow-y: auto;
  padding-bottom: 1.25rem; /* base padding; modal override handles actions */
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.preview-details {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.preview-details dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.3rem 0.6rem;
  font-size: 0.9rem;
}

.preview-details dt {
  color: var(--muted);
}

.preview-details dd {
  margin: 0;
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-overflow: initial;
  overflow: visible;
}

.preview-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 0.6rem;
  padding: 0.75rem 0.15rem 0.15rem;
  background: linear-gradient(180deg, rgba(12, 17, 29, 0.05) 0%, rgba(12, 17, 29, 0.9) 50%, rgba(12, 17, 29, 0.95) 100%);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 22px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.preview-actions button {
  flex: 1;
  border: none;
  border-radius: 1rem;
  padding: 0.85rem;
  cursor: pointer;
}

.preview-actions .primary {
  background: var(--accent);
  color: #fff;
}

.preview-actions .secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.preview-overlay .overlay__panel {
  display: flex;
  flex-direction: column;
  max-height: calc(85vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
  max-height: calc(85svh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
  max-height: calc(85dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
  overflow: hidden;
  max-width: 100%;
  margin: calc(0.75rem + env(safe-area-inset-top, 0px)) auto calc(1.5rem + env(safe-area-inset-bottom, 0px));
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}


.preview-overlay .preview-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  position: relative;
  gap: 0.15rem;
}

.preview-overlay .preview-content .price-row {
  margin: 0;
  gap: 0.3rem;
}

.preview-overlay .product-modal__actions {
  position: sticky !important;
  bottom: 0 !important;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  margin: 0;
  width: 100%;
  border-radius: 0.5rem;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  flex-wrap: nowrap;
  background: linear-gradient(180deg, rgba(12, 17, 29, 0.05) 0%, rgba(12, 17, 29, 0.9) 50%, rgba(12, 17, 29, 0.95) 100%);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 22px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.preview-overlay .product-modal__actions button {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 1rem;
  margin: 0;
  border-radius: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.preview-overlay .product-modal__actions .icon-btn {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 0.35rem;
  padding: 0;
  box-sizing: border-box;
}

.preview-overlay .preview-details,
.preview-overlay .preview-details dl {
  max-width: 100%;
  overflow-x: hidden;
}

main.empty::before {
  content: "No products found. Try adjusting filters.";
  display: block;
  text-align: center;
  color: var(--muted);
  padding: 2rem 0;
}

.home-hero {
  min-height: calc(80vh - var(--header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.2rem 1rem 1.6rem;
  gap: 0.4rem;
  background: radial-gradient(circle at 50% 20%, rgba(69, 245, 198, 0.08), transparent 60%);
}

.home-hero p {
  max-width: 480px;
  color: var(--muted);
}

.home-hero a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #70ffe2);
  color: #03130f;
  font-weight: 600;
  box-shadow: 0 15px 30px rgba(69, 245, 198, 0.35);
}


@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.about-hero {
  max-width: 900px;
  margin: 2.5rem auto;
  padding: 2rem;
  background: rgba(17, 24, 42, 0.8);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.about-hero h1 {
  margin: 0.5rem 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.about-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--muted);
}

.about-content {
  max-width: 1000px;
  margin: 0 auto 6rem;
  padding: 0 1rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: rgba(15, 21, 36, 0.85);
  border-radius: 1.3rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.about-card h2 {
  margin-top: 0;
}

.about-card ul {
  padding-left: 1.2rem;
  margin: 0;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.about-cta {
  margin-top: 0.8rem;
  display: inline-flex;
  justify-content: center;
}

.basket-page,
.checkout-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page-auth,
.page-profile {
  min-height: 100vh;
}

.auth-wrapper {
  max-width: 480px;
  margin: 3rem auto 4rem;
  padding: 0 1rem;
}

.auth-card {
  background: rgba(15, 21, 36, 0.9);
  border-radius: 1.2rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
}

.auth-form input {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: rgba(3, 5, 10, 0.8);
  color: var(--text);
}

.auth-message {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
}

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

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

.auth-switch {
  text-align: center;
  margin-top: 1rem;
  color: var(--muted);
}

.auth-switch a {
  color: var(--accent);
}

.checkout-page {
  padding-bottom: 220px;
}

.history-page {
  max-width: 900px;
  margin: 0 auto 4rem;
  padding: 1.5rem 1rem 3rem;
}

.history-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.history-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.history-hero h1 {
  margin: 0 0 0.8rem;
}

.history-hero p {
  margin: 0 auto 1rem;
  max-width: 620px;
  color: var(--muted);
}

.history-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: #03130f;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.profile-page {
  max-width: 900px;
  margin: 0 auto 4rem;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.profile-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  background: radial-gradient(circle at top left, rgba(69, 245, 198, 0.25), rgba(5, 10, 18, 0.95));
  border-radius: 1.2rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  min-height: 180px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-card-link:hover {
  transform: translateY(-4px);
  border-color: rgba(69, 245, 198, 0.5);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.profile-shortcuts .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.3rem;
}

.profile-card-link h3 {
  margin: 0 0 0.4rem;
}

.profile-card-link p {
  margin: 0 0 0.4rem;
  color: var(--muted);
}

.profile-card-link.developer-link {
  background: radial-gradient(circle at top right, rgba(87, 132, 255, 0.3), rgba(5, 8, 14, 0.95));
}

.history-preview {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.4rem;
}

.history-preview span {
  width: 48px;
  height: 48px;
  border-radius: 0.6rem;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.history-preview .preview-empty {
  color: var(--muted);
  margin: 0;
}

.profile-card {
  background: rgba(15, 21, 36, 0.9);
  border-radius: 1.5rem;
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-main .avatar-chip {
  border-width: 2px;
}

.profile-email {
  color: var(--muted);
  margin: 0.2rem 0 0;
}

.profile-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: flex-end;
}

.profile-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.profile-panel {
  background: rgba(15, 21, 36, 0.9);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 200px;
}

.profile-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.profile-entry {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
}

.profile-entry header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.profile-entry header span {
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-entry__total {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-entry__total span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.profile-entry ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.profile-entry li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.profile-entry li span {
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-empty {
  color: var(--muted);
  margin: 0;
}

.page-developer {
  min-height: 100vh;
}

.developer-dashboard {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.developer-header h1 {
  margin-bottom: 0.2rem;
}

.developer-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.2rem;
}

.developer-list {
  background: rgba(15, 21, 36, 0.95);
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 70vh;
  overflow: auto;
}

.developer-user {
  border: 1px solid transparent;
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.developer-user.active {
  border-color: rgba(69, 245, 198, 0.6);
  background: rgba(69, 245, 198, 0.08);
}

.developer-user small {
  color: var(--muted);
}

.developer-detail {
  background: rgba(15, 21, 36, 0.95);
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem;
  min-height: 400px;
}

.developer-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.developer-meta div {
  flex: 1;
  min-width: 140px;
}

.developer-meta span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.developer-wishlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}

.wishlist-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.8rem;
  padding: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.15);
}

.wishlist-card img {
  width: 48px;
  height: 48px;
  border-radius: 0.6rem;
  object-fit: cover;
}

.wishlist-card span {
  font-size: 0.85rem;
}

.developer-empty {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 900px) {
  .developer-grid {
    grid-template-columns: 1fr;
  }
}

.table-like {
  width: 100%;
  border-collapse: collapse;
}

.table-like th,
.table-like td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}


.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.coupon-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.coupon-input {
  display: flex;
  gap: 0.6rem;
}

.coupon-input input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.coupon-input button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  cursor: pointer;
}

.coupon-message {
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

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

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

.checkout-item {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.checkout-item img {
  width: 48px;
  height: 48px;
  border-radius: 0.6rem;
  object-fit: cover;
  background: #f1f1f1;
}

.checkout-summary {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 8, 12, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.65rem clamp(0.75rem, 4vw, 2rem);
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.45);
  z-index: 970;
  color: var(--text);
}

.checkout-summary__totals {
  display: flex;
  gap: 0.75rem;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.checkout-summary__actions {
  display: flex;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.checkout-summary__actions button {
  min-width: 150px;
  padding: 0.55rem 0.9rem;
}

.summary-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.9rem;
  min-width: 110px;
}

.summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
}

.checkout-summary__totals .summary-row {
  flex: 1 1 120px;
  min-width: 140px;
}

.checkout-summary .primary {
  margin-top: 0;
}

@media (max-width: 768px) {
  .checkout-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .checkout-summary__totals {
    width: 100%;
    gap: 0.75rem;
  }

  .checkout-summary__actions {
    width: 100%;
    flex-direction: column;
    gap: 0.6rem;
  }

  .checkout-summary__actions button {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .site-header {
    padding: 0 2rem;
  }

  .sticky-controls,
  .category-bar-wrapper,
  main {
    padding-left: calc((100vw - var(--max-content-width)) / 2 + 1rem);
    padding-right: calc((100vw - var(--max-content-width)) / 2 + 1rem);
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}
.site-footer {
  width: 100%;
  background: #0e0e11;
  color: #ccc;
  padding: 18px 0;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  text-align: center;
  line-height: 1.25;
}

.footer-shortcuts,
.footer-links a {
  margin: 0 6px;
  font-size: 0.8rem;
  color: #88c9ff;
  text-decoration: none;
}

.footer-container .footer-shortcuts::after {
  content: '';
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin: 6px 0 8px;
}

.site-footer p {
  margin: 2px 0;
  line-height: 1.2;
}

.footer-meta {
  display: block;
  font-size: 0.7rem;
  color: #9ca3b5;
  line-height: 1.15;
  margin: 1px 0;
}

.footer-shortcuts a {
  margin: 0 10px;
  text-decoration: none;
}

.footer-shortcuts a:hover,
.footer-links a:hover {
  text-decoration: underline;
}

/* Cookie consent */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(5, 8, 14, 0.95);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: start;
  z-index: 1200;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}

.cookie-banner__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.88rem;
}

.cookie-banner__actions {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.cookie-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 10px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 0.82rem;
}

.cookie-btn--primary {
  background: var(--accent);
  color: #03130f;
  border-color: transparent;
}

.cookie-btn--secondary {
  background: rgba(255, 255, 255, 0.05);
}

.cookie-link,
.cookie-manage-link {
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
}

.cookie-prefs {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  padding: 1rem;
}

.cookie-prefs.open {
  display: flex;
}

.cookie-prefs__panel {
  background: #0f141f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  width: min(420px, 92vw);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  color: var(--text);
}

.cookie-prefs__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cookie-prefs__header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cookie-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.cookie-prefs__body {
  margin: 0.75rem 0;
  display: grid;
  gap: 0.5rem;
}

.cookie-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.cookie-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.cookie-prefs__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .cookie-banner {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0.75rem 1rem;
  }
  .cookie-banner__actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
}

/* Ensure footer styling is always applied across breakpoints */
@media (min-width: 0) {
  .site-footer {
    width: 100% !important;
    background: #0e0e11 !important;
    color: #ccc !important;
    padding: 18px 0 !important;
    margin-top: 40px !important;
    text-align: center;
  }
  .footer-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 12px !important;
    line-height: 1.35 !important;
  }
  .footer-links a {
    margin: 0 6px !important;
    font-size: 0.8rem !important;
    color: #88c9ff !important;
    text-decoration: none;
  }
  .footer-links a:hover {
    text-decoration: underline;
  }
}

.page-products main {
  max-width: none;
  width: 100%;
  margin: 0 auto 4rem;
  padding-left: clamp(.1rem, 4vw, 1rem);
  padding-right: clamp(.1rem, 4vw, 1rem);
}

.page-products .sticky-controls {
  max-width: none;
  width: 100%;
  padding-left: clamp(1rem, 4vw, 4rem);
  padding-right: clamp(1rem, 4vw, 4rem);
}

.page-products .category-bar-wrapper {
  max-width: none;
  width: 100%;
  padding-left: clamp(1rem, 4vw, 4rem);
  padding-right: clamp(1rem, 4vw, 4rem);
}

@media (max-width: 540px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.enquiry-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1200;
}

.enquiry-modal.open {
  display: flex;
}

.enquiry-modal__panel {
  width: min(600px, 100%);
  max-height: 90vh;
  background: var(--panel);
  border-radius: 1.25rem;
  padding: 1rem 1.25rem 1.5rem;
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.enquiry-modal__body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enquiry-summary table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.enquiry-summary th,
.enquiry-summary td {
  padding: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.enquiry-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.enquiry-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.enquiry-form input,
.enquiry-form textarea {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.65rem 0.75rem;
}

.enquiry-form__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.enquiry-history {
  max-width: 900px;
  margin: 2rem auto 4rem;
  padding: 0 1rem;
}

#enquiryHistory {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.enquiry-history h2 {
  margin-bottom: 0.8rem;
}

.enquiry-history__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enquiry-history__card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.enquiry-history__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.history-timestamp {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.history-timestamp span {
  color: var(--muted);
  font-size: 0.85rem;
}

.history-total {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  align-items: flex-end;
}

.history-total span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.enquiry-history__items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.history-item img {
  width: 48px;
  height: 48px;
  border-radius: 0.6rem;
  object-fit: cover;
}

.history-item__info {
  flex: 1;
}

.history-item__info p {
  margin: 0;
  font-size: 0.9rem;
}

.history-item__info small {
  color: var(--muted);
}

.enquiry-history__empty {
  color: var(--muted);
  margin: 0;
}

/* --- FINAL, AGGRESSIVE FAQ STYLES (Use this block in styles.css) --- */

.faq-item summary {
  /* 1. AGGRESSIVELY DISABLE DEFAULT MARKER */
  list-style: none !important;
  list-style-type: none !important;

  /* 2. FORCE FLEXBOX LAYOUT (Required for arrow positioning) */
  display: flex !important; 
  justify-content: space-between !important; 
  align-items: center;

  /* Standard styling */
  padding: 15px 20px;
  cursor: pointer;
  outline: none;
  font-weight: bold;
}

/* Fallback/Specific marker hiding */
.faq-item summary::-webkit-details-marker {
  display: none !important; 
}
.faq-item summary::marker {
  content: '' !important; 
}

/* 3. Custom Arrow Icon */
.faq-item summary::after {
  content: '>'; 
  font-size: 1.2rem;
  font-weight: 900;
  transition: transform 0.2s ease-in-out; 
  color: var(--accent); 
  /* Removed margin-left: 10px; to keep it right next to the text, as requested */
  flex-shrink: 0; 
}

/* 4. Rotation on Open */
.faq-item[open] summary::after {
  /* Rotates the > 90 degrees clockwise */
  transform: rotate(90deg); 
}

/* Styling for the expanded content */
.faq-content {
  padding: 0 20px 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Add this or update your existing .product-modal .modal-content styles in styles.css */

.product-modal .modal-content {
  background-color: var(--card-bg); /* Use the card background color */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Add a slight border for definition */
  border-radius: 1rem;
  padding: 1.5rem;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative; /* Needed for positioning the X button */
  /* Ensure text color inside is visible */
  color: var(--text);
}

/* Optional: Make the dark overlay slightly less transparent to focus on the modal */
.product-modal {
    background-color: rgba(0, 0, 0, 0.7); /* Adjust from 0.8 if needed, or keep it dark */
}

/* --- Styling for the Product Results Meta message --- */
#resultsMeta {
    /* Example: Make the text slightly larger (10% bigger) */
    font-size: 1.1em; 
    
    /* Example: Make the overall text slightly bolder */
    font-weight: 500; 
    
    /* Optional: Add a little extra margin below the text */
    margin-bottom: 20px;
}

/* Home featured grid */
.home-featured {
    max-width: var(--max-content-width);
    margin: 32px auto;
    padding: 0 12px;
}

.home-featured__header {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 12px;
}

.home-featured__header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.home-featured__header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.home-featured__grid {
  display: flex;
  flex-flow: row nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 4px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  background: transparent;
}

.home-featured__grid.products-grid {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
}

.home-featured__grid .product-card {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
  scroll-snap-align: start;
}

.home-featured__grid .product-card img {
  object-fit: cover;
}

@media (min-width: 1024px) {
  .home-featured__grid {
    background: transparent !important;
    padding: 0;
    border-radius: 0;
    mask-image: none;
    min-height: auto;
  }
}

.home-featured__grid::-webkit-scrollbar {
  height: 6px;
}

.home-featured__grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.category-bar::-webkit-scrollbar {
  display: none;
}



/* --- CRITICAL: MODAL CONTENT OVERFLOW FIX --- */
/* This targets the main content area of the modal to prevent it from growing too wide */
.product-modal__content {
    /* Ensures content does not exceed modal width */
    max-width: 100%;
    /* Prevents content (like the action bar) from leaking outside the visible area */
    overflow-x: hidden; 
}
/* --- CRITICAL: MODAL BODY OVERFLOW FIX (Desktop Containment) --- */
/* Target the main scrollable/content container of the modal */
.product-modal__body {
    /* Prevents horizontal scrolling/overflow for elements like the action bar */
    overflow-x: hidden;
    /* Ensures the element respects its boundaries */
    box-sizing: border-box; 
    /* Ensures it uses 100% of the space allotted by the main modal container */
    width: 100%; 
}

/* Ensure the wrapper around the content also respects constraints */
.product-modal__content {
    max-width: 100%;
    /* Prevents its children (like the action bar) from leaking outside */
    overflow-x: hidden; 
}

/* --- CRITICAL: MODAL WRAPPER CONTAINMENT FIX (Desktop View) --- */
/* Target the main container that defines the modal's size */
.product-modal__preview,
.product-modal__container {
    /* Ensures nothing inside can push past the defined width */
    max-width: 100%;
    /* Hides any content that attempts to leak horizontally */
    overflow-x: hidden; 
}
/* --- CRITICAL: PRODUCT DETAILS CONTENT FIX --- */
/* Target the column holding the text, price, and buttons */
.product-modal__details {
    /* Ensures this element can shrink when necessary */
    flex-shrink: 1; 
    /* CRITICAL: Prevents content (like long product names) from forcing an overflow width */
    min-width: 0; 
}

/* --- CRITICAL: Remove margin from content above action bar --- */
/* This targets the last element inside the modal details wrapper, 
   which is forcing the gap above the action bar. */
.product-modal__details > *:last-child:not(.product-modal__actions) {
    margin-bottom: 0 !important; 
}
/* --- CRITICAL: MODAL WRAPPER FIX (Suppress Scrollbar) --- */
.product-modal__preview,
.product-modal__container {
    /* Hides any vertical content that attempts to leak, eliminating the unwanted scrollbar */
    overflow-y: hidden; 
}

/* --- CSS to Center the Third-Party Counter - START --- */
/* --- CSS to Center Counter A and HIDE Counter B --- */

/* 1. Wrapper to center Counter A (the image) */
#counter-block-wrapper {
    width: 100%;
    /* This centers the inline image element */
    text-align: center; 
    
    /* Adds spacing */
    margin-top: 20px;
    padding-bottom: 10px;
}

/* 2. Rule to center the IMAGE badge (Counter A) */
#counter-block-wrapper img {
    /* Ensures the image can be centered by text-align: center; */
    display: inline-block; 
    margin: 0 auto;
}

/* 3. CRITICAL: HIDES the stubborn Counter B element (for stats tracking only) */
#sfc275rg56w386jn47s87w1z4wae3wrxbky {
    /* FORCES the browser to ignore its position and hide it */
    display: none !important; 
    visibility: hidden !important;
    
    /* Keep these overrides in case the script tries to inject a massive container */
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
}

/* --- CSS Update: HIDE the NEW Counter B element --- */

/* Keep the previous rules for #counter-block-wrapper and #counter-block-wrapper img */

/* CRITICAL: HIDES the NEW stubborn Counter B element (for stats tracking only) */
/* ... Keep the centering rules for #counter-block-wrapper and img ... */

/* --- CONSOLIDATED CSS TO HIDE ALL Counter B TRACKERS --- */

/* Selects ALL the unique Counter B IDs and applies the hiding rules */
#sfcngbxe6tsp5f81l1gak6b5py5ufgnwea3, /* Profile Page ID */
#sfcproductspageid,                  /* Products Page ID */
#sfcaboutpageid                      /* About Page ID */
{
    /* CRITICAL: Hides the element and removes it from flow */
    display: none !important; 
    visibility: hidden !important;

    /* Fallback overrides against aggressive external styling */
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    
    /* Ensure no residual box model properties interfere */
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* --- CSS to Center the Third-Party Counter - END --- */

