/* 3D-print and filament vertical slice. WooCommerce remains authoritative. */

body.em26-category--filament,
body.em26-product--filament {
  --em26fil-accent: var(--em26-cobalt);
  --em26fil-soft: color-mix(in srgb, var(--em26-cobalt) 7%, var(--em26-surface));
  --em26fil-turquoise-soft: color-mix(in srgb, var(--em26-turquoise) 10%, var(--em26-surface));
  --em26fil-shadow: 0 1px 2px rgba(22, 53, 61, 0.05), 0 14px 34px rgba(22, 53, 61, 0.09);
}

body.em26-category--filament :focus-visible,
body.em26-product--filament :focus-visible {
  outline: 3px solid var(--em26-cobalt);
  outline-offset: 3px;
}

.em26-category-hero--filament {
  border-bottom-color: var(--em26fil-accent);
}

.em26-category-hero--filament .em26-category-hero__trust {
  border-left-color: var(--em26-turquoise);
}

/* Compact route system on the root and retained descendant URLs. */
.em26-category--filament .em26-filament-root {
  padding-block: clamp(2.25rem, 5vw, 4.5rem);
}

.em26-category--filament .em26-filament-root .em26-section-heading {
  max-width: 62rem;
}

.em26-category--filament .em26-filament-root .em26-section-heading h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2rem, 1.35rem + 2.15vw, 3.4rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.em26-category--filament .em26-filament-root .em26-section-heading > p:last-child {
  max-width: 68ch;
  margin: 1rem 0 0;
  color: var(--em26-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.em26-category--filament .em26-filament-routes__grid {
  gap: 1rem;
  margin-top: 2rem;
  border: 0;
}

.em26-category--filament .em26-filament-route {
  min-height: 17rem;
  padding: 1.4rem;
  overflow: hidden;
  border: 1px solid var(--em26-border);
  border-top: 4px solid var(--em26-cobalt);
  border-radius: var(--em26-radius-card);
  background: var(--em26-surface);
  box-shadow: var(--em26fil-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.em26-category--filament .em26-filament-route:nth-child(2) { border-top-color: var(--em26-turquoise); }
.em26-category--filament .em26-filament-route:nth-child(3) { border-top-color: var(--em26-magenta); }

.em26-category--filament .em26-filament-route:hover,
.em26-category--filament .em26-filament-route:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--em26-cobalt) 45%, var(--em26-border));
  background: var(--em26-surface);
  box-shadow: 0 18px 42px rgba(22, 53, 61, 0.14);
}

.em26-category--filament .em26-filament-route > strong {
  align-self: end;
  font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.em26-category--filament .em26-filament-route > small {
  color: var(--em26-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.em26-category--filament .em26-filament-route__formats i {
  min-height: 2.25rem;
  border-color: var(--em26-border);
  background: var(--em26-canvas);
}

.em26-category--filament .em26-filament-utility {
  gap: 1rem;
  margin-top: 1rem;
  border: 0;
}

.em26-category--filament .em26-filament-utility > a {
  min-height: 14rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--em26-border);
  border-radius: var(--em26-radius-card);
  box-shadow: var(--em26fil-shadow);
}

.em26-category--filament .em26-filament-utility__refill { border-top: 4px solid var(--em26-magenta); }
.em26-category--filament .em26-filament-utility__bot { border-top: 4px solid var(--em26-turquoise); }

.em26-filament-family-nav {
  display: flex;
  gap: 0.55rem;
  margin-block: 1.4rem 2rem;
  padding-block: 0.25rem 0.65rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.em26-filament-family-nav a {
  flex: 0 0 auto;
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--em26-border);
  border-radius: 999px;
  background: var(--em26-surface);
  color: var(--em26-ink);
  font-size: 0.875rem;
  font-weight: 750;
  text-decoration: none;
}

.em26-filament-family-nav a:hover,
.em26-filament-family-nav a[aria-current="page"] {
  border-color: var(--em26fil-accent);
  background: var(--em26fil-soft);
}

/* Existing WooCommerce category cards: compact, aligned, and fully clickable. */
body.em26-category--filament ul.products:has(> li.product-category) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  align-items: stretch;
  margin: 0 0 clamp(3rem, 7vw, 6rem) !important;
  padding: 0 !important;
}

body.em26-category--filament ul.products:has(> li.product-category)::before,
body.em26-category--filament ul.products:has(> li.product-category)::after {
  display: none !important;
}

body.em26-category--filament li.product-category {
  float: none !important;
  width: auto !important;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid var(--em26-border) !important;
  border-top: 4px solid var(--em26-cobalt) !important;
  border-radius: var(--em26-radius-card);
  background: var(--em26-surface);
  box-shadow: var(--em26fil-shadow);
}

body.em26-category--filament li.product-category:nth-child(3n + 2) { border-top-color: var(--em26-turquoise) !important; }
body.em26-category--filament li.product-category:nth-child(3n) { border-top-color: var(--em26-magenta) !important; }

body.em26-category--filament li.product-category > a {
  display: grid !important;
  height: 100%;
  grid-template-rows: auto 1fr;
  color: var(--em26-ink);
  text-decoration: none;
}

body.em26-category--filament li.product-category img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  margin: 0 !important;
  padding: 1rem;
  object-fit: contain !important;
  background: color-mix(in srgb, var(--em26-paper) 75%, #fff);
  transition: transform 180ms ease;
}

body.em26-category--filament li.product-category:hover img { transform: scale(1.025); }

body.em26-category--filament li.product-category .woocommerce-loop-category__title {
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  margin: 0 !important;
  padding: 1rem 1.1rem !important;
  border-top: 1px solid var(--em26-border);
  font-size: 1.05rem !important;
  line-height: 1.3 !important;
  overflow-wrap: break-word;
}

body.em26-category--filament li.product-category mark.count { display: none !important; }

/* Live product archives: Woo owns products and state; the theme aligns them. */
body.em26-category--filament .woocommerce-result-count {
  margin: 0 0 1rem;
  color: var(--em26-muted);
  font-size: 0.875rem;
}

body.em26-category--filament .woocommerce-ordering {
  margin: 0 0 1rem;
}

body.em26-category--filament .woocommerce-ordering select {
  min-height: 3rem;
  padding: 0.65rem 2.5rem 0.65rem 0.85rem;
  border: 1px solid var(--em26-border-strong);
  border-radius: var(--em26-radius-control);
  background: var(--em26-surface);
  color: var(--em26-ink);
}

body.em26-category--filament ul.products:not(:has(> li.product-category)) {
  clear: both;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  align-items: stretch;
  width: 100%;
  margin: 0 0 clamp(3rem, 7vw, 6rem) !important;
  padding: 0 !important;
}

body.em26-category--filament ul.products:not(:has(> li.product-category))::before,
body.em26-category--filament ul.products:not(:has(> li.product-category))::after {
  display: none !important;
}

body.em26-category--filament li.product:not(.product-category) {
  float: none !important;
  width: auto !important;
  min-width: 0;
  height: 100%;
  display: flex !important;
  flex-direction: column;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid var(--em26-border);
  border-radius: var(--em26-radius-card);
  background: var(--em26-surface);
  box-shadow: 0 8px 24px rgba(22, 53, 61, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

body.em26-category--filament li.product:not(.product-category):hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(22, 53, 61, 0.13);
}

body.em26-category--filament li.product:not(.product-category) > a.woocommerce-LoopProduct-link {
  display: flex !important;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  color: var(--em26-ink);
  text-decoration: none;
}

body.em26-category--filament li.product:not(.product-category) img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 !important;
  margin: 0 !important;
  padding: 0.65rem;
  object-fit: contain !important;
  background: color-mix(in srgb, var(--em26-paper) 76%, #fff);
}

body.em26-category--filament li.product:not(.product-category) .woocommerce-loop-product__title {
  min-height: 4.8em;
  margin: 0 !important;
  padding: 1rem 1rem 0.6rem !important;
  font-size: 0.98rem !important;
  line-height: 1.35 !important;
  overflow-wrap: break-word;
}

body.em26-category--filament li.product:not(.product-category) .star-rating {
  margin-inline: 1rem;
}

body.em26-category--filament li.product:not(.product-category) .price {
  margin: auto 0 0 !important;
  padding: 0.45rem 1rem 1rem !important;
  color: var(--em26-ink) !important;
  font-size: 1rem !important;
  font-weight: 800;
}

body.em26-category--filament li.product:not(.product-category) a.button {
  min-height: 3rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 1rem 1rem !important;
  padding: 0.7rem 0.8rem !important;
  border: 1px solid var(--em26-ink) !important;
  border-radius: var(--em26-radius-control) !important;
  background: var(--em26-ink) !important;
  color: #fff !important;
  font-size: 0.875rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-align: center;
  white-space: normal;
}

body.em26-category--filament li.product:not(.product-category) a.button:hover {
  border-color: var(--em26-magenta) !important;
  background: var(--em26-magenta) !important;
}

body.em26-category--filament .term-description,
body.em26-category--filament .em26-category-editorial {
  clear: both;
  max-width: none;
}

/* Product detail page. */
.em26-product--filament.em26-woo-surface--product {
  box-sizing: border-box;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  padding-block-end: clamp(3rem, 7vw, 6rem);
}

body.em26-product--filament .product.type-product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(21rem, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.em26-product--filament .woocommerce-product-gallery {
  position: sticky;
  top: 7rem;
  float: none !important;
  width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  border: 1px solid var(--em26-border);
  border-top: 4px solid var(--em26-cobalt);
  border-radius: var(--em26-radius-card);
  background: var(--em26-surface);
  box-shadow: var(--em26fil-shadow);
}

.em26-product--filament .woocommerce-product-gallery__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: calc(var(--em26-radius-card) - 0.35rem);
  background: var(--em26-canvas);
}

.em26-product--filament .flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0 0 !important;
  padding: 0 !important;
}

.em26-product--filament .flex-control-thumbs li { width: auto !important; margin: 0 !important; }
.em26-product--filament .flex-control-thumbs img { aspect-ratio: 1; object-fit: cover; border: 2px solid transparent; border-radius: 0.5rem; }
.em26-product--filament .flex-control-thumbs img.flex-active { border-color: var(--em26-cobalt); }

.em26-product--filament .summary.entry-summary {
  box-sizing: border-box;
  float: none !important;
  width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--em26-border);
  border-top: 4px solid var(--em26-magenta);
  border-radius: var(--em26-radius-card);
  background: var(--em26-surface);
  box-shadow: var(--em26fil-shadow);
}

.em26-product--filament .summary.entry-summary > * { max-width: 100%; overflow-wrap: break-word; }

.em26-product--filament .summary .product_title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.em26-product--filament .summary > .price,
.em26-product--filament .woocommerce-variation-price .price {
  margin: 0 0 1.25rem;
  color: var(--em26-ink);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 800;
}

body.em26-product--filament .woocommerce-product-details__short-description {
  margin: 0 0 1.5rem;
  color: var(--em26-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.em26-product--filament table.variations {
  display: block;
  width: 100%;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--em26-border);
  border-radius: var(--em26-radius-control);
  background: var(--em26fil-soft);
}

.em26-product--filament table.variations tbody,
.em26-product--filament table.variations tr,
.em26-product--filament table.variations th,
.em26-product--filament table.variations td { display: block; width: 100%; }
.em26-product--filament table.variations tr + tr { margin-top: 1rem; }
.em26-product--filament table.variations th { padding: 0 0 0.5rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.em26-product--filament table.variations td { padding: 0; }
.em26-product--filament table.variations select { width: 100%; min-height: 3rem; padding: 0.7rem 2.5rem 0.7rem 0.9rem; border: 1px solid var(--em26-ink); border-radius: var(--em26-radius-control); background: var(--em26-surface); color: var(--em26-ink); }

.em26-product--filament .cgkit-attribute-swatches,
.em26-product--filament .variable-items-wrapper { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.em26-product--filament .cgkit-swatch,
.em26-product--filament .variable-item { min-width: 3rem; min-height: 3rem; padding: 0.6rem 0.8rem !important; border: 1px solid var(--em26-border) !important; border-radius: var(--em26-radius-control) !important; background: var(--em26-surface) !important; box-shadow: none !important; }
.em26-product--filament .cgkit-swatch.selected,
.em26-product--filament .variable-item.selected { border-color: var(--em26-cobalt) !important; box-shadow: 0 0 0 2px var(--em26-cobalt) !important; }

.em26-product--filament .woocommerce-variation-add-to-cart,
.em26-product--filament form.cart:not(.variations_form) { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; }
.em26-product--filament .quantity input.qty { min-width: 5rem; min-height: 3rem; border: 1px solid var(--em26-ink); border-radius: var(--em26-radius-control); font-weight: 800; }
.em26-product--filament .single_add_to_cart_button { flex: 1 1 14rem; min-height: 3rem; padding: 0.75rem 1.25rem !important; border: 1px solid var(--em26-magenta) !important; border-radius: var(--em26-radius-control) !important; background: var(--em26-magenta) !important; color: #fff !important; font-weight: 800 !important; }
.em26-product--filament .single_add_to_cart_button.disabled,
.em26-product--filament .single_add_to_cart_button:disabled { cursor: not-allowed; opacity: 0.45; }

.em26-filament-delivery {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  margin: 1.25rem 0;
  padding: 1rem;
  border-left: 4px solid var(--em26-turquoise);
  border-radius: 0 var(--em26-radius-control) var(--em26-radius-control) 0;
  background: var(--em26fil-turquoise-soft);
}

.em26-filament-delivery > span { min-width: 3.25rem; color: var(--em26-turquoise); font-family: var(--em26-font-mono); font-size: 1.25rem; font-weight: 800; }
.em26-filament-delivery p { margin: 0; color: var(--em26-muted); font-size: 0.9rem; line-height: 1.55; }
.em26-filament-delivery strong { display: block; color: var(--em26-ink); }

.em26-filament-product-context {
  margin: 1.25rem 0 0;
  padding: 1rem;
  border: 1px solid var(--em26-border);
  border-radius: var(--em26-radius-control);
  background: var(--em26fil-soft);
}

.em26-filament-product-context > strong { display: block; margin-bottom: 0.4rem; font-size: 1rem; }
.em26-filament-product-context > p:not(.em26-eyebrow) { margin: 0; color: var(--em26-muted); font-size: 0.9rem; line-height: 1.55; }
.em26-filament-product-context nav { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem; }
.em26-filament-product-context nav a { min-height: 2.25rem; display: inline-flex; align-items: center; padding: 0.45rem 0.65rem; border: 1px solid var(--em26-border); border-radius: 999px; background: var(--em26-surface); color: var(--em26-ink); font-size: 0.78rem; font-weight: 750; text-decoration: none; }
.em26-filament-product-context nav a:hover { border-color: var(--em26-cobalt); color: var(--em26-cobalt); }

.em26-product--filament .product_meta { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--em26-border); color: var(--em26-muted); font-size: 0.875rem; line-height: 1.65; }

.em26-product--filament .woocommerce-tabs,
.em26-product--filament .related,
.em26-product--filament .upsells { grid-column: 1 / -1; min-width: 0; margin-top: clamp(2rem, 5vw, 4rem); }
.em26-product--filament .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem !important; padding: 0 !important; border: 0 !important; }
.em26-product--filament .woocommerce-tabs ul.tabs::before,
.em26-product--filament .woocommerce-tabs ul.tabs li::before,
.em26-product--filament .woocommerce-tabs ul.tabs li::after { display: none !important; }
.em26-product--filament .woocommerce-tabs ul.tabs li { margin: 0 !important; padding: 0 !important; border: 1px solid var(--em26-border) !important; border-radius: var(--em26-radius-control) !important; background: var(--em26-surface) !important; }
.em26-product--filament .woocommerce-tabs ul.tabs li.active { border-color: var(--em26-cobalt) !important; background: var(--em26fil-soft) !important; }
.em26-product--filament .woocommerce-tabs ul.tabs li a { padding: 0.8rem 1rem !important; color: var(--em26-ink) !important; font-weight: 800 !important; }

body.em26-product--filament .woocommerce-Tabs-panel {
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(1.25rem, 3vw, 2.25rem) !important;
  border: 1px solid var(--em26-border);
  border-top: 4px solid var(--em26-cobalt);
  border-radius: var(--em26-radius-card);
  background: var(--em26-surface);
  color: var(--em26-ink);
  font-size: 1rem;
  line-height: 1.7;
}

.em26-product--filament .woocommerce-Tabs-panel > * { max-width: 76ch; }
.em26-product--filament .woocommerce-Tabs-panel h2,
.em26-product--filament .woocommerce-Tabs-panel h3,
.em26-product--filament .woocommerce-Tabs-panel h4 { max-width: 28ch; margin: 2rem 0 0.75rem; line-height: 1.15; letter-spacing: -0.02em; }
.em26-product--filament .woocommerce-Tabs-panel h2:first-child,
.em26-product--filament .woocommerce-Tabs-panel h3:first-child { margin-top: 0; }
.em26-product--filament .woocommerce-Tabs-panel p { margin: 0.75rem 0; }
.em26-product--filament .woocommerce-Tabs-panel ul,
.em26-product--filament .woocommerce-Tabs-panel ol { margin: 0.75rem 0 1.25rem; padding-inline-start: 1.35rem; }
.em26-product--filament .woocommerce-Tabs-panel li + li { margin-top: 0.35rem; }

.em26-product--filament .related ul.products,
.em26-product--filament .upsells ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.em26-product--filament .related li.product,
.em26-product--filament .upsells li.product { float: none !important; width: auto !important; min-width: 0; margin: 0 !important; }

@media (max-width: 68rem) {
  body.em26-category--filament ul.products:not(:has(> li.product-category)),
  .em26-product--filament .related ul.products,
  .em26-product--filament .upsells ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 63.99rem) {
  body.em26-product--filament .product.type-product { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .em26-product--filament .woocommerce-product-gallery { position: relative; top: auto; }
}

@media (max-width: 47.99rem) {
  body.em26-category--filament ul.products:has(> li.product-category) { grid-template-columns: minmax(0, 1fr) !important; }
  body.em26-category--filament ul.products:not(:has(> li.product-category)),
  .em26-product--filament .related ul.products,
  .em26-product--filament .upsells ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.7rem !important; }
  body.em26-category--filament li.product:not(.product-category) .woocommerce-loop-product__title { min-height: 5.4em; padding: 0.8rem 0.75rem 0.5rem !important; font-size: 0.86rem !important; }
  body.em26-category--filament li.product:not(.product-category) .price { padding: 0.35rem 0.75rem 0.75rem !important; font-size: 0.9rem !important; }
  body.em26-category--filament li.product:not(.product-category) a.button { margin: 0 0.75rem 0.75rem !important; font-size: 0.78rem !important; }
  .em26-product--filament .summary.entry-summary { padding: 1.1rem; }
  .em26-product--filament .summary .product_title { font-size: clamp(1.8rem, 10vw, 2.55rem); }
  .em26-filament-delivery { grid-template-columns: 1fr; }
  .em26-filament-product-context nav { display: grid; grid-template-columns: 1fr 1fr; }
  .em26-filament-product-context nav a { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .em26-category--filament .em26-filament-route,
  body.em26-category--filament li.product:not(.product-category),
  body.em26-category--filament li.product-category img { transition: none; }
  .em26-category--filament .em26-filament-route:hover,
  body.em26-category--filament li.product:not(.product-category):hover { transform: none; }
}
