/* ============================================================================
 * BYTE theme — site styles + SDK component skin
 *
 * This is the SINGLE stylesheet for both:
 *   1) Our static site (header, footer, hero, PDP, cart, favorites)
 *   2) The SearchX SDK components (SearchBar popup, SearchPage results,
 *      facets, pagination, etc.)
 *
 * Derived from the original MOTI theme — same layout structure (square,
 * flat, uppercase), but recolored around a deep electric blue palette
 * suited to an electronics storefront. Layout/typography untouched so the
 * shared HTML works without changes; only color tokens differ.
 *
 * To swap themes for the demo, drop a new file into assets/css/themes/
 * and set `SITE_THEME_FILE` in config.js.
 * ========================================================================== */

/* ==========================================================================
   SearchX Theme: "BYTE" — electronics demo
   Minimal modern tech aesthetic in deep navy + electric blue.
   Primary accent: #1565c0 · Dark base: #0a1929
   ========================================================================== */

/* ==========================================================================
   1) COLOR TOKENS
   ========================================================================== */
:root {
  --searchx-white: #ffffff;
  --searchx-black: #0a1929; /* deep navy — replaces pure black throughout */

  /* Primary = Electric blue scale (built around #1565c0) */
  --searchx-primary-50:  #e8f1fb;
  --searchx-primary-100: #cfe0f4;
  --searchx-primary-200: #9fc1ea;
  --searchx-primary-300: #6ea3df;
  --searchx-primary-400: #3e84d5;
  --searchx-primary-500: #1f6fcb;
  --searchx-primary-600: #1565c0; /* Base accent — primary CTAs, badges, hovers */
  --searchx-primary-700: #0d4a99;
  --searchx-primary-800: #093a7a;
  --searchx-primary-900: #062a5b;
  --searchx-primary-950: #031634;

  /* Grays — neutral with a very faint cool tint */
  --searchx-gray-50: #f7f9fc;
  --searchx-gray-100: #eef1f6;
  --searchx-gray-200: #e1e6ee;
  --searchx-gray-300: #c6cdd9;
  --searchx-gray-400: #9aa4b5;
  --searchx-gray-500: #6c7689;
  --searchx-gray-600: #4e5867;
  --searchx-gray-700: #353d49;
  --searchx-gray-800: #1f2630;
  --searchx-gray-900: #131822;
  --searchx-gray-950: #0a1019;

  /* Status */
  --searchx-danger-color: #cc0000;

  /* AI Search — pop blue against the navy base */
  --sx-ai-color: var(--searchx-primary-600);
  --sx-ai-color-hover: var(--searchx-primary-700);
  --sx-ai-gradient: linear-gradient(135deg, var(--searchx-primary-600), var(--searchx-primary-800));
  --sx-ai-bg: var(--searchx-primary-50);
  --sx-ai-text-on-color: var(--searchx-white);
  --sx-ai-radius: 0px;
  --sx-ai-popup-radius: 0px;
  --sx-ai-card-radius: 0px;
}

/* ==========================================================================
   2) NON-COLOR TOKENS â€” Square / Flat aesthetic
   ========================================================================== */
:root {
  --sx-font-family:
    "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  --sx-font-size-base: 14px;

  --sx-radius-sm: 0px; /* square corners everywhere */
  --sx-radius-md: 0px;
  --sx-radius-pill: 0px;

  --sx-border-width: 1px;
  --sx-border-color: var(--searchx-gray-200);

  --sx-shadow-sm: none; /* no shadows â€” flat design */
  --sx-shadow-md: none;

  --sx-transition: 180ms ease;
}

/* ==========================================================================
   3) BASE TYPOGRAPHY
   ========================================================================== */
.searchx__container.searchx__theme,
.searchx__page.searchx__theme {
  font-family: var(--sx-font-family);
  font-size: var(--sx-font-size-base);
  color: var(--searchx-black);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   4) SEARCH BAR
   ========================================================================== */
.searchx__container.searchx__theme .searchx__form {
  background: var(--searchx-white);
  border: 1px solid var(--searchx-black);
  border-radius: 0;
  box-shadow: none;
  transition: border-color var(--sx-transition);
}

.searchx__container.searchx__theme .searchx__form:focus-within {
  border-color: var(--searchx-black);
  box-shadow: none;
  transform: none;
}

.searchx__container.searchx__theme .searchx__ai-trigger,
.searchx__container.searchx__theme .searchx__ai-trigger--mobile {
  border-radius: 0;
}

.searchx__container.searchx__theme .searchx__input,
.searchx__container.searchx__theme .searchx__input input {
  color: var(--searchx-black);
  font-family: var(--sx-font-family);
  letter-spacing: 0.04em;
}

