/*
 * Colour materials: final visual layer.
 *
 * Loaded only for the approved colour/effects taxonomy routes and after the
 * shared WooCommerce compatibility layer. This file is presentation-only: it
 * does not hide editorial copy, rewrite URLs, or change WooCommerce data.
 */

body.em26-category--colour-effects {
  --em26c-sunk: #efebe1;
  --em26c-shadow: 0 1px 2px rgba(22, 53, 61, 0.06), 0 8px 24px rgba(22, 53, 61, 0.07);
  --em26c-shadow-up: 0 2px 4px rgba(22, 53, 61, 0.08), 0 14px 32px rgba(22, 53, 61, 0.12);
  --em26c-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Join the category hero and the explanatory mini-landing into one rhythm. */
.em26-category-hero--colour-effects + .em26-colour-landing {
  margin-top: 0;
  border-top: 0;
}

.em26-category-hero--colour-effects + .em26-colour-routes {
  padding-top: var(--em26-space-6);
}

.em26-colour-routes > header,
.em26-colour-guide > header,
.em26-colour-landing__header {
  text-wrap: balance;
}

.em26-colour-routes > header p,
.em26-colour-landing__header > p:last-child {
  max-width: 68ch;
  line-height: 1.65;
}

.em26-colour-routes > header h2,
.em26-colour-guide > header h2 {
  max-width: 24ch;
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.em26-colour-routes__grid,
.em26-colour-guide__grid,
.em26-colour-landing__options {
  gap: var(--em26-space-4);
  border: 0;
}

.em26-colour-route,
.em26-colour-guide__grid a,
.em26-colour-landing__options > article {
  border: 0.0625rem solid var(--em26-border);
  border-radius: var(--em26-radius-card);
  box-shadow: var(--em26c-shadow);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--em26c-ease);
}

.em26-colour-route:hover,
.em26-colour-route:focus-visible,
.em26-colour-guide__grid a:hover,
.em26-colour-guide__grid a:focus-visible,
.em26-colour-landing__options > article:focus-within {
  transform: translateY(-0.125rem);
  border-color: color-mix(in srgb, var(--em26-turquoise) 66%, var(--em26-border));
  box-shadow: var(--em26c-shadow-up);
}

.em26-colour-route:focus-visible,
.em26-colour-guide__grid a:focus-visible,
.em26-colour-landing__options a:focus-visible {
  outline: 0.1875rem solid var(--em26-cobalt);
  outline-offset: 0.1875rem;
}

/* Show the complete physical COLORFUN proof instead of cropping it. */
.em26-colour-landing__proof img {
  height: auto;
  max-height: none;
  object-fit: contain;
}

.em26-colour-route {
  overflow: hidden;
  background: var(--em26-surface);
}

.em26-colour-route__marker {
  width: 4rem;
  height: 0.25rem;
  border-radius: 999px;
}

.em26-colour-route strong {
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.25;
}

.em26-colour-route small {
  line-height: 1.6;
}

.em26-colour-guide {
  border-radius: var(--em26-radius-card);
  box-shadow: var(--em26c-shadow);
}

.em26-colour-guide__grid a {
  border-color: rgba(247, 244, 236, 0.26);
  background: rgba(247, 244, 236, 0.035);
}

.em26-colour-guide__grid a:hover,
.em26-colour-guide__grid a:focus-visible {
  border-color: rgba(247, 244, 236, 0.7);
  background: color-mix(in srgb, var(--em26-turquoise) 30%, var(--em26-ink));
}

.em26-colour-landing {
  border: 0.0625rem solid var(--em26-border);
  border-top: 0.25rem solid var(--em26-turquoise);
  border-radius: var(--em26-radius-card);
  box-shadow: var(--em26c-shadow);
}

.em26-category-hero--colour-effects + .em26-colour-landing {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.em26-colour-landing__options > article {
  min-width: 0;
  background: color-mix(in srgb, var(--em26-paper) 70%, var(--em26-surface));
}

.em26-colour-landing__options h3 {
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.25;
}

.em26-colour-landing__options p {
  line-height: 1.6;
}

.em26-colour-landing__options > article > a,
.em26-colour-landing__options nav a {
  display: inline-flex;
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  align-items: center;
  justify-content: center;
  border: 0.0625rem solid var(--em26-ink);
  border-radius: var(--em26-radius-control);
  text-align: center;
  text-decoration: none;
}

.em26-colour-landing__options > article > a {
  color: var(--em26-paper);
  background: var(--em26-ink);
}

.em26-colour-landing__options > article > a:hover,
.em26-colour-landing__options > article > a:focus-visible {
  background: var(--em26-magenta);
  border-color: var(--em26-magenta);
}

.em26-colour-landing__options nav {
  align-items: stretch;
}

.em26-colour-landing__options nav a {
  flex: 1 1 8rem;
  background: var(--em26-surface);
}

.em26-colour-landing__options nav a:hover,
.em26-colour-landing__options nav a:focus-visible {
  color: var(--em26-paper);
  background: var(--em26-ink);
}

.em26-colour-landing__facts > div {
  gap: var(--em26-space-3);
}

.em26-colour-landing__facts article,
.em26-colour-landing__note,
.em26-colour-landing__cross-route {
  border-radius: var(--em26-radius-control);
  background: var(--em26-paper);
}

.em26-colour-landing__facts article {
  box-shadow: 0 1px 2px rgba(22, 53, 61, 0.04);
}

.em26-colour-landing__cross-route {
  border-left-color: var(--em26-magenta);
}

.em26-colour-landing--inks .em26-colour-landing__cross-route {
  border-left-color: var(--em26-coral);
}

/* Product cards inherit the same calmer interaction grammar as the approved
 * resin family while keeping the turquoise colour-material accent. */
.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]) {
  overflow: hidden;
  border-top-color: var(--em26-turquoise) !important;
  border-radius: var(--em26-radius-card);
  box-shadow: var(--em26c-shadow);
  transition: transform 180ms var(--em26c-ease), box-shadow 180ms var(--em26c-ease), border-color 180ms ease;
}

