
.tk-category-collection {
  --block-default-padding-block: 0;
  --block-default-padding-inline: 0;
}

.tk-category-grid {
  display: grid;
  grid-template-columns: repeat(var(--cc-columns, 4), minmax(0, 1fr));
  gap: var(--cc-gap, 18px);
}

.tk-category-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: all var(--tk-dur-base) ease;
}

.tk-category-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: color-mix(in srgb, var(--tk-color-primary) 8%, var(--tk-color-muted));
}

.tk-category-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tk-dur-slow) var(--tk-ease-snap);
}

.tk-category-card:hover .tk-category-card-media img {
  transform: scale(1.08);
}

.tk-category-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.34), transparent),
    color-mix(in srgb, var(--tk-color-primary) 12%, #eeeeee);
}

.tk-category-name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-family: var(--cc-name-font, inherit);
  font-weight: var(--cc-name-weight, 800);
  line-height: var(--cc-name-line-height, 1.35);
  letter-spacing: var(--cc-name-letter-spacing, normal);
  text-transform: var(--cc-name-transform, none);
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--cc-name-lines, 1);
  line-clamp: var(--cc-name-lines, 1);
}

.tk-category-count {
  display: block;
  margin: 2px 0 0;
  font-size: 12px;
}

/* ─────────────────────────── Overlay ─────────────────────────── */
.tk-category-collection--overlay .tk-category-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--cc-ratio, 4 / 3);
  border-start-start-radius: var(--cc-card-radius-ts, var(--tk-card-radius, 14px));
  border-start-end-radius: var(--cc-card-radius-te, var(--tk-card-radius, 14px));
  border-end-end-radius: var(--cc-card-radius-be, var(--tk-card-radius, 14px));
  border-end-start-radius: var(--cc-card-radius-bs, var(--tk-card-radius, 14px));
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
}

.tk-category-collection--overlay .tk-category-card-media {
  position: absolute;
  inset: 0;
}

.tk-category-collection--overlay .tk-category-card-overlay {
  position: absolute;
  inset: 0;
  transition: opacity var(--tk-dur-base) ease;
}

.tk-category-collection--overlay .tk-category-card-body {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 100%;
  padding: 14px 16px;
  z-index: 1;
}

.tk-category-collection--overlay .tk-category-name {
  font-size: var(--cc-name-size, clamp(14px, 1.4vw, 18px));
}

/* ──────────────────────────── Tile ──────────────────────────── */
.tk-category-collection--tile .tk-category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tk-category-collection--tile .tk-category-card-media {
  width: 100%;
  aspect-ratio: var(--cc-ratio, 1 / 1);
  border-start-start-radius: var(--cc-card-radius-ts, var(--tk-card-radius, 14px));
  border-start-end-radius: var(--cc-card-radius-te, var(--tk-card-radius, 14px));
  border-end-end-radius: var(--cc-card-radius-be, var(--tk-card-radius, 14px));
  border-end-start-radius: var(--cc-card-radius-bs, var(--tk-card-radius, 14px));
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.04);
}

.tk-category-collection--tile .tk-category-card-overlay {
  display: none;
}

.tk-category-collection--tile .tk-category-card-body {
  padding: 2px 4px;
}

.tk-category-collection--tile .tk-category-name {
  color: var(--cc-name-color, var(--tk-color-heading));
  font-size: var(--cc-name-size, 15px);
  transition: color var(--tk-dur-fast) ease;
}

.tk-category-collection--tile .tk-category-card:hover .tk-category-name {
  color: var(--cc-name-color, var(--tk-color-primary));
}

.tk-category-collection--tile .tk-category-count {
  color: var(--tk-color-muted-foreground);
}

/* ─────────────────────────── Circle ─────────────────────────── */
.tk-category-collection--circle .tk-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.tk-category-collection--circle .tk-category-card-media {
  width: clamp(72px, 10vw, 130px);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 3px solid color-mix(in srgb, var(--tk-color-primary) 16%, transparent);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.06);
  transition: transform var(--tk-dur-base) var(--tk-ease-spring), border-color var(--tk-dur-base) ease, box-shadow var(--tk-dur-slow) ease;
}

.tk-category-collection--circle .tk-category-card:hover .tk-category-card-media {
  transform: scale(1.06);
  border-color: var(--tk-color-primary);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--tk-color-primary) 25%, transparent);
}

.tk-category-collection--circle .tk-category-card-overlay {
  display: none;
}

.tk-category-collection--circle .tk-category-name {
  color: var(--cc-name-color, var(--tk-color-heading));
  font-size: var(--cc-name-size, 14px);
  transition: color var(--tk-dur-fast) ease;
}

.tk-category-collection--circle .tk-category-card:hover .tk-category-name {
  color: var(--cc-name-color, var(--tk-color-primary));
}