.searchx__container.searchx__theme .searchx__input input::placeholder {
  color: var(--searchx-gray-400);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.searchx__container.searchx__theme .searchx__input_overlay {
  color: var(--searchx-gray-400);
}

.searchx__container.searchx__theme .searchx__mobile-trigger,
.searchx__container.searchx__theme .sx-settings__trigger {
  color: var(--searchx-black);
  border-radius: 0;
  transition:
    background var(--sx-transition),
    color var(--sx-transition);
}

.searchx__container.searchx__theme .searchx__mobile-trigger:hover,
.searchx__container.searchx__theme .sx-settings__trigger:hover {
  background: var(--searchx-gray-100);
  color: var(--searchx-black);
}

.searchx__container.searchx__theme .searchx__form-close-icon:hover {
  background-color: var(--searchx-black);
  border-color: var(--searchx-black);
  color: var(--searchx-white);
}

/* --------------------------------------------------------------------------
   Popup / Autocomplete dropdown
   -------------------------------------------------------------------------- */
.searchx__container.searchx__theme .searchx__popup {
  background: var(--searchx-white);
  border: 1px solid var(--searchx-gray-200);
  border-radius: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Results counter â€” pill becomes a flat badge */
.searchx__container.searchx__theme .searchx__popup-results-counter {
  background: var(--searchx-black);
  color: var(--searchx-white);
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* Popup items */
.searchx__container.searchx__theme .searchx__popup-item {
  background: var(--searchx-white);
  border-radius: 0;
  border-bottom: 1px solid var(--searchx-gray-100);
  transition:
    background var(--sx-transition),
    color var(--sx-transition);
}

.searchx__container.searchx__theme .searchx__popup-item:hover {
  background: var(--searchx-black);
  color: var(--searchx-white);
  transform: none;
}

/* Make all text inside hovered popup item white */
.searchx__container.searchx__theme .searchx__popup-item:hover *,
.searchx__container.searchx__theme
  .searchx__popup-item:hover
  .searchx__popup-item-title,
.searchx__container.searchx__theme
  .searchx__popup-item:hover
  .searchx__popup-item-name,
.searchx__container.searchx__theme
  .searchx__popup-item:hover
  .searchx__popup-item-price {
  color: var(--searchx-white) !important;
}

/* EXCEPTION: keep the highlighted search term readable (black on yellow) */
.searchx__container.searchx__theme
  .searchx__popup-item:hover
  mark.ais-Highlight-highlighted,
.searchx__container.searchx__theme
  .searchx__popup-item:hover
  .ais-Highlight-highlighted {
  background-color: #f5e642 !important;
  color: #000000 !important;
  border-radius: 2px;
  padding: 0 1px;
}
.searchx__powered-by {
  bottom: 6px !important;
}
/* Î ÏÎ¿Ï„ÎµÎ¹Î½ÏŒÎ¼ÎµÎ½Î± Ï€ÏÎ¿ÏŠÏŒÎ½Ï„Î± (showcase grid) â€” 10rem */
.searchx__container.searchx__theme
  .searchx__showcase
  .searchx__popup-item-image {
  width: 100% !important;
  height: 10rem !important;
  object-fit: contain;
  flex-shrink: 0;
}

/* Popup item image â€” bigger (4.5rem) */
.searchx__container.searchx__theme .searchx__popup-item-image {
  border-color: transparent;
  border-radius: 0;
  width: 4.5rem !important;
  height: 4.5rem !important;
  min-width: 4.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.searchx__container.searchx__theme .searchx__popup-no-results-icon {
  color: var(--searchx-gray-300);
}

.searchx__container.searchx__theme .searchx__popup-no-results-title {
  color: var(--searchx-danger-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}

/* ==========================================================================
   5) SEARCH PAGE â€” full width, no max-width constraint
   ========================================================================== */
.searchx__page.searchx__theme {
  width: 100% !important;
  max-width: 1800px !important;
  margin: 0 auto;
  box-sizing: border-box;
}
.searchx__page.searchx__theme .searchx__page-heading-title {
  color: var(--searchx-black);
  text-transform: none; /* no uppercase â€” show as typed */
  letter-spacing: 0;
  font-size: 20px;
  font-weight: 600;
}

.searchx__page.searchx__theme .searchx__page-heading-subtitle {
  color: var(--searchx-gray-500);
  font-size: 12px;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Sorting
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-sorting {
  border: 1px solid var(--searchx-black);
  border-radius: 0;
  background: var(--searchx-white);
  color: var(--searchx-black);
  box-shadow: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    background var(--sx-transition),
    color var(--sx-transition);
}

.searchx__page.searchx__theme .searchx__page-sorting:hover {
  background: var(--searchx-black);
  border-color: var(--searchx-black);
  color: var(--searchx-white);
  transform: none;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-pagination-button {
  border: 1px solid var(--searchx-gray-300);
  border-radius: 0;
  background: var(--searchx-white);
  color: var(--searchx-gray-900);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition:
    background var(--sx-transition),
    color var(--sx-transition);
}

.searchx__page.searchx__theme .searchx__page-pagination-button:hover {
  background: var(--searchx-black);
  border-color: var(--searchx-black);
  color: var(--searchx-white);
}

/* --------------------------------------------------------------------------
   PRODUCT GRID â€” 3 columns desktop/tablet, 2 columns mobile
   Targets the actual results wrapper from the HTML
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 16px;
  align-items: start; /* prevent cards stretching to equal height */
}

/* Also cover the alternative class name */
.searchx__page.searchx__theme .searchx__page-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 16px;
  align-items: start;
}

@media (max-width: 1024px) {
  .searchx__page.searchx__theme .searchx__page-results,
  .searchx__page.searchx__theme .searchx__page-items {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
  }
}

@media (max-width: 768px) {
  .searchx__page.searchx__theme .searchx__page-results,
  .searchx__page.searchx__theme .searchx__page-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 10px;
  }
}

/* --------------------------------------------------------------------------
   PRODUCT CARDS â€” override base SearchX defaults
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-item {
  border: none !important;
  border-radius: 0 !important;
  background: var(--searchx-white);
  box-shadow: none !important;
  padding: 0 !important;
  display: block !important;
  position: relative;
  overflow: visible;
  transition: none;
  transform: translateZ(0);
  will-change: transform;
}

.searchx__page.searchx__theme .searchx__page-item:hover {
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  scale: 1 !important;
}

/* --------------------------------------------------------------------------
   IMAGE WRAPPER -- fixed height, clips zoom overflow
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-item-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
  background: var(--searchx-gray-50);
}

/* --------------------------------------------------------------------------
   IMAGE -- smooth zoom on hover, clipped by wrapper
   -------------------------------------------------------------------------- */

.searchx__page.searchx__theme .searchx__page-item-details {
  display: block;
  text-decoration: none;
  color: inherit;
  /* NO overflow:hidden here â€” that would clip the text too */
}

/* Optional explicit wrapper â€” clips if SearchX adds one */
.searchx__page.searchx__theme .searchx__page-item-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background: var(--searchx-gray-50);
}

/* Primary image */
.searchx__page.searchx__theme .searchx__page-item-image,
.searchx__page.searchx__theme .searchx__page-item img {
  border-radius: 0 !important;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  display: block;
  /* clip-path: inset(0) is the key â€” it clips the zoom to the img's
       own bounding box without needing overflow:hidden on the parent */
  clip-path: inset(0 0 0 0);
  /* Smooth GPU-accelerated zoom */
  transition:
    transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 320ms ease;
  transform-origin: center center;
  /*  will-change: transform; */
  z-index: 1;
}

/* Zoom on hover â€” fully contained within the image bounds */
.searchx__page.searchx__theme
  .searchx__page-item:hover
  .searchx__page-item-image,
.searchx__page.searchx__theme
  .searchx__page-item:hover
  .searchx__page-item-image-container
  > img:first-child {
  transform: scale(1.05);
  transition:
    transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 320ms ease;
}

/* --------------------------------------------------------------------------
   SECOND IMAGE â€” fade in on hover
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-item-details img:nth-child(2),
.searchx__page.searchx__theme
  .searchx__page-item-image-container
  img:nth-child(2),
.searchx__page.searchx__theme .searchx__page-item-image--hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 320ms ease;
  z-index: 2;
  border-radius: 0 !important;
}

.searchx__page.searchx__theme
  .searchx__page-item:hover
  .searchx__page-item-details
  img:nth-child(2),
.searchx__page.searchx__theme
  .searchx__page-item:hover
  .searchx__page-item-image-container
  img:nth-child(2),
.searchx__page.searchx__theme
  .searchx__page-item:hover
  .searchx__page-item-image--hover {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Wishlist button â€” positioned in bottom-right of image area
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-item-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 1 / 1; /* matches the SQUARE image height exactly */
  pointer-events: none;
  z-index: 4;
}

.searchx__page.searchx__theme .searchx__page-item-button.wishlist {
  position: absolute;
  bottom: 8px;
  right: 8px;
  pointer-events: all;

  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--searchx-black) !important;
  cursor: pointer;
  transition:
    background var(--sx-transition),
    color var(--sx-transition);
  z-index: 3;

  /* Hide the text span, keep the SVG icon */
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Hide text label inside wishlist button */
.searchx__page.searchx__theme .searchx__page-item-button.wishlist span {
  display: none !important;
}

/* Ensure SVG icon is visible and centered */
.searchx__page.searchx__theme .searchx__page-item-button.wishlist svg {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0;
  font-size: 16px !important;
  line-height: 1 !important;
  stroke-width: 24;
}

.searchx__page.searchx__theme .searchx__page-item-button.wishlist:hover {
  background: var(--searchx-black) !important;
  color: var(--searchx-white) !important;
}

.searchx__page.searchx__theme .searchx__page-item-button.wishlist:hover svg {
  stroke: var(--searchx-white);
  color: var(--searchx-white);
}

/* Wishlist active state */
.searchx__page.searchx__theme .searchx__page-item-button.wishlist.is-active,
.searchx__page.searchx__theme
  .searchx__page-item-button.wishlist[data-active="true"] {
  background: var(--searchx-black) !important;
  color: var(--searchx-white) !important;
}

/* --------------------------------------------------------------------------
   Hide Add-to-Cart button entirely
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-item-button:not(.wishlist) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Product info area â€” LEFT aligned, no uppercase
   -------------------------------------------------------------------------- */
.searchx__page.searchx__theme .searchx__page-item-info {
  padding: 10px 0 6px 0;
  text-align: left;
}

/* Brand name */
.searchx__page.searchx__theme .searchx__page-item-brand {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--searchx-black);
  text-align: left;
}

/* Product title */
.searchx__page.searchx__theme .searchx__page-item-title,
.searchx__page.searchx__theme .searchx__page-item-name,
.searchx__page.searchx__theme a.searchx__page-item-details > .ais-Highlight,
.searchx__page.searchx__theme
  a.searchx__page-item-details
  > span.searchx__page-item-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--searchx-black);
  line-height: 1.4;
  text-align: left;
  margin-top: 8px;
  margin-bottom: 0;
  padding: 0;
}

