/* Scrollprise Dark Theme v40.6 — MATTE CATALOGUE PASS
   EXPERIMENT BRANCH ONLY.
   Presentation-only CSS. No product data, handlers, routing, affiliate or RMM logic changes.
*/

html.theme-dark-v40 {
  --sp40-matte-page: #111411;
  --sp40-matte-section: #171a18;
  --sp40-matte-panel: #1b1f1c;
  --sp40-matte-card: #181c19;
  --sp40-matte-card-hi: #1d221e;
  --sp40-matte-copy: #141714;
  --sp40-matte-media: #c7cac4;
  --sp40-matte-media-hi: #d0d2cc;
  --sp40-matte-line: rgba(255,255,255,.055);
  --sp40-matte-line-hi: rgba(255,255,255,.10);
  --sp40-matte-text: #f1f3ef;
  --sp40-matte-muted: #9ba29b;
  --sp40-matte-dim: #747c75;
}

/* ==================== PAGE / CATALOGUE CANVAS ==================== */
html.theme-dark-v40 body.catalogue-page,
html.theme-dark-v40 body.all-products-page,
html.theme-dark-v40 body.traditional-categories-page {
  background: var(--sp40-matte-page) !important;
}

html.theme-dark-v40 body.catalogue-page main,
html.theme-dark-v40 body.all-products-page main,
html.theme-dark-v40 body.traditional-categories-page main {
  background:
    radial-gradient(900px circle at 78% 4%, rgba(255,255,255,.022), transparent 58%),
    linear-gradient(180deg, #141714 0%, #101310 100%) !important;
}

html.theme-dark-v40 .category-products,
html.theme-dark-v40 .catalogue-products,
html.theme-dark-v40 #catalogue {
  background:
    radial-gradient(780px circle at 85% 0%, rgba(255,255,255,.025), transparent 62%),
    var(--sp40-matte-section) !important;
  border-top: 1px solid rgba(255,255,255,.045) !important;
  border-bottom: 1px solid rgba(255,255,255,.04) !important;
}

html.theme-dark-v40 .category-products > .container,
html.theme-dark-v40 .catalogue-products > .container {
  background: transparent !important;
}

html.theme-dark-v40 .category-products-head h2,
html.theme-dark-v40 .catalogue-page .category-products-head h2 {
  color: var(--sp40-matte-text) !important;
}

html.theme-dark-v40 .category-products-head #resultText,
html.theme-dark-v40 #resultText {
  color: #8d958e !important;
}

/* ==================== SEARCH / SORT — MATTE CONTROLS ==================== */
html.theme-dark-v40 .catalogue-tools {
  background: rgba(20,23,20,.72) !important;
  border: 1px solid rgba(255,255,255,.045) !important;
  border-radius: 22px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018) !important;
}

html.theme-dark-v40 .catalogue-search-wrap,
html.theme-dark-v40 .all-products-page .catalogue-search-wrap {
  background: #1a1e1b !important;
  border: 1px solid var(--sp40-matte-line) !important;
  box-shadow: none !important;
}

html.theme-dark-v40 #catalogueSearch,
html.theme-dark-v40 #traditionalSearch {
  background: transparent !important;
  color: #eef1ec !important;
  -webkit-text-fill-color: #eef1ec !important;
}

html.theme-dark-v40 #catalogueSearch::placeholder,
html.theme-dark-v40 #traditionalSearch::placeholder {
  color: #727a73 !important;
  -webkit-text-fill-color: #727a73 !important;
}

html.theme-dark-v40 .catalogue-sort-label {
  color: #747c75 !important;
}

html.theme-dark-v40 .catalogue-sort-button,
html.theme-dark-v40 [data-catalogue-sort] {
  background: #1b1f1c !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  color: #9ea69f !important;
  box-shadow: none !important;
}

html.theme-dark-v40 .catalogue-sort-button:hover,
html.theme-dark-v40 .catalogue-sort-button.is-active,
html.theme-dark-v40 [data-catalogue-sort]:hover,
html.theme-dark-v40 [data-catalogue-sort].active,
html.theme-dark-v40 [data-catalogue-sort][aria-pressed="true"] {
  background: #222722 !important;
  border-color: rgba(183,255,51,.26) !important;
  color: #f4f6f2 !important;
}

/* ==================== PRODUCT GRID ==================== */
html.theme-dark-v40 .product-grid,
html.theme-dark-v40 #productGrid {
  background: transparent !important;
}

