* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #212121;
  background: #f5f5f5;
}

body {
  margin: 0;
  background: #ffffff;
}

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

button,
input,
textarea {
  font: inherit;
}

/* Header */
.header {
  background: #ffffff;
  border-bottom: 1px solid #d9dde6;
  box-shadow: 0 10px 30px rgba(33, 33, 33, 0.07);
  position: sticky;
  top: 0;
  z-index: 100;
}

.utility-bar {
  border-bottom: 1px solid #edf0f5;
  font-size: 0.82rem;
  color: #4b5563;
  background: #f8fafc;
}

.utility-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.4rem 1.5rem;
}

.utility-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.utility-links a {
  color: #1b4d9b;
  font-weight: 600;
}

.utility-links a:hover {
  text-decoration: underline;
}

.header-top {
  display: flex;
  justify-content: stretch;
  align-items: center;
  gap: 1.1rem;
  padding: 0.95rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  height: 50px;
  width: auto;
  display: block;
}

.logo-link {
  display: inline-block;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.category-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.category-menu {
  flex: 0 0 auto;
  width: 98px;
  background: #f8fafc;
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  color: #374151;
  cursor: pointer;
  font-size: 0.86rem;
  line-height: 1.2;
  text-align: left;
  padding: 0.58rem 0.7rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.category-menu:hover {
  background: #eef4ff;
  border-color: #b8c7e8;
  color: #111827;
}

.category-menu-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  width: min(1040px, calc(100vw - 2rem));
  max-height: min(75vh, 640px);
  overflow: auto;
  padding: 1rem;
  border: 1px solid #d9dde6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.18);
  z-index: 200;
}

.category-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}

.category-menu-group {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.category-menu-heading,
.category-menu-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: #172033;
  cursor: pointer;
  text-align: left;
}

.category-menu-heading {
  padding: 0.2rem 0;
  font-weight: 800;
}

.category-menu-link {
  display: block;
  padding: 0.22rem 0;
  color: #4b5563;
  font-size: 0.88rem;
}

.category-menu-heading:hover,
.category-menu-link:hover {
  color: #1b4d9b;
  text-decoration: underline;
}

.search-bar {
  display: flex;
  gap: 0;
  flex: 1;
  min-width: 260px;
  border: 2px solid #172033;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.1);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
  border-color: #3665f3;
  box-shadow: 0 0 0 4px rgba(54, 101, 243, 0.14), 0 10px 26px rgba(17, 24, 39, 0.12);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1.15rem;
  border: 0;
  font-size: 1rem;
  background: #ffffff;
  outline: none;
}

.search-bar select {
  flex: 0 0 190px;
  padding: 0 0.85rem;
  border: 0;
  border-left: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  outline: none;
}

.search-button {
  background: linear-gradient(135deg, #3665f3 0%, #2148c6 100%);
  color: white;
  border: 0;
  padding: 0.8rem 2.35rem;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0.16rem;
  min-width: 122px;
  box-shadow: 0 6px 14px rgba(54, 101, 243, 0.28);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.search-button:hover {
  background: linear-gradient(135deg, #2857df 0%, #183aa7 100%);
  box-shadow: 0 8px 18px rgba(54, 101, 243, 0.36);
  transform: translateY(-1px);
}

.search-button:active {
  transform: translateY(0);
}

.nav-categories {
  display: flex;
  gap: 0;
  padding: 0 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid #eef1f5;
  overflow-x: auto;
}

.nav-item {
  flex-shrink: 0;
  padding: 0.72rem 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #555555;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-item:hover {
  color: #111111;
}

.nav-item.active {
  border-bottom-color: #3665f3;
  color: #111827;
}

/* Main Layout */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}

.market-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  min-height: 270px;
  overflow: hidden;
  background: #f7d7c4;
}

.market-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem clamp(1.25rem, 4vw, 3.5rem);
}

.market-hero-copy h1 {
  max-width: 620px;
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.market-hero-copy p:not(.eyebrow) {
  max-width: 520px;
  margin: 0 0 1.25rem;
  color: #2f2f2f;
  font-size: 1.02rem;
}

.button-dark {
  background: #111111;
  color: #ffffff;
}

.button-dark:hover {
  background: #333333;
}

.market-hero-visual {
  position: relative;
  min-height: 270px;
}

.market-hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-showcase {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 1rem;
  padding: 1.75rem 0;
  text-align: center;
}

.category-shortcut {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: #111111;
}

.category-shortcut:hover strong {
  text-decoration: underline;
}

.shortcut-image {
  width: min(100%, 128px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #f2f2f2;
}

.shortcut-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shortcut-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fde8e8, #eef4ff);
  font-size: clamp(2rem, 5vw, 3rem);
}

.category-shortcut strong {
  max-width: 100%;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}

.hero-deals {
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 1.35rem 0 0;
}

.deals-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.deals-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #212121;
}

.deals-header p {
  margin: 0.5rem 0 0;
  color: #757575;
  font-size: 0.95rem;
}

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

.product-card {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: #d4d4d4;
}

.card-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f3f3f3;
  overflow: hidden;
  border-radius: 6px;
}

.card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.discount-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #111111;
  color: white;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
}

.card-content {
  padding: 0.7rem 0.15rem 0.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  margin: 0 0 0.5rem;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.3;
  color: #212121;
  min-height: 2.6em;
}

.product-name a:hover {
  text-decoration: underline;
}

.product-desc {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #757575;
  line-height: 1.3;
}

.product-rating {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #f57f17;
}

.product-pricing {
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-grow: 1;
}

.current-price {
  font-weight: 700;
  font-size: 1.15rem;
  color: #212121;
}

.original-price {
  font-size: 0.85rem;
  color: #999;
  text-decoration: line-through;
}

.add-cart-btn {
  width: 100%;
  padding: 0.65rem;
  font-size: 0.9rem;
}

/* Sidebar Cart */
.sidebar-cart {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1.1rem;
  height: fit-content;
  position: sticky;
  top: 172px;
}

.cart-widget h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.cart-items {
  margin-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.cart-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-button {
  background: #f97316;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.checkout-options {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.checkout-options fieldset {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.checkout-options legend {
  margin-bottom: 0.15rem;
  color: #212121;
  font-size: 0.9rem;
  font-weight: 800;
}

.shipping-quote {
  display: grid;
  gap: 0.45rem;
}

.shipping-quote label {
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 700;
}

.shipping-quote div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.shipping-quote input {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d1d8e3;
  border-radius: 6px;
  outline: none;
}

.shipping-quote input:focus {
  border-color: #3665f3;
  box-shadow: 0 0 0 3px rgba(54, 101, 243, 0.12);
}

.shipping-quote p {
  margin: 0;
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.35;
}

.location-button {
  justify-self: start;
  border: 0;
  border-radius: 4px;
  background: #eef4ff;
  color: #1b4d9b;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.42rem 0.62rem;
}

.location-button:hover:not(:disabled) {
  background: #dbe8ff;
}

.location-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.shipping-rates {
  display: grid;
  gap: 0.6rem;
}

.checkout-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fbfcff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.checkout-option:hover,
.checkout-option:has(input:checked) {
  border-color: #3665f3;
  background: #f2f6ff;
  box-shadow: 0 6px 18px rgba(54, 101, 243, 0.09);
}

.checkout-option input {
  accent-color: #3665f3;
}

.checkout-option span {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.checkout-option strong {
  font-size: 0.9rem;
}

.checkout-option small {
  color: #6b7280;
  font-size: 0.78rem;
}

.checkout-option em {
  color: #111827;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.cart-summary {
  margin-bottom: 1rem;
}

.summary-row,
.total-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.42rem 0;
}

.summary-row {
  color: #5f6978;
  font-size: 0.9rem;
}

.summary-row strong {
  color: #212121;
}

.total-row {
  margin-top: 0.45rem;
  padding-top: 0.85rem;
  font-weight: 600;
  border-top: 1px solid #e0e0e0;
}

.button {
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.button-primary {
  background: #e53238;
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: #c41c1c;
}

.button-secondary {
  background: #f5f5f5;
  color: #212121;
  border: 1px solid #e0e0e0;
}

.button-secondary:hover {
  background: #eeeeee;
}

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

.full-width {
  width: 100%;
}

.checkout-status {
  min-height: 1.2rem;
  margin: 0.65rem 0 0;
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.35;
}

/* Product Detail */
.product-detail-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2.75rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #555555;
  font-size: 0.88rem;
}

.breadcrumb a {
  color: #0654ba;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.listing-shell {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(380px, 0.72fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.75rem;
}

.gallery-panel {
  min-width: 0;
}

.main-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main-product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  background: #f3f5f7;
  overflow: hidden;
}

.image-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.82);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.purchase-panel {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
  padding: 0.4rem 0.25rem;
}

.seller-strip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0 0.85rem;
  border-bottom: 1px solid #e8e8e8;
  color: #555555;
  font-size: 0.9rem;
}

.seller-strip strong {
  color: #111111;
}

.purchase-panel h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.detail-subtitle {
  margin: -0.55rem 0 0;
  color: #666666;
}

.listing-facts {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 1rem;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
}

.listing-facts div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: center;
}

.listing-facts dt {
  color: #555555;
}

.listing-facts dd {
  margin: 0;
  font-weight: 600;
}

.listing-facts select {
  width: 74px;
  margin: 0 0.65rem 0 0;
  padding: 0.45rem;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  background: #ffffff;
}

.availability {
  color: #666666;
  font-size: 0.9rem;
  font-weight: 400;
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.35rem 0;
}

.price-label {
  color: #555555;
}

.price-block strong {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
}

.detail-original-price {
  color: #777777;
  text-decoration: line-through;
}

.purchase-actions {
  display: grid;
  gap: 0.65rem;
}

.buy-now-button,
.detail-cart-button,
.watch-button {
  border-radius: 22px;
  font-size: 1rem;
}

.buy-now-button {
  background: #0053a0;
  color: #ffffff;
}

.detail-cart-button {
  background: #3665f3;
  color: #ffffff;
}

.watch-button {
  background: #ffffff;
  color: #3665f3;
  border: 1px solid #3665f3;
}

.shipping-box {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fbff;
}

.shipping-box div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1rem;
}

.shipping-box span {
  color: #555555;
}

/* Affiliate listings: the buy buttons are links to the brand's site. */
a.buy-now-button,
a.buy-bar-button {
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.affiliate-disclosure {
  margin: 0;
  color: #555555;
  font-size: 0.85rem;
}

.detail-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

.detail-section,
.seller-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.25rem;
}

.detail-section h2,
.seller-card h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.specifics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid #e8e8e8;
}

.specifics-grid div {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) 1fr;
  min-height: 46px;
}

.specifics-grid dt,
.specifics-grid dd {
  margin: 0;
  padding: 0.75rem;
  border-bottom: 1px solid #e8e8e8;
}

.specifics-grid dt {
  background: #f6f6f6;
  color: #555555;
  font-weight: 600;
}

.specifics-grid dd {
  background: #ffffff;
}

.seller-card {
  display: grid;
  gap: 0.5rem;
}

.seller-card > strong {
  font-size: 1.05rem;
}

.seller-card > span {
  color: #065f46;
  font-weight: 700;
}

.seller-card p {
  margin: 0.35rem 0 0.75rem;
  color: #666666;
}

.description-section {
  margin-top: 1.5rem;
}

.description-section p {
  margin: 0;
  color: #333333;
}

.description-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: #555555;
}

.description-body {
  position: relative;
  color: #333333;
  line-height: 1.6;
}

.description-body p + p {
  margin-top: 0.6rem;
}

.description-body h3 {
  margin: 1.2rem 0 0.45rem;
  font-size: 1rem;
}

.description-body h3:first-child {
  margin-top: 0;
}

.description-body ul {
  margin: 0;
  padding-left: 1.25rem;
}

.description-body li + li {
  margin-top: 0.25rem;
}

/* Long descriptions: the first lines, fading out, until "Show full description". */
.description-body.is-collapsed {
  max-height: 14rem;
  overflow: hidden;
}

.description-body.is-collapsed::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5rem;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--surface, #ffffff));
  pointer-events: none;
}

.description-toggle {
  margin-top: 0.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent, #2563eb);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.description-toggle:hover {
  text-decoration: underline;
}

.description-toggle[hidden] {
  display: none;
}

/* Admin Pages */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  margin: 0.75rem 0 0.5rem;
  font-size: clamp(2rem, 3vw, 3rem);
}

.admin-page {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.admin-cta,
.admin-form-actions,
.table-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-stat {
  display: grid;
  gap: 0.15rem;
  min-height: 104px;
  padding: 1.15rem;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-stat span {
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 800;
  color: #e53238;
}

.admin-stat strong {
  color: #555555;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.35rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f5f5f5;
  overflow-x: auto;
}

.admin-tab {
  flex: 1 0 150px;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #424242;
  cursor: pointer;
  font-weight: 800;
}

.admin-tab.active {
  background: #ffffff;
  color: #e53238;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-panel {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.panel-header p {
  margin: 0.75rem 0 1.5rem;
  color: #757575;
}

.admin-preview,
.admin-products {
  margin-top: 2rem;
}

.admin-preview h3,
.admin-products h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.preview-card {
  display: grid;
  gap: 1rem;
}

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

.card {
  display: grid;
  overflow: hidden;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  background: #ffffff;
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #f2f2f2;
}

.card-body {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
}

.card-body h3 {
  margin: 0;
  font-size: 1rem;
}

.card-body p {
  margin: 0.35rem 0 0;
  color: #666666;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.meta-pill {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #f2f4f7;
  color: #444444;
  font-size: 0.82rem;
  font-weight: 700;
}

.price {
  font-weight: 800;
}

label {
  display: block;
  margin-bottom: 1rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  margin-top: 0.5rem;
  background: #f5f5f5;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.admin-message {
  margin-top: 1rem;
  color: #065f46;
  font-weight: 600;
}

.admin-message.is-error {
  color: #b91c1c;
}

.admin-crud-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0 1rem;
  padding: 1rem;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: #fbfbfb;
}

.image-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.5rem 0 1rem;
}

.image-picker .button {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.image-picker-status {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.875rem;
  color: #555555;
}

.image-picker-status:empty {
  display: none;
}

.image-picker-status.is-error {
  color: #b91c1c;
}

.admin-crud-form .admin-form-actions {
  align-self: end;
  margin-bottom: 1rem;
}

.admin-table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.admin-table th,
.admin-table td {
  padding: 0.9rem;
  border-bottom: 1px solid #eeeeee;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: #f7f7f7;
  color: #555555;
  font-size: 0.86rem;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.danger-button {
  background: #fff1f2;
  color: #b91c1c;
  border: 1px solid #fecdd3;
}

.category-admin-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.category-admin-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #ffffff;
}

.category-admin-card img {
  width: 72px;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  background: #f2f2f2;
}

.category-admin-card div:nth-child(2) {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.category-admin-card strong,
.category-admin-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-admin-card span {
  color: #666666;
}

.category-admin-card small {
  color: #4b5563;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.auth-body {
  min-height: 100vh;
  background: #f6f7f9;
  overflow-x: hidden;
}

.compact-header {
  width: min(100%, 1180px);
  padding: 1rem 1.5rem 0;
}

.compact-header .logo {
  width: 150px;
}

.auth-page {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 450px);
  gap: clamp(1.75rem, 5vw, 5.5rem);
  align-items: center;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) 1.5rem 4rem;
}

.auth-hero {
  min-width: 0;
}

