/* Updated grid card, Figma file 397:7938 / designer note 397:8779.
   Keep the existing list-mode markup/controls and the existing server action handlers. */
.category-page .sp-grid-icon, .category-page .sp-grid-cart { display: none; }
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .category-card-image { position: relative; isolation: isolate; }
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .category-card-image::after {
  content: ''; position: absolute; inset: 0; z-index: 1; background: rgb(38 29 16 / 30%); opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
body.sp26.category-page .category-grid:not(.catalog-list) .category-card-image > .category-hover { position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
/* List view never switches images, even when the pointer passes over its thumbnail. */
body.sp26.category-page .category-grid.catalog-list .category-card-image > .category-hover { display: none; }
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions {
  position: absolute; top: clamp(8px, 1vw, 16px); right: clamp(8px, 1vw, 16px); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions .product-action {
  display: flex; justify-content: center; align-items: center; width: 34px; height: 34px; padding: 5px;
  color: #fdfcf8; background: transparent; border: 0; border-radius: 0; box-shadow: none; cursor: pointer; transition: color .15s;
}
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions .product-action svg { display: none; }
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions .product-action:hover,
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions .product-action:focus-visible,
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions .product-action[aria-pressed=true] { color: #e6dac9; background: transparent; }
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions .product-action:focus-visible { outline: 1px solid #fdfcf8; outline-offset: 1px; }
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions [data-sp-compare] { order: 0; }
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions [data-sp-wishlist] { order: 1; }
body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions .sp-grid-cart { order: 2; }
body.sp26.category-page .category-grid.catalog-list .category-card .list-product-actions .sp-grid-cart { display: none; }
body.sp26.category-page .category-grid:not(.catalog-list) .sp-grid-icon {
  display: block; flex: 0 0 auto; background: currentColor; mask: var(--sp-card-icon) center / contain no-repeat; -webkit-mask: var(--sp-card-icon) center / contain no-repeat;
}
.sp-grid-icon--compare { --sp-card-icon: url('assets/delivery/card-compare.svg'); width: 16.211914px; height: 20.52px; }
.sp-grid-icon--heart { --sp-card-icon: url('assets/delivery/card-heart.svg'); width: 19.899305px; height: 18.212732px; }
.sp-grid-icon--bag { --sp-card-icon: url('assets/delivery/card-bag.svg'); width: 22.32095px; height: 20.028204px; }
@media (hover: hover) and (pointer: fine) {
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card:hover .category-card-image > .category-hover,
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card:hover .category-card-image::after,
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card:focus-within .category-card-image > .category-hover,
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card:focus-within .category-card-image::after { opacity: 1; }
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card:hover .list-product-actions,
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card:focus-within .list-product-actions { opacity: 1; visibility: visible; pointer-events: auto; }
}
@media (hover: none), (pointer: coarse) {
  /* Touch cannot hover: keep the original photograph and actions available. */
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions { opacity: 1; visibility: visible; pointer-events: auto; gap: 2px; }
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card .list-product-actions .product-action { min-width: 36px; min-height: 36px; filter: drop-shadow(0 1px 2px rgb(38 29 16 / 55%)); }
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card-image:hover > .category-hover { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card .category-card-image::after,
  body.sp26.category-page .category-grid:not(.catalog-list) .category-card :is(.category-hover, .list-product-actions, .product-action) { transition: none; }
}