.searchx__page.searchx__theme
  .searchx__page-item-title
  .ais-Highlight-nonHighlighted:not(:first-child),
.searchx__page.searchx__theme
  .searchx__page-item-title
  .ais-Highlight-nonHighlighted
  ~ .ais-Highlight-nonHighlighted {
  font-weight: 400;
}

.searchx__page.searchx__theme
  .searchx__page-item-title
  .ais-Highlight-nonHighlighted:first-child {
  font-weight: 400;
}

/* Highlighted search term â€” keep yellow background */
.searchx__page.searchx__theme
  .searchx__page-item-title
  mark.ais-Highlight-highlighted,
.searchx__page.searchx__theme
  .searchx__page-item-title
  .ais-Highlight-highlighted {
  background-color: #f5e642;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* Price â€” dark gray, 13px, left */
.searchx__page.searchx__theme .searchx__page-item-price {
  font-size: 13px !important;
  font-weight: 400;
  color: var(--searchx-black) !important;
  text-align: left;
  display: block !important;
  letter-spacing: 0.01em;
  margin-top: 8px;
  padding: 0;
}

/* Sizes */
.searchx__page.searchx__theme .searchx__page-item-sizes {
  font-size: 15px;
  font-weight: 700;
  color: var(--searchx-black);
  margin-top: 8px;
}

.searchx__page.searchx__theme .searchx__page-item-sizes span {
  padding: 8px;
  color: var(--searchx-black);
  font-weight: 400;
}

/* Original / sale price strikethrough */
.searchx__page.searchx__theme .searchx__page-item-price-original,
.searchx__page.searchx__theme .searchx__page-item-price s,
.searchx__page.searchx__theme .searchx__page-item-price del {
  color: var(--searchx-gray-400);
  text-decoration: line-through;
  font-weight: 400;
  font-size: 11px;
  margin-right: 4px;
}

/* Discount badge â€” top-left of image */
.searchx__page.searchx__theme .searchx__page-item-badge,
.searchx__page.searchx__theme .searchx__page-item-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--searchx-black);
  color: var(--searchx-white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 0;
  z-index: 2;
}

/* ==========================================================================
   6) FACETS / FILTERS
   ========================================================================== */
.searchx__page.searchx__theme .searchx__facet-block {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 16px 0;
  border-bottom: 1px solid var(--searchx-gray-200);
  margin-bottom: 16px;
}

.searchx__page.searchx__theme .searchx__facet-title {
  color: var(--searchx-black);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding-bottom: 4px;
  margin-bottom: 0;
}

/* Facet items â€” checkbox style, no pill */
.searchx__page.searchx__theme .searchx__facet-item {
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--searchx-gray-700);
  font-size: 12px;
  padding: 4px 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--sx-transition);
}

.searchx__page.searchx__theme .searchx__facet-item:hover,
.searchx__page.searchx__theme .searchx__facet-item--active {
  background: transparent;
  border-color: transparent;
  color: var(--searchx-black);
  font-weight: 700;
  transform: none;
}

.searchx__page.searchx__theme .searchx__facet-item--active::before {
  content: "✓ ";
  font-size: 10px;
}

.searchx__page.searchx__theme .searchx__facet-search-input {
  border: 1px solid var(--searchx-gray-300);
  border-radius: 0;
  font-size: 12px;
}

.searchx__page.searchx__theme .searchx__facet-search-input:focus {
  border-color: var(--searchx-black);
  outline: none;
}

/* Range slider â€” monochrome */
.searchx__page.searchx__theme .multi-range-slider__range {
  background: var(--searchx-black);
}

.searchx__page.searchx__theme .multi-range-slider__thumb {
  background: var(--searchx-black);
  border-radius: 0;
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   7) COMPACT PAGINATION (flat, monochrome)
   ========================================================================== */
.searchx__page.searchx__theme .sx-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 4px;
  margin-top: 32px;
}

