/* CRAFTLEX shared UI overrides.
   Keep this file consolidated; do not stack flagship patches below it. */

.demo-notice { display: none !important; }

/* The page itself must never become wider than the viewport. Intentional
   horizontal scrolling is limited to the thumbnail strip only. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.shop-page,
.shop-page .shell,
.catalog-section,
.product-grid,
.product-detail-page,
.product-detail-layout,
.product-gallery,
.product-gallery-main,
.product-detail-summary {
  min-width: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
}

img { max-width: 100%; }

/* Keep the existing mobile-header breakpoint and its 70px flow height.
   overflow:hidden on body would otherwise capture the sticky scroll context. */
@media (max-width: 820px) {
  html, body { overflow-x: clip; }
  /* Banner actions live in a body-level layer at z-index:20. Keep the
     entire mobile header/menu above that layer, including after scrolling. */
  .site-header { position: sticky; top: 0; z-index: 30; }
  .mobile-menu[open] { z-index: 1; }
  .header-cart { position: relative; overflow: visible; flex-shrink: 0; }
  .header-cart b {
    position: absolute;
    top: -7px;
    right: -7px;
  }
  .mobile-menu nav {
    max-height: calc(100dvh - 82px);
    overflow-y: auto;
  }
  html { scroll-padding-top: 82px; }
}