.tk-category-collection--circle .tk-category-count {
  color: var(--tk-color-muted-foreground);
}

/* ─────────────────────────── Minimal ─────────────────────────── */
.tk-category-collection--minimal .tk-category-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--cc-ratio, 16 / 10);
  border-start-start-radius: var(--cc-card-radius-ts, var(--tk-card-radius, 16px));
  border-start-end-radius: var(--cc-card-radius-te, var(--tk-card-radius, 16px));
  border-end-end-radius: var(--cc-card-radius-be, var(--tk-card-radius, 16px));
  border-end-start-radius: var(--cc-card-radius-bs, var(--tk-card-radius, 16px));
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.05);
}

.tk-category-collection--minimal .tk-category-card-media {
  position: absolute;
  inset: 0;
}

.tk-category-collection--minimal .tk-category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.02) 0%, rgb(0 0 0 / 0.45) 100%);
}

.tk-category-collection--minimal .tk-category-card-body {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 6px 14px;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--tk-round-radius, 999px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
  z-index: 1;
}

.tk-category-collection--minimal .tk-category-name {
  color: var(--cc-name-color, #0f172a);
  font-size: var(--cc-name-size, 13px);
  font-weight: 700;
}

.tk-category-collection--minimal .tk-category-count {
  display: none;
}

/* ─────────────────────────── Floating ─────────────────────────── */
.tk-category-collection--floating .tk-category-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--cc-ratio, 4 / 3);
  border-start-start-radius: var(--cc-card-radius-ts, var(--tk-card-radius, 20px));
  border-start-end-radius: var(--cc-card-radius-te, var(--tk-card-radius, 20px));
  border-end-end-radius: var(--cc-card-radius-be, var(--tk-card-radius, 20px));
  border-end-start-radius: var(--cc-card-radius-bs, var(--tk-card-radius, 20px));
  box-shadow: 0 8px 24px -4px rgb(0 0 0 / 0.08);
}

.tk-category-collection--floating .tk-category-card-media {
  position: absolute;
  inset: 0;
}

.tk-category-collection--floating .tk-category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgb(0 0 0 / 0.5) 100%);
}

.tk-category-collection--floating .tk-category-card-body {
  position: absolute;
  inset-block-end: 16px;
  inset-inline: 16px;
  padding: 12px 16px;
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgb(255 255 255 / 0.6);
  border-radius: var(--tk-control-radius, 14px);
  text-align: center;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.1);
  z-index: 1;
  transition: transform var(--tk-dur-base) var(--tk-ease-spring), background var(--tk-dur-base) ease;
}

.tk-category-collection--floating .tk-category-card:hover .tk-category-card-body {
  transform: translateY(-4px);
  background: #ffffff;
}

.tk-category-collection--floating .tk-category-name {
  color: var(--cc-name-color, #0f172a);
  font-size: var(--cc-name-size, 15px);
  font-weight: 800;
}

.tk-category-collection--floating .tk-category-count {
  /* Fixed like the name: the glass under it is white in both themes. */
  color: #64748b;
  font-size: 12px;
}

/* ─────────────────────────── Compact ─────────────────────────── */
.tk-category-collection--compact .tk-category-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--tk-color-surface);
  border: 1px solid var(--tk-color-border);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
}

.tk-category-collection--compact .tk-category-card:hover {
  transform: translateY(-2px);
  border-color: var(--tk-color-primary);
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.08);
}

.tk-category-collection--compact .tk-category-card-media {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 999px;
}

.tk-category-collection--compact .tk-category-card-overlay {
  display: none;
}

.tk-category-collection--compact .tk-category-card-body {
  display: flex;
  flex-direction: column;
  text-align: start;
  min-width: 0;
}

.tk-category-collection--compact .tk-category-name {
  color: var(--cc-name-color, var(--tk-color-heading));
  font-size: var(--cc-name-size, 13px);
  font-weight: 700;
}

.tk-category-collection--compact .tk-category-count {
  color: var(--tk-color-muted-foreground);
  font-size: 11px;
}

/* ──────────────────── Featured grid layout ──────────────────── */
/* The first card spans two columns and two rows (see
   setFeaturedPlacementVariables); dense flow lets the rest fill around it. */
.tk-category-collection--featured .tk-category-grid {
  grid-auto-flow: dense;
}

.tk-category-collection--featured .tk-category-card--featured {
  grid-column: var(--cc-feature-column, span 2);
  grid-row: var(--cc-feature-row, span 2);
  /* Its height comes from the rows it spans; the floor covers a grid with
     no other card to size those rows. */
  aspect-ratio: auto;
  min-height: 240px;
}

.tk-category-collection--featured .tk-category-card--featured .tk-category-name {
  font-size: calc(var(--cc-name-size, 18px) * 1.35);
  -webkit-line-clamp: 2;
}