.searchx__page.searchx__theme .sx-page-arrow {
  border: 1px solid var(--searchx-gray-300);
  background: transparent;
  color: var(--searchx-black);
  font-size: 14px;
  cursor: pointer;
  padding: 0 10px;
  height: 36px;
  border-radius: 0;
  transition:
    background var(--sx-transition),
    color var(--sx-transition);
}

.searchx__page.searchx__theme .sx-page-arrow:hover {
  background: var(--searchx-black);
  color: var(--searchx-white);
  border-color: var(--searchx-black);
}

.searchx__page.searchx__theme .sx-page-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.searchx__page.searchx__theme .sx-page-pill {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--searchx-gray-300);
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--searchx-black);
  background: var(--searchx-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--sx-transition),
    color var(--sx-transition),
    border-color var(--sx-transition);
  flex: 0 0 auto;
}

.searchx__page.searchx__theme .sx-page-pill:hover {
  background: var(--searchx-gray-100);
}

.searchx__page.searchx__theme .sx-page-pill:active {
  background: var(--searchx-black);
  color: var(--searchx-white);
}

.searchx__page.searchx__theme .sx-page-pill.is-active {
  background: var(--searchx-black);
  color: var(--searchx-white);
  border-color: var(--searchx-black);
  font-weight: 700;
}

.searchx__page.searchx__theme .sx-page-ellipsis {
  color: var(--searchx-gray-400);
  pointer-events: none;
  font-weight: 400;
  padding: 0 4px;
}

/* ==========================================================================
   8) MOBILE FILTERS -- square corners, monochrome, uppercase
   ========================================================================== */

/* Filter toggle button */
.searchx__page.searchx__theme .facet-toggle-button {
    border-radius: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    background-color: var(--searchx-black);
    color: var(--searchx-white);
}

.searchx__page.searchx__theme .facet-toggle-button:hover {
    background-color: var(--searchx-gray-800);
}

/* Facet sheet controls — separator before facets */
.searchx__page.searchx__theme .facet-sheet__controls {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--searchx-gray-200);
}

/* Facet sheet labels — match facet-title style */
.searchx__page.searchx__theme .facet-sheet__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--searchx-black);
}

/* Facet sheet selects */
.searchx__page.searchx__theme .facet-sheet__select {
    border-radius: 0 !important;
    border: 1px solid var(--searchx-gray-300);
    font-family: var(--sx-font-family);
    font-size: 13px;
}

/* Facet sheet apply button */
.searchx__page.searchx__theme .facet-sheet__apply {
    border-radius: 0 !important;
    background: var(--searchx-black);
    color: var(--searchx-white);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
    font-family: var(--sx-font-family);
}

/* Desktop per-page wrapper */
.searchx__page.searchx__theme .searchx__per-page-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.searchx__page.searchx__theme .searchx__per-page-wrapper select {
    border-radius: 0;
}

/* ==========================================================================
   9) MOBILE AI CAROUSEL CARDS — theme-specific overrides only
   ========================================================================== */
@media (max-width: 900px) {
  .searchx__ai-carousel-item .searchx__popup-item {
    border-radius: 0;
  }
  .searchx__ai-carousel-item .searchx__popup-item:hover {
    background-color: var(--searchx-black);
    color: var(--searchx-white);
  }
  .searchx__container.searchx__theme .searchx__showcase .searchx__ai-carousel-item .searchx__popup-item-image {
    width: 100% !important;
    height: var(--sx-ai-card-img-height) !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    flex-shrink: 0;
    min-width: 0 !important;
  }
}

/* ====== Site-level styles (header, footer, hero, PDP, cart, favorites) ====== */

/* ============================================================================
 * BYTE — site theme (electronics: deep navy + electric blue, square, flat)
 * Pages: home, search, PDP, cart, favorites.
 * The site classes are still prefixed `.m-*` (kept identical to MOTI) so the
 * same HTML works unchanged across themes; only the color tokens differ.
 * ========================================================================== */

:root {
  --m-black: #0a1929; /* deep navy — replaces pure black */
  --m-white: #ffffff;
  --m-accent: #1565c0; /* electric blue accent — buttons, badges, hovers */
  --m-accent-dark: #0d4a99;
  --m-gray-50: #f7f9fc;
  --m-gray-100: #eef1f6;
  --m-gray-200: #e1e6ee;
  --m-gray-300: #c6cdd9;
  --m-gray-400: #9aa4b5;
  --m-gray-500: #6c7689;
  --m-gray-600: #4e5867;
  --m-gray-700: #353d49;
  --m-gray-900: #131822;
  --m-danger: #cc0000;

  --m-font: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui,
    sans-serif;
  --m-text: 14px;

  --m-radius: 0px;
  --m-border: 1px solid var(--m-gray-200);
  --m-transition: 180ms ease;

  --m-container: 1400px;
  --m-container-narrow: 1100px;
}

/* ---------------- Reset ---------------- */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--m-font);
  font-size: var(--m-text);
  color: var(--m-black);
  background: var(--m-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.02em;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------------- Container ---------------- */
.m-container {
  width: 100%;
  max-width: var(--m-container);
  margin: 0 auto;
  padding: 0 24px;
}
.m-container--narrow {
  max-width: var(--m-container-narrow);
}

/* ============================================================================
 * Header
 *
 * Desktop (>900px):
 *   Row 1:  [LOGO] | [---- search bar (wide, fills middle) ----] | [♡ 🛍 ☰]
 *   Row 2:  [-------- centered category nav --------]
 *
 * Mobile (≤900px):
 *   Row 1:  [LOGO]                                       | [♡ 🛍 ☰]
 *   Row 2:  [-------- search bar (full-width) --------]
 *           (nav hidden — accessible via hamburger drawer)
 * ========================================================================== */
.m-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--m-white);
  border-bottom: var(--m-border);
}
.m-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: center;
  gap: 28px;
  padding: 16px 32px;
  max-width: var(--m-container);
  margin: 0 auto;
}
.m-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--m-black);
  text-transform: uppercase;
  flex-shrink: 0;
}
.m-logo small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--m-gray-500);
  margin-top: 2px;
}