/* Search drafts are applied only when the form is submitted. */
.shop-page .catalog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.shop-page .craftlex-search-field {
  position: relative;
  display: block;
  flex: 1;
  min-width: 0;
}
.shop-page .catalog-search input {
  width: 100%;
  min-width: 0;
  padding-right: 48px;
  font-size: 16px; /* Avoid automatic input zoom on narrow iPhones. */
}
.shop-page .catalog-search input::-webkit-search-cancel-button { display: none; }
.craftlex-search-submit {
  flex-shrink: 0;
  min-height: 43px;
  padding: 10px 16px;
  border: 1px solid var(--ink, #17202a);
  border-radius: 999px;
  background: var(--ink, #17202a);
  color: #fff;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.craftlex-search-submit:focus-visible { outline: 2px solid var(--blue, #0098cf); outline-offset: 2px; }
.shop-technical .catalog-search {
  order: -1;
  position: relative;
}
.craftlex-search-clear {
  position: absolute;
  right: 3px;
  top: 0;
  width: 43px;
  height: 43px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink, #17202a);
  font-size: 24px;
  cursor: pointer;
}
.craftlex-search-clear[hidden], .craftlex-catalog-more[hidden], .craftlex-show-more[hidden] { display: none; }
.craftlex-search-clear:focus-visible { outline: 2px solid var(--blue, #0098cf); }

/* ---------- Catalog loading ---------- */
.shop-technical .catalog-section:has(.product-grid:empty):has(.category-tabs button:only-child) .catalog-empty {
  display: grid !important;
  place-items: center !important;
  min-height: 190px !important;
  margin: 0 !important;
  padding: 32px !important;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
}

.shop-technical .catalog-section:has(.product-grid:empty):has(.category-tabs button:only-child) .catalog-empty::before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  border: 4px solid #dfe5e8;
  border-top-color: var(--blue, #0098cf);
  border-radius: 50%;
  animation: craftlex-catalog-spin .72s linear infinite;
}

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

/* ---------- Compact catalog header and section-aware filters ---------- */
@media (min-width: 900px) {
  .shop-page .shop-hero {
    height: 250px !important;
    min-height: 250px !important;
  }

  .shop-page .shop-hero > img,
  .shop-page .shop-hero > .shop-hero-shade,
  .shop-page .shop-hero > .shop-hero-copy {
    height: 100% !important;
    min-height: 0 !important;
  }

  .shop-page .shop-hero-copy {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0 !important;
  }

  .shop-page .shop-hero-copy h1 {
    margin: 8px 0 10px !important;
    font-size: clamp(38px, 3.7vw, 50px) !important;
    line-height: 1.04 !important;
  }

  .shop-page .shop-hero-copy > p:last-child {
    margin-bottom: 0 !important;
  }
}

.shop-page .catalog-tools {
  display: grid !important;
  grid-template-columns: max-content minmax(220px, 1fr) max-content;
  align-items: center !important;
  gap: 12px 16px !important;
}

.shop-technical .catalog-tools {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content;
}
.shop-technical .catalog-tools > * { min-width: 0; }

.shop-technical .craftlex-section-tabs {
  grid-column: 1;
  grid-row: 2;
}

.shop-technical .category-tabs[data-craftlex-label] {
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.shop-technical .category-tabs[data-craftlex-label]::before {
  content: attr(data-craftlex-label);
  flex: 0 0 100%;
  color: #637083;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.shop-page .catalog-search {
  grid-column: 2;
  grid-row: 1;
  width: 100% !important;
  max-width: 360px;
}

.shop-technical .catalog-search { grid-column: 1 / -1; grid-row: 1; max-width: none; }
.shop-technical .craftlex-sort { grid-row: 2 !important; }

.shop-technical .craftlex-brand-filter {
  display: flex;
  grid-column: 2;
  grid-row: 2;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #637083;
  font-size: 12px;
  font-weight: 700;
}
.craftlex-brand-filter > span { flex-shrink: 0; }
.craftlex-brand-filter select {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #dce3e8;
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #17202a);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.craftlex-brand-filter select:focus-visible {
  outline: 2px solid var(--blue, #0098cf);
  outline-offset: 2px;
}

.shop-page .craftlex-sort {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.shop-technical .craftlex-material-tabs {
  grid-column: 1;
  grid-row: 3;
}

.shop-technical .craftlex-style-tabs {
  grid-column: 2 / 4;
  grid-row: 3;
}

.shop-technical .craftlex-material-tabs,
.shop-technical .craftlex-style-tabs {
  align-self: stretch;
  padding: 9px 11px 11px;
  border: 1px solid #dce3e8;
  border-radius: 15px;
  background: rgba(255, 255, 255, .82);
}

.shop-warm .catalog-tools > .category-tabs {
  grid-column: 1 / -1;
  grid-row: 2;
}

.shop-warm .catalog-search {
  grid-column: 1 / 3;
  justify-self: start;
}

.shop-technical .craftlex-section-tabs button { font-weight: 700; }

.shop-technical .craftlex-native-accessory,
.shop-technical .craftlex-material-tabs[hidden],
.shop-technical .craftlex-style-tabs[hidden],
.shop-technical .craftlex-accessory-tabs[hidden],
.shop-technical .craftlex-brand-filter[hidden],
.product-card.craftlex-section-hidden,
.product-card.craftlex-style-hidden,
.product-card.craftlex-brand-hidden {
  display: none !important;
}

@media (max-width: 899px) {
  .shop-page .shop-hero {
    min-height: 260px !important;
  }

  .shop-page .shop-hero-copy {
    padding-top: 38px !important;
    padding-bottom: 34px !important;
  }

  .shop-page .catalog-tools {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .shop-page .catalog-search,
  .shop-page .craftlex-sort,
  .shop-technical .craftlex-brand-filter {
    width: 100% !important;
    max-width: none;
  }

  .shop-page .craftlex-sort {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .shop-technical .craftlex-brand-filter {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .shop-page .craftlex-sort select { width: 100%; }

  .shop-technical .craftlex-section-tabs,
  .shop-technical .craftlex-material-tabs,
  .shop-technical .craftlex-style-tabs,
  .shop-technical .craftlex-accessory-tabs {
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow: visible;
  }

  .shop-technical .craftlex-section-tabs {
    padding-bottom: 0;
  }

  .shop-technical .craftlex-material-tabs,
  .shop-technical .craftlex-style-tabs,
  .shop-technical .craftlex-accessory-tabs {
    padding: 8px 10px 11px;
  }

  .shop-technical .craftlex-section-tabs button,
  .shop-technical .craftlex-material-tabs button,
  .shop-technical .craftlex-style-tabs button,
  .shop-technical .craftlex-accessory-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .shop-technical .category-tabs[data-craftlex-label] {
    gap: 6px;
  }

  .shop-technical .craftlex-material-tabs,
  .shop-technical .craftlex-style-tabs,
  .shop-technical .craftlex-accessory-tabs {
    padding: 7px 8px 10px;
  }

  .shop-technical .craftlex-material-tabs button,
  .shop-technical .craftlex-style-tabs button,
  .shop-technical .craftlex-accessory-tabs button {
    min-height: 36px;
    padding: 7px 9px !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
  }
}


/* ---------- Ready-products lamp hero ---------- */
.shop-warm .shop-hero.craftlex-ready-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 280px !important;
  min-height: 280px !important;
  max-height: 280px !important;
  overflow: hidden;
  background: #17100d;
}

.shop-warm .craftlex-ready-hero-media,
.shop-warm .craftlex-ready-hero-media > img {
  display: block;
  width: 100%;
  height: 100%;
}

.shop-warm .craftlex-ready-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.shop-warm .craftlex-ready-hero-media > img {
  object-fit: cover;
  object-position: center;
}

.shop-warm .craftlex-ready-hero .shop-hero-shade {
  z-index: -1;
  background: linear-gradient(90deg, rgba(18, 12, 10, .98) 0%, rgba(23, 14, 11, .9) 39%, rgba(31, 18, 13, .3) 67%, rgba(31, 18, 13, .08) 100%) !important;
}

.shop-warm .craftlex-ready-hero .shop-hero-copy {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  width: min(100% - 40px, 1240px);
  height: 100% !important;
  min-height: 0 !important;
  padding-top: 22px !important;
  padding-bottom: 22px !important;
}

.shop-warm .craftlex-ready-hero .eyebrow {
  margin: 0 0 8px !important;
  color: #ffad8e !important;
  font-size: 12px !important;
  letter-spacing: .14em;
}

.shop-warm .craftlex-ready-hero h1 {
  max-width: 610px !important;
  margin: 0 !important;
  font-size: clamp(38px, 3.3vw, 50px) !important;
  line-height: 1.02 !important;
}

.shop-warm .craftlex-ready-hero .shop-hero-copy > p:last-of-type {
  max-width: 560px !important;
  margin: 10px 0 0 !important;
  color: #f2e8e2 !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
}

.craftlex-ready-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: #f45b35;
  color: #fff !important;
  box-shadow: 0 9px 24px rgba(244, 91, 53, .24);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}

.craftlex-ready-hero-cta:hover {
  transform: translateY(-1px);
  background: #dc4824;
}

.craftlex-ready-hero-cta:focus-visible,
.craftlex-ready-hero-all:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .92);
  outline-offset: 3px;
}

.craftlex-ready-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
}

.craftlex-ready-hero-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 999px;
  background: rgba(18, 12, 10, .34);
  color: #fff !important;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.craftlex-ready-hero-all:hover {
  border-color: rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .12);
}

.shop-warm .catalog-section {
  scroll-margin-top: 92px;
}

.shop-warm .craftlex-ready-catalog-title {
  margin: 0 0 18px;
  color: #2c201a;
  font-size: clamp(27px, 2.2vw, 34px);
  line-height: 1.12;
  letter-spacing: -.025em;
}

@media (max-width: 899px) {
  .shop-warm .shop-hero.craftlex-ready-hero {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
  }

  .shop-warm .craftlex-ready-hero-media > img {
    object-position: center;
  }

  .shop-warm .craftlex-ready-hero .shop-hero-shade {
    background: linear-gradient(90deg, rgba(17, 12, 10, .97) 0%, rgba(21, 13, 10, .82) 53%, rgba(24, 14, 10, .18) 100%) !important;
  }

  .shop-warm .craftlex-ready-hero .shop-hero-copy {
    justify-content: flex-start;
    width: min(100% - 32px, 680px);
    padding-top: 22px !important;
    padding-bottom: 18px !important;
  }

  .shop-warm .craftlex-ready-hero h1 {
    max-width: 260px !important;
    font-size: clamp(32px, 9.2vw, 40px) !important;
    line-height: 1.02 !important;
  }

  .shop-warm .craftlex-ready-hero .shop-hero-copy > p:last-of-type {
    max-width: 225px !important;
    margin-top: 10px !important;
    font-size: 14px !important;
    line-height: 1.42 !important;
  }

  .craftlex-ready-hero-actions {
    gap: 8px;
    margin-top: 12px;
  }

  .craftlex-ready-hero-cta,
  .craftlex-ready-hero-all {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .shop-warm .craftlex-ready-catalog-title {
    margin-bottom: 14px;
    font-size: 26px;
  }
}

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


/* ---------- Finished products ---------- */
.shop-warm .catalog-section > .shell { max-width: 1360px !important; }
.shop-warm .product-grid { gap: 26px !important; }

.shop-warm .product-card {
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 32px rgba(55, 38, 28, .07);
}

.shop-warm .product-visual {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 3 !important;
  background: #f4efe9 !important;
}

.shop-warm .product-visual > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #f4efe9 !important;
}

.shop-warm .product-copy { padding: 22px 24px 24px !important; }
.shop-warm .product-copy h2 {
  font-size: clamp(21px, 1.65vw, 27px) !important;
  line-height: 1.14 !important;
}
.shop-warm .product-copy > p {
  font-size: 14px !important;
  line-height: 1.55 !important;
}
.shop-warm .product-buy { margin-top: 18px !important; }

/* ---------- Flagship / configurable product ---------- */
.shop-warm .product-grid > .craftlex-featured-card {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 56%) minmax(0, 44%) !important;
  align-items: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  background: #fff !important;
}

/* Follow the real image ratio. Never crop the flagship image. */
.shop-warm .craftlex-featured-card .product-visual {
  display: block !important;
  align-self: start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: #efe8df !important;
}

.shop-warm .craftlex-featured-card .product-visual > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #efe8df !important;
}

.shop-warm .craftlex-featured-card .product-copy {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: clamp(28px, 3vw, 44px) !important;
}

.shop-warm .craftlex-featured-card .product-category {
  display: block !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 8px 0 0 !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.shop-warm .craftlex-featured-card .product-copy h2 {
  display: block !important;
  width: auto !important;
  max-width: 18ch !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 12px 0 14px !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  hyphens: none !important;
  font-size: clamp(28px, 2.25vw, 36px) !important;
  line-height: 1.1 !important;
  letter-spacing: -.03em !important;
}

.shop-warm .craftlex-featured-card .product-copy > p {
  display: block !important;
  max-width: 48ch !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  white-space: normal !important;
  color: #6d7785 !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
}

.shop-warm .craftlex-featured-card .product-copy > ul { display: none !important; }
.shop-warm .craftlex-featured-card .stock-label {
  display: inline-flex !important;
  align-self: flex-start !important;
  margin-top: 18px !important;
}
.shop-warm .craftlex-featured-card .product-buy {
  width: 100% !important;
  margin-top: 24px !important;
}
.shop-warm .craftlex-featured-card .product-price strong {
  font-size: clamp(28px, 2.2vw, 36px) !important;
}

.craftlex-featured-label {
  display: inline-flex !important;
  align-self: flex-start !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 7px 11px !important;
  border-radius: 999px;
  background: #fff0e9;
  color: #f45b35;
  white-space: normal;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* ---------- Finished-product detail ---------- */
.product-detail-page.shop-warm .product-detail-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr) !important;
  gap: clamp(26px, 3.4vw, 48px) !important;
}

.product-detail-page.shop-warm .product-gallery-main {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
  background: #f4efe9 !important;
}

.product-detail-page.shop-warm .product-gallery-main img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

.product-detail-page.craftlex-flagship-detail .product-gallery-main {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  background: #f4efe9 !important;
}

.product-detail-page.craftlex-flagship-detail .product-gallery-main img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}

.product-detail-page.craftlex-flagship-detail .product-gallery-thumbs img {
  object-fit: contain !important;
  object-position: center !important;
}

.product-detail-page.craftlex-flagship-detail .product-detail-summary {
  min-width: 0 !important;
  max-width: 100% !important;
}

.product-detail-page.craftlex-flagship-detail .product-detail-summary h1 {
  max-width: 18ch !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  hyphens: none !important;
  font-size: clamp(32px, 3vw, 44px) !important;
  line-height: 1.08 !important;
}

.product-detail-page.shop-warm .product-gallery-thumbs {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  padding: 2px 0 7px;
  scrollbar-width: thin;
}

.product-detail-page.shop-warm .product-gallery-thumbs > button {
  flex: 0 0 88px !important;
  width: 88px !important;
  height: 76px !important;
  scroll-snap-align: start;
}

/* ---------- Configurable options ---------- */
.craftlex-option-group { margin: 2px 0 20px; padding: 0; border: 0; }
.craftlex-option-group legend {
  margin-bottom: 9px;
  color: #17212b;
  font-size: 13px;
  font-weight: 800;
}
.craftlex-option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.craftlex-option-chip { position: relative; cursor: pointer; }
.craftlex-option-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.craftlex-option-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #d9e0e5;
  border-radius: 11px;
  background: #fff;
  color: #27333e;
  font-size: 13px;
  font-weight: 700;
}
.craftlex-option-chip input:focus-visible + span {
  outline: 2px solid #1d6fa5;
  outline-offset: 2px;
}
.craftlex-option-chip input:checked + span {
  border-color: #f45b35;
  background: #fff7f3;
  box-shadow: inset 0 0 0 1px #f45b35;
}
.craftlex-option-help {
  margin: 8px 0 0;
  color: #6c7781;
  font-size: 12px;
  line-height: 1.45;
}

