/*
 * Print.az — Category Standard v2 (shared card styles).
 * Used by the dedicated online-ordering page (onlayn-sifaris/).
 */

.category-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 700px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 920px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.category-card {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  min-height: 0;
  padding: var(--card-padding);
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.category-card.featured {
  border-color: rgba(215, 25, 32, 0.22);
}

/* Framed like every other card's media box (shared --card-media-* tokens),
   inset within the card's own padding instead of flush to its edges.
   aspect-ratio keeps a definite box height so the image's width/height:100%
   below can fill it; overflow:hidden + this box's own border-radius clips
   the image to the frame's rounded corners -- it fills edge-to-edge
   (object-fit: cover), no interior gap. position:relative stays so the
   badge (absolutely positioned) still anchors to this box. */
.category-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: 16px;
  background: var(--card-media-bg);
  border: var(--card-media-border);
  border-radius: var(--card-media-radius);
}

.category-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.category-card__media--placeholder {
  background:
    radial-gradient(120% 130% at 82% 12%, rgba(215, 25, 32, 0.14), transparent 55%),
    repeating-linear-gradient(115deg, rgba(17, 24, 39, 0.03) 0 1px, transparent 1px 24px),
    linear-gradient(135deg, #fdecec 0%, #f6f7f9 60%, #eef0f3 100%);
}

.category-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  color: #a80f16;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 25, 32, 0.16);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.category-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0;
  min-height: 10.5rem;
}

.category-card__title {
  margin: 0 0 8px;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #17191d;
}

.category-card__desc {
  margin: 0 0 14px;
  color: #4f5865;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
}

.category-card__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.category-card__list li {
  color: #4f5865;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}

.category-card__list li:not(:last-child)::after {
  content: "\00B7";
  margin-left: 8px;
  color: rgba(17, 24, 39, 0.28);
}

/* Base look (color/weight/gap/hover arrow) comes from the shared .card-link
   in cards.css -- only the touch-target height differs here. */
.category-card .card-link {
  min-height: 44px;
}

@media (hover: hover) {
  .category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.11);
    border-color: rgba(215, 25, 32, 0.28);
  }
  .category-card.featured:hover {
    border-color: rgba(215, 25, 32, 0.42);
  }
  .category-card:hover .category-card__img {
    transform: scale(1.02);
  }
  .category-card:hover .card-link::after {
    transform: translateX(3px);
  }
}

.category-card:focus-visible {
  outline: 3px solid rgba(215, 25, 32, 0.55);
  outline-offset: 3px;
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.11);
  border-color: rgba(215, 25, 32, 0.28);
}

.category-card.featured:focus-visible {
  border-color: rgba(215, 25, 32, 0.42);
}

.category-card:focus-visible .category-card__img {
  transform: scale(1.02);
}

.category-card:focus-visible .card-link::after {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .category-card,
  .category-card__img,
  .category-card .card-link,
  .category-card .card-link::after {
    transition: border-color 0.24s ease, box-shadow 0.24s ease;
  }
  .category-card:hover,
  .category-card:focus-visible {
    transform: none;
  }
  .category-card:hover .category-card__img,
  .category-card:focus-visible .category-card__img,
  .category-card:hover .card-link::after,
  .category-card:focus-visible .card-link::after {
    transform: none;
  }
}

@media (max-width: 699.98px) {
  .category-card {
    padding: 20px;
  }

  .category-card__body {
    min-height: 0;
  }

  .category-card__title {
    font-size: 1.15rem;
  }

  .category-card__desc {
    font-size: 0.9rem;
  }
}