/* Desktop category nav — second row, centered, separator above */
.m-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 10px 24px 14px;
  border-top: 1px solid var(--m-gray-100);
}
.m-nav a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--m-gray-700);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--m-transition), border-color var(--m-transition);
}
.m-nav a:hover,
.m-nav a.is-active {
  color: var(--m-black);
  border-bottom-color: var(--m-black);
}
.m-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.m-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--m-black);
  position: relative;
  transition: opacity var(--m-transition);
}
.m-icon-btn:hover {
  opacity: 0.6;
}
.m-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}
.m-icon-btn .m-badge {
  position: absolute;
  top: 2px;
  right: 0;
  background: var(--m-black);
  color: var(--m-white);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.m-badge--hidden {
  display: none !important;
}

/* ============================================================================
 * Search bar wrapper (header) — must coexist with the optional Ask-AI button.
 *
 * Layout philosophy:
 *  - Wrapper fills the middle grid column.
 *  - SDK container is a flex row capped at 878px (matches popup 2-col width),
 *    centered. Children: form + (optional) AI trigger.
 *  - Form FLEXES to fill remaining width, but yields to the AI trigger.
 *  - AI trigger keeps its natural width (flex-shrink:0) so it never overflows.
 *
 * (Earlier we had hard `width: 100% !important` on .searchx__form. That looked
 * fine WITHOUT the AI button, but once AI was enabled the button overlapped
 * the form on desktop and got pushed offscreen on mobile.)
 * ========================================================================== */
.m-header__search {
  min-width: 0; /* lets the grid track actually shrink */
  width: 100%;
}
.m-header__search .searchx__container,
.m-header__search .searchx__container.searchx__theme {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  width: 100% !important;
  max-width: 878px !important;
  margin: 0 auto !important;
}
.m-header__search .searchx__form {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none !important; /* override SDK's 400px desktop cap */
  width: auto !important;
}
.m-header__search .searchx__ai-trigger,
.m-header__search .searchx__ai-trigger--mobile {
  flex-shrink: 0; /* AI button stays its natural width, never collapses */
}

/* Mobile menu trigger */
.m-mobile-trigger {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}
.m-mobile-trigger svg {
  width: 22px;
  height: 22px;
}

/* ============== Tablet & Mobile (≤900px) ==============
 * Single-row flex layout: [LOGO] ............ [🔍] [♡] [🛒] [☰]
 * The SDK falls back to its compact magnifier trigger (mobileViewPort = 900px)
 * so the search wrapper collapses to a small icon that sits inline with the
 * other action icons.
 * ====================================================== */
@media (max-width: 900px) {
  .m-header__inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
  }
  .m-logo {
    font-size: 17px;
    flex-shrink: 0;
    margin-right: auto; /* push everything else to the right */
  }
  .m-header__search {
    width: auto;
    flex-shrink: 0;
  }
  /* Undo the desktop max-width / margin-auto overrides */
  .m-header__search .searchx__container,
  .m-header__search .searchx__container.searchx__theme,
  .m-header__search .searchx__form {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .m-header__actions {
    flex-shrink: 0;
    gap: 4px;
  }
  .m-nav {
    display: none; /* hamburger drawer instead */
  }
  .m-mobile-trigger {
    display: inline-flex;
  }
}

/* Mobile menu drawer */
.m-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 80vw);
  background: var(--m-white);
  border-left: 1px solid var(--m-black);
  z-index: 100;
  padding: 24px;
  flex-direction: column;
  gap: 6px;
  transform: translateX(100%);
  transition: transform var(--m-transition);
}
.m-mobile-menu.is-open {
  display: flex;
  transform: translateX(0);
}
.m-mobile-menu__close {
  align-self: flex-end;
  font-size: 22px;
  padding: 4px 8px;
}
.m-mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  border-bottom: 1px solid var(--m-gray-100);
}

/* ============================================================================
 * Hero
 * ========================================================================== */
.m-hero {
  background: var(--m-gray-50);
  padding: 80px 24px 90px;
  text-align: center;
  border-bottom: var(--m-border);
}
.m-hero__eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--m-gray-500);
  margin-bottom: 18px;
}
.m-hero h1 {
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 auto 16px;
  max-width: 18ch;
  line-height: 1.1;
}
.m-hero p {
  font-size: 15px;
  color: var(--m-gray-600);
  max-width: 50ch;
  margin: 0 auto 28px;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .m-hero {
    padding: 50px 16px 60px;
  }
}

/* ============================================================================
 * Buttons
 * ========================================================================== */
.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--m-black);
  color: var(--m-white);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid var(--m-black);
  border-radius: 0;
  cursor: pointer;
  transition: background var(--m-transition), color var(--m-transition);
}
.m-btn:hover {
  background: var(--m-white);
  color: var(--m-black);
}
.m-btn--ghost {
  background: var(--m-white);
  color: var(--m-black);
}
.m-btn--ghost:hover {
  background: var(--m-black);
  color: var(--m-white);
}
.m-btn--block {
  width: 100%;
}
.m-btn--sm {
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.m-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================================
 * Section heading
 * ========================================================================== */
.m-section {
  padding: 70px 0;
}
.m-section--tight {
  padding: 40px 0;
}
.m-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.m-section__title {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
}
.m-section__see-all {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--m-gray-600);
  border-bottom: 1px solid var(--m-gray-300);
  padding-bottom: 2px;
  transition: color var(--m-transition), border-color var(--m-transition);
}
.m-section__see-all:hover {
  color: var(--m-black);
  border-color: var(--m-black);
}

/* ============================================================================
 * Product grid + cards (used on home, favorites, related-products on PDP)
 * ========================================================================== */
.m-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 20px;
}
@media (max-width: 1100px) {
  .m-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 720px) {
  .m-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 12px;
  }
}

.m-card {
  display: flex;
  flex-direction: column;
  position: relative;
}
.m-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--m-gray-50);
}
.m-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity var(--m-transition), transform 500ms
      cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.m-card__media img:nth-child(2) {
  opacity: 0;
}
.m-card:hover .m-card__media img:first-child {
  opacity: 0;
}
.m-card:hover .m-card__media img:nth-child(2) {
  opacity: 1;
  transform: scale(1.04);
}
.m-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--m-black);
  color: var(--m-white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  z-index: 2;
}
.m-card__fav {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--m-black);
  background: transparent;
  transition: background var(--m-transition), color var(--m-transition);
}
.m-card__fav:hover,
.m-card__fav.is-active {
  background: var(--m-black);
  color: var(--m-white);
}
.m-card__fav svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}
.m-card__info {
  padding: 12px 0 4px;
}
.m-card__brand {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-black);
}
.m-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  color: var(--m-gray-700);
  margin: 6px 0 0;
  line-height: 1.4;
}
.m-card__price {
  margin-top: 8px;
  font-size: 13px;
  color: var(--m-black);
}
.m-card__price del {
  color: var(--m-gray-400);
  margin-right: 6px;
  font-size: 11px;
}

/* ============================================================================
 * Category teaser tiles (home)
 * ========================================================================== */