.tk-category-collection--featured.tk-category-collection--overlay .tk-category-card--featured .tk-category-card-body {
  padding: clamp(16px, 2.4vw, 28px);
}

.tk-category-collection--featured.tk-category-collection--floating .tk-category-card--featured .tk-category-card-body {
  inset-inline: clamp(16px, 2.4vw, 28px);
  inset-block-end: clamp(16px, 2.4vw, 28px);
  padding: 14px 18px;
}

/* Overlay tones */
.tk-category-collection--tone-dark .tk-category-card-overlay {
  background: linear-gradient(to top, rgb(0 0 0 / 0.76), rgb(0 0 0 / 0.2) 44%, transparent);
}

.tk-category-collection--tone-primary .tk-category-card-overlay {
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--tk-color-primary) 92%, transparent),
    color-mix(in srgb, var(--tk-color-primary) 40%, transparent) 44%,
    transparent
  );
}

.tk-category-collection--tone-surface .tk-category-card-overlay {
  background: linear-gradient(
    to top,
    var(--tk-color-surface),
    color-mix(in srgb, var(--tk-color-surface) 40%, transparent) 46%,
    transparent
  );
}

.tk-category-collection--tone-dark .tk-category-name,
.tk-category-collection--tone-primary .tk-category-name {
  color: var(--cc-name-color, #ffffff);
}

.tk-category-collection--tone-dark .tk-category-count,
.tk-category-collection--tone-primary .tk-category-count {
  color: rgb(255 255 255 / 0.78);
}

.tk-category-collection--tone-surface .tk-category-name {
  color: var(--cc-name-color, var(--tk-color-heading));
}

.tk-category-collection--tone-surface .tk-category-count {
  color: var(--tk-color-muted-foreground);
}

.tk-category-collection-empty {
  margin: 0;
  border: 1px dashed var(--tk-color-border);
  border-radius: var(--tk-control-radius, 8px);
  padding: 28px;
  color: var(--tk-color-muted-foreground);
  text-align: center;
}

@media (max-width: 1023px) {
  .tk-category-grid {
    grid-template-columns: repeat(var(--cc-columns-tablet, var(--cc-columns, 3)), minmax(0, 1fr));
    gap: var(--cc-gap-tablet, var(--cc-gap, 18px));
  }

  .tk-category-collection--featured .tk-category-card--featured {
    grid-column: var(--cc-feature-column-tablet, var(--cc-feature-column, span 2));
    grid-row: var(--cc-feature-row-tablet, var(--cc-feature-row, span 2));
  }

  .tk-category-collection--overlay .tk-category-name {
    font-size: var(--cc-name-size-tablet, var(--cc-name-size, clamp(14px, 1.4vw, 18px)));
  }

  .tk-category-collection--tile .tk-category-name,
  .tk-category-collection--circle .tk-category-name,
  .tk-category-collection--minimal .tk-category-name,
  .tk-category-collection--floating .tk-category-name,
  .tk-category-collection--compact .tk-category-name {
    font-size: var(--cc-name-size-tablet, var(--cc-name-size, 14px));
  }
}

@media (max-width: 767px) {
  .tk-category-grid {
    grid-template-columns: repeat(var(--cc-columns-mobile, var(--cc-columns-tablet, var(--cc-columns, 2))), minmax(0, 1fr));
    gap: var(--cc-gap-mobile, var(--cc-gap-tablet, var(--cc-gap, 18px)));
  }

  .tk-category-collection--featured .tk-category-card--featured {
    grid-column: var(--cc-feature-column-mobile, var(--cc-feature-column-tablet, var(--cc-feature-column, span 2)));
    grid-row: var(--cc-feature-row-mobile, var(--cc-feature-row-tablet, var(--cc-feature-row, span 2)));
  }

  .tk-category-collection--overlay .tk-category-name {
    font-size: var(--cc-name-size-mobile, var(--cc-name-size-tablet, var(--cc-name-size, clamp(14px, 1.4vw, 18px))));
  }

  .tk-category-collection--tile .tk-category-name,
  .tk-category-collection--circle .tk-category-name,
  .tk-category-collection--minimal .tk-category-name,
  .tk-category-collection--floating .tk-category-name,
  .tk-category-collection--compact .tk-category-name {
    font-size: var(--cc-name-size-mobile, var(--cc-name-size-tablet, var(--cc-name-size, 14px)));
  }
}


.tk-section {
  display: flex;
  flex-direction: column;
  justify-content: var(--sc-justify, center);
  --block-default-padding-block: var(--tk-section-padding-y);
}

/* The content sits in the container (shared styles). A Section is as tall as
   its content: the editor sizes an empty Section's drop zone itself. */

/*
 * Auto-collapse: hide the section when its inner slot produces no visible block.
 * :empty matches a .tk-section-inner with no child nodes at all (storefront SSR case).
 * :has(> :empty:only-child) catches the Puck render where one empty wrapper div is injected.
 */
.tk-section:has(> .tk-section-inner:empty),
.tk-section:has(> .tk-section-inner > :empty:only-child) {
  display: none;
}


.tk-section {
  min-height: var(--sc-min-height, auto);
}

@media (max-width: 1023px) {
  .tk-section {
    min-height: var(--sc-min-height-tablet, var(--sc-min-height, auto));
  }
}

@media (max-width: 767px) {
  .tk-section {
    min-height: var(--sc-min-height-mobile, var(--sc-min-height-tablet, var(--sc-min-height, auto)));
  }
}


/* Edges reach past the band into its neighbour, so the band is lifted above
   the Sections beside it. Each edge is painted with the band's own background
   (or its own colour, below)
   and cut to its shape by a mask. */
.tk-section--edged {
  z-index: 1;
}

.tk-section > .tk-section-edge {
  position: absolute;
  inset-inline: 0;
  background-color: var(--block-container-background, transparent);
  background-image: var(--block-container-background-image, none);
  background-size: cover;
  pointer-events: none;
  -webkit-mask: var(--sc-edge-mask) no-repeat 0 0 / 100% 100%;
  mask: var(--sc-edge-mask) no-repeat 0 0 / 100% 100%;
}

.tk-section > .tk-section-edge--top {
  inset-block-end: 100%;
}

.tk-section > .tk-section-edge--bottom {
  inset-block-start: 100%;
  transform: scaleY(-1);
}

/* An edge in a colour of its own, for a band coloured by a block inside it. */
.tk-section--edge-colored > .tk-section-edge {
  background: var(--sc-edge-color);
}

/* Arches repeat along the edge, each twice as wide as the edge is tall. */
.tk-section > .tk-section-edge--arches {
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: calc(var(--sc-edge-block-size) * 2) 100%;
  mask-size: calc(var(--sc-edge-block-size) * 2) 100%;
}


.tk-section > .tk-section-edge {
  block-size: var(--sc-edge-height, 48px);
  --sc-edge-block-size: var(--sc-edge-height, 48px);
}

@media (max-width: 1023px) {
  .tk-section > .tk-section-edge {
    block-size: var(--sc-edge-height-tablet, var(--sc-edge-height, 48px));
    --sc-edge-block-size: var(--sc-edge-height-tablet, var(--sc-edge-height, 48px));
  }
}

@media (max-width: 767px) {
  .tk-section > .tk-section-edge {
    block-size: var(--sc-edge-height-mobile, var(--sc-edge-height-tablet, var(--sc-edge-height, 48px)));
    --sc-edge-block-size: var(--sc-edge-height-mobile, var(--sc-edge-height-tablet, var(--sc-edge-height, 48px)));
  }
}

/* Parallax: the band stops painting its background image, and a layer behind
   its content paints it instead - taller than the band, so it has room to
   move. The layer clips itself, so the band's edges still reach outside it.
   --sc-parallax runs from -1 (the band coming in at the bottom of the screen)
   to 1 (leaving at the top), written by the layer itself; it slides
   the image from 15% of the band's height up to 15% down, so the image moves
   slower than the page. Unset - no script, reduced motion - it sits centred. */
.tk-block.tk-section--parallax {
  isolation: isolate;
  background-image: none;
}

.tk-section > .tk-section-parallax {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.tk-section-parallax::before {
  content: "";
  position: absolute;
  inset-block: -15%;
  inset-inline: 0;
  background-image: var(--block-container-background-image, none);
  background-size: var(--block-container-background-fit, cover);
  background-position: var(--block-container-background-position, center);
  background-repeat: no-repeat;
  /* The layer is 130% of the band, so 15% of the band is 15 / 1.3 of it. */
  transform: translate3d(0, calc(var(--sc-parallax, 0) * 15% / 1.3), 0);
  will-change: transform;
}

@media (max-width: 767px) {
  .tk-section-parallax::before {
    background-image: var(--block-container-background-image-mobile, var(--block-container-background-image, none));
  }
}
/* Video: behind the content and its overlay, over the background image,
   which shows until the video plays and then fades under it. */
.tk-section--video {
  isolation: isolate;
}

.tk-section > .tk-section-video {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--tk-dur-slow) ease;
}

.tk-section > .tk-section-video.is-playing {
  opacity: 1;
}
/* Anchored: a same-page link stops the Section just under the sticky header
   (its bottom edge, published by the header), and the jump scrolls smoothly
   unless the shopper asks for reduced motion. */
.tk-section[id] {
  scroll-margin-top: var(--tk-sticky-top, 0px);
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.tk-section[id]) {
    scroll-behavior: smooth;
  }
}