/* ---------- Cart options and filament promotion ---------- */
.craftlex-cart-option,
.craftlex-order-option {
  margin: 5px 0 0 !important;
  color: #596773 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.craftlex-discount-row,
.craftlex-order-discount,
.craftlex-order-shipping,
.craftlex-final-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}
.craftlex-discount-row,
.craftlex-order-discount { color: #20754d; }
.craftlex-discount-row strong,
.craftlex-order-discount strong { color: inherit; }
.craftlex-order-shipping strong { color: #263443; }
.craftlex-final-total-row {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #dfe5e9;
  font-weight: 800;
}
.craftlex-final-total-row strong { font-size: 22px; }
.craftlex-promo-hint {
  display: block;
  margin: 10px 0 0 !important;
  color: #596773;
  font-size: 12px !important;
  line-height: 1.45;
}
.craftlex-promo-hint.is-active { color: #20754d; font-weight: 700; }
.craftlex-shipping-hint {
  display: block;
  margin: 6px 0 0 !important;
  color: #1d6fa5;
  font-size: 12px !important;
  font-weight: 650;
  line-height: 1.45;
}
.craftlex-shipping-hint.is-active { color: #20754d; }

/* The generated checkout keeps its original controlled field for React state;
   customers use the clearer carrier-specific field below. */
.craftlex-native-delivery-select { display: none !important; }
.craftlex-delivery-select { width: 100%; }
.delivery-estimate.is-free {
  color: #20754d !important;
  font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (min-width: 1600px) {
  .shop-warm .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* This range also covers a phone browser's “desktop site” viewport (~980px).
   Keep the intended desktop split instead of one enormous full-width photo. */
@media (min-width: 900px) and (max-width: 1599px) {
  .shop-warm .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .shop-warm .product-grid > .craftlex-featured-card {
    grid-template-columns: minmax(0, 54%) minmax(0, 46%) !important;
  }

  .product-detail-page.shop-warm .product-detail-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr) !important;
  }

  .product-detail-page.craftlex-flagship-detail .product-gallery-main img {
    max-height: 620px !important;
    width: 100% !important;
    object-fit: contain !important;
  }
}

@media (max-width: 899px) {
  .shop-warm .product-grid { grid-template-columns: 1fr !important; }
  .shop-warm .product-grid > .craftlex-featured-card {
    grid-template-columns: 1fr !important;
  }
  .shop-warm .craftlex-featured-card .product-copy {
    padding: 28px 26px 30px !important;
  }
  .shop-warm .craftlex-featured-card .product-copy h2 {
    max-width: 20ch !important;
    font-size: clamp(28px, 4.5vw, 34px) !important;
  }
  .product-detail-page.shop-warm .product-detail-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 759px) {
  .shop-warm .product-copy { padding: 18px 18px 20px !important; }
  .shop-warm .craftlex-featured-card .product-copy {
    padding: 22px 20px 24px !important;
  }
  .shop-warm .craftlex-featured-card .product-copy h2 {
    max-width: none !important;
    margin: 10px 0 12px !important;
    font-size: 26px !important;
    line-height: 1.12 !important;
    letter-spacing: -.025em !important;
    overflow-wrap: anywhere !important;
  }
  .shop-warm .craftlex-featured-card .product-copy > p {
    font-size: 15px !important;
    line-height: 1.52 !important;
  }
  .shop-warm .craftlex-featured-card .stock-label { margin-top: 15px !important; }
  .shop-warm .craftlex-featured-card .product-buy {
    align-items: center !important;
    margin-top: 18px !important;
  }
  .craftlex-featured-label { font-size: 10px; }
  .product-detail-page.craftlex-flagship-detail .product-detail-summary {
    padding: 25px 20px !important;
  }
  .product-detail-page.craftlex-flagship-detail .product-detail-summary h1 {
    max-width: none !important;
    font-size: 28px !important;
    line-height: 1.1 !important;
    letter-spacing: -.02em !important;
    overflow-wrap: anywhere !important;
  }
  .product-detail-page.shop-warm .product-gallery-thumbs > button {
    flex-basis: 72px !important;
    width: 72px !important;
    height: 64px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-section .catalog-empty::before { animation-duration: 1.5s; }
}


/* Clean, uniformly sized product thumbnails in the cart. */
.cart-thumb.craftlex-cart-thumb-has-image {
  position: relative;
  width: 70px;
  height: 70px;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff !important;
  background-image: none !important;
  color: inherit;
}
.cart-thumb > .craftlex-cart-thumb-image {
  display: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 4px;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.cart-thumb.craftlex-cart-thumb-has-image > .craftlex-cart-thumb-image {
  display: block !important;
}
.cart-thumb.craftlex-cart-thumb-has-image span,
.cart-thumb.craftlex-cart-thumb-has-image [hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  .cart-thumb.craftlex-cart-thumb-has-image {
    width: 60px;
    height: 60px;
  }
}


/* ---------- Compact filament catalog cards ---------- */
.catalog-section .craftlex-card-spec-secondary {
  display: none !important;
}

@media (min-width: 900px) {
  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy {
    padding: 15px 17px 16px !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-category {
    display: block !important;
    min-width: 0 !important;
    min-height: 11px !important;
    max-height: 11px !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #71808a !important;
    font-size: 8px !important;
    line-height: 11px !important;
    letter-spacing: .045em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    -webkit-line-clamp: unset !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy h2 {
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 5px 0 !important;
    font-size: 18px !important;
    line-height: 21px !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy > p {
    min-height: 36px !important;
    max-height: 36px !important;
    font-size: 13px !important;
    line-height: 18px !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy > ul {
    min-height: 22px !important;
    margin: 8px 0 !important;
    gap: 5px !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy > ul > li {
    padding: 4px 7px !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-buy {
    min-height: 46px !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
  }
}


/* ---------- Full-HD catalog and cart density ---------- */
/* Keep the whole-card link above product imagery while preserving the add button. */
.catalog-section .product-card-overlay {
  z-index: 2 !important;
}
.catalog-section .product-card .product-buy button {
  z-index: 3 !important;
}

@media (min-width: 900px) {
  /* The catalog title is the only descriptive copy on desktop. */
  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy > p {
    display: none !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy h2 {
    min-height: 60px !important;
    max-height: 60px !important;
    margin: 5px 0 6px !important;
    overflow: hidden !important;
    font-size: 17px !important;
    line-height: 20px !important;
    -webkit-line-clamp: 3 !important;
    overflow-wrap: anywhere !important;
  }

  /* Denser desktop cart: smaller vertical padding and no technical SKU line. */
  .cart-row {
    grid-template-columns: 72px minmax(0, 1fr) 104px 68px !important;
    gap: 12px !important;
    padding: 9px 14px !important;
  }

  .cart-thumb.craftlex-cart-thumb-has-image {
    width: 60px !important;
    height: 60px !important;
  }

  .cart-product small {
    display: none !important;
  }

  .cart-product h2 {
    display: -webkit-box !important;
    min-height: 0 !important;
    max-height: 38px !important;
    margin: 0 0 5px !important;
    overflow: hidden !important;
    font-size: 15px !important;
    line-height: 19px !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  .cart-product button {
    font-size: 10px !important;
  }
}


/* ---------- Mobile catalog and cart density ---------- */
/* The short catalog description duplicates the title/specs; details stay on the product page. */
.catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy > p {
  display: none !important;
}

@media (max-width: 899px) {
  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy {
    padding: 14px 16px 15px !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-category {
    display: block !important;
    min-width: 0 !important;
    min-height: 11px !important;
    max-height: 11px !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 8px !important;
    line-height: 11px !important;
    letter-spacing: .045em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    -webkit-line-clamp: unset !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy h2 {
    min-height: 0 !important;
    max-height: 60px !important;
    margin: 5px 0 6px !important;
    overflow: hidden !important;
    font-size: 17px !important;
    line-height: 20px !important;
    -webkit-line-clamp: 3 !important;
    overflow-wrap: anywhere !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy > ul {
    min-height: 22px !important;
    margin: 7px 0 !important;
    gap: 5px !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy > ul > li {
    padding: 4px 7px !important;
  }

  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-buy {
    min-height: 42px !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
  }

  .cart-section {
    padding-top: 30px !important;
  }

  .cart-section h1 {
    font-size: 38px !important;
  }

  .cart-intro {
    margin: 8px 0 18px !important;
    font-size: 13px !important;
  }

  .cart-layout {
    gap: 16px !important;
  }

  .cart-product small {
    display: none !important;
  }

  .cart-product h2 {
    display: -webkit-box !important;
    min-height: 0 !important;
    max-height: 36px !important;
    margin: 0 0 4px !important;
    overflow: hidden !important;
    font-size: 14px !important;
    line-height: 18px !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  .cart-product button {
    font-size: 10px !important;
  }
}

@media (min-width: 521px) and (max-width: 899px) {
  .cart-row {
    grid-template-columns: 64px minmax(0, 1fr) 94px 64px !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  .cart-thumb.craftlex-cart-thumb-has-image {
    width: 56px !important;
    height: 56px !important;
  }

  .cart-row > strong {
    grid-column: 4 !important;
    text-align: right !important;
  }
}

@media (max-width: 520px) {
  .cart-section {
    padding-top: 22px !important;
  }

  .cart-section h1 {
    font-size: 32px !important;
  }

  .cart-intro {
    margin: 6px 0 14px !important;
    line-height: 1.4 !important;
  }

  .cart-row {
    grid-template-columns: 52px minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 4px 8px !important;
    padding: 8px 10px !important;
  }

  .cart-thumb.craftlex-cart-thumb-has-image {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    width: 48px !important;
    height: 48px !important;
  }

  .cart-product {
    grid-column: 2 / 4 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  .cart-product h2 {
    max-height: 32px !important;
    font-size: 13px !important;
    line-height: 16px !important;
  }

  .quantity-control {
    grid-column: 2 !important;
    grid-row: 2 !important;
    grid-template-columns: 28px 30px 28px !important;
    justify-self: start !important;
  }

  .quantity-control button {
    height: 28px !important;
    font-size: 16px !important;
  }

  .quantity-control span {
    font-size: 12px !important;
  }

  .cart-row > strong {
    grid-column: 3 !important;
    grid-row: 2 !important;
    align-self: center !important;
    text-align: right !important;
    font-size: 15px !important;
  }
}


/* ---------- Card baseline and compact cart SKU ---------- */
/* Keep the price separator aligned across every row, regardless of title length. */
.catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-buy {
  margin-top: auto !important;
}

/* Leave enough vertical room for descenders such as the “g” in “kg”. */
.catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy h2 {
  max-height: 64px !important;
  line-height: 21px !important;
}

/* SKU stays available in the cart without increasing row density. */
.cart-product small {
  display: block !important;
  min-width: 0 !important;
  margin: 0 0 2px !important;
  overflow: hidden !important;
  color: var(--muted, #66727e) !important;
  font-size: 8px !important;
  line-height: 10px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (min-width: 900px) {
  .catalog-section .product-card.craftlex-compact-card:not(.craftlex-featured-card) .product-copy h2 {
    min-height: 63px !important;
    max-height: 63px !important;
  }
}
/* Coupon controls in the cart and checkout. */
.craftlex-coupon {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #dfe5e9;
  border-radius: 12px;
  background: #f6f8fa;
}
.craftlex-coupon-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.craftlex-coupon label { color: #263443 !important; font-weight: 750; font-size: 14px; }
.craftlex-coupon-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.craftlex-coupon input {
  min-width: 0;
  width: 100%;
  padding: 10px;
  border: 1px solid #aebbc5;
  border-radius: 8px;
  background: #fff;
  color: #263443;
  font: inherit;
  font-size: 16px;
}
.craftlex-coupon button {
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.craftlex-coupon-apply {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: #263443;
  color: #fff;
}
.craftlex-coupon-remove { padding: 4px 0; border: 0; background: none; color: #596773; text-decoration: underline; }
.craftlex-coupon-remove[hidden] { display: none; }
.craftlex-coupon button:disabled { cursor: wait; opacity: .6; }
.craftlex-coupon input:focus-visible, .craftlex-coupon button:focus-visible { outline: 2px solid #1d6fa5; outline-offset: 2px; }
.craftlex-coupon .craftlex-coupon-status { min-height: 1.4em; margin: 8px 0 4px !important; color: #20754d !important; font-size: 13px !important; line-height: 1.4; overflow-wrap: anywhere; }
.craftlex-coupon .craftlex-coupon-status.is-error { color: #a32929 !important; }
.craftlex-coupon small { display: block; color: #596773; font-size: 12px; line-height: 1.4; }
.craftlex-coupon-discount-row, .craftlex-order-coupon { display: flex; justify-content: space-between; gap: 18px; align-items: baseline; color: #20754d; }
.craftlex-coupon-discount-row strong, .craftlex-order-coupon strong { color: inherit; white-space: nowrap; }
.craftlex-coupon-discount-row span, .craftlex-order-coupon span { min-width: 0; overflow-wrap: anywhere; }

/* Discount totals sit on the dark cart/order panels; controls use a light card. */
.cart-summary .craftlex-coupon-discount-row,
.order-preview .craftlex-order-coupon,
.cart-summary .craftlex-discount-row,
.order-preview .craftlex-order-discount {
  color: #70dfa7;
}