.m-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .m-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}
.m-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--m-gray-100);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--m-black);
  transition: background var(--m-transition), color var(--m-transition);
}
.m-tile:hover {
  background: var(--m-black);
  color: var(--m-white);
}

/* ============================================================================
 * Product Detail Page (PDP)
 * ========================================================================== */
.m-pdp {
  padding: 40px 0 80px;
}
.m-pdp__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}
@media (max-width: 900px) {
  .m-pdp__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
.m-pdp__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
@media (max-width: 600px) {
  .m-pdp__gallery {
    grid-template-columns: 1fr;
  }
}
.m-pdp__gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--m-gray-50);
}
.m-pdp__info {
  padding-top: 6px;
}
.m-pdp__brand {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--m-gray-700);
}
.m-pdp__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  margin: 10px 0 6px;
  line-height: 1.25;
  color: var(--m-black);
}
.m-pdp__price {
  font-size: 20px;
  margin: 16px 0 22px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.m-pdp__price del {
  color: var(--m-gray-400);
  font-size: 14px;
  font-weight: 400;
}
.m-pdp__price--sale {
  color: var(--m-black);
}
.m-pdp__field {
  margin: 22px 0;
}
.m-pdp__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--m-gray-700);
  margin-bottom: 10px;
}
.m-pdp__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.m-size {
  min-width: 48px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--m-gray-300);
  background: var(--m-white);
  color: var(--m-black);
  font-size: 13px;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--m-transition), color var(--m-transition),
    border-color var(--m-transition);
}
.m-size:hover {
  border-color: var(--m-black);
}
.m-size.is-active {
  background: var(--m-black);
  color: var(--m-white);
  border-color: var(--m-black);
}
.m-pdp__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 28px 0 16px;
}
.m-pdp__fav-btn {
  width: 52px;
  height: 52px;
  border: 1px solid var(--m-black);
  background: var(--m-white);
  color: var(--m-black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--m-transition), color var(--m-transition);
}
.m-pdp__fav-btn:hover,
.m-pdp__fav-btn.is-active {
  background: var(--m-black);
  color: var(--m-white);
}
.m-pdp__fav-btn svg {
  width: 22px;
  height: 22px;
}
.m-pdp__desc {
  border-top: var(--m-border);
  padding-top: 24px;
  margin-top: 30px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--m-gray-700);
}
.m-pdp__meta {
  margin-top: 24px;
  font-size: 12px;
  color: var(--m-gray-500);
  letter-spacing: 0.02em;
}
.m-pdp__meta dt {
  display: inline;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--m-gray-700);
}
.m-pdp__meta dd {
  display: inline;
  margin: 0 16px 0 6px;
}
.m-pdp__flash {
  background: var(--m-gray-100);
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-left: 3px solid var(--m-black);
  display: none;
}
.m-pdp__flash.is-visible {
  display: block;
}
.m-pdp__error {
  border-left-color: var(--m-danger);
  color: var(--m-danger);
}

/* Breadcrumbs */
.m-crumbs {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--m-gray-500);
  margin: 24px 0;
}
.m-crumbs a {
  color: var(--m-gray-500);
  transition: color var(--m-transition);
}
.m-crumbs a:hover {
  color: var(--m-black);
}
.m-crumbs span {
  margin: 0 8px;
  color: var(--m-gray-300);
}

/* ============================================================================
 * Cart & Favorites pages
 * ========================================================================== */
.m-page-head {
  padding: 40px 0 16px;
  border-bottom: var(--m-border);
}
.m-page-head h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.01em;
}
.m-page-head p {
  font-size: 13px;
  color: var(--m-gray-500);
  margin-top: 6px;
}

.m-cart {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  padding: 40px 0 80px;
}
@media (max-width: 900px) {
  .m-cart {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
.m-cart__items {
  display: flex;
  flex-direction: column;
}
.m-cart-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  padding: 24px 0;
  border-bottom: var(--m-border);
  align-items: flex-start;
}
@media (max-width: 600px) {
  .m-cart-row {
    grid-template-columns: 90px 1fr;
  }
}
.m-cart-row__media {
  width: 120px;
  aspect-ratio: 1 / 1;
  background: var(--m-gray-50);
}
@media (max-width: 600px) {
  .m-cart-row__media {
    width: 90px;
  }
}
.m-cart-row__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.m-cart-row__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.m-cart-row__brand {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.m-cart-row__title {
  font-size: 13px;
  color: var(--m-gray-700);
  line-height: 1.4;
}
.m-cart-row__meta {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-gray-500);
  margin-top: 4px;
}
.m-cart-row__price {
  font-size: 14px;
  margin-top: 8px;
}
.m-cart-row__price del {
  color: var(--m-gray-400);
  margin-right: 6px;
  font-size: 12px;
}
.m-cart-row__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
@media (max-width: 600px) {
  .m-cart-row__controls {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.m-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--m-gray-300);
}
.m-qty button {
  width: 32px;
  height: 32px;
  font-size: 14px;
}
.m-qty button:hover {
  background: var(--m-gray-100);
}
.m-qty input {
  width: 36px;
  height: 32px;
  border: none;
  text-align: center;
  font-family: inherit;
  font-size: 13px;
  background: transparent;
}
.m-qty input:focus {
  outline: none;
}
.m-remove {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--m-gray-500);
  transition: color var(--m-transition);
}
.m-remove:hover {
  color: var(--m-black);
  text-decoration: underline;
}

.m-summary {
  border: var(--m-border);
  padding: 28px;
  background: var(--m-gray-50);
  height: fit-content;
}
.m-summary h2 {
  margin: 0 0 18px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}
.m-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--m-gray-200);
}
.m-summary__row:last-of-type {
  border-bottom: none;
  padding-top: 16px;
  font-weight: 700;
  font-size: 15px;
}

.m-empty {
  text-align: center;
  padding: 80px 20px;
}
.m-empty h2 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  margin-bottom: 10px;
}
.m-empty p {
  color: var(--m-gray-500);
  font-size: 13px;
  margin-bottom: 24px;
}

/* ============================================================================
 * Footer
 * ========================================================================== */
.m-footer {
  border-top: 1px solid var(--m-black);
  padding: 50px 24px 30px;
  margin-top: 80px;
  background: var(--m-white);
}
.m-footer__inner {
  max-width: var(--m-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: flex-start;
}
@media (max-width: 700px) {
  .m-footer__inner {
    grid-template-columns: 1fr;
  }
}
.m-footer__brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.m-footer__note {
  font-size: 11px;
  color: var(--m-gray-500);
  margin-top: 6px;
  max-width: 50ch;
  line-height: 1.6;
}
.m-footer__copy {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--m-gray-500);
  margin-top: 30px;
  text-align: center;
}

