/* =================== page-catalog.css =================== */

.page-catalog .pcard.pcard-mini .pcard-mini__ph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.page-catalog .hc-cat-main {
  min-width: 0;
}

.page-catalog .hc-cat-tile {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  min-height: 56px;
  padding: 0;
  border: 1px solid rgba(141, 109, 71, 0.18);
  background: #ded8ce;
}

.page-catalog .hc-cat-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.page-catalog .hc-cat-tile__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.page-catalog .hc-cat-tile__fallback::before {
  content: "";
  position: absolute;
  inset: auto -8% -28% -8%;
  height: 62%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.page-catalog .hc-cat-tile__mark {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(26, 23, 20, 0.16);
  display: grid;
  place-items: center;
  font-family: var(--hc-serif, Georgia, serif);
  font-size: 20px;
  color: rgba(26, 23, 20, 0.72);
  background: rgba(255, 255, 255, 0.7);
}

.page-catalog .hc-cat-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.03);
  transform: scale(1.01);
  transition: filter 220ms ease, transform 240ms ease;
}

.page-catalog .hc-cat-tile__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  background: linear-gradient(
    to top,
    rgba(17, 15, 14, 0.72) 0%,
    rgba(17, 15, 14, 0.28) 52%,
    rgba(17, 15, 14, 0.06) 100%
  );
}