.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]):hover,
.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]):focus-within {
  transform: translateY(-0.1875rem);
  box-shadow: var(--em26c-shadow-up);
}

.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]) > a[class~="woocommerce-LoopProduct-link"] {
  position: relative;
}

.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]) img {
  border-radius: 0.5rem;
  background: radial-gradient(circle at 50% 40%, var(--em26-surface), var(--em26c-sunk));
  transition: transform 300ms var(--em26c-ease);
}

.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]):hover img {
  transform: scale(1.025);
}

.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]) [class~="woocommerce-loop-product__title"] {
  min-height: 3.9em;
  font-size: 1.0625rem !important;
  line-height: 1.3 !important;
}

.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]) [class~="price"] {
  margin-top: auto !important;
  font-size: 1.25rem !important;
  line-height: 1.25;
}

.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]) a[class~="button"] {
  min-height: 3rem;
  padding-block: 0.65rem;
  background: var(--em26-ink) !important;
  transition: background 180ms ease, transform 150ms var(--em26c-ease);
}

.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]) a[class~="button"]:hover,
.em26-category--colour-effects li[class~="product"]:not([class~="product-category"]) a[class~="button"]:focus-visible {
  background: var(--em26-magenta) !important;
}

/* Keep sparse real ranges intentional on desktop. The shared 4/2/1 system
 * remains unchanged for lists with four or more products. */
.em26-woo-catalogue ul[class~="products"]:has(> li[class~="product"]:first-child:last-child) {
  grid-template-columns: minmax(0, min(28rem, 100%)) !important;
}

.em26-woo-catalogue ul[class~="products"]:has(> li[class~="product"]:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.em26-woo-catalogue ul[class~="products"]:has(> li[class~="product"]:nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.em26-category-editorial__inner {
  line-height: 1.7;
}

.em26-category-editorial__inner :is(h2, h3, h4) {
  max-width: 32ch;
  text-wrap: balance;
}

.em26-category-editorial__inner :is(p, li) {
  overflow-wrap: break-word;
}

@media (max-width: 47.99rem) {
  .em26-category-hero--colour-effects + .em26-colour-routes {
    padding-top: var(--em26-space-5);
  }

  .em26-colour-landing__header h2 {
    font-size: clamp(1.75rem, 9vw, 2.6rem);
  }

  .em26-colour-route,
  .em26-colour-guide__grid a,
  .em26-colour-landing__options > article {
    min-height: 0;
  }

  .em26-colour-routes__grid,
  .em26-colour-guide__grid,
  .em26-colour-landing__options {
    gap: var(--em26-space-3);
  }

  .em26-colour-guide,
  .em26-colour-landing {
    padding: var(--em26-space-5);
  }

  .em26-category--colour-effects li[class~="product"]:not([class~="product-category"]):hover,
  .em26-category--colour-effects li[class~="product"]:not([class~="product-category"]):focus-within {
    transform: none;
  }

  .em26-woo-catalogue ul[class~="products"]:has(> li[class~="product"]:first-child:last-child),
  .em26-woo-catalogue ul[class~="products"]:has(> li[class~="product"]:nth-child(2):last-child),
  .em26-woo-catalogue ul[class~="products"]:has(> li[class~="product"]:nth-child(3):last-child) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