/* ============================================================================
 * Utilities
 * ========================================================================== */
.m-flash {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--m-black);
  color: var(--m-white);
  padding: 14px 22px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  z-index: 200;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--m-transition), transform var(--m-transition);
  pointer-events: none;
}
.m-flash.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
 * Add-to-Cart button on SearchPage product cards
 * ----------------------------------------------------------------------------
 * The c-mor theme HIDES `.searchx__page-item-button:not(.wishlist)` by default
 * (cart-less variant). We override to bring it back as a small icon button
 * sitting next to the heart, bottom-right of the image.
 *
 * Visual: [BAG]  [HEART]  → both 40×40 black icons over the bottom of the image.
 * ========================================================================== */
.searchx__page.searchx__theme .searchx__page-item-button:not(.wishlist) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute;
  bottom: 8px;
  right: 56px; /* leaves room for the wishlist button at right:8px (40+8 gap) */
  pointer-events: all;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: var(--m-black) !important;
  color: var(--m-white) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: opacity var(--m-transition);
  z-index: 3;
  font-size: 0 !important;
  line-height: 0 !important;
}
.searchx__page.searchx__theme
  .searchx__page-item-button:not(.wishlist)
  span {
  display: none !important;
}
.searchx__page.searchx__theme
  .searchx__page-item-button:not(.wishlist)
  svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  stroke: var(--m-white);
}
.searchx__page.searchx__theme
  .searchx__page-item-button:not(.wishlist):hover {
  opacity: 0.85;
}

/* ============================================================================
 * Skeleton — placeholder while the SDK boots.
 *
 * Base `.m-skeleton` = soft grey block with a left-to-right shimmer sweep.
 *   Use on any container that briefly holds nothing while async content loads
 *   (e.g. `#search-page` on the Shop page).
 *
 * Modifier `.m-skeleton--bar` = the same shimmer but shaped like a search
 *   input field — fixed height, subtle border, rounded right-side magnifier
 *   silhouette — so the residual ~100-300ms of loading reads as a designed
 *   "input is loading" state rather than a broken grey box.
 *
 * Both variants reuse the same @keyframes, so removing one class doesn't kill
 * the animation on the other.
 * ========================================================================== */
.m-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--m-gray-100);
  min-height: 48px;
  width: 100%;
}
.m-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.65) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: m-skeleton-shimmer 1.4s linear infinite;
  pointer-events: none;
}
@keyframes m-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Search-bar-shaped variant: same width as the real SDK SearchBar, with a
 * faint magnifier silhouette on the right so the placeholder reads as
 * "search input loading" rather than "grey rectangle". */
.m-skeleton--bar {
  min-height: 42px;
  max-width: 878px; /* matches .m-header__search .searchx__container max-width */
  margin: 0 auto;
  background: var(--m-white);
  border: var(--m-border);
}
.m-skeleton--bar::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 1.6px solid var(--m-gray-300);
  border-radius: 50%;
  box-shadow:
    7px 7px 0 -6px var(--m-gray-300),
    8px 8px 0 -6px var(--m-gray-300);
  pointer-events: none;
}

/* On mobile the SDK collapses the search bar to a small magnifier trigger,
 * so the placeholder should follow suit instead of taking up the whole row. */
@media (max-width: 900px) {
  .m-skeleton--bar {
    width: 36px;
    min-height: 36px;
    border-radius: 0;
  }
  .m-skeleton--bar::before {
    right: 50%;
    margin-right: -8px;
  }
}

/* Honour reduced-motion: keep the placeholder visible but stop the shimmer. */
@media (prefers-reduced-motion: reduce) {
  .m-skeleton::after {
    animation: none;
  }
}

/* ============================================================================
 * Language switcher (header + mobile menu)
 * ========================================================================== */
.m-lang-switcher {
  display: inline-flex;
  border: 1px solid var(--m-gray-300);
  margin-right: 4px;
}
.m-lang-btn {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--m-gray-600);
  background: var(--m-white);
  border: none;
  cursor: pointer;
  transition: background var(--m-transition), color var(--m-transition);
}
.m-lang-btn + .m-lang-btn {
  border-left: 1px solid var(--m-gray-300);
}
.m-lang-btn:hover {
  color: var(--m-black);
}
.m-lang-btn.is-active {
  background: var(--m-black);
  color: var(--m-white);
}

@media (max-width: 900px) {
  /* Hide the desktop in-header switcher; move it to the drawer */
  .m-header__actions > .m-lang-switcher {
    display: none;
  }
}

.m-mobile-menu__lang {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--m-gray-100);
}

/* ============================================================================
 * "About this demo" — SearchX call-out section on home
 * ========================================================================== */
.m-about {
  background: var(--m-black);
  color: var(--m-white);
  padding: 80px 24px;
  text-align: center;
}
.m-about__eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--m-gray-400);
  margin-bottom: 18px;
}
.m-about__headline {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 auto 18px;
  max-width: 24ch;
  line-height: 1.2;
  color: var(--m-white);
}
.m-about__body {
  font-size: 14px;
  color: var(--m-gray-300);
  max-width: 56ch;
  margin: 0 auto 28px;
  line-height: 1.7;
}
@media (max-width: 700px) {
  .m-about {
    padding: 50px 20px;
  }
}

/* Inverse ghost button (white border/text on dark background) */
.m-btn--inverse {
  background: transparent;
  color: var(--m-white);
  border-color: var(--m-white);
}
.m-btn--inverse:hover {
  background: var(--m-white);
  color: var(--m-black);
}

/* Inline link inside footer/about — subtle, monochrome, underlined on hover */
.m-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--m-transition);
}
.m-link:hover {
  opacity: 0.7;
}

/* ============================================================================
 * Footer nav
 * ========================================================================== */
.m-footer__nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.m-footer__nav a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--m-gray-700);
  transition: color var(--m-transition);
}
.m-footer__nav a:hover {
  color: var(--m-black);
}

/* ============================================================================
 * MOTI overrides — applied LAST so they always win ties against the rules
 * above (SDK c-mor + site-level).
 * ========================================================================== */

/* --- Wishlist heart → TOP-right of image (both our .m-card and SDK card) --- */
.m-card__fav {
  top: 8px !important;
  right: 8px !important;
  bottom: auto !important;
}
.searchx__page.searchx__theme .searchx__page-item-button.wishlist {
  top: 8px !important;
  right: 8px !important;
  bottom: auto !important;
}

