/* Load after the storefront brand. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories, #catalog) {
  --editorial-ivory: #f8f6f1;
  --editorial-ink: #26241f;
  --editorial-bronze: #80613a;
  --editorial-muted: #686157;
  --editorial-line: #e8e0d4;
  --editorial-wash: #f0e9df;
  --editorial-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', Georgia, serif;
  --atlas-cat-stone: var(--editorial-ivory);
  --atlas-cat-rule: var(--editorial-line);
  --atlas-cat-ink: var(--editorial-ink);
  --atlas-cat-muted: var(--editorial-muted);
  --atlas-cat-accent: var(--editorial-bronze);
  --atlas-cat-deep: var(--editorial-bronze);
  --atlas-cat-wash: var(--editorial-wash);
  --atlas-cat-active-line: #d8c8b4;
  --atlas-cat-sidebar: clamp(178px, 15vw, 218px);
  color: var(--editorial-ink);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home .marketplace-section {
  background: transparent;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-layout .home-products-heading, #categories .directory-products .subpage-head, #catalog .catalog-head) {
  border-bottom-color: var(--editorial-line);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories) .product-total {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home .marketplace-layout .home-products-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home .home-product-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex: 0 1 29rem;
  width: 100%;
  min-width: min(100%, 29rem);
  max-width: none;
  gap: 8px;
  margin: 0;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home .home-search {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home .home-search :is(svg, i, [data-lucide]) {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 12px;
  width: 16px;
  height: 16px;
  color: var(--editorial-bronze);
  transform: translateY(-50%);
  pointer-events: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .home-search #home-product-filter, #home #home-product-sort, #catalog .catalog-utility select, #catalog .catalog-filter-block > label select) {
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  border: 1px solid var(--editorial-line) !important;
  border-radius: 6px;
  background: #fff !important;
  color: var(--editorial-ink);
  font-size: 14px;
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home .home-search #home-product-filter {
  width: 100%;
  padding-inline: 36px 12px !important;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home #home-product-sort, #catalog .catalog-utility select, #catalog .catalog-filter-block > label select) {
  appearance: auto !important;
  padding-inline: 12px 8px !important;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home #home-product-sort {
  width: 9rem !important;
}

/* Keep the category rail and its open, active, and hidden states intact. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-layout .category-sidebar, #categories .directory-layout > .category-sidebar, #catalog .catalog-filter) {
  padding-inline-end: clamp(8px, 1vw, 16px);
  border: 0;
  border-inline-end: 1px solid var(--editorial-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories) .category-sidebar-head {
  margin: 0;
  padding: 6px 8px 10px 0 !important;
  border-color: var(--editorial-line);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories) .category-sidebar-head .kicker {
  display: none;
}

@media (min-width: 761px) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories) .category-mobile-toggle {
    display: none;
  }
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .category-sidebar, #categories .category-sidebar, #catalog .catalog-categories-block) > .category-side-list {
  padding: 6px 3px 6px 0;
  gap: 2px;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .category-sidebar, #categories .category-sidebar, #catalog .catalog-filter) .category-side-item {
  min-height: 44px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--editorial-ink);
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .category-sidebar, #categories .category-sidebar, #catalog .catalog-filter) .category-side-item :is(img, .mark-fallback) {
  border: 0;
  background: transparent;
  color: var(--editorial-bronze);
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .category-sidebar, #categories .category-sidebar, #catalog .catalog-filter) .category-side-item:hover {
  background: #fff;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .category-sidebar, #categories .category-sidebar, #catalog .catalog-filter) .category-side-item:is(.active, [aria-pressed='true'], [aria-current='page']) {
  background: var(--editorial-wash);
  color: var(--editorial-ink);
  box-shadow: inset 2px 0 var(--editorial-bronze);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #catalog :is(.filter-note :is(svg, i), #reset-filter, .crumb button) {
  color: var(--editorial-bronze);
}

/* A compact card led by category, fulfillment and product name. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-layout #hot-products, #categories #category-page-products, #catalog .product-list > .store-product-grid) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.25vw, 18px);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  grid-template-rows: auto auto 1fr auto;
  gap: 6px 10px;
  min-width: 0;
  min-height: 0;
  padding: clamp(13px, 1.2vw, 18px);
  border: 0 !important;
  border-radius: 9px;
  background: #fff !important;
  color: var(--editorial-ink);
  box-shadow: 0 2px 8px rgb(38 36 31 / 5%);
  transition: box-shadow .18s ease;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-card:is(:hover, :focus-within) {
  box-shadow: 0 5px 15px rgb(38 36 31 / 10%);
  transform: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-info {
  display: contents;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-visual {
  grid-area: 1 / 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 32px;
  aspect-ratio: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 4px;
  background: transparent !important;
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-visual > .cover-fallback {
  display: none !important; /* The Atlas fallback rule also scopes to the detail ID. */
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-visual > img {
  position: static;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 0;
  border-radius: 4px;
  background: var(--editorial-ivory);
  object-fit: contain;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-visual .delivery-badge {
  position: static;
  max-width: 100%;
  min-height: 0;
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  background: var(--editorial-ivory) !important;
  color: var(--editorial-bronze);
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: normal;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-visual .delivery-badge:is(.code, :hover) {
  background: var(--editorial-wash) !important;
  color: var(--editorial-bronze);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-category {
  grid-area: 1 / 1;
  align-self: center;
  min-width: 0;
  color: var(--editorial-bronze);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .035em;
  white-space: normal;
  overflow-wrap: anywhere;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-name {
  grid-area: 2 / 1 / auto / -1;
  display: block;
  width: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--editorial-ink);
  font: 700 clamp(17px, 1.35vw, 22px)/1.36 var(--editorial-serif);
  letter-spacing: 0;
  line-break: strict;
  text-align: start;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-name:hover {
  color: var(--editorial-bronze);
  text-decoration: underline;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-info > .store-product-description {
  grid-area: 3 / 1 / auto / -1;
  color: var(--editorial-muted);
  font-size: 12px;
  line-height: 1.5;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-footer {
  grid-area: 4 / 1 / auto / -1;
  align-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 5px 0 0;
  padding-top: 7px;
  border: 0;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-footer > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-footer .store-product-stock {
  flex-basis: 100%;
  margin: 0;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-footer strong {
  color: var(--editorial-ink);
  font-size: clamp(18px, 1.45vw, 23px);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-footer :is(small, .was-price) {
  color: var(--editorial-muted);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-footer :is(.stock-low, .stock-soldout) {
  color: var(--editorial-bronze);
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-buy-button {
  min-height: 38px;
  min-width: 68px;
  width: auto;
  border: 1px solid var(--atlas-cat-active-line) !important;
  border-radius: 5px;
  background: #fff !important;
  color: var(--editorial-bronze) !important;
  box-shadow: none;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-buy-button:hover:not(:disabled) {
  border-color: var(--editorial-bronze) !important;
  background: var(--editorial-bronze) !important;
  color: #fff !important;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-buy-button:disabled {
  border-color: var(--editorial-line) !important;
  background: var(--editorial-ivory) !important;
  color: var(--editorial-muted) !important;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) > .field-help {
  border: 0;
  background: #fff;
  color: var(--editorial-muted);
}

/* Remove decorative marks inherited from the legacy catalog styles. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories, #catalog) :is(.store-product-card, .product-visual, .delivery-badge, .store-product-category, .store-product-name, .store-product-footer, .store-product-footer strong, .product-buy-button, .category-sidebar-head, .category-side-item, .home-products-heading, .product-total)::before,
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories, #catalog) :is(.store-product-card, .product-visual, .delivery-badge, .store-product-category, .store-product-name, .store-product-footer, .store-product-footer strong, .product-buy-button, .category-sidebar-head, .category-side-item, .home-products-heading, .product-total)::after {
  content: none !important;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories, #catalog) :is(button, select, input, a):focus-visible {
  outline: 2px solid var(--editorial-bronze);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-layout #hot-products, #categories #category-page-products, #catalog .product-list > .store-product-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-layout #hot-products, #categories #category-page-products, #catalog .product-list > .store-product-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-layout .category-sidebar, #categories .directory-layout > .category-sidebar, #catalog .catalog-filter) {
    padding-inline-end: 0;
    border-inline-end: 0;
    border-block-end: 1px solid var(--editorial-line);
  }

  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#home .marketplace-section, #categories) .category-sidebar-head {
    padding-inline-end: 0 !important;
    border-bottom: 0;
  }

  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home .home-product-tools {
    flex-basis: 100%;
  }

  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .product-buy-button {
    min-height: 44px;
  }
}

@media (max-width: 470px) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home .home-product-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #home #home-product-sort {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#hot-products, #category-page-products, #product-list) .store-product-card {
    transition: none;
  }
}