.page-catalog .hc-cat-tile__title {
  margin: 0;
  color: #f6f4f1;
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  max-width: 88%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.page-catalog .hc-cat-tile__count {
  color: #f6f4f1;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.02em;
  border: 1px solid rgba(246, 244, 241, 0.45);
  border-radius: 999px;
  padding: 3px 6px;
  background: rgba(20, 16, 13, 0.44);
  white-space: nowrap;
}

.page-catalog .hc-cat-tile:hover .hc-cat-tile__img,
.page-catalog .hc-cat-tile:focus-visible .hc-cat-tile__img {
  filter: grayscale(0);
  transform: scale(1.04);
}

.page-catalog .hc-cat-tile:hover .hc-cat-tile__overlay,
.page-catalog .hc-cat-tile:focus-visible .hc-cat-tile__overlay {
  background: linear-gradient(
    to top,
    rgba(17, 15, 14, 0.82) 0%,
    rgba(17, 15, 14, 0.58) 52%,
    rgba(17, 15, 14, 0.1) 100%
  );
}

.page-catalog .hc-cat-tile__fallback--1 { background: linear-gradient(160deg, #ede5d5 0%, #d8c6aa 100%); }
.page-catalog .hc-cat-tile__fallback--2 { background: linear-gradient(160deg, #f0ece3 0%, #d8cdb8 100%); }
.page-catalog .hc-cat-tile__fallback--3 { background: linear-gradient(160deg, #e7e2d8 0%, #cdbca2 100%); }
.page-catalog .hc-cat-tile__fallback--4 { background: linear-gradient(160deg, #efe7dc 0%, #d6c3a9 100%); }

@media (max-width: 1024px) {
  .page-catalog .hc-cat-tiles-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-catalog .hc-cat-tiles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .page-catalog .hc-cat-tile {
    min-height: 52px;
  }
}


/* ─── Sprint 12.short: stronger view-mode active state ─── */
.hc-cat-toolbar__view-btn.is-active,
.hc-cat-toolbar__view-btn[aria-pressed="true"],
.hc-cat-toolbar__view-btn[data-active="true"] {
  background: var(--hc-ink, #1a1714);
  color: var(--hc-paper, #ffffff);
  border-color: var(--hc-ink, #1a1714);
  box-shadow: 0 6px 14px -6px rgba(40, 30, 15, 0.32);
}
.hc-cat-toolbar__view-btn.is-active::after,
.hc-cat-toolbar__view-btn[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1.5px solid var(--hc-gold, #d4b896);
  border-radius: inherit;
  pointer-events: none;
}


/* ─── Sprint13: category tile series-color accents ─── */
/* Series-color stripe — accents on category tiles by series-slug.
   Targets common category data-slug attributes on the tile. */
[data-series-key="clip-top"]      { --hc-tile-accent: #5b8a8a; }
[data-series-key="legrabox"]      { --hc-tile-accent: #8b6e47; }
[data-series-key="merivobox"]    { --hc-tile-accent: #4a5d76; }
[data-series-key="aventos"]      { --hc-tile-accent: #b8894a; }
[data-series-key="movento"]      { --hc-tile-accent: #5a4a3d; }
[data-series-key="tandembox"]    { --hc-tile-accent: #7d6048; }
[data-series-key="orga-line"]    { --hc-tile-accent: #6b8a5e; }
[data-series-key="tip-on"]       { --hc-tile-accent: #908070; }
.hc-cat-tile,
.hc-shop-tile,
.hc-cat-pill,
[class*="cat-tile"] {
  position: relative;
  isolation: isolate;
}
.hc-cat-tile::before,
.hc-shop-tile::before,
.hc-cat-pill::before,
[class*="cat-tile"]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--hc-tile-accent, var(--hc-gold, #d4b896));
  border-radius: 3px 0 0 3px;
  opacity: 0.86;
  pointer-events: none;
  z-index: 1;
}


/* ─── Sprint13.P2: shop mobile (375-720) ─── */
@media (max-width: 720px) {
  /* Filter sidebar — collapse to dropdown/sheet */
  .hc-shop__layout,
  [class*="shop__layout"] {
    grid-template-columns: 1fr !important;
  }
  /* Category tiles 4-col → 2-col on phone */
  [class*="cat-tile"]:not(.hc-cat-pill),
  .hc-cat-tile {
    grid-template-columns: 1fr 1fr;
  }
  /* Filter dropdown becomes full-width bottom sheet trigger */
  .hc-shop__filters,
  [class*="shop"][class*="filters"] {
    position: sticky;
    bottom: 0;
    background: var(--hc-paper, #ffffff);
    z-index: 10;
  }
  /* PCard grid 4-col → 2-col on phone, 1-col under 420px */
  .hc-shop__grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}
@media (max-width: 420px) {
  .hc-shop__grid {
    grid-template-columns: 1fr;
  }
}


/* ─── Sprint14.6: floating DIZ-style circles on tiles ─── */
/* Add 2 floating gold dots that orbit each category tile (DIZ-style FX) */
.hc-cat-tile,
.hc-shop-tile,
.hc-cat-pill,
[class*="cat-tile"]:not(.hc-cat-pill) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hc-cat-tile::after,
.hc-shop-tile::after,
.hc-cat-pill::after,
[class*="cat-tile"]:not(.hc-cat-pill)::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hc-gold, #d4b896);
  box-shadow: 0 0 12px rgba(212, 184, 150, 0.62);
  top: 20%;
  right: 28%;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.4s ease;
  animation: hc-tile-orbit-a 8s ease-in-out infinite;
  pointer-events: none;
}
.hc-cat-tile:hover::after,
.hc-shop-tile:hover::after,
.hc-cat-pill:hover::after,
[class*="cat-tile"]:hover::after {
  opacity: 0.85;
}
/* Second floating dot via inner span if available, else use double-pulse keyframes */
@keyframes hc-tile-orbit-a {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(-22px, 18px) scale(1.4);
  }
  50% {
    transform: translate(-44px, 4px) scale(0.7);
  }
  75% {
    transform: translate(-16px, -22px) scale(1.2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hc-cat-tile::after,
  .hc-shop-tile::after,
  [class*="cat-tile"]::after {
    animation: none;
  }
}






/* ─── Sprint14.9: premium category tiles (v3 — correct markup) ─── */
.hc-cat-tile,
.hc-shop-tile {
  position: relative !important;
  display: block !important;
  height: 132px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  text-decoration: none !important;
  isolation: isolate !important;
  box-shadow:
    0 1px 2px rgba(40, 30, 15, 0.04),
    0 12px 28px -20px rgba(40, 30, 15, 0.18) !important;
  transition: transform 0.32s cubic-bezier(0.2, 0.84, 0.3, 1), box-shadow 0.32s !important;
}
.hc-cat-tile:hover,
.hc-shop-tile:hover {
  transform: translateY(-3px) !important;
  box-shadow:
    0 1px 2px rgba(40, 30, 15, 0.04),
    0 28px 56px -28px rgba(184, 154, 111, 0.42) !important;
}
.hc-cat-tile__img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.5s cubic-bezier(0.2, 0.84, 0.3, 1);
}
.hc-cat-tile:hover .hc-cat-tile__img {
  transform: scale(1.06);
}
.hc-cat-tile__overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  padding: 18px 20px !important;
  background: linear-gradient(180deg,
    transparent 0%,
    transparent 40%,
    rgba(20, 16, 12, 0.42) 70%,
    rgba(15, 12, 8, 0.85) 100%) !important;
}
.hc-cat-tile__title {
  font-family: var(--hc-serif, "Cormorant Garamond", serif) !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.005em !important;
  color: #ffffff !important;
  text-transform: none !important;
  margin: 0 !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}
.hc-cat-tile__count {
  font-family: var(--hc-mono, "JetBrains Mono", monospace) !important;
  font-size: 11px !important;
  color: rgba(255, 255, 255, 0.86) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.hc-cat-tile__count::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--hc-gold, #d4b896);
  border-radius: 50%;
  display: inline-block;
}
/* Left vertical accent stripe (series color) */
.hc-cat-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 14%;
  width: 3px;
  background: var(--hc-tile-accent, var(--hc-gold, #d4b896));
  border-radius: 0 3px 3px 0;
  opacity: 0.94;
  z-index: 3;
  transition: opacity 0.3s, top 0.3s, bottom 0.3s;
}
.hc-cat-tile:hover::before {
  top: 0;
  bottom: 0;
  opacity: 1;
}
/* Rotating dashed ring decoration top-right (DIZ-style) */
.hc-cat-tile::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -28px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 0.5px dashed rgba(212, 184, 150, 0.42);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  animation: hc-tile-rot 70s linear infinite;
}
.hc-cat-tile:hover::after {
  opacity: 0.7;
}
@keyframes hc-tile-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hc-cat-tile::after { animation: none; }
}
@media (max-width: 720px) {
  .hc-cat-tile, .hc-shop-tile {
    height: 108px !important;
  }
  .hc-cat-tile__title { font-size: 16px !important; }
  .hc-cat-tile::after { display: none; }
}