/* --- Cart icon on SearchPage cards: ALWAYS visible, bottom-right --- */
.searchx__page.searchx__theme .searchx__page-item-button:not(.wishlist) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  bottom: 8px !important;
  right: 8px !important;
  top: auto !important;
  pointer-events: all !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: var(--m-black) !important;
  color: var(--m-white) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  z-index: 3;
  font-size: 0 !important;
  line-height: 0 !important;
}
.searchx__page.searchx__theme
  .searchx__page-item-button:not(.wishlist)
  span {
  display: none !important;
}
.searchx__page.searchx__theme
  .searchx__page-item-button:not(.wishlist)
  svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  stroke: var(--m-white) !important;
  color: var(--m-white) !important;
}
.searchx__page.searchx__theme
  .searchx__page-item-button:not(.wishlist):hover {
  opacity: 0.85;
}

/* --- Search form sizing handled by the flex layout above (see
 *     "Search bar wrapper (header)" block). We deliberately do NOT force
 *     width: 100% here — that would steal space from the Ask-AI trigger
 *     button when aiSearchEnabled = true. --- */

/* ============================================================================
 * BYTE — accent overrides
 *
 * Everything above this point inherits the MOTI layout 1:1, just recolored
 * from black → deep navy via --m-black / --searchx-black. The block below
 * promotes the electric blue accent to a few high-impact surfaces so the
 * page reads as "modern electronics retailer" rather than "navy MOTI".
 *
 * Touch sparingly — these are intentional accent moments, not blanket swaps.
 * ========================================================================== */

/* --- Primary CTA (Add to cart, Hero "Shop now", Cart "Checkout") --- */
.m-btn {
  background: var(--m-accent);
  color: var(--m-white);
  border-color: var(--m-accent);
}
.m-btn:hover {
  background: var(--m-accent-dark);
  border-color: var(--m-accent-dark);
}

/* Ghost / inverse buttons stay on the deep-navy base — leave them alone. */

/* --- Sale badge on product cards (-25%) --- */
.m-card__badge {
  background: var(--m-accent);
  color: var(--m-white);
}

/* --- "See all →" links pop the same blue accent on hover --- */
.m-section__see-all:hover {
  color: var(--m-accent);
  border-bottom-color: var(--m-accent);
}

/* --- Active nav link underline --- */
.m-nav a.is-active {
  color: var(--m-accent);
  border-bottom-color: var(--m-accent);
}

/* --- PDP sale price emphasis --- */
.m-pdp__price--sale strong {
  color: var(--m-accent);
}

/* --- Active size chip (still used for variants like 128GB / 55") --- */
.m-size.is-active {
  background: var(--m-accent);
  color: var(--m-white);
  border-color: var(--m-accent);
}

/* --- SDK SearchPage: results counter pill + add-to-cart bar use blue --- */
.searchx__container.searchx__theme .searchx__popup-results-counter {
  background: var(--searchx-primary-600);
}
.searchx__page.searchx__theme .searchx__page-item-button:not(.wishlist) {
  background: var(--searchx-primary-600) !important;
}
.searchx__page.searchx__theme .searchx__page-item-button:not(.wishlist):hover {
  background: var(--searchx-primary-700) !important;
  opacity: 1;
}

/* ============================================================================
 * BYTE — header accent overrides
 *
 * Originally the header inherited MOTI's monochrome palette: cart/wishlist
 * count badges, the active language pill, the nav-link hover underline and
 * the wishlist heart all defaulted to deep navy (var(--m-black) = #0a1929).
 * On a "modern electronics" demo that reads as black-and-white rather than
 * "blue brand", so we promote the electric-blue accent to those high-traffic
 * header / card surfaces.
 *
 * Kept OUT of this list (intentionally still navy):
 *   .m-about background — needs strong contrast for the white CTA
 *   .m-flash toast      — high-contrast notification, not a brand surface
 *   .m-footer border    — subtle separator only
 *   SDK popup-item hover — full-bleed accent on every result is too loud
 * ========================================================================== */

/* --- Header count badges (cart + favorites) --- */
.m-icon-btn .m-badge {
  background: var(--m-accent);
  color: var(--m-white);
}

/* --- Language switcher (header + mobile drawer) --- */
.m-lang-btn:hover {
  color: var(--m-accent);
}
.m-lang-btn.is-active {
  background: var(--m-accent);
  color: var(--m-white);
}
.m-lang-btn.is-active:hover {
  /* keep white text legible while still hinting at the hover state */
  background: var(--m-accent-dark);
  color: var(--m-white);
}

/* --- Category nav hover (active state already on accent above) --- */
.m-nav a:hover {
  color: var(--m-accent);
  border-bottom-color: var(--m-accent);
}

/* --- Category teaser tiles --- */
.m-tile:hover {
  background: var(--m-accent);
  color: var(--m-white);
}

/* --- Wishlist heart on product cards (home / favorites grid) --- */
.m-card__fav:hover,
.m-card__fav.is-active {
  background: var(--m-accent);
  color: var(--m-white);
}

/* --- Wishlist button on the Product Detail Page --- */
.m-pdp__fav-btn {
  border-color: var(--m-accent);
}
.m-pdp__fav-btn:hover,
.m-pdp__fav-btn.is-active {
  background: var(--m-accent);
  border-color: var(--m-accent);
  color: var(--m-white);
}

/* --- SDK SearchPage wishlist heart — match site cards --- */
.searchx__page.searchx__theme .searchx__page-item-button.wishlist:hover,
.searchx__page.searchx__theme .searchx__page-item-button.wishlist.is-active,
.searchx__page.searchx__theme
  .searchx__page-item-button.wishlist[data-active="true"] {
  background: var(--searchx-primary-600) !important;
  color: var(--searchx-white) !important;
}
.searchx__page.searchx__theme
  .searchx__page-item-button.wishlist:hover
  svg,
.searchx__page.searchx__theme
  .searchx__page-item-button.wishlist.is-active
  svg,
.searchx__page.searchx__theme
  .searchx__page-item-button.wishlist[data-active="true"]
  svg {
  stroke: var(--searchx-white) !important;
  color: var(--searchx-white) !important;
}

/* --- Mobile filter toggle button (search page) --- */
.searchx__page.searchx__theme .facet-toggle-button {
  background-color: var(--searchx-primary-600);
}
.searchx__page.searchx__theme .facet-toggle-button:hover {
  background-color: var(--searchx-primary-700);
}

/* --- Mobile filter sheet apply button --- */
.searchx__page.searchx__theme .facet-sheet__apply {
  background: var(--searchx-primary-600);
}
.searchx__page.searchx__theme .facet-sheet__apply:hover {
  background: var(--searchx-primary-700);
}