/* Matte shell: no glass / glossy highlight treatment. */
html.theme-dark-v40 .product-card,
html.theme-dark-v40 .catalogue-lite-card,
html.theme-dark-v40 .traditional-categories-page .product-card {
  background: linear-gradient(180deg, #1b1f1c 0%, #171b18 100%) !important;
  border: 1px solid var(--sp40-matte-line) !important;
  color: var(--sp40-matte-text) !important;
  box-shadow:
    0 12px 32px rgba(0,0,0,.27),
    inset 0 1px 0 rgba(255,255,255,.022) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.theme-dark-v40 .product-card:hover,
html.theme-dark-v40 .catalogue-lite-card:hover {
  background: linear-gradient(180deg, #202520 0%, #1a1e1b 100%) !important;
  border-color: rgba(255,255,255,.09) !important;
  box-shadow:
    0 18px 42px rgba(0,0,0,.32),
    inset 0 1px 0 rgba(255,255,255,.028) !important;
}

html.theme-dark-v40 .product-card::before,
html.theme-dark-v40 .product-card::after,
html.theme-dark-v40 .catalogue-lite-card::before,
html.theme-dark-v40 .catalogue-lite-card::after {
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Photography well: muted warm stone rather than bright white. */
html.theme-dark-v40 .product-card .card-media,
html.theme-dark-v40 .catalogue-lite-card .card-media,
html.theme-dark-v40 .traditional-categories-page .product-card .card-media {
  background:
    radial-gradient(420px circle at 50% 18%, rgba(255,255,255,.18), transparent 56%),
    linear-gradient(180deg, #cfd1cb 0%, #c3c6c0 100%) !important;
  border: 0 !important;
  box-shadow:
    inset 0 -1px 0 rgba(0,0,0,.07),
    inset 0 1px 0 rgba(255,255,255,.24) !important;
}

html.theme-dark-v40 .product-card .card-media img,
html.theme-dark-v40 .catalogue-lite-card .card-media img {
  filter: brightness(.94) saturate(.95) contrast(.99) !important;
}

/* Lower information block: deep charcoal, not pure black. */
html.theme-dark-v40 .product-card .card-copy,
html.theme-dark-v40 .catalogue-lite-card .card-copy,
html.theme-dark-v40 .traditional-categories-page .product-card .card-copy {
  background: linear-gradient(180deg, #171a18 0%, #131613 100%) !important;
  border-top: 1px solid rgba(255,255,255,.04) !important;
  color: var(--sp40-matte-text) !important;
}

html.theme-dark-v40 .product-card:hover .card-copy,
html.theme-dark-v40 .catalogue-lite-card:hover .card-copy {
  background: linear-gradient(180deg, #1b1f1c 0%, #161916 100%) !important;
}

html.theme-dark-v40 .product-card h3,
html.theme-dark-v40 .product-card h3 button,
html.theme-dark-v40 .catalogue-lite-card h3,
html.theme-dark-v40 .catalogue-lite-card h3 button {
  color: #f2f4f0 !important;
  -webkit-text-fill-color: #f2f4f0 !important;
}

html.theme-dark-v40 .product-card .card-story,
html.theme-dark-v40 .catalogue-lite-card .card-story {
  color: #969e97 !important;
  -webkit-text-fill-color: #969e97 !important;
}

html.theme-dark-v40 .product-card .best-for,
html.theme-dark-v40 .catalogue-lite-card .best-for {
  background: #111411 !important;
  border: 1px solid rgba(255,255,255,.05) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.015) !important;
}

html.theme-dark-v40 .product-card .details-button,
html.theme-dark-v40 .catalogue-lite-card .details-button {
  background: #1d211e !important;
  border-color: rgba(255,255,255,.075) !important;
  color: #d6dbd5 !important;
  box-shadow: none !important;
}

html.theme-dark-v40 .product-card .details-button:hover,
html.theme-dark-v40 .catalogue-lite-card .details-button:hover {
  background: #242924 !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #fff !important;
}

/* Keep the Scrollprise lime action as the single high-energy accent. */
html.theme-dark-v40 .product-card .amazon-button,
html.theme-dark-v40 .catalogue-lite-card .amazon-button {
  box-shadow: none !important;
}

html.theme-dark-v40 .product-card .card-save,
html.theme-dark-v40 .catalogue-lite-card .card-save {
  background: rgba(24,28,25,.92) !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 5px 14px rgba(0,0,0,.18) !important;
}

/* ==================== CATEGORY CARDS — SAME MATERIAL LANGUAGE ==================== */
html.theme-dark-v40 .traditional-category-card,
html.theme-dark-v40 .traditional-window-rail > a {
  background:
    radial-gradient(220px circle at 88% 0%, rgba(255,255,255,.025), transparent 62%),
    #1a1e1b !important;
  border-color: rgba(255,255,255,.055) !important;
  box-shadow:
    0 10px 28px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.018) !important;
}

html.theme-dark-v40 .traditional-category-card:hover,
html.theme-dark-v40 .traditional-window-rail > a:hover {
  background:
    radial-gradient(220px circle at 88% 0%, rgba(183,255,51,.04), transparent 64%),
    #202420 !important;
  border-color: rgba(183,255,51,.16) !important;
}

/* ==================== HOMEPAGE PRODUCT AREAS ==================== */
html.theme-dark-v40 body[data-page="home"] .picks,
html.theme-dark-v40 body[data-page="home"] .traditional-home-section,
html.theme-dark-v40 body[data-page="home"] .editorial-drop {
  background: var(--sp40-matte-page) !important;
}

html.theme-dark-v40 body[data-page="home"] .picks .product-card,
html.theme-dark-v40 body[data-page="home"] .editorial-drop .product-card {
  background: linear-gradient(180deg, #1b1f1c 0%, #171b18 100%) !important;
}

/* Mobile: preserve material hierarchy without expensive effects. */
@media (max-width:700px) {
  html.theme-dark-v40 .catalogue-tools {
    border-radius: 18px !important;
  }

  html.theme-dark-v40 .product-card,
  html.theme-dark-v40 .catalogue-lite-card {
    box-shadow: 0 9px 24px rgba(0,0,0,.24) !important;
  }

  html.theme-dark-v40 .product-card .card-copy,
  html.theme-dark-v40 .catalogue-lite-card .card-copy {
    background: #151815 !important;
  }
}