.auth-hero h1 {
  max-width: 720px;
  margin: 0.4rem 0 1.35rem;
  font-size: clamp(2.2rem, 4.6vw, 4.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.auth-showcase {
  position: relative;
  width: min(100%, 650px);
  aspect-ratio: 16 / 9;
  margin: 1.25rem 0 1.3rem;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  background: #e9edf2;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.14);
}

.auth-showcase-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-deal-card {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.12rem;
  min-width: 150px;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.auth-deal-card span,
.auth-deal-card small {
  color: #626262;
  font-weight: 700;
}

.auth-deal-card strong {
  font-size: 1.55rem;
  line-height: 1;
}

.auth-mini-products {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 0.55rem;
}

.auth-mini-products img {
  width: 72px;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border: 3px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.auth-benefits span {
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 6px;
  background: #ffffff;
  color: #333333;
  font-weight: 700;
}

.auth-panel {
  position: relative;
  width: 100%;
  background: #ffffff;
  border: 1px solid #dedede;
  border-radius: 8px;
  padding: clamp(1.35rem, 3vw, 2rem);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #e53238, #f5af02, #86b817, #3665f3);
}

.auth-copy h1 {
  margin: 0.55rem 0 0.55rem;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  line-height: 1.12;
}

.auth-copy p:last-child {
  margin: 0 0 1.5rem;
  color: #626262;
}

.eyebrow {
  margin: 0;
  color: #e53238;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  background: #f2f3f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}

.auth-tab {
  border: 0;
  border-radius: 4px;
  padding: 0.72rem 0.75rem;
  background: transparent;
  color: #424242;
  cursor: pointer;
  font-weight: 700;
}

.auth-tab.active {
  background: #ffffff;
  color: #e53238;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-form {
  display: grid;
  gap: 0.25rem;
}

.auth-form label {
  margin-bottom: 0.9rem;
  color: #333333;
  font-weight: 700;
}

.auth-form input {
  margin-top: 0.45rem;
  background: #ffffff;
  border-color: #cfcfcf;
  min-height: 46px;
}

.auth-form input:focus {
  outline: none;
  border-color: #3665f3;
  box-shadow: 0 0 0 3px rgba(54, 101, 243, 0.16);
}

.hidden {
  display: none !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #757575;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e0e0e0;
}

.google-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  min-height: 46px;
  background: #ffffff;
  color: #212121;
  border: 1px solid #d6d6d6;
}

.google-signin-container {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 44px;
}

.google-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #d6d6d6;
  color: #4285f4;
  font-weight: 800;
}

.form-message {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: #b91c1c;
  font-weight: 700;
}

.auth-terms {
  margin: 0.4rem 0 0;
  color: #757575;
  font-size: 0.82rem;
  text-align: center;
}

.dashboard-page {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.dashboard-hero h1 {
  margin: 0.35rem 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.dashboard-hero p:last-child {
  margin: 0;
  color: #757575;
}

.dashboard-stat {
  min-width: 140px;
  padding: 1.25rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
  background: #ffffff;
}

.dashboard-stat span {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: #e53238;
  line-height: 1;
}

.dashboard-stat small {
  color: #757575;
  font-weight: 700;
}

.account-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
}

.option-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 96px;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.option-tile:hover {
  border-color: #e53238;
  box-shadow: 0 2px 8px rgba(229, 50, 56, 0.12);
  transform: translateY(-1px);
}

.option-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #fef2f2;
  color: #e53238;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
}

.option-tile strong,
.option-tile small {
  display: block;
}

.option-tile strong {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.option-tile small {
  color: #757575;
  line-height: 1.35;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 1.25rem;
  padding-top: 1.5rem;
}

.dashboard-panel {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
}

.profile-list {
  margin: 0;
}

.profile-list div {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eeeeee;
}

.profile-list div:last-child {
  border-bottom: none;
}

.profile-list dt {
  color: #757575;
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-list dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.order-list {
  display: grid;
  gap: 0.75rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.order-item div {
  display: grid;
  gap: 0.2rem;
}

.order-item span {
  color: #757575;
}

.order-item > span {
  color: #212121;
  font-weight: 800;
}

/* Footer */
footer {
  border-top: 1px solid #dce3ee;
  padding: 1.8rem 1.5rem;
  text-align: center;
  color: #5d6675;
  font-size: 0.9rem;
  background:
    linear-gradient(90deg, rgba(229, 50, 56, 0.08), rgba(54, 101, 243, 0.08)),
    #f8fafc;
}

footer p {
  max-width: 1400px;
  margin: 0 auto;
  font-weight: 600;
  letter-spacing: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

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

  .listing-shell,
  .detail-lower-grid,
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-page {
    max-width: 760px;
  }

  .auth-hero {
    text-align: center;
  }

  .auth-showcase {
    margin-right: auto;
    margin-left: auto;
  }

  .auth-benefits {
    justify-content: center;
  }

  .sidebar-cart {
    position: static;
  }

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

@media (max-width: 820px) {
  .auth-page {
    max-width: 100%;
  }

  .auth-showcase {
    width: 100%;
  }

  .auth-benefits {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .auth-benefits span {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .utility-inner {
    padding: 0.45rem 1rem;
    overflow-x: auto;
  }

  .utility-links {
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
  }

  .utility-right {
    display: none;
  }

  .header-top {
    align-items: stretch;
    flex-wrap: wrap;
    padding: 0.65rem 1rem;
  }

  .logo {
    height: 42px;
  }

  .category-menu {
    order: 3;
    width: auto;
    padding: 0.58rem 0.7rem;
  }

  .category-menu-wrap {
    order: 3;
  }

  .category-menu-panel {
    position: fixed;
    top: 126px;
    left: 1rem;
    right: 1rem;
    width: auto;
  }

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

  .search-bar {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.55rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .search-bar input,
  .search-bar select,
  .search-button {
    border-radius: 8px;
    width: 100%;
    flex-basis: auto;
    border: 1px solid #d8dde8;
  }

  .search-bar input,
  .search-bar select {
    min-height: 46px;
  }

  .search-button {
    margin: 0;
    min-height: 46px;
    min-width: 0;
  }

  .header-actions {
    margin-left: auto;
  }

  .nav-categories {
    padding: 0;
  }

  .nav-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .card-content {
    padding: 0.65rem;
  }

  .product-name {
    font-size: 0.85rem;
  }

  .main {
    padding: 1rem;
    gap: 1rem;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
    padding: 1.5rem 1rem 1rem;
  }

  .admin-page {
    padding: 0 1rem;
  }

  .admin-overview {
    grid-template-columns: 1fr;
  }

  .admin-panel {
    padding: 1.25rem;
  }

  .market-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .market-hero-copy {
    padding: 1.5rem;
  }

  .market-hero-visual {
    min-height: 180px;
  }

  .category-showcase {
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 1rem 0.75rem;
  }

  .shortcut-image {
    width: min(100%, 96px);
  }

  .hero-deals {
    padding-top: 1rem;
  }

  .sidebar-cart {
    padding: 1rem;
  }

  .product-detail-page {
    padding: 1rem;
  }

  .compact-header {
    padding: 0.8rem 1rem 0;
  }

  .compact-header .logo {
    width: 132px;
  }

  .auth-page {
    min-height: calc(100vh - 78px);
    padding: 1.5rem 1rem 3rem;
  }

  .auth-hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .auth-showcase {
    aspect-ratio: 4 / 3;
  }

  .listing-shell {
    gap: 1.25rem;
  }

  .main-product-image {
    min-height: 360px;
  }

  .seller-strip,
  .shipping-box div {
    grid-template-columns: 1fr;
  }

  .seller-strip {
    flex-direction: column;
    gap: 0.25rem;
  }

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

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

  .account-options {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .compact-header {
    gap: 0.75rem;
    align-items: center;
  }

  .compact-header .button {
    flex: 0 0 auto;
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
  }

  .header-top {
    gap: 0.5rem;
  }

  .header-actions {
    justify-content: flex-end;
  }

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

  .category-showcase {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .main-product-image {
    min-height: 280px;
  }

  .listing-facts div,
  .specifics-grid div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .specifics-grid dt {
    border-bottom: none;
  }

  .auth-panel {
    padding: 1.25rem;
  }

  .auth-page {
    padding-top: 1rem;
    max-width: 100%;
  }

  .auth-showcase {
    margin-top: 1rem;
  }

  .auth-deal-card {
    left: 0.7rem;
    bottom: 0.7rem;
    min-width: 132px;
    padding: 0.7rem 0.8rem;
  }

  .auth-deal-card strong {
    font-size: 1.35rem;
  }

  .auth-mini-products {
    right: 0.7rem;
    bottom: 0.7rem;
    gap: 0.4rem;
  }

  .auth-mini-products img {
    width: 54px;
  }

  .auth-benefits {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .auth-benefits span {
    width: 100%;
    padding: 0.55rem 0.7rem;
    font-size: 0.88rem;
    text-align: center;
  }

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

  .category-admin-card .table-actions {
    grid-column: 1 / -1;
  }

  .category-admin-card img {
    width: 58px;
  }

  .dashboard-page {
    padding: 0 1rem;
  }
}

.verify-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #dedede;
  border-radius: 8px;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.verify-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.verify-dialog h2 {
  margin: 0 0 0.25rem;
}

.verify-dialog #verify-copy {
  margin: 0 0 0.75rem;
  color: #555555;
}

.verify-dialog #verify-code {
  font-size: 1.4rem;
  letter-spacing: 0.35em;
  text-align: center;
}

.verify-dialog .button + .button {
  margin-top: 0.5rem;
}

.contact-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 0.5rem;
  background: #f2f2f2;
  border-radius: 8px;
}

.contact-option {
  border: 0;
  border-radius: 6px;
  padding: 0.5rem;
  background: transparent;
  color: #555555;
  font-weight: 700;
  cursor: pointer;
}

.contact-option.active {
  background: #ffffff;
  color: #111111;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#phone-field {
  display: grid;
  gap: 0.45rem;
}

.phone-input {
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
  gap: 0.5rem;
}

.phone-input select,
.phone-input input {
  min-height: 46px;
  margin-top: 0;
}

.category-menu-link.category-menu-more {
  color: #0654ba;
  font-weight: 700;
}

.nav-item.nav-item-special {
  color: #c4161c;
  font-weight: 700;
}

.listing-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-chip {
  border: 1px solid #d9dde6;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: #ffffff;
  color: #172033;
  font-size: 0.88rem;
  cursor: pointer;
}

.filter-chip span {
  color: #6b7280;
  margin-left: 0.25rem;
}

.filter-chip.active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.filter-chip.active span {
  color: #d1d5db;
}

.listing-empty {
  margin: 0;
  color: #6b7280;
}

.product-brand {
  margin: 0 0 0.2rem;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sale-event-badge {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #fde8e8;
  color: #c4161c;
  font-size: 0.75rem;
  font-weight: 700;
}

.was-price {
  margin-right: 0.35rem;
  color: #999999;
  font-weight: 400;
}

.admin-product-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}

.admin-product-filters input,
.admin-product-filters select {
  min-height: 40px;
  flex: 1 1 180px;
  margin: 0;
}

.product-filter-count {
  flex-basis: 100%;
  color: #6b7280;
  font-size: 0.85rem;
}

.draft-card {
  border-style: dashed;
}

.draft-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #fff4d6;
  color: #8a5a00;
  font-size: 0.75rem;
  font-weight: 700;
}

.draft-notes {
  color: #8a5a00;
  font-size: 0.8rem;
}

#product-show-more {
  display: block;
  margin: 1rem auto 0;
}

#product-show-more[hidden] {
  display: none;
}

/* Keep the price visible when a long category/subcategory pill shares the footer. */
.card-footer .price {
  flex-shrink: 0;
  white-space: nowrap;
}

.card-footer .meta-pill {
  min-width: 0;
}

/* Listings without a photo fall back to the logo; show it whole instead of cropped. */
img[src="logo.svg"].product-image,
.card-image img[src="logo.svg"] {
  object-fit: contain;
  padding: 1.5rem;
  background: #f6f6f6;
}

/* Let listing cards shrink to their grid column so long pills can't push the price out of view. */
.grid > .card {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

/* ── Hero slider ─────────────────────────────────────────────── */
.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.hero-track {
  display: flex;
  transition: transform 0.5s ease;
}

.hero-slide.market-hero {
  flex: 0 0 100%;
  min-height: 220px;
  background: var(--hero-tone, #f7d7c4);
}

.hero-slide .market-hero-copy {
  padding: 1.25rem clamp(1.25rem, 4vw, 3.5rem) 2rem;
}

.hero-slide .market-hero-copy h2 {
  max-width: 560px;
  margin: 0.3rem 0 0.4rem;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  line-height: 1.05;
}

.hero-slide .market-hero-copy p:not(.eyebrow) {
  margin-bottom: 0.9rem;
  font-size: 0.98rem;
}

.hero-slide .market-hero-visual {
  min-height: 220px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111111;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.hero-arrow-prev {
  left: 0.75rem;
}

.hero-arrow-next {
  right: 0.75rem;
}

.hero-dots {
  position: absolute;
  bottom: 0.65rem;
  left: clamp(1.25rem, 4vw, 3.5rem);
  display: flex;
  gap: 0.4rem;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.25);
  cursor: pointer;
}

.hero-dots button[aria-selected="true"] {
  width: 22px;
  border-radius: 999px;
  background: #111111;
}

@media (max-width: 768px) {
  .hero-slide .market-hero-visual {
    min-height: 130px;
    order: -1;
  }

  .hero-slide .market-hero-copy {
    padding: 1rem 1.25rem 2rem;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    left: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track {
    transition: none;
  }
}

/* ══ Design refresh ═══════════════════════════════════════════════════════
   Shared tokens and component styles. Later rules here intentionally override
   the older per-page rules above. */
:root {
  --brand: #e53238;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eef4ff;
  --ink: #111827;
  --ink-soft: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --success: #15803d;
  --radius: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.1);
  --shadow-lg: 0 18px 45px rgba(17, 24, 39, 0.16);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}

body {
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(37, 99, 235, 0.18);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

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

.button-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}

.button-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: var(--surface-soft);
}

.button-dark {
  background: var(--ink);
}

.danger-button {
  border-radius: var(--radius-pill);
}

.small-button {
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  font-weight: 600;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.small-button:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

#quote-shipping-button {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

/* Form fields */
input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([role="combobox"]),
select,
textarea {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([role="combobox"]):hover,
select:hover,
textarea:hover {
  border-color: #9ca3af;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([role="combobox"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234b5563' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--accent);
}

/* Header + search */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
}

.category-menu {
  border-radius: var(--radius);
  font-weight: 600;
}

.category-menu:hover,
.category-menu[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: #bfd3fe;
  color: var(--accent);
}

.search-bar {
  position: relative;
  overflow: visible;
  align-items: center;
  border: 2px solid var(--ink);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), var(--shadow-md);
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.search-bar .search-field input {
  width: 100%;
  margin: 0;
  padding: 0.8rem 4.2rem 0.8rem 1.15rem;
  border: 0;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  box-shadow: none;
  background: transparent;
}

.search-clear {
  position: absolute;
  right: 2.2rem;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.search-clear:hover {
  background: #e5e7eb;
  color: var(--ink);
}

.search-hint {
  position: absolute;
  right: 0.7rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font: 600 0.72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-soft);
}

.search-bar:focus-within .search-hint {
  display: none;
}

.search-bar .search-category {
  flex: 0 0 180px;
  width: auto;
  margin: 0;
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  font-size: 0.9rem;
}

.search-button {
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
}

.search-button:hover {
  background: var(--accent-hover);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 300;
  max-height: 420px;
  overflow-y: auto;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.14s ease-out;
}

.search-suggestions li[role="option"] {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}

.search-suggestions li[aria-selected="true"],
.search-suggestions li[role="option"]:hover {
  background: var(--accent-soft);
}

.search-suggestions img,
.suggestion-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.suggestion-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.suggestion-label mark {
  background: none;
  color: var(--accent);
  font-weight: 700;
}

.suggestion-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.suggestion-empty {
  padding: 0.75rem;
  color: var(--muted);
}

.utility-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.count-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.count-badge[hidden] {
  display: none;
}

.count-bump {
  animation: bump 0.35s ease-out;
}

/* Listing toolbar */
.deals-header h2 {
  letter-spacing: -0.01em;
}

.listing-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin: 0 0 1.1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.listing-count {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.active-filter,
.active-filter-reset {
  border: 1px solid #bfd3fe;
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.7rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s;
}

.active-filter:hover {
  background: #dbe7ff;
}

.active-filter-reset {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
  text-decoration: underline;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.sort-control select {
  width: auto;
  margin: 0;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: 0.88rem;
}

.filter-chip {
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
}

.filter-chip:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}

/* Product cards */
.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.product-card {
  position: relative;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: default;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
  border-color: #d1d5db;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-image {
  border-radius: 10px;
  background: #f6f7f9;
}

.card-image img {
  object-fit: contain;
  padding: 0.6rem;
  transition: transform 0.35s ease;
}

.product-card:hover .card-image img {
  transform: scale(1.05);
}

.discount-badge {
  top: 10px;
  left: 10px;
  right: auto;
  background: var(--brand);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
}

.watch-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
  transition: transform 0.15s, color 0.15s, background-color 0.15s;
}

.watch-toggle:hover {
  transform: scale(1.1);
  color: var(--brand);
}

.watch-toggle.is-watched {
  color: var(--brand);
  animation: bump 0.35s ease-out;
}

.card-content {
  padding: 0.75rem 0.2rem 0.1rem;
}

.product-name {
  min-height: 2.6em;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-name a:hover {
  color: var(--accent);
}

.product-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  color: var(--muted);
}

.product-rating {
  color: #f59e0b;
  letter-spacing: 1px;
}

.product-pricing {
  flex-grow: 1;
  align-items: flex-end;
  margin: 0.35rem 0 0.75rem;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.add-cart-btn {
  margin-top: auto;
}

.button.add-cart-btn.is-added,
.button.detail-cart-button.is-added {
  background: var(--success);
  box-shadow: 0 6px 16px rgba(21, 128, 61, 0.25);
}

/* Loading and empty states */
.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #f1f3f5 0%, #e7eaee 50%, #f1f3f5 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

.skeleton-card:hover {
  transform: none;
  box-shadow: none;
}

.skeleton-image {
  padding-top: 100%;
  border-radius: 10px;
}

.skeleton-line {
  height: 12px;
  margin: 0.45rem 0;
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-line.price {
  width: 55%;
  height: 18px;
  margin-top: 0.9rem;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 3rem 1rem;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  text-align: center;
  background: var(--surface-soft);
}

.empty-state h3 {
  margin: 0;
}

.empty-state p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.empty-icon {
  font-size: 2.2rem;
}

/* Cart */
.cart-widget {
  border-radius: 14px;
}

.cart-item {
  border-radius: 8px;
  transition: background-color 0.18s;
}

.cart-item:hover {
  background: var(--surface-soft);
}

/* Product page buttons */
.buy-now-button {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.buy-now-button:hover {
  background: var(--accent-hover);
}

.detail-cart-button {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #bfd3fe;
}

.detail-cart-button:hover {
  background: #dbe7ff;
}

.button.detail-cart-button.is-added {
  color: #ffffff;
  border-color: var(--success);
}

.watch-button {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.watch-button:hover,
.watch-button.is-watched {
  border-color: #fecaca;
  color: var(--brand);
  background: #fff5f5;
}

/* Toasts */
.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  display: grid;
  gap: 0.5rem;
  max-width: min(380px, calc(100vw - 2rem));
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast a {
  color: #93c5fd;
  font-weight: 800;
  white-space: nowrap;
}

/* Back to top */
.back-to-top {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background-color 0.18s;
}

.back-to-top-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent);
}

/* Category tiles */
.shortcut-image {
  transition: transform 0.25s, box-shadow 0.25s;
}

.category-shortcut:hover .shortcut-image {
  transform: translateY(-4px) scale(1.04);
  box-shadow: var(--shadow-md);
}

.category-shortcut:hover strong {
  color: var(--accent);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.listing-facts select {
  width: 88px;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border-radius: 8px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234b5563' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
}

@media (max-width: 768px) {
  .search-bar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    padding: 0.3rem;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: var(--surface);
  }

  .search-bar:focus-within {
    border-color: var(--accent);
  }

  .search-field {
    flex: 1 1 100%;
  }

  .search-bar .search-field input {
    min-height: 44px;
    border: 0;
    padding-right: 2.6rem;
  }

  .search-bar .search-category {
    flex: 1 1 auto;
    width: auto;
    min-height: 42px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .search-bar .search-button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 1.4rem;
    border: 0;
    border-radius: 12px;
    width: auto;
  }

  .search-hint {
    display: none;
  }

  .search-clear {
    right: 0.6rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .sort-control {
    margin-left: 0;
  }

  .toast-stack {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══ Bigger, more colorful, animated ═════════════════════════════════════ */
:root {
  font-size: 17px;
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #db2777 100%);
  --gradient-sale: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  --gradient-brand: linear-gradient(90deg, #e53238 0%, #f59e0b 30%, #22c55e 55%, #2563eb 80%, #7c3aed 100%);
}

/* Buttons: larger, gradient, with a light sweep on hover */
.button {
  position: relative;
  overflow: hidden;
  padding: 0.8rem 1.45rem;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.button:hover:not(:disabled)::before {
  animation: shine 0.75s ease;
}

.button-primary,
.search-button,
.buy-now-button {
  background: var(--gradient-primary);
  background-size: 180% 100%;
  background-position: 0% 50%;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.28);
  transition: background-position 0.45s ease, box-shadow 0.2s, transform 0.12s;
}

.button-primary:hover:not(:disabled),
.search-button:hover,
.buy-now-button:hover {
  background: var(--gradient-primary);
  background-size: 180% 100%;
  background-position: 100% 50%;
  box-shadow: 0 10px 26px rgba(219, 39, 119, 0.3);
}

.search-button {
  font-size: 1rem;
  padding: 0.85rem 2.4rem;
}

.button-secondary:hover:not(:disabled) {
  border-color: #c4b5fd;
  color: #6d28d9;
  background: #f5f3ff;
}

/* Banner buttons get a sliding arrow */
.button-dark::after {
  content: "\2192";
  display: inline-block;
  transition: transform 0.2s ease;
}

.button-dark:hover::after {
  transform: translateX(4px);
}

.button-dark {
  background: linear-gradient(135deg, #111827 0%, #312e81 100%);
}

.hero-slide[aria-hidden="false"] .button-dark {
  animation: soft-glow 2.6s ease-in-out 1s infinite;
}

/* Bigger, livelier text */
.deals-header h2 {
  position: relative;
  font-size: 1.75rem;
  padding-bottom: 0.4rem;
}

.deals-header h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--gradient-brand);
  background-size: 200% 100%;
  animation: slide-gradient 4s linear infinite;
}

.hero-slide .market-hero-copy h2 {
  font-size: clamp(1.7rem, 2.9vw, 2.6rem);
}

.hero-slide .market-hero-copy p:not(.eyebrow) {
  font-size: 1.05rem;
}

.eyebrow {
  letter-spacing: 0.08em;
}

.product-name {
  font-size: 1rem;
}

.current-price {
  font-size: 1.35rem;
  background: linear-gradient(135deg, #111827 0%, #4338ca 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.product-brand {
  color: #7c3aed;
}

.utility-links a {
  position: relative;
  font-size: 0.86rem;
}

.utility-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.utility-links a:hover {
  text-decoration: none;
}

.utility-links a:hover::after {
  transform: scaleX(1);
}

/* Colorful accents */
.discount-badge {
  background: var(--gradient-sale);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
  animation: badge-wiggle 3.5s ease-in-out 1.5s infinite;
}

.sale-event-badge {
  background: linear-gradient(135deg, #fee2e2 0%, #ffedd5 100%);
  color: #c2410c;
}

.count-badge {
  background: var(--gradient-sale);
}

.active-filter {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border-color: #c7d2fe;
  color: #4338ca;
}

.filter-chip.active {
  background: var(--gradient-primary);
  border-color: transparent;
}

.category-shortcut strong {
  font-size: 1rem;
  transition: color 0.2s;
}

.category-shortcut:hover strong {
  color: #7c3aed;
}

.shortcut-image {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px transparent;
}

.category-shortcut:hover .shortcut-image {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #a78bfa, var(--shadow-md);
}

.product-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.14);
}

.toast {
  border-left: 4px solid transparent;
  border-image: var(--gradient-primary) 1;
  border-radius: 12px;
}

.back-to-top {
  background: var(--gradient-primary);
}

.hero-dots button[aria-selected="true"] {
  background: var(--gradient-primary);
}

/* Cards rise in one after another */
.product-card:not(.skeleton-card) {
  animation: rise-in 0.45s ease both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes shine {
  from { left: -75%; }
  to { left: 125%; }
}

@keyframes slide-gradient {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

@keyframes soft-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
  50% { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.18); }
}

@keyframes badge-wiggle {
  0%, 90%, 100% { transform: rotate(0); }
  93% { transform: rotate(-6deg) scale(1.06); }
  96% { transform: rotate(6deg) scale(1.06); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  :root {
    font-size: 16px;
  }
}

/* ══ Buttons in the logo color ═══════════════════════════════════════════
   Every button uses the logo red; hover switches to cyan. */
:root {
  --button-bg: #e53238;
  --button-hover: #0891b2;
  --button-soft: #fff1f1;
  --button-soft-border: #fbc4c6;
}

.button-primary,
.search-button,
.buy-now-button,
.button-dark,
.back-to-top,
#quote-shipping-button,
.small-button,
.location-button {
  background: var(--button-bg);
  border-color: var(--button-bg);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(229, 50, 56, 0.28);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.button-primary:hover:not(:disabled),
.search-button:hover,
.buy-now-button:hover,
.button-dark:hover,
.back-to-top:hover,
#quote-shipping-button:hover,
.small-button:hover,
.location-button:hover:not(:disabled) {
  background: var(--button-hover);
  border-color: var(--button-hover);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(8, 145, 178, 0.35);
}

.button-secondary,
.detail-cart-button,
.watch-button,
.danger-button {
  background: var(--button-soft);
  border: 1px solid var(--button-soft-border);
  color: var(--button-bg);
}

.button-secondary:hover:not(:disabled),
.detail-cart-button:hover,
.watch-button:hover,
.watch-button.is-watched,
.danger-button:hover {
  background: var(--button-hover);
  border-color: var(--button-hover);
  color: #ffffff;
}

.hero-dots button[aria-selected="true"] {
  background: var(--button-bg);
}

/* Keep the green "added to cart" confirmation */
.button.add-cart-btn.is-added,
.button.detail-cart-button.is-added {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

/* ══ Admin orders ════════════════════════════════════════════════════════ */
#order-form[hidden] {
  display: none;
}

#order-form {
  margin-bottom: 1rem;
}

.order-summary,
.order-note-field,
.order-history {
  grid-column: 1 / -1;
}

.order-summary h3 {
  margin: 0 0 0.25rem;
}

.order-summary p {
  margin: 0.35rem 0;
  color: var(--ink-soft);
}

.order-summary ul {
  margin: 0.5rem 0;
  padding-left: 1.1rem;
}

.order-summary li span {
  color: var(--muted);
}

.order-summary code {
  font-size: 0.8rem;
  word-break: break-all;
}

.order-history {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.order-history li {
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
}

.order-history time {
  font-weight: 700;
  color: var(--ink);
}

#order-table-body td small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
  background: #f1f5f9;
  color: var(--ink-soft);
}

.status-payment-paid,
.status-shipping-delivered {
  background: #dcfce7;
  color: #166534;
}

.status-payment-authorized,
.status-payment-invoiced,
.status-shipping-processing {
  background: #e0f2fe;
  color: #075985;
}

.status-shipping-shipped {
  background: #cffafe;
  color: #0e7490;
}

.status-payment-pending,
.status-shipping-unfulfilled {
  background: #fef3c7;
  color: #92400e;
}

.status-payment-failed,
.status-payment-refunded,
.status-shipping-cancelled {
  background: var(--button-soft);
  color: #b91c1c;
}

@media (max-width: 768px) {
  #order-form {
    grid-template-columns: 1fr;
  }
}

/* ══ Account roles ═══════════════════════════════════════════════════════ */
.role-superadmin {
  background: var(--button-bg);
  color: #ffffff;
}

.role-admin {
  background: #cffafe;
  color: #0e7490;
}

.table-actions small {
  color: var(--muted);
}

/* ══ Admin product preview: a compact card ═══════════════════════════════ */
.preview-card .card {
  max-width: 240px;
}

.preview-card .product-image {
  aspect-ratio: 16 / 9;
}

.preview-card .card-body {
  padding: 0.75rem;
  gap: 0.3rem;
}

.preview-card .card-body p {
  font-size: 0.85rem;
}

/* ══ Voice search ════════════════════════════════════════════════════════ */
.search-voice {
  position: absolute;
  right: 2.3rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

.search-voice:hover {
  background: var(--button-soft);
  color: var(--button-bg);
}

.search-voice.is-listening {
  background: var(--button-bg);
  color: #ffffff;
  animation: voice-pulse 1.2s ease-out infinite;
}

@keyframes voice-pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 50, 56, 0.45); }
  100% { box-shadow: 0 0 0 12px rgba(229, 50, 56, 0); }
}

.search-field.has-voice .search-clear {
  right: 4.6rem;
}

.search-bar .search-field.has-voice input {
  padding-right: 7rem;
}

@media (max-width: 768px) {
  .search-voice {
    right: 0.4rem;
  }

  .search-field.has-voice .search-clear {
    right: 2.8rem;
  }

  .search-bar .search-field.has-voice input {
    padding-right: 5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-voice.is-listening {
    animation: none;
  }
}

/* ══ Home page without the cart sidebar ══════════════════════════════════ */
.content-grid.content-grid-full {
  grid-template-columns: minmax(0, 1fr);
}

/* ══ Cart & checkout page ════════════════════════════════════════════════ */
.checkout-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
}

.checkout-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.checkout-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.checkout-header .logo {
  width: 130px;
  height: auto;
  display: block;
}

.checkout-secure {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: #ecfdf5;
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 700;
}

.checkout-header-links {
  margin-left: auto;
  display: flex;
  gap: 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.checkout-header-links a:hover {
  color: var(--button-bg);
}

.checkout-page {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.checkout-steps {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.checkout-steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.checkout-steps li + li::before {
  content: "";
  width: 28px;
  height: 2px;
  margin-right: 0.1rem;
  background: var(--line);
}

.checkout-steps span,
.step-dot {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.checkout-steps .is-current {
  color: var(--ink);
}

.checkout-steps .is-current span,
.step-dot {
  background: var(--button-bg);
  color: #ffffff;
}

.checkout-steps .is-done span {
  background: var(--success);
  color: #ffffff;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
}

.checkout-main {
  display: grid;
  gap: 1rem;
}

.checkout-card,
.checkout-summary {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.checkout-card[hidden] {
  display: none;
}

.checkout-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.checkout-card-head h1,
.checkout-card-head h2,
.checkout-summary h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.2rem;
}

.checkout-card-head h1 {
  font-size: 1.45rem;
}

.checkout-muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.cart-lines {
  display: grid;
}

.cart-line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto auto;
  grid-template-areas:
    "image info qty total"
    "image info remove remove";
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.cart-line:first-child {
  border-top: 0;
  padding-top: 0;
}

.cart-line-image {
  grid-area: image;
  display: block;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-soft);
}

.cart-line-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line-image img[src="logo.svg"] {
  object-fit: contain;
  padding: 0.6rem;
}

.cart-line-info {
  grid-area: info;
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.cart-line-name {
  font-weight: 700;
  line-height: 1.3;
}

.cart-line-name:hover {
  color: var(--button-bg);
}

.cart-line-info small,
.cart-line-each {
  color: var(--muted);
  font-size: 0.85rem;
}

.cart-line-qty {
  grid-area: qty;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.cart-line-qty button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.05rem;
  cursor: pointer;
}

.cart-line-qty button:hover {
  background: var(--button-soft);
  color: var(--button-bg);
}

.cart-line-qty span {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 700;
}

.cart-line-total {
  grid-area: total;
  min-width: 5rem;
  text-align: right;
}

.cart-line-remove {
  grid-area: remove;
  justify-self: end;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.cart-line-remove:hover {
  color: var(--button-bg);
}

.cart-empty {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 2rem 1rem;
  text-align: center;
}

.cart-empty img {
  width: 140px;
  opacity: 0.85;
}

.cart-empty h2 {
  margin: 0.25rem 0 0;
}

.cart-empty p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.checkout-summary {
  position: sticky;
  top: 1rem;
}

.checkout-summary h2 {
  margin-bottom: 0.75rem;
}

.checkout-fineprint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
}

.checkout-footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .checkout-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkout-summary {
    position: static;
  }
}

@media (max-width: 560px) {
  .checkout-header-inner {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }

  .checkout-secure {
    order: 3;
  }

  .checkout-header-links {
    gap: 0.8rem;
  }

  .checkout-steps li + li::before {
    width: 12px;
  }

  .cart-line {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas:
      "image info info"
      "image qty total"
      "remove remove remove";
  }

  .cart-line-image {
    width: 64px;
    height: 64px;
  }
}

/* Checkout page: calmer shipping controls */
.checkout-card .shipping-quote {
  margin-bottom: 1rem;
}

.checkout-card .shipping-quote div {
  align-items: center;
}

.checkout-card .shipping-quote input {
  margin: 0;
  min-height: 44px;
}

.checkout-card #quote-shipping-button {
  min-height: 44px;
  padding: 0 1.2rem;
  border-radius: 10px;
  box-shadow: none;
  font-size: 0.9rem;
}

.checkout-card .location-button,
.checkout-card .location-button:hover:not(:disabled) {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--button-bg);
  font-weight: 700;
  text-decoration: underline;
}

.checkout-card .shipping-quote p {
  margin: 0;
}

.checkout-footer {
  background: none;
  border-top: 1px solid var(--line);
}

.cart-line-qty {
  justify-self: start;
}

/* My Lyrshop (dashboard.html): tabs, a section sidebar and summary blocks, laid out like My eBay. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.my-page {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.my-heading {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.75rem 0 1rem;
}

.my-heading h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

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

.my-tabs {
  display: flex;
  gap: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.my-tab {
  padding: 0.7rem 0;
  border-bottom: 3px solid transparent;
  color: var(--ink-soft);
  font-weight: 600;
}

.my-tab.active {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.my-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 2rem;
  padding-top: 1.5rem;
}

.my-sidebar[hidden] {
  display: none;
}

.my-sidebar[hidden] + .my-content {
  grid-column: 1 / -1;
}

.my-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-self: start;
}

.my-sidebar a {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--ink-soft);
}

.my-sidebar a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.my-sidebar a.active {
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 700;
}

.my-section[hidden] {
  display: none;
}

.my-block {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.my-block:last-child {
  border-bottom: 0;
}

.my-block-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.my-block-header h2,
.my-block-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.my-block-header a {
  color: var(--accent);
  font-size: 0.9rem;
}

.my-empty,
.my-muted {
  color: var(--muted);
}

.my-empty {
  margin: 0;
}

.my-empty a {
  color: var(--accent);
}

.my-orders {
  display: grid;
  gap: 1rem;
}

.my-order {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.my-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 0.7rem 1rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.my-order-meta strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
}

.my-order-body {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.my-thumb,
.my-item-image {
  display: block;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #f6f7f9;
  overflow: hidden;
}

.my-thumb img,
.my-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.4rem;
}

.my-order-info p {
  margin: 0 0 0.3rem;
  overflow-wrap: anywhere;
}

.my-order-info a:hover,
.my-item-name:hover {
  text-decoration: underline;
}

.my-order-status {
  font-weight: 700;
  color: var(--success);
}

.my-order-status.is-waiting {
  color: #b45309;
}

.my-order-status.is-closed {
  color: var(--muted);
}

.my-order-tracking {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.my-order-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.my-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.25rem 1rem;
}

.my-items > .my-empty {
  grid-column: 1 / -1;
}

.my-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.my-item-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.35;
}

.my-item-price {
  font-weight: 800;
}

.my-item .link-button {
  align-self: flex-start;
}

.my-profile {
  max-width: 560px;
}

@media (max-width: 760px) {
  .compact-header:has(+ .my-page) .header-actions {
    gap: 0.5rem;
  }

  .compact-header:has(+ .my-page) .button {
    padding: 0.5rem 0.9rem;
    font-size: 0.88rem;
  }

  .my-page {
    padding: 0 1rem;
  }

  .my-heading {
    flex-direction: column;
    gap: 0.25rem;
  }

  .my-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding-top: 1rem;
  }

  .my-sidebar {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.4rem;
    scrollbar-width: none;
  }

  .my-sidebar a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
  }

  .my-order-body {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .my-order-badges {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
  }

  .my-items {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

/* Site footer (footer.js): one compact band like Lyrtrip's, group titles inline with their links. */
footer.site-footer {
  padding: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  text-align: left;
  font-size: 0.76rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
}

.footer-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
}

.footer-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.75rem;
}

.footer-group-title {
  color: var(--ink);
  font-weight: 700;
}

footer.site-footer a {
  color: var(--ink-soft);
}

footer.site-footer a:hover {
  color: var(--brand);
}

footer.site-footer .footer-legal {
  flex: 0 0 auto;
  gap: 0.4rem 1rem;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.74rem;
}

footer.site-footer .locale-select select {
  min-height: 0;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  font-size: 0.74rem;
}

@media (max-width: 1024px) {
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .footer-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 1rem;
  }

  .footer-group {
    gap: 0.1rem 0.6rem;
  }

  .footer-group-title {
    flex-basis: 100%;
  }

  footer.site-footer .footer-legal {
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
  }
}

/* AI listing assist on the seller form (admin.js fillFromPhoto). */
.ai-assist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: -0.25rem 0 1rem;
  padding: 0.75rem;
  border: 1px dashed #c7d2fe;
  border-radius: 8px;
  background: #f5f7ff;
}

.ai-assist .button {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.ai-status {
  flex: 1 1 220px;
  margin: 0;
  font-size: 0.875rem;
  color: #4b5563;
}

.ai-status[data-tone="busy"] {
  color: #4338ca;
}

.ai-status[data-tone="busy"]::before {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.4em;
  vertical-align: -0.1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}

.ai-status[data-tone="done"] {
  color: #065f46;
}

.ai-status[data-tone="warn"] {
  color: #92400e;
}

.ai-status[data-tone="error"] {
  color: #b91c1c;
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  color: #4338ca;
  font-size: 0.82rem;
  font-weight: 500;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-status[data-tone="busy"]::before {
    animation: none;
  }
}

/* Product photo zoom (product.js bindZoom): hover magnifier plus a full-screen viewer. */
.main-product-image[role="button"] {
  cursor: zoom-in;
}

.main-product-image img {
  transition: transform 0.12s ease-out;
}

.main-product-image.is-zooming .image-badge,
.main-product-image.is-zooming .zoom-hint {
  opacity: 0;
}

.main-product-image:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.zoom-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(17, 24, 39, 0.72);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.15s;
}

.zoom-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(10, 12, 16, 0.94);
}

.zoom-lightbox[hidden] {
  display: none;
}

body.zoom-open {
  overflow: hidden;
}

.zoom-viewport {
  flex: 1;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 3.5rem 1rem 0;
}

.zoom-viewport img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  object-fit: contain;
  cursor: zoom-in;
  background: #ffffff;
  border-radius: 6px;
}

.zoom-viewport.is-zoomed {
  display: block;
  padding: 0;
}

.zoom-viewport.is-zoomed img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
  border-radius: 0;
}

.zoom-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.zoom-close:hover,
.zoom-close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}

.zoom-caption {
  margin: 0;
  padding: 0.75rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  text-align: center;
}

/* Product options on the listing page: color swatches and size/other pills. */
.detail-options {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}

.detail-options:empty {
  display: none;
}

.detail-option-label {
  margin: 0 0 0.5rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.detail-option-label strong {
  color: var(--ink);
}

.detail-option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-pill {
  min-width: 48px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.option-pill:hover {
  border-color: var(--ink-soft);
}

.option-pill[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.option-swatch {
  width: 40px;
  height: 40px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.option-swatch span,
.swatch {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: linear-gradient(135deg, #e5e7eb, #9ca3af);
}

.option-swatch:hover {
  border-color: var(--line);
}

.option-swatch[aria-pressed="true"] {
  border-color: var(--ink);
}

.option-pill.is-unavailable,
.option-swatch.is-unavailable {
  opacity: 0.45;
  background-image: linear-gradient(to top right, transparent calc(50% - 1px), var(--ink-soft) 50%, transparent calc(50% + 1px));
}

.option-menu {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 320px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.option-menu:focus-within {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.option-menu .option-dot {
  width: 20px;
  height: 20px;
}

.option-menu select {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.detail-option.is-missing .option-menu {
  box-shadow: 0 0 0 2px #fca5a5;
}

.detail-option.is-missing .detail-option-values {
  padding: 0.35rem;
  margin: -0.35rem;
  border-radius: 10px;
  box-shadow: 0 0 0 2px #fca5a5;
}

.option-error {
  margin: 0 0 0.75rem;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
}

.option-error:empty {
  display: none;
}

.detail-measurements h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.05rem;
}

.cart-line-variant {
  color: var(--ink-soft);
  font-weight: 600;
}

/* Seller Hub: options panel on the product form and the Attributes tab. */
.product-options {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.product-options legend {
  padding: 0 0.35rem;
  font-weight: 700;
}

.field-note {
  display: block;
  margin: 0.25rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.option-group {
  margin-bottom: 1rem;
}

.option-group-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.option-chips,
.value-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.option-chip input {
  width: auto;
  margin: 0;
}

.option-chip:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-chip .swatch,
.value-chip .swatch {
  width: 14px;
  height: 14px;
}

.value-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: #f1f5f9;
  font-size: 0.78rem;
  white-space: nowrap;
}

.measurements h4 {
  margin: 0;
  font-size: 0.95rem;
}

.measurement-rows {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.measurement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.measurement-row input {
  margin: 0;
}

.measurement-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.chip-button {
  padding: 0.3rem 0.65rem;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.chip-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-crud-form .wide-field {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .measurement-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .measurement-row .link-button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.admin-form-actions [hidden] {
  display: none;
}

/* Sign-in page: one centered card, no photo panel (auth.js adds the interactive states). */
.auth-body .auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  grid-template-columns: none;
  min-height: auto;
  padding: clamp(1.5rem, 6vh, 4rem) 1rem 4rem;
}

.auth-body .auth-panel {
  max-width: 440px;
  border-color: var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.auth-body .auth-copy {
  text-align: center;
}

.auth-body .auth-copy h1 {
  margin-top: 0.4rem;
}

.auth-body .auth-tabs {
  position: relative;
  border-radius: var(--radius-pill);
  border-color: transparent;
}

.auth-tab-indicator {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  width: calc(50% - 0.425rem);
  border-radius: var(--radius-pill);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease;
}

.auth-tabs[data-mode="signup"] .auth-tab-indicator {
  transform: translateX(calc(100% + 0.35rem));
}

.auth-body .auth-tab {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-pill);
  transition: color 0.2s;
}

.auth-body .auth-tab.active {
  background: transparent;
  box-shadow: none;
}

.auth-form.is-switching {
  animation: auth-fade 0.25s ease;
}

@keyframes auth-fade {
  from { opacity: 0.4; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.auth-field {
  margin-bottom: 0.9rem;
}

.auth-field > label {
  margin: 0;
}

.password-field {
  position: relative;
  margin-top: 0.45rem;
}

.auth-form .password-field input {
  margin-top: 0;
  padding-right: 4.5rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  padding: 0.35rem 0.65rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--accent-soft);
}

.field-feedback {
  display: block;
  min-height: 0;
  margin-top: 0.3rem;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
}

.field-feedback:empty {
  display: none;
}

.field-feedback.is-warning {
  color: #b45309;
}

.auth-form input.is-invalid {
  border-color: #f87171;
}

.auth-form input.is-valid {
  border-color: #22c55e;
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  flex: 1;
}

.strength-bars i {
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  transition: background 0.2s;
}

.password-strength[data-score="1"] .strength-bars i:nth-child(-n + 1) { background: #ef4444; }
.password-strength[data-score="2"] .strength-bars i:nth-child(-n + 2) { background: #f59e0b; }
.password-strength[data-score="3"] .strength-bars i:nth-child(-n + 3) { background: #84cc16; }
.password-strength[data-score="4"] .strength-bars i:nth-child(-n + 4) { background: #16a34a; }
.password-strength[data-score="0"] #strength-label,
.password-strength[data-score="1"] #strength-label { color: #b91c1c; }
.password-strength[data-score="4"] #strength-label { color: #15803d; }

.auth-submit {
  position: relative;
  min-height: 48px;
}

.auth-submit.is-loading .auth-submit-label {
  visibility: hidden;
}

.auth-submit.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}

.auth-body .auth-terms {
  text-align: center;
}

.auth-perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin: 1rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Rating stars (ui.js ratingStars): larger, and they light up in a wave with a score tooltip. */
.product-rating {
  font-size: 1.05rem;
  letter-spacing: 0;
}

.rating-stars {
  position: relative;
  display: inline-flex;
  gap: 1px;
  line-height: 1;
  cursor: default;
  outline: none;
}

.rating-stars .star {
  display: inline-block;
  color: #d1d5db;
  font-size: 1.15em;
  transition: transform 0.18s ease, color 0.18s ease, text-shadow 0.18s ease;
  transition-delay: calc(var(--star) * 40ms);
}

.rating-stars .star.is-full {
  color: #f59e0b;
}

.rating-stars:hover .star,
.rating-stars:focus-visible .star {
  transform: translateY(-2px) scale(1.22);
}

.rating-stars:hover .star.is-full,
.rating-stars:focus-visible .star.is-full {
  color: #f97316;
  text-shadow: 0 0 8px rgba(249, 115, 22, 0.45);
}

.rating-stars::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}

.rating-stars:hover::after,
.rating-stars:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.rating-stars:focus-visible {
  border-radius: 4px;
  box-shadow: var(--focus-ring);
}

.detail-subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}

.detail-subtitle .rating-stars {
  font-size: 1.3rem;
}

@media (prefers-reduced-motion: reduce) {
  .rating-stars .star,
  .auth-tab-indicator,
  .auth-form.is-switching {
    transition: none;
    animation: none;
  }
}

/* Floating buttons on the right: back-to-top at the bottom, Lyrbot just above it. */
.back-to-top {
  left: auto;
  right: 1rem;
}

.lyrbot {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + 44px + 0.75rem);
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.lyrbot-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 52px;
  padding: 0 1rem 0 0.7rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lyrbot-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.45);
}

.lyrbot-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 10px 25px rgba(79, 70, 229, 0.35);
}

.lyrbot-toggle svg {
  width: 32px;
  height: 32px;
  animation: lyrbot-bob 3s ease-in-out infinite;
}

.lyrbot svg .lyrbot-eye {
  fill: #4f46e5;
}

.lyrbot svg .lyrbot-mouth {
  stroke: #4f46e5;
}

.lyrbot-toggle svg .lyrbot-eye {
  animation: lyrbot-blink 4s infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.lyrbot.is-open .lyrbot-toggle-label {
  display: none;
}

.lyrbot.is-open .lyrbot-toggle {
  padding: 0 0.7rem;
}

@keyframes lyrbot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes lyrbot-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

.lyrbot-panel {
  order: -1;
  display: flex;
  flex-direction: column;
  width: min(370px, calc(100vw - 2rem));
  height: min(540px, calc(100vh - 10rem));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: lyrbot-open 0.2s ease;
}

.lyrbot-panel[hidden] {
  display: none;
}

@keyframes lyrbot-open {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.lyrbot-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0.85rem 0.85rem 1rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
}

.lyrbot-header div {
  display: grid;
  flex: 1;
}

.lyrbot-header small {
  opacity: 0.85;
  font-size: 0.78rem;
}

.lyrbot-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.lyrbot-avatar svg {
  width: 26px;
  height: 26px;
}

.lyrbot-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lyrbot-close:hover,
.lyrbot-close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}

.lyrbot-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
  overflow-y: auto;
  background: var(--surface-soft);
}

.lyrbot-message {
  max-width: 85%;
  padding: 0.6rem 0.8rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lyrbot-message.is-bot {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}

.lyrbot-message.is-user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: #4f46e5;
  color: #ffffff;
}

.lyrbot-message.is-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.lyrbot-message a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.lyrbot-typing {
  display: inline-flex;
  gap: 4px;
  padding: 0.2rem 0;
}

.lyrbot-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  animation: lyrbot-dot 1.2s infinite ease-in-out;
}

.lyrbot-typing i:nth-child(2) { animation-delay: 0.15s; }
.lyrbot-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes lyrbot-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.lyrbot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--line);
}

.lyrbot-quick[hidden] {
  display: none;
}

.lyrbot-quick button {
  padding: 0.35rem 0.7rem;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-pill);
  background: #eef2ff;
  color: #4338ca;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.lyrbot-quick button:hover {
  background: #e0e7ff;
}

.lyrbot-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  border-top: 1px solid var(--line);
}

.lyrbot-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.9rem;
}

.lyrbot-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.lyrbot-send {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  cursor: pointer;
}

.lyrbot-send svg {
  width: 18px;
  height: 18px;
}

.lyrbot-send:disabled {
  opacity: 0.5;
  cursor: wait;
}

.lyrbot-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.6rem 1rem 0.8rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.lyrbot-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-pill);
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

.lyrbot-whatsapp svg {
  width: 15px;
  height: 15px;
}

.lyrbot-email {
  color: var(--accent);
  font-weight: 600;
}

.lyrbot-whatsapp:hover,
.lyrbot-email:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .lyrbot-toggle-label {
    display: none;
  }

  .lyrbot-toggle {
    width: 52px;
    padding: 0;
    justify-content: center;
  }

  .lyrbot-panel {
    height: min(520px, calc(100vh - 8rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .lyrbot-toggle svg,
  .lyrbot-toggle svg .lyrbot-eye,
  .lyrbot-panel,
  .lyrbot-typing i {
    animation: none;
  }
}

.password-strength[hidden] {
  display: none;
}

/* Top bar: larger text, with the greeting on the far right (ui.js renderUserGreeting). */
.utility-bar {
  font-size: 0.92rem;
}

.utility-inner {
  padding: 0.5rem 1.5rem;
}

.utility-links {
  gap: 1.15rem;
}

.utility-greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: 1.15rem;
  border-left: 1px solid #dfe3ea;
}

.utility-user {
  gap: 0.45rem;
}

/* Profile photos (ui.js userAvatar): a photo, or the name's first letter. */
.user-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

.my-heading {
  align-items: center;
}

.my-heading-avatar {
  width: 52px;
  height: 52px;
  font-size: 1.3rem;
}

.profile-form {
  display: grid;
  gap: 1.25rem;
  max-width: 560px;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.profile-photo {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.profile-avatar-large {
  width: 96px;
  height: 96px;
  font-size: 2.4rem;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line);
}

.profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.profile-photo-actions .field-note {
  flex-basis: 100%;
  margin: 0;
}

.profile-name-field {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.profile-name-field input {
  margin: 0;
}

.profile-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.profile-message {
  color: #065f46;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-message.is-error {
  color: #b91c1c;
}

@media (max-width: 860px) {
  .utility-right {
    display: flex;
  }

  .utility-right > :not(.utility-greeting) {
    display: none;
  }

  .utility-greeting {
    padding-left: 0;
    border-left: 0;
  }

  .utility-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .profile-photo {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Language and currency pickers (locale.js), in the top bar and the footer. */
.locale-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.locale-select {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  font-weight: 600;
}

.locale-select select {
  width: auto;
  max-width: 11rem;
  min-height: 0;
  margin: 0;
  padding: 0.2rem 1.6rem 0.2rem 0.5rem;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  background-color: var(--surface);
  color: #1b4d9b;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

footer.site-footer .footer-legal p {
  margin: 0;
}

.currency-note {
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.currency-note[hidden] {
  display: none;
}

/* Google's website translator: keep the page in place and hide its toolbar and hover popups. */
body {
  top: 0 !important;
  position: static !important;
}

.goog-te-banner-frame,
body > .skiptranslate,
iframe.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

@media (max-width: 860px) {
  .utility-right > [data-locale-picker] {
    display: inline-flex;
  }

  .locale-select select {
    max-width: 8.5rem;
  }
}

/* Product galleries: photo and video thumbnails on the listing (product.js renderGallery). */
.main-product-image video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000000;
}

.main-product-image [hidden],
.gallery-thumbs[hidden],
.media-manager[hidden] {
  display: none;
}

.main-product-image.is-video {
  cursor: auto;
}

.main-product-image.is-video .image-badge,
.main-product-image.is-video .zoom-hint {
  display: none;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.gallery-thumb {
  position: relative;
  flex: 0 0 4.5rem;
  height: 4.5rem;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #f3f5f7;
  overflow: hidden;
  cursor: pointer;
}

.gallery-thumb img,
.gallery-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.gallery-thumb:hover {
  border-color: var(--ink-soft);
}

.gallery-thumb.is-active {
  border-color: var(--accent);
}

.gallery-thumb:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.gallery-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.1rem;
  background: rgba(17, 24, 39, 0.35);
}

/* Seller form gallery (admin.js renderProductMedia). */
.media-field-label {
  font-weight: 600;
}

.media-field-hint {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.media-manager {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.media-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f5f7;
  overflow: hidden;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-tag {
  position: absolute;
  top: 0.3rem;
  left: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: rgba(17, 24, 39, 0.78);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}

.media-actions {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  left: 0.3rem;
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
}

.media-actions button {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.media-actions button[data-media-remove] {
  margin-left: auto;
  color: #b91c1c;
}

.media-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}

.media-actions button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.media-link {
  display: flex;
  flex: 1 1 100%;
  gap: 0.5rem;
}

.media-link input {
  flex: 1;
  min-width: 0;
}

/* Sales calendar: the home page event strip (app.js renderEventBanner). */
.event-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: var(--event-tone, #fde2e1);
  color: var(--ink);
}

.event-banner[hidden] {
  display: none;
}

.event-banner p {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
}

.event-banner a {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.event-banner-icon {
  font-size: 1.25rem;
}

@media (max-width: 560px) {
  .event-banner {
    flex-wrap: wrap;
  }

  .event-banner p {
    flex-basis: calc(100% - 2.5rem);
  }
}

/* Sales calendar admin tab (admin.js renderCalendar). */
.calendar-summary {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.calendar-summary:empty {
  display: none;
}

.calendar-summary[data-tone="live"] {
  background: #ecfdf3;
  border-color: #a7f3d0;
}

.calendar-rules {
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.calendar-rules summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.calendar-rules ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.calendar-form [hidden] {
  display: none;
}

.admin-crud-form .checkbox-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.admin-crud-form .checkbox-field input {
  width: auto;
}

.calendar-form input[type="color"] {
  height: 2.6rem;
  padding: 0.2rem;
}

.calendar-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.5rem;
  border: 1px solid rgba(17, 24, 39, 0.15);
  border-radius: 50%;
  vertical-align: middle;
}

.calendar-phase {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.calendar-phase.is-live {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.calendar-phase.is-early {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.calendar-phase.is-off {
  color: var(--muted);
}

#calendar-table-body .table-actions,
#coupon-table-body .table-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
}

#calendar-table-body .table-actions .button,
#coupon-table-body .table-actions .button {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ── Coupons, gift cards and points in the cart (cart.js renderTotals) ─────────── */
.summary-discount strong {
  color: var(--success);
}

.amount-due-row {
  border-top: 1px dashed var(--line);
}

.checkout-codes {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.checkout-codes[hidden] {
  display: none;
}

.code-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.code-form-row {
  display: flex;
  gap: 0.5rem;
}

.code-form-row input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
}

.code-form-row input:disabled {
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.code-form-row .button {
  padding: 0.5rem 0.9rem;
}

.code-status {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--success);
}

.code-status:empty {
  display: none;
}

.code-status.is-error {
  color: #b91c1c;
}

.points-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.points-toggle[hidden],
.points-earn[hidden] {
  display: none;
}

.points-toggle input {
  width: auto;
}

.points-earn {
  margin: 0;
  font-size: 0.85rem;
}

/* ── Tiers and badges (dashboard, product page) ─────────────────────────────────── */
.tier-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.tier-pill[hidden] {
  display: none;
}

.tier-bronze { background: #f6e7dc; border-color: #e3bfa3; color: #7c3f16; }
.tier-silver { background: #eef1f5; border-color: #c7ced8; color: #374151; }
.tier-gold { background: #fef3c7; border-color: #f4cf62; color: #854d0e; }
.tier-platinum { background: #e0f2fe; border-color: #93c5fd; color: #1e3a8a; }

.rewards-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

.rewards-strip[hidden] {
  display: none;
}

.rewards-strip span {
  color: var(--ink-soft);
}

.rewards-strip .rewards-strip-link {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
}

.rewards-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.rewards-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 100%);
  border: 1px solid #fde2e1;
}

.rewards-points {
  margin: 0.6rem 0 0;
  font-size: 1.1rem;
}

.rewards-points strong {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}

.rewards-value,
.tier-note {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.tier-bar {
  height: 0.5rem;
  margin-top: 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.tier-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.rewards-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
}

.rewards-stats div {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rewards-stats dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.rewards-stats dd {
  margin: 0.2rem 0 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.badge-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badge-item {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  padding: 0.9rem 0.6rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  opacity: 0.55;
}

.badge-item.is-earned {
  border-style: solid;
  border-color: #f4cf62;
  background: #fffbeb;
  opacity: 1;
}

.badge-icon {
  font-size: 1.6rem;
  filter: grayscale(1);
}

.badge-item.is-earned .badge-icon {
  filter: none;
}

.badge-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.points-history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.points-history li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.points-history li span small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.points-history strong {
  color: var(--success);
  white-space: nowrap;
}

.points-history strong.is-negative {
  color: #b91c1c;
}

.rewards-rules {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.rewards-rules summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.seller-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: -0.25rem 0 0.75rem;
  padding: 0;
  list-style: none;
}

.seller-badges[hidden] {
  display: none;
}

.seller-badges li {
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: #fffbeb;
  border: 1px solid #f4cf62;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Gift cards and affiliate (dashboard) ───────────────────────────────────────── */
.gift-card-list {
  display: grid;
  gap: 0.75rem;
}

.gift-card-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.gift-card-mini {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 3.5rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #e53238 0%, #f59e0b 100%);
  color: #ffffff;
  font-weight: 800;
}

.gift-card-info {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.gift-card-info span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.gift-card-message {
  margin: 0;
  font-style: italic;
  color: var(--ink-soft);
}

.gift-card-code {
  justify-self: start;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.gift-card-send {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.gift-card-send-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  color: var(--success);
}

.gift-card-send-status:empty {
  display: none;
}

.gift-card-send-status.is-error {
  color: #b91c1c;
}

.affiliate-panel {
  display: grid;
  gap: 0.9rem;
}

.affiliate-panel p {
  margin: 0;
}

.affiliate-link {
  display: flex;
  gap: 0.5rem;
}

.affiliate-link input {
  flex: 1;
  min-width: 0;
}

.affiliate-panel .rewards-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ── Gift card page (giftcards.js) ──────────────────────────────────────────────── */
.giftcard-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
}

.giftcard-hero h1 {
  margin: 0 0 0.4rem;
}

.giftcard-hero p {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.giftcard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.giftcard-form {
  display: grid;
  gap: 1.25rem;
}

.giftcard-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.giftcard-form legend {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.giftcard-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.giftcard-presets .chip-button[aria-pressed="true"] {
  border-color: var(--brand);
  background: #fff1f1;
  color: var(--brand);
}

.giftcard-custom,
.giftcard-recipient label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.giftcard-delivery {
  display: grid;
  gap: 0.5rem;
}

.giftcard-recipient {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.giftcard-recipient[hidden] {
  display: none;
}

.giftcard-message-field {
  grid-column: 1 / -1;
}

.giftcard-preview-wrap {
  position: sticky;
  top: 1rem;
}

.giftcard-preview {
  display: grid;
  gap: 0.4rem;
  aspect-ratio: 1.6 / 1;
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #e53238 0%, #f59e0b 45%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  align-content: space-between;
}

.giftcard-preview-brand {
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 700;
}

.giftcard-preview strong {
  font-size: 2.4rem;
  letter-spacing: -0.02em;
}

.giftcard-preview code {
  justify-self: start;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.06em;
}

.giftcard-preview-message {
  margin: 0.75rem 0 0;
  font-style: italic;
  color: var(--ink-soft);
}

.giftcard-preview-message[hidden] {
  display: none;
}

.giftcard-steps {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  .rewards-overview,
  .giftcard-layout,
  .giftcard-recipient {
    grid-template-columns: minmax(0, 1fr);
  }

  .giftcard-preview-wrap {
    position: static;
    order: -1;
  }

  .gift-card-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .affiliate-panel .rewards-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.summary-row[hidden],
.total-row[hidden] {
  display: none;
}

.my-block-header a.button-primary {
  color: #ffffff;
}

/* ── Business (B2B) buying ─────────────────────────────────────────────────────── */
.bulk-badge {
  display: inline-block;
  margin: 0 0 0.4rem 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.75rem;
  font-weight: 700;
}

.quantity-input {
  width: 6rem;
}

/* ── Item location and regional prices ─────────────────────────────────────────── */
.regional-badge {
  display: inline-block;
  margin: 0 0 0.4rem 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
}

.product-location {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-location.is-local {
  color: var(--success, #15803d);
  font-weight: 600;
}

.regional-pricing-field {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
}

.regional-pricing-field input {
  width: auto;
  margin-top: 0.2rem;
}

.regional-pricing-field .field-hint {
  display: block;
}

.wholesale-box {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  background: #f0f9ff;
}

.wholesale-box[hidden] {
  display: none;
}

.wholesale-box h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.wholesale-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.wholesale-table th,
.wholesale-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #dbeafe;
  text-align: left;
}

.wholesale-table th {
  color: var(--muted);
  font-weight: 600;
}

.wholesale-table tr.is-active td {
  background: #dbeafe;
  font-weight: 700;
}

.wholesale-note {
  margin: 0.6rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.cart-line-business {
  display: inline-block;
  justify-self: start;
  align-self: start;
  width: fit-content;
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.75rem;
  font-weight: 700;
}

.cart-line-business[hidden],
.business-savings[hidden] {
  display: none;
}

.business-savings {
  margin: 0 0 0.25rem;
  color: #075985;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Seller form wholesale tiers (admin.js addWholesaleRow) */
.wholesale-tiers {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.wholesale-tiers legend {
  padding: 0 0.3rem;
  font-weight: 700;
}

.wholesale-rows {
  display: grid;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.wholesale-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.5rem;
}

.wholesale-row label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.88rem;
}

/* Dashboard business account panel */
.business-status {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.business-status[data-status="approved"] { background: #ecfdf3; border-color: #a7f3d0; }
.business-status[data-status="pending"] { background: #fffbeb; border-color: #fcd34d; }
.business-status[data-status="rejected"] { background: #fef2f2; border-color: #fecaca; }

.business-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.business-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.business-form .wide {
  grid-column: 1 / -1;
}

.business-form .checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.business-form .checkbox-field input {
  width: auto;
}

/* Admin business review (admin.js renderBusinessApplications) */
.business-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.business-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.business-card header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.business-card h3 {
  margin: 0;
}

.business-card header p {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
}

.business-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0.8rem 0;
}

.business-facts dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.business-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.business-review {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.business-review input[type="text"] {
  flex: 1 1 14rem;
}

.business-review .checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.business-review .checkbox-field input {
  width: auto;
}

#admin-business-section .admin-filters label {
  display: inline-grid;
  gap: 0.3rem;
  font-weight: 600;
}

@media (max-width: 760px) {
  .business-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── CJ Dropshipping (admin) ── */
.cj-lookup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.cj-lookup label {
  flex: 1 1 320px;
}

.cj-product {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cj-product h4 {
  margin: 1rem 0 0.25rem;
}

/* .button and label rules set display, which would otherwise override the hidden attribute (e.g. Save link). */
#admin-suppliers-section [hidden],
#user-form [hidden] {
  display: none;
}

.cj-import-settings {
  margin-bottom: 0.75rem;
}

.cj-import-run {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.cj-import-last ul {
  margin: 0.25rem 0 1rem;
  padding-left: 1.25rem;
}

.cj-import-last .is-error {
  color: #b91c1c;
}

.cj-imported-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cj-imported-filters input {
  flex: 1 1 220px;
}

.cj-imported-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

#admin-suppliers-section > h3 {
  margin: 1.5rem 0 0.5rem;
}

.cj-product-head {
  display: flex;
  gap: 1rem;
  align-items: start;
}

.cj-product-head img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.cj-product-head h3,
.cj-product-head p {
  margin: 0 0 0.25rem;
}

.cj-product-head p,
.cj-hint {
  color: var(--ink-soft);
}

.cj-hint {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.cj-warehouses {
  margin: 0;
  padding-left: 1.1rem;
}

.cj-warehouses small {
  display: block;
  color: var(--ink-soft);
}

.cj-link-rows,
.cj-address-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 1rem;
}

.cj-quote {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.cj-quote input[type="number"] {
  display: block;
  width: 6rem;
}

#cj-link-save {
  justify-self: start;
}

.order-cj {
  grid-column: 1 / -1;
}

.order-cj:empty {
  display: none;
}

.cj-address {
  margin: 0.5rem 0;
}

.cj-send {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cj-send button {
  justify-self: start;
}

/* ── Product page: gallery slideshow, live counts, sizes, delivery, Lyrbot, similar items, buy bar (product.js) ── */
.gallery-stage-wrap {
  position: relative;
}

.gallery-stage-wrap .main-product-image {
  touch-action: pan-y;
}

#detail-image.is-entering {
  animation: gallery-fade 0.35s ease-out;
}

@keyframes gallery-fade {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0 0 3px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-prev { left: 0.6rem; }
.gallery-next { right: 0.6rem; }

.gallery-stage-wrap:hover .gallery-nav,
.gallery-nav:focus-visible {
  opacity: 1;
}

.gallery-nav:hover {
  transform: scale(1.08);
}

.gallery-nav:focus-visible,
.gallery-autoplay:focus-visible,
.gallery-dots button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.gallery-nav[hidden],
.gallery-dots[hidden],
.gallery-autoplay[hidden] {
  display: none;
}

.gallery-autoplay {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(17, 24, 39, 0.65);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-stage-wrap:hover .gallery-autoplay,
.gallery-autoplay:focus-visible {
  opacity: 1;
}

.gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
  max-width: 70%;
  padding: 0.3rem 0.45rem;
  border-radius: var(--radius-pill);
  background: rgba(17, 24, 39, 0.35);
  transform: translateX(-50%);
}

.gallery-dots button {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
  cursor: pointer;
  transition: width 0.25s ease;
}

.gallery-dots button[aria-current="true"] {
  width: 26px;
  background: rgba(255, 255, 255, 0.55);
}

.gallery-dots button span {
  position: absolute;
  inset: 0;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
}

.gallery-dots button[aria-current="true"] span {
  transform: scaleX(var(--progress, 0));
}

.gallery-thumbs {
  position: relative;
  scroll-behavior: smooth;
}

@media (hover: none) {
  .gallery-nav {
    opacity: 0.9;
    width: 34px;
    height: 34px;
    margin-top: -17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #detail-image.is-entering { animation: none; }
}

.live-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.live-signals[hidden] {
  display: none;
}

.live-signals li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  animation: live-in 0.3s ease-out;
}

.live-signals .live-eye { background: #eef4ff; border-color: #cddcfb; color: #1e3a8a; }
.live-signals .live-cart { background: #fff7e6; border-color: #fde3a7; color: #8a5300; }
.live-signals .live-fire { background: #fff1f0; border-color: #fdd2cf; color: #9f1d22; }

@keyframes live-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.option-pill.has-swatch,
.option-pill:has(.option-alt) {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.45rem;
  text-align: left;
}

.option-dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 39, 0.2);
}

.option-alt {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.option-pill.has-swatch .option-alt {
  padding-left: calc(16px + 0.45rem);
}

.size-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin-top: -0.4rem;
}

.size-help[hidden],
.size-note[hidden] {
  display: none;
}

.size-guide-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.size-note {
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: #fff7e6;
  color: #8a5300;
  font-size: 0.82rem;
}

.size-guide {
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  padding: 1.25rem;
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.size-guide::backdrop {
  background: rgba(17, 24, 39, 0.5);
}

.size-guide-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.size-guide-head h2 {
  margin: 0 auto 0 0;
  font-size: 1.25rem;
}

.size-guide h3 {
  margin: 1.1rem 0 0.5rem;
  font-size: 1rem;
}

.size-unit-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.size-unit-toggle button {
  padding: 0.3rem 0.8rem;
  border: 0;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}

.size-unit-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: #ffffff;
}

.size-guide-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 1.4rem;
  cursor: pointer;
}

.size-table-wrap {
  overflow-x: auto;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.size-table th,
.size-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.size-table thead th {
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.size-guide-tip {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.delivery-dates {
  color: var(--success);
}

.share-button {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.ask-item {
  padding: 1rem;
  border: 1px solid #e4dcfb;
  border-radius: 10px;
  background: linear-gradient(135deg, #f7f4ff, #f2f8ff);
}

.ask-item h2 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.ask-item p {
  margin: 0 0 0.7rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.ask-item-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ask-item-chips button {
  padding: 0.4rem 0.8rem;
  border: 1px solid #d5c9f7;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: #4c1d95;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.ask-item-chips button:hover {
  background: #efe9ff;
}

.ask-item-chips button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.similar-section[hidden] {
  display: none;
}

.similar-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 180px);
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
}

.similar-card {
  display: grid;
  gap: 0.35rem;
  scroll-snap-align: start;
}

.similar-image {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #f6f7f9;
  overflow: hidden;
}

.similar-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.similar-card:hover .similar-image img {
  transform: scale(1.05);
}

.similar-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.88rem;
  color: var(--ink);
}

.similar-card:hover .similar-name {
  text-decoration: underline;
}

.buy-bar {
  display: none;
}

@media (max-width: 900px) {
  .buy-bar:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 940;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.1);
    animation: buy-bar-in 0.25s ease-out;
  }

  .buy-bar img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #f6f7f9;
  }

  .buy-bar-text {
    display: grid;
    min-width: 0;
    flex: 1;
  }

  .buy-bar-text strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.88rem;
  }

  .buy-bar-text span {
    font-weight: 700;
  }

  .buy-bar-button {
    flex: 0 0 auto;
    border-radius: 22px;
    background: var(--accent);
    color: #ffffff;
  }

  body.has-buy-bar .back-to-top {
    bottom: calc(1rem + 68px);
  }

  body.has-buy-bar .lyrbot {
    bottom: calc(1rem + 44px + 0.75rem + 68px);
  }
}

@keyframes buy-bar-in {
  from { transform: translateY(100%); }
  to { transform: none; }
}

/* With slideshow dots along the bottom, the zoom hint moves to the top corner. */
.gallery-stage-wrap:has(.gallery-dots:not([hidden])) .zoom-hint {
  top: 1rem;
  bottom: auto;
}

/* ── Dropshipping partner portal (partners.html) ── */
.partner-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
  display: grid;
  gap: 1.25rem;
}

.partner-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  max-width: 24ch;
}

.partner-hero > p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 68ch;
}

.partner-eyebrow {
  margin: 0 0 0.4rem;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.partner-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.partner-steps li {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.partner-steps span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.partner-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}

.partner-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.partner-card > p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

#partner-console {
  display: grid;
  gap: 1.25rem;
}

#partner-console[hidden] {
  display: none;
}

.partner-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr);
  gap: 0.75rem;
}

.partner-stat {
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.partner-stat span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.partner-stat strong {
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.partner-stat code {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.partner-stat small {
  color: var(--muted);
}

.partner-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.partner-inline-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.partner-inline-form .grow {
  flex: 1 1 18rem;
}

.partner-secret {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  background: #fffbeb;
}

.partner-secret[hidden] {
  display: none;
}

.partner-secret p {
  flex-basis: 100%;
  margin: 0;
}

.partner-secret code {
  flex: 1 1 16rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  background: var(--surface);
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.amount-in {
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

.amount-out {
  font-variant-numeric: tabular-nums;
}

.partner-order-status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.partner-order-status.is-awaiting_payment {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.partner-order-status.is-shipped,
.partner-order-status.is-delivered,
.partner-order-status.is-paid {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.partner-order-status + small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
}

.partner-docs h3 {
  margin: 1.5rem 0 0.5rem;
}

.partner-docs p,
.partner-docs li {
  color: var(--ink-soft);
  line-height: 1.55;
}

.partner-docs pre {
  margin: 0.5rem 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.5;
}

.partner-docs :not(pre) > code {
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.86em;
}

.partner-endpoints {
  display: grid;
  gap: 0.2rem;
  margin: 0.5rem 0 1rem;
}

.partner-endpoints dt {
  margin-top: 0.6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.partner-endpoints dd {
  margin: 0;
  color: var(--ink-soft);
}

.partner-endpoints .method {
  display: inline-block;
  min-width: 3.2rem;
  margin-right: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  text-align: center;
}

.partner-endpoints .method.post {
  background: #dcfce7;
  color: #166534;
}

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

  .partner-stat.wide {
    grid-column: 1 / -1;
  }
}

/* Admin: dropshipping partner review (admin.js renderPartners) */
.partner-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.partner-settings label,
.business-review .partner-field {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.business-review .partner-field input {
  width: 8rem;
}

/* Privacy policy and other text pages */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
  line-height: 1.6;
}

.legal-page h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal-page ul {
  padding-left: 1.25rem;
}

.legal-page li + li {
  margin-top: 0.4rem;
}

.legal-updated {
  color: #707070;
  font-size: 0.9rem;
}

/* On phones the full header (links, pickers, logo, search) is ~350px tall, so pinning it would hide half the screen. */
@media (max-width: 768px) {
  .header {
    position: static;
  }
}

/* ── Grocery list page (groceries.js) ───────────────────────────────────────────── */
.grocery-list-field {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.grocery-list-field textarea {
  font: inherit;
  font-weight: 400;
  resize: vertical;
}

.grocery-quick-label {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.grocery-preview {
  margin: 0 0 1rem;
  padding: 1rem 1rem 1rem 2rem;
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 12px;
  max-height: 320px;
  overflow-y: auto;
  overflow-wrap: anywhere;
}

.grocery-preview .grocery-empty {
  list-style: none;
  margin-left: -1rem;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  /* The list comes first on phones; the preview and steps follow it. */
  #grocery-form {
    order: -1;
  }
}

/* Checkout page: delivery address between the ZIP code and the shipping rates */
.delivery-address {
  margin: 1.25rem 0;
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.delivery-address legend {
  padding: 0;
  font-weight: 700;
  font-size: 1rem;
}

.delivery-address > p {
  margin: 0.25rem 0 0.75rem;
}

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.delivery-grid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 0;
}

.delivery-grid input {
  margin: 0;
  min-height: 44px;
  width: 100%;
}

.delivery-grid .delivery-wide {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .delivery-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Business checkout: quotes and invoices (cart, account page, invoice) ── */
.business-checkout[hidden],
.quote-request[hidden] {
  display: none;
}

.business-checkout {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.business-quote-note {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #075985;
  font-size: 0.9rem;
  font-weight: 600;
}

.quote-request summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.quote-request label {
  display: block;
  margin: 0.6rem 0 0.3rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.quote-request textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.my-quote {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.my-quote + .my-quote {
  margin-top: 0.7rem;
}

.my-quote-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.my-quote ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.my-quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.my-order-invoice {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
}

.my-order-invoice.is-overdue {
  color: #b91c1c;
  font-weight: 600;
}

.status-quote-requested { background: #fef3c7; color: #92400e; }
.status-quote-quoted { background: #dcfce7; color: #166534; }
.status-quote-ordered { background: #e0f2fe; color: #075985; }
.status-quote-declined,
.status-quote-expired,
.status-quote-withdrawn { background: #f1f5f9; color: var(--ink-soft); }

.certificate-field[hidden] {
  display: none;
}

/* ── Invoice page ── */
.invoice-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.25rem 16px 3rem;
}

.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.invoice-sheet {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.invoice-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.invoice-head h1 {
  margin: 0;
  font-size: 1.8rem;
}

.invoice-number {
  margin: 0.2rem 0 0.5rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.invoice-status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 600;
}

.invoice-status.is-paid { background: #dcfce7; color: #166534; }
.invoice-status.is-overdue { background: #fee2e2; color: #b91c1c; }

.invoice-from {
  display: grid;
  gap: 0.15rem;
  text-align: right;
  color: var(--ink-soft);
}

.invoice-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.invoice-meta dt,
.invoice-totals dt {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invoice-meta dd {
  margin: 0.2rem 0 0;
}

.invoice-table-wrap {
  overflow-x: auto;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.invoice-table th,
.invoice-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
}

.invoice-table th:first-child,
.invoice-table td:first-child {
  text-align: left;
}

.invoice-table small {
  color: var(--muted);
}

.invoice-totals {
  display: grid;
  gap: 0.35rem;
  width: min(100%, 320px);
  margin: 1.2rem 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.invoice-totals div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.invoice-totals dd {
  margin: 0;
}

.invoice-due {
  padding-top: 0.5rem;
  border-top: 2px solid var(--ink);
  font-weight: 700;
}

.invoice-terms {
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .invoice-sheet {
    padding: 1.1rem;
  }

  .invoice-from {
    text-align: left;
  }
}

@media print {
  .invoice-chrome,
  .lyrbot-launcher {
    display: none !important;
  }

  .invoice-page {
    padding: 0;
  }

  .invoice-sheet {
    border: 0;
    padding: 0;
  }
}

.quote-admin-header {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* ── Condition, auctions and offers (eBay-style selling formats) ───────────── */
/* The hidden attribute always wins over a component's display (buttons and labels set their own). */
[hidden] {
  display: none !important;
}

.condition-note {
  display: block;
  margin-top: 0.2rem;
  color: #555;
  font-size: 0.88rem;
  font-style: italic;
}

.product-condition {
  margin: 0.15rem 0;
  color: #555;
  font-size: 0.85rem;
  font-weight: 600;
}

.product-selling {
  margin: 0.1rem 0 0.4rem;
  color: #555;
  font-size: 0.85rem;
}

.product-selling .time-left {
  color: #c2410c;
  font-weight: 600;
}

.offer-button {
  background: #ffffff;
  border: 1px solid var(--button-soft-border);
  color: var(--button-bg);
}

.offer-button:hover {
  background: var(--button-hover);
  border-color: var(--button-hover);
  color: #ffffff;
}

.auction-box {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #d9dde6;
  border-radius: var(--radius);
  background: #fafbfc;
}

.auction-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.auction-head > div {
  display: flex;
  flex-direction: column;
}

.auction-head strong {
  font-size: 1.6rem;
  line-height: 1.2;
}

.auction-clock strong.is-ending {
  color: #c2410c;
}

.auction-meta {
  color: #555;
  font-size: 0.88rem;
}

.auction-standing {
  margin: 0.75rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #eef2ff;
  font-weight: 600;
}

.auction-standing.is-winning {
  background: #ecfdf5;
  color: #047857;
}

.auction-standing.is-outbid {
  background: #fef2f2;
  color: #b91c1c;
}

.bid-form {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.3rem;
}

.bid-form label {
  font-weight: 600;
}

.bid-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bid-row input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c5cad6;
  border-radius: 999px;
  font-size: 1.05rem;
}

.bid-row .button {
  flex: 0 0 auto;
}

.bid-currency {
  font-weight: 700;
}

.market-dialog {
  width: min(480px, calc(100vw - 32px));
  border: 0;
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.market-dialog::backdrop {
  background: rgba(17, 24, 39, 0.45);
}

.market-dialog h2 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
}

.market-dialog form {
  display: grid;
  gap: 0.75rem;
}

.market-dialog label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
}

.market-dialog input,
.market-dialog textarea {
  padding: 0.6rem 0.7rem;
  border: 1px solid #c5cad6;
  border-radius: 10px;
  font-weight: 400;
}

.market-dialog textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.offer-item {
  margin: 0;
  color: #555;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bid-history {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.bid-history th,
.bid-history td {
  padding: 0.4rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

/* Seller form */
.selling-format {
  border: 1px solid #d9dde6;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}

.selling-format legend {
  font-weight: 700;
  padding: 0 0.3rem;
}

.format-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.format-choice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d9dde6;
  border-radius: 12px;
  cursor: pointer;
}

.format-choice input,
.offer-fields .checkbox-field input,
.email-prefs input {
  flex: 0 0 auto;
  width: auto;
  margin: 0.3rem 0 0;
}

.format-choice:has(input:checked) {
  border-color: var(--button-bg);
  background: var(--button-soft);
}

.format-choice span {
  display: grid;
}

.format-choice small {
  color: #555;
}

.auction-fields,
.offer-thresholds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.offer-fields .checkbox-field {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.selling-pill {
  background: #fff7ed;
  color: #9a3412;
}

/* Account: bids, offers and email preferences */
.my-subhead {
  margin: 1.4rem 0 0.6rem;
  font-size: 1.05rem;
}

.market-card {
  display: flex;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.market-card img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  background: #f3f4f6;
}

.market-card-body {
  flex: 1;
  min-width: 0;
}

.market-card-body p {
  margin: 0.2rem 0;
}

.market-card-title {
  font-weight: 600;
  color: #0f4fd6;
}

.market-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

.market-status.is-your-turn,
.market-status.is-outbid {
  color: #b91c1c;
}

.market-status.is-winning,
.market-status.status-accepted,
.market-status.status-purchased {
  color: #047857;
}

.offer-history {
  margin: 0.4rem 0;
  padding-left: 1.1rem;
  color: #555;
  font-size: 0.86rem;
}

.market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.deal-banner,
.deal-note {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: #ecfdf5;
  color: #065f46;
}

.deal-banner p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0;
}

.deal-note {
  margin: 0.75rem 0;
  font-weight: 600;
}

.email-prefs {
  display: grid;
  gap: 0.75rem;
}

.email-prefs .checkbox-field {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.email-prefs small {
  color: #555;
}

.unsubscribe-page .button {
  margin: 0.25rem 0.5rem 0.25rem 0;
}

@media (max-width: 600px) {
  .market-card img {
    width: 64px;
    height: 64px;
  }

  .bid-row .button {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ── Brands & Stores (brands.html) and the admin Brands tab ───────────────── */
.brands-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
}

.brands-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brands-hero h1 {
  margin: 0 0 0.3rem;
}

.brands-hero p {
  margin: 0;
  color: var(--ink-soft);
}

.brands-country {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.brands-country select,
.brands-toolbar input[type="search"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0.75rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.brands-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
  overflow-x: auto;
}

.brands-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}

.brands-tab.active {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

.brands-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.9rem;
}

.brands-toolbar input[type="search"] {
  flex: 1 1 260px;
  max-width: 520px;
}

.brands-local {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

.brands-local input {
  width: auto;
  margin: 0;
}

.brands-sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.brands-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 0.8rem;
}

.brands-letters button {
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.brands-letters button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.brands-letters button:disabled {
  opacity: 0.35;
  cursor: default;
}

.brands-count {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.brand-tile {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.brand-tile:hover {
  border-color: #d1d5db;
  box-shadow: var(--shadow-md);
}

.brand-tile-text {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.brand-tile-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-tile-sector {
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-logo {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line);
}

.brand-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  background: #ffffff;
}

.brand-monogram {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: hsl(var(--brand-hue, 0) 55% 92%);
  color: hsl(var(--brand-hue, 0) 45% 30%);
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-logo-large {
  width: 104px;
  height: 104px;
  border-radius: 20px;
}

.brand-logo-large .brand-monogram {
  font-size: 2rem;
}

.brand-logo-small {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.brand-logo-small .brand-monogram {
  font-size: 0.65rem;
}

.brand-logo-small img {
  padding: 2px;
}

.brand-tags,
.brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.brand-tag {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  font-size: 0.76rem;
  white-space: nowrap;
}

.brand-tag-local {
  background: #ecfdf3;
  box-shadow: inset 0 0 0 1px #bbf7d0;
  color: var(--success);
}

.brand-tag-count {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px #c7d7fe;
  color: var(--accent);
}

.brand-tag-protected {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fed7aa;
  color: #9a3412;
}

.brands-more {
  display: block;
  margin: 1.25rem auto 0;
}

.brands-crumbs {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.brands-crumbs a {
  color: var(--accent);
}

.brand-card-large {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  margin-bottom: 1.25rem;
}

.brand-summary {
  flex: 1 1 320px;
  min-width: 0;
}

.brand-summary h1 {
  margin: 0 0 0.5rem;
}

.brand-summary p {
  color: var(--ink-soft);
  max-width: 70ch;
}

.brand-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1rem;
}

.brand-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-facts dd {
  margin: 0;
  font-weight: 600;
}

.brand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brand-availability {
  margin-bottom: 1.5rem;
}

.brand-availability h2,
.brand-detail h2,
#brand-listings-title,
#brand-related-wrap h2 {
  font-size: 1.2rem;
  margin: 1.25rem 0 0.6rem;
}

.brand-listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
}

.brand-product {
  display: block;
  cursor: pointer;
}

.brand-product-image {
  aspect-ratio: 1;
  border-radius: 10px;
  background: #f6f7f9;
  overflow: hidden;
}

.brand-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.brand-product-name {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brand-product-price {
  margin: 0;
  font-weight: 700;
}

.brand-was {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.brand-product-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.brands-empty {
  color: var(--ink-soft);
}

.brands-empty a {
  color: var(--accent);
}

.brand-related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.88rem;
}

.brand-chip:hover {
  border-color: #d1d5db;
}

/* Admin Brands tab */
.brand-admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.brand-admin-filters input,
.brand-admin-filters select {
  flex: 1 1 200px;
  width: auto;
  margin: 0;
}

.brand-admin-filters .button {
  flex: 0 0 auto;
}

.brand-admin-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.brand-admin-row .brand-logo {
  width: 40px;
  height: 40px;
}

.brand-admin-main {
  flex: 1;
  min-width: 0;
}

.brand-admin-main strong {
  display: block;
}

.brand-admin-main small {
  color: var(--muted);
}

.brand-admin-hidden {
  opacity: 0.55;
}

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

.brand-form-grid .wide {
  grid-column: 1 / -1;
}

.brand-sector-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  max-height: 180px;
  overflow: auto;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.brand-sector-picks label {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  font-size: 0.88rem;
}

.brand-review-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.brand-review-row img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #f6f7f9;
}

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

  .brand-listings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-review-row,
  .brand-admin-row {
    flex-wrap: wrap;
  }
}

/* ── Totals: admin cards and tab numbers, brand directory and brand page categories ── */

.admin-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.admin-total {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-total[hidden] {
  display: none;
}

.admin-total:hover {
  border-color: #d1d5db;
  box-shadow: var(--shadow-md);
}

.admin-total-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-total strong {
  font-size: 1.6rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.admin-total small {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-tab {
  white-space: nowrap;
}

.tab-total {
  margin-left: 0.25rem;
  padding: 0 0.4rem;
  border-radius: var(--radius-pill);
  background: #e5e7eb;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tab-total:empty {
  display: none;
}

.brands-groups {
  display: grid;
  gap: 1.75rem;
}

.brands-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.brands-group-head h2,
.brands-group-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.brands-group-count {
  margin-left: 0.3rem;
  padding: 0.05rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  vertical-align: middle;
}

.brands-group-all {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.brands-group-all:hover {
  text-decoration: underline;
}

.brand-listings-wrap {
  display: grid;
  gap: 1.5rem;
}

.brand-category-group .brand-listings {
  margin-top: 0.25rem;
}

/* Compact hero slider: half the old height, image beside the copy on every screen */
.hero-slide.market-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
  height: 144px;
}

.hero-slide .market-hero-visual {
  order: 0;
  min-height: 0;
}

.hero-slide .market-hero-copy {
  padding: 0.6rem clamp(1rem, 4vw, 3.5rem) 1.5rem;
}

.hero-slide .market-hero-copy .eyebrow {
  margin: 0;
  font-size: 0.72rem;
}

.hero-slide .market-hero-copy h2 {
  margin: 0.1rem 0 0.2rem;
  font-size: clamp(1.05rem, 2vw, 1.6rem);
  line-height: 1.1;
}

.hero-slide .market-hero-copy p:not(.eyebrow) {
  max-width: 100%;
  margin: 0 0 0.45rem;
  overflow: hidden;
  font-size: 0.9rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-slide .market-hero-copy .button {
  min-height: 0;
  padding: 0.35rem 0.95rem;
  font-size: 0.88rem;
}

@media (max-width: 768px) {
  .hero-slide.market-hero {
    height: 150px;
  }

  .hero-slide .market-hero-copy {
    padding: 0.5rem 0.85rem 1.4rem;
  }

  .hero-slide .market-hero-copy p:not(.eyebrow) {
    display: none;
  }

  .hero-dots {
    bottom: 0.45rem;
    left: 0.85rem;
  }
}

/* Signed-in side menu (eBay app style) */
.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.drawer-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.drawer-toggle:hover {
  background: var(--surface-soft);
}

.drawer-toggle:focus-visible,
.drawer-close:focus-visible,
.drawer-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.drawer-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17, 24, 39, 0.45);
}

.account-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  width: min(320px, 86vw);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

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

body.drawer-open {
  overflow: hidden;
}

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--line);
}

.drawer-profile > div {
  display: grid;
  flex: 1;
  min-width: 0;
}

.drawer-profile strong {
  overflow: hidden;
  font-size: 1.1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.drawer-profile a {
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: none;
}

.drawer-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
}

.drawer-close {
  align-self: flex-start;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.drawer-close:hover {
  background: var(--surface-soft);
}

.drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem 0 1rem;
}

.drawer-group {
  padding: 0.35rem 0;
}

.drawer-group + .drawer-group {
  border-top: 1px solid var(--line);
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.7rem 1.1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.drawer-link:hover {
  background: var(--surface-soft);
}

.drawer-link span:not(.count-badge) {
  flex: 1;
}

.drawer-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .account-drawer {
    transition: none;
  }
}

/* Slim left rail for signed-in shoppers on wider screens */
.account-rail {
  display: none;
}

@media (min-width: 900px) {
  body.has-account-rail {
    padding-left: 76px;
  }

  body.has-account-rail .drawer-toggle {
    display: none;
  }

  .account-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 76px;
    padding: 0.75rem 0 0.9rem;
    border-right: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 2px 0 12px rgba(17, 24, 39, 0.04);
  }

  .rail-menu {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }

  .rail-menu svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .rail-menu:hover {
    background: var(--surface-soft);
  }

  .rail-profile {
    margin: 0.35rem 0 0.6rem;
    border-radius: 50%;
    transition: transform 0.15s ease;
  }

  .rail-profile:hover {
    transform: scale(1.06);
  }

  .rail-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(124, 58, 237, 0.25);
  }

  .rail-links {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    width: 100%;
    padding: 0.5rem 0;
    border-top: 1px solid var(--line);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .rail-links::-webkit-scrollbar {
    display: none;
  }

  .rail-bottom {
    margin-top: auto;
    padding-bottom: 0;
  }

  .rail-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    padding: 0.2rem 0.25rem;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
  }

  .rail-link .drawer-icon {
    box-sizing: content-box;
    width: 22px;
    height: 22px;
    padding: 0.32rem 1rem;
    border-radius: var(--radius-pill);
    stroke: currentColor;
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  .rail-label {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.01em;
  }

  .rail-link:hover {
    color: var(--ink);
  }

  .rail-link:hover .drawer-icon {
    background: var(--surface-soft);
  }

  .rail-link.is-current {
    color: var(--brand);
  }

  .rail-link.is-current .drawer-icon {
    background: rgba(229, 50, 56, 0.1);
  }

  .rail-link:focus-visible,
  .rail-menu:focus-visible,
  .rail-profile:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius);
  }

  .rail-badge {
    position: absolute;
    top: 0;
    left: calc(50% + 6px);
    min-width: 18px;
    font-size: 0.65rem;
  }
}

@media (min-width: 900px) and (max-height: 740px) {
  .rail-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ══ Slim header (eBay style): thin top bar, one compact row with logo, category button and a smaller search ══ */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.05);
}

.utility-bar {
  background: #ffffff;
  border-bottom: 1px solid #f0f1f4;
  font-size: 0.78rem;
}

.utility-inner {
  padding: 0.28rem 1.5rem;
}

.utility-links {
  gap: 1rem;
}

.utility-links a {
  color: #374151;
  font-weight: 500;
}

.utility-links a:hover {
  color: var(--ink);
}

.utility-greeting {
  padding-left: 1rem;
}

.utility-bar select,
.utility-bar .locale-select {
  min-height: 0;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  font-size: 0.78rem;
}

.header-top {
  gap: 0.85rem;
  padding: 0.55rem 1.5rem;
}

.header-top .logo {
  height: 40px;
}

.header .category-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: auto;
  max-width: 92px;
  padding: 0.3rem 0.45rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.15;
}

.header .category-menu::after {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.header .category-menu[aria-expanded="true"]::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.header .category-menu:hover,
.header .category-menu[aria-expanded="true"] {
  background: var(--surface-soft);
  color: var(--ink);
}

.header .search-bar {
  max-width: 860px;
  min-width: 220px;
  height: 42px;
  border: 2px solid var(--ink);
  box-shadow: none;
}

.header .search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header .search-bar .search-field input {
  height: 100%;
  padding: 0 3.6rem 0 1rem;
  font-size: 0.95rem;
}

.header .search-bar .search-field.has-voice input {
  padding-right: 4.8rem;
}

.header .search-bar .search-category {
  flex-basis: 150px;
  height: 26px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.84rem;
}

.header .search-button {
  align-self: stretch;
  min-width: 0;
  margin: 3px;
  padding: 0 1.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: none;
}

.header .search-button:hover {
  box-shadow: none;
  transform: none;
}

.header .search-voice {
  width: 28px;
  height: 28px;
}

.header .header-actions {
  margin-left: auto;
}

.header .header-actions .button {
  min-height: 0;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
}

.compact-header {
  padding-top: 0.6rem;
}

.compact-header .logo {
  width: 124px;
}

@media (max-width: 768px) {
  .header-top {
    gap: 0.5rem;
    padding: 0.45rem 0.85rem 0.6rem;
  }

  .header-top .logo {
    height: 34px;
  }

  /* One slim line that scrolls sideways instead of wrapping onto several rows. */
  .utility-inner {
    position: relative;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    padding: 0.3rem 0.85rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .utility-inner::-webkit-scrollbar {
    display: none;
  }

  .utility-links,
  .utility-links.utility-right {
    display: flex;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    gap: 0.9rem;
  }

  .utility-greeting {
    padding-left: 0.9rem;
  }

  .header .search-bar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    height: 40px;
    padding: 0;
    min-width: 0;
    border: 2px solid var(--ink);
    border-radius: var(--radius-pill);
    background: #ffffff;
  }

  .header .search-bar .search-field input,
  .header .search-bar .search-field.has-voice input {
    border: 0;
    border-radius: var(--radius-pill) 0 0 var(--radius-pill);
    padding-right: 2.6rem;
  }

  .header .search-bar .search-category,
  .header .search-hint {
    display: none;
  }

  .header .search-button {
    align-self: center;
    width: auto;
    height: 30px;
    min-height: 0;
    flex: 0 0 auto;
    margin: 0 3px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
  }

  .header .header-actions .button {
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
  }

  .compact-header .logo {
    width: 112px;
  }
}

/* ══ Tablet & phone header (ui.js initHeaderMenu): icon buttons on the right and a cascading menu from the right ══ */
.header-icons {
  display: none;
}

.header-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.header-icon:hover,
.header-icon[aria-expanded="true"] {
  background: var(--surface-soft);
}

.header-icon:focus-visible,
.header-menu-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.header-icon .drawer-icon {
  width: 23px;
  height: 23px;
  stroke: currentColor;
}

.header-icon .count-badge {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 0.28rem;
  font-size: 0.62rem;
  line-height: 17px;
}

.header-icon-avatar,
.header-menu-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
}

.header-menu-wrap {
  position: relative;
}

.header-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 300;
  width: min(330px, calc(100vw - 1rem));
  max-height: calc(100dvh - 7rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.35rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.18);
  text-align: left;
  animation: header-menu-in 0.16s ease-out;
}

.header-menu[hidden] {
  display: none;
}

@keyframes header-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .header-menu {
    animation: none;
  }
}

.header-menu-profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.header-menu-profile .header-menu-avatar {
  width: 38px;
  height: 38px;
  font-size: 1rem;
}

.header-menu-profile div {
  display: grid;
  line-height: 1.3;
}

.header-menu-profile div a {
  color: var(--accent);
  font-size: 0.82rem;
}

.header-menu-guest .button {
  flex: 1;
  min-height: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  text-align: center;
}

.header-menu-group {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}

.header-menu-sub {
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-menu-sub[hidden] {
  display: none;
}

.header-menu-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.header-menu-link:hover {
  background: var(--surface-soft);
}

.header-menu-link span:not(.count-badge) {
  flex: 1;
  min-width: 0;
}

.header-menu-link .drawer-icon {
  width: 20px;
  height: 20px;
}

.header-menu-branch .drawer-icon:last-child {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.header-menu-branch[aria-expanded="true"] {
  font-weight: 600;
}

.header-menu-branch[aria-expanded="true"] .drawer-icon:last-child {
  transform: rotate(90deg);
}

/* Each level of the cascade steps in and gets a soft guide line. */
.header-menu-sub .header-menu-link {
  padding-left: 2.9rem;
  font-size: 0.88rem;
}

.header-menu-sub .header-menu-sub {
  margin: 0 0 0.25rem 2.9rem;
  border-left: 2px solid var(--line);
}

.header-menu-sub .header-menu-sub .header-menu-link {
  padding: 0.45rem 1rem 0.45rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.header-menu-all {
  font-weight: 600;
}

.header-menu-sub .header-menu-sub .header-menu-all {
  color: var(--accent);
}

.header-menu-locale {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.7rem 1rem 0.45rem;
}

@media (max-width: 1024px) {
  .header .utility-bar,
  .has-header-icons > .header-actions,
  .header .category-menu-wrap,
  .drawer-brand .drawer-toggle {
    display: none;
  }

  .header-icons {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    flex: 0 0 auto;
    margin-left: auto;
  }

  /* One line: logo, search, then the icons. */
  .header .header-top {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
  }

  .header .header-top .search-bar {
    order: 0;
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }

  .header .header-top .logo-link,
  .header .header-top .drawer-brand {
    flex: 0 0 auto;
  }

  /* Folded down to two slim lines, so phones can keep it pinned like eBay's. */
  .header {
    position: sticky;
  }

  .compact-header.has-header-icons {
    position: relative;
    z-index: 100;
    flex-direction: row;
    align-items: center;
    padding-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .header .header-top,
  .compact-header.has-header-icons {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .header-top .logo,
  .compact-header .logo {
    height: 30px;
    width: auto;
  }

  .header-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 340px) {
  .header-icons > .header-icon:first-child {
    display: none;
  }
}

/* Phones: the search keeps its room between the logo and the icons (watchlist and account live in the menu). */
@media (max-width: 600px) {
  .header .header-top {
    gap: 0.4rem;
  }

  .header .header-top .header-icons > .header-icon:not(.header-menu-toggle):not([href="cart.html"]) {
    display: none;
  }

  .header .search-bar {
    height: 38px;
  }

  .header .search-bar .search-field input,
  .header .search-bar .search-field.has-voice input {
    padding-left: 0.75rem;
    padding-right: 1.8rem;
    font-size: 0.88rem;
  }

  .header .search-bar .search-voice {
    display: none;
  }

  /* The search button turns into a round magnifier. */
  .header .search-button {
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 17px;
  }
}

@media (max-width: 400px) {
  .header .header-top .logo {
    height: 26px;
  }
}

/* Tablets and phones: the category picker and "/" hint make room for the typed search. */
@media (max-width: 1024px) {
  .header .search-bar .search-category,
  .header .search-hint {
    display: none;
  }
}

.content-grid-full .hero-deals {
  border-top: 0;
  padding-top: 0;
}

/* Home: no heading over the plain listing; the filter bar is for signed-in shoppers (app.js renderListingToolbar). */
.deals-header[hidden],
.listing-toolbar[hidden],
.sort-control[hidden] {
  display: none;
}

/* ══ Offer strip: the hero slider at half height, with offer badges, entrance animations, drag and a progress bar ══ */
.hero-slider {
  margin-bottom: 1rem;
  border-radius: 12px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.hero-slider .hero-track {
  transition: transform 0.55s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.hero-slider.is-dragging .hero-track {
  transition: none;
}

.hero-slider .hero-slide.market-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.4rem);
  height: 80px;
  padding: 0 clamp(0.75rem, 3vw, 3.5rem);
  overflow: hidden;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
    var(--hero-tone, #f7d7c4);
  cursor: pointer;
}

/* Photo on the right, fading into the slide colour. */
.hero-slider .hero-slide .market-hero-visual {
  position: absolute;
  inset: 0 0 0 auto;
  width: 42%;
  min-height: 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
  mask-image: linear-gradient(to right, transparent, #000 45%);
}

.hero-slider .hero-slide .market-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 7s ease-out;
}

.hero-slider .hero-slide.is-active .market-hero-visual img {
  transform: scale(1);
}

.hero-offer {
  position: relative;
  z-index: 1;
  display: grid;
  place-content: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e53238, #f5af02);
  color: #ffffff;
  text-align: center;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(229, 50, 56, 0.35);
}

.hero-offer strong {
  font-size: 1.15rem;
  font-weight: 800;
}

.hero-offer small {
  margin-top: 0.12rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-offer.is-live::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid #e53238;
  border-radius: 50%;
  animation: hero-ring 1.6s ease-out infinite;
}

.hero-slider .hero-slide .market-hero-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 58%;
  padding: 0;
}

.hero-slider .hero-slide .market-hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  overflow: hidden;
  font-size: 0.66rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-live-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e53238;
  animation: hero-blink 1s steps(2, start) infinite;
}

.hero-slider .hero-slide .market-hero-copy h2 {
  max-width: none;
  margin: 0.05rem 0 0;
  overflow: hidden;
  font-size: clamp(0.98rem, 1.8vw, 1.3rem);
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-slider .hero-slide .market-hero-copy p:not(.eyebrow) {
  margin: 0.05rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.hero-slider .hero-cta {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 0;
  margin-left: auto;
  padding: 0.42rem 1rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

/* Entrance: badge pops, text rises in a stagger, the button slides in. */
.hero-slide.is-active .hero-offer {
  animation: hero-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hero-slide.is-active .market-hero-copy > * {
  animation: hero-rise 0.5s ease-out both;
}

.hero-slide.is-active .market-hero-copy > :nth-child(2) {
  animation-delay: 0.08s;
}

.hero-slide.is-active .market-hero-copy > :nth-child(3) {
  animation-delay: 0.16s;
}

.hero-slide.is-active .hero-cta {
  animation: hero-slide-in 0.5s 0.2s ease-out both;
}

.hero-slide:hover .hero-offer {
  transform: rotate(-8deg) scale(1.06);
  transition: transform 0.2s ease;
}

@keyframes hero-pop {
  from { opacity: 0; transform: scale(0.4) rotate(-20deg); }
  to { opacity: 1; transform: none; }
}

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

@keyframes hero-slide-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-ring {
  from { opacity: 0.8; transform: scale(1); }
  to { opacity: 0; transform: scale(1.35); }
}

@keyframes hero-blink {
  to { visibility: hidden; }
}

/* Arrows appear on hover; the dots are progress bars that fill while a slide is showing. */
.hero-slider .hero-arrow {
  z-index: 2;
  width: 30px;
  height: 30px;
  font-size: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hero-slider:hover .hero-arrow,
.hero-slider .hero-arrow:focus-visible {
  opacity: 1;
}

.hero-slider .hero-arrow-prev {
  left: 0.3rem;
}

.hero-slider .hero-arrow-next {
  right: 0.3rem;
}

.hero-slider .hero-dots {
  z-index: 2;
  bottom: 6px;
  left: 50%;
  gap: 4px;
  transform: translateX(-50%);
}

.hero-slider .hero-dots button,
.hero-slider .hero-dots button[aria-selected="true"] {
  position: relative;
  width: 16px;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(17, 17, 17, 0.2);
}

.hero-slider .hero-dots button[aria-selected="true"] {
  width: 26px;
}

.hero-slider .hero-dots button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #111111;
  transform-origin: left;
}

.hero-slider .hero-dots button.is-running::after {
  animation: hero-progress var(--hero-autoplay, 6s) linear both;
}

.hero-slider.is-paused .hero-dots button.is-running::after {
  animation-play-state: paused;
}

@keyframes hero-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 768px) {
  .hero-slider .hero-slide.market-hero {
    height: 76px;
  }

  .hero-offer {
    width: 50px;
    height: 50px;
  }

  .hero-offer strong {
    font-size: 1rem;
  }

  .hero-slider .hero-slide .market-hero-copy {
    max-width: none;
  }

  .hero-slider .hero-slide .market-hero-copy p:not(.eyebrow) {
    display: none;
  }

  .hero-slider .hero-slide .market-hero-visual {
    width: 38%;
    opacity: 0.55;
  }

  .hero-slider .hero-arrow {
    display: none;
  }
}

/* Phones: the whole banner is the link, so the button gives its room to the title and a chevron hints at it. */
@media (max-width: 600px) {
  .hero-slider .hero-cta {
    display: none;
  }

  .hero-slider .hero-slide.market-hero::after {
    content: "";
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin: 0 0.35rem 0 auto;
    border-top: 2.5px solid var(--ink);
    border-right: 2.5px solid var(--ink);
    transform: rotate(45deg);
  }

  .hero-slider .hero-slide.is-active.market-hero::after {
    animation: hero-nudge 1.4s ease-in-out 0.6s infinite;
  }
}

@keyframes hero-nudge {
  0%, 100% { transform: translateX(0) rotate(45deg); }
  50% { transform: translateX(4px) rotate(45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider .hero-track,
  .hero-slider .hero-slide .market-hero-visual img {
    transition: none;
  }

  .hero-slide.is-active .hero-offer,
  .hero-slide.is-active .market-hero-copy > *,
  .hero-slide.is-active .hero-cta,
  .hero-offer.is-live::after,
  .hero-live-dot {
    animation: none;
  }
}

/* Signed-in filter bar on phones: a tidy 2 x 2 grid instead of four stacked rows. */
@media (max-width: 600px) {
  .listing-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.6rem;
    padding: 0.55rem;
  }

  .listing-toolbar .active-filters {
    grid-column: 1 / -1;
  }

  .listing-toolbar .active-filters:empty {
    display: none;
  }

  .listing-toolbar .sort-control {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    font-size: 0.74rem;
  }

  .listing-toolbar .sort-control select {
    width: 100%;
    min-width: 0;
    font-size: 0.84rem;
  }
}

/* ══ Photo search button (ui.js initPhotoSearch) ══ */
.search-photo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  align-self: center;
  width: 34px;
  height: 34px;
  margin-left: 0.15rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

.search-photo:hover {
  background: var(--button-soft);
  color: var(--button-bg);
}

.search-photo:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.search-photo.is-busy svg {
  animation: photo-pulse 0.9s ease-in-out infinite;
}

@keyframes photo-pulse {
  50% { opacity: 0.35; transform: scale(0.9); }
}

/* ══ Live sourcing status over the results (app.js sourceSearch) ══ */
.sourcing-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.sourcing-status[hidden] {
  display: none;
}

.sourcing-spinner {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sourcing-spin 0.8s linear infinite;
}

@keyframes sourcing-spin {
  to { transform: rotate(360deg); }
}

/* ══ Bottom bar on phones (ui.js initBottomNav), like the Amazon app ══ */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body.has-bottom-nav {
    --bottom-nav-h: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: var(--bottom-nav-h);
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 950;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -6px 20px rgba(17, 24, 39, 0.08);
    backdrop-filter: saturate(180%) blur(10px);
  }

  .bottom-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }

  .bottom-nav-item > span:last-child {
    overflow: hidden;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .bottom-nav-item .drawer-icon {
    width: 23px;
    height: 23px;
    stroke: currentColor;
  }

  .bottom-nav-item.is-current {
    color: var(--brand);
  }

  /* A bar above the current tab, as in the Amazon app. */
  .bottom-nav-item.is-current::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28%;
    right: 28%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--brand);
  }

  .bottom-nav-item:active {
    background: var(--surface-soft);
  }

  .bottom-nav-item:focus-visible {
    outline: none;
    box-shadow: inset var(--focus-ring);
  }

  .bottom-nav-icon {
    position: relative;
    display: grid;
    place-items: center;
  }

  .bottom-nav-icon .count-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    min-width: 17px;
    height: 17px;
    padding: 0 0.28rem;
    font-size: 0.62rem;
    line-height: 17px;
  }

  .bottom-nav-avatar {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--brand);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
  }

  /* The top keeps just the logo and the search; the icons moved to the bottom bar. */
  body.has-bottom-nav .header-icons > .header-icon,
  body.has-bottom-nav .header-menu-toggle {
    display: none;
  }

  /* A backdrop filter would make the header the frame for the fixed menu sheet below. */
  body.has-bottom-nav .header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.has-bottom-nav .header-icons {
    margin-left: 0;
  }

  /* The menu rises from the bottom bar as a sheet. */
  body.has-bottom-nav .header-menu {
    position: fixed;
    top: auto;
    right: 0.5rem;
    bottom: calc(var(--bottom-nav-h) + 0.5rem);
    left: 0.5rem;
    width: auto;
    max-height: calc(100dvh - var(--bottom-nav-h) - 5rem);
    animation-name: header-sheet-in;
  }

  /* Categories has its own sheet, so the Menu sheet leaves its category tree out. */
  body.has-bottom-nav .header-menu-categories {
    display: none;
  }

  .category-sheet {
    position: fixed;
    right: 0.5rem;
    bottom: calc(var(--bottom-nav-h) + 0.5rem);
    left: 0.5rem;
    z-index: 960; /* above the Lyrbot bubble */
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - var(--bottom-nav-h) - 5rem);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.18);
    animation: header-sheet-in 0.16s ease-out;
  }

  .category-sheet[hidden] {
    display: none;
  }

  .category-sheet-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--line);
  }

  .category-sheet-head strong {
    flex: 1;
    font-size: 1rem;
  }

  .category-sheet-back,
  .category-sheet-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: inherit;
  }

  .category-sheet-back .drawer-icon {
    transform: rotate(180deg);
  }

  .category-sheet-back .drawer-icon,
  .category-sheet-close .drawer-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
  }

  .category-sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.8rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .category-sheet-grid[hidden],
  .category-sheet-subs[hidden] {
    display: none;
  }

  .category-sheet-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
  }

  .category-sheet-tile img,
  .category-sheet-blank {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    background: #f3f4f6;
  }

  .category-sheet-blank {
    display: grid;
    place-items: center;
    font-size: 2rem;
  }

  .category-sheet-subs {
    margin: 0;
    padding: 0.3rem 0;
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .category-sheet-subs a {
    display: block;
    padding: 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
  }

  .category-sheet-subs a:active {
    background: #f3f4f6;
  }

  .category-sheet-subs .category-sheet-all {
    color: var(--brand);
    font-weight: 700;
  }

  body.has-bottom-nav .toast-stack,
  body.has-bottom-nav .back-to-top {
    bottom: calc(1rem + var(--bottom-nav-h));
  }

  body.has-bottom-nav .lyrbot {
    bottom: calc(1rem + 44px + 0.75rem + var(--bottom-nav-h));
  }

  body.has-bottom-nav .buy-bar:not([hidden]) {
    bottom: var(--bottom-nav-h);
    padding-bottom: 0.6rem;
  }

  body.has-bottom-nav.has-buy-bar .back-to-top {
    bottom: calc(1rem + 68px + var(--bottom-nav-h));
  }

  body.has-bottom-nav.has-buy-bar .lyrbot {
    bottom: calc(1rem + 44px + 0.75rem + 68px + var(--bottom-nav-h));
  }

  /* The header search on phones: the camera sits beside the magnifier. */
  .header .search-photo {
    width: 30px;
    height: 30px;
    margin: 0;
  }
}

@keyframes header-sheet-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .search-photo.is-busy svg,
  .sourcing-spinner {
    animation-duration: 2.4s;
  }
}

/* Add to Cart on a listing with options: a small picker over the page (a bottom sheet on phones). */
.quick-options {
  width: min(420px, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  color: inherit;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.25);
}

.quick-options::backdrop {
  background: rgba(17, 24, 39, 0.45);
}

.quick-options-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.quick-options-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quick-options-head img {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
}

.quick-options-head div {
  display: grid;
  flex: 1;
  gap: 0.2rem;
  min-width: 0;
}

.quick-options-head strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.95rem;
  line-height: 1.3;
}

.quick-options-head span {
  font-weight: 700;
}

.quick-options-close {
  align-self: flex-start;
  width: 34px;
  height: 34px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: inherit;
  font-size: 1.3rem;
  line-height: 1;
}

.quick-options-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.quick-options-field select {
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  font-weight: 400;
}

.quick-options-error {
  margin: 0;
  color: #b91c1c;
  font-size: 0.9rem;
}

.quick-options-error[hidden] {
  display: none;
}

.quick-options-more {
  justify-self: center;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .quick-options {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  .quick-options-panel {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* Admin Regions tab */
.region-card {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.region-store {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem 0.75rem;
  align-items: end;
  padding: 0.75rem 0;
  border-top: 1px solid #f1f5f9;
}

.region-store .wide-field,
.region-store-check {
  grid-column: 1 / -1;
}

.region-store-actions,
.region-actions,
.regions-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.region-actions {
  margin-top: 0.75rem;
}

.regions-add {
  align-items: end;
  margin: 1rem 0;
}
