.alke-product-cards {
  margin: 40px 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px 0;
}

.alke-pc-toolbar {
  display: flex;
  align-items: center;
  /* Keep items aligned left; arrows will push themselves to the right */
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Optional header (title + subtitle) */
.alke-pc-head.containerized {
  margin-bottom: 8px;
}

.alke-pc-head-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #111;
  padding-bottom: 15px;
}

.alke-pc-head-subtitle {
  margin: 0 0 20px;
  color: #374151;
  font-size: 1.05rem;
}

.alke-pc-navs {
  display: flex;
  gap: 8px;
  /* Stay at the far right of the current flex line */
  margin-left: auto;
  flex: 0 0 auto;
  /* When wrapping to a new line, stick to the top-right of that line */
  align-self: flex-start;
}

.alke-pc-arrow {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease, opacity 0.2s ease;
}

.alke-pc-arrow:hover {
  background: #f3f4f6;
}

.alke-pc-arrow:disabled,
.alke-pc-arrow[disabled] {
  color: #9ca3af;
  border-color: #e5e7eb;
  opacity: 0.7;
  cursor: default;
}

.alke-pc-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  /* Allow filters to consume available space before arrows */
  flex: 1 1 auto;
}

/* Mobile: horizontal draggable filters with progress bar */
@media (max-width: 768px) {
  .alke-pc-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #111 #e5e7eb;
    padding-bottom: 15px;
    margin-bottom: 6px;
  }

  .alke-pc-filters::-webkit-scrollbar {
    height: 6px;
  }

  .alke-pc-filters::-webkit-scrollbar-thumb {
    background-color: #111;
    border-radius: 999px;
  }

  .alke-pc-filters::-webkit-scrollbar-track {
    background: #e5e7eb;
  }

  .alke-pc-filters .alke-pc-filter {
    flex: 0 0 auto;
  }

  .alke-pc-filters-bar {
    display: none !important;
  }

  .alke-pc-filters-bar .alke-pc-filters-bar-fill {
    display: none !important;
  }
}

.alke-pc-filter {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
}

.alke-pc-filter.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.alke-pc-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: none;
  padding-bottom: 8px;
  padding-left: 0;
  padding-right: 0;
  scroll-behavior: smooth;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-x pinch-zoom;
}

.alke-pc-grid::-webkit-scrollbar {
  height: 0;
  width: 0;
}

.alke-pc-grid {
  scrollbar-width: none;
}

/* Desktop: let only the cards bleed to the right edge of the viewport */
@media (min-width: 769px) {
  .alke-product-cards .alke-pc-grid {
    margin-right: calc(50% - 50vw);
    padding-right: calc(50vw - 50%);
  }

  /* Desktop: slightly wider spacing and narrower card width */
  .alke-pc-grid {
    gap: 24px;
  }

  .alke-pc-card {
    flex: 0 0 clamp(260px, 24vw, 300px);
  }
}

.alke-pc-grid.is-dragging {
  cursor: grabbing;
}

/* Mobile: center padding and dot indicator */
@media (max-width: 768px) {
  .alke-pc-grid {
    padding-left: 20px;
    padding-right: 20px;
  }

  .alke-pc-card {
    scroll-snap-align: none;
  }

  .alke-pc-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 10px;
  }

  .alke-pc-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .alke-pc-dots .dot.is-active {
    background: #e11d2e;
    transform: scale(1.15);
  }

  .alke-pc-navs {
    display: none !important;
  }
}

.alke-pc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  flex: 0 0 clamp(260px, 26vw, 320px);
  scroll-snap-align: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  padding-top: 0 !important;
}

.alke-pc-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.alke-pc-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.alke-pc-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Defensive override: ensure images inside cards are never hidden by global rules */
.alke-product-cards img {
  display: block;
  max-width: 100%;
  height: auto;
  opacity: 1 !important;
  visibility: visible !important;
}

.alke-pc-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alke-pc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 4px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.25em * 2);
}

.alke-pc-title a {
  color: #111;
  text-decoration: none;
}

.alke-pc-subtitle {
  color: #6b7280;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.2em * 1);
}

.alke-pc-text {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.5em * 3);
}

.alke-pc-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  font-weight: bold !important;
}

.alke-pc-cta {
  color: #111 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold !important;
}

/* Hide cards when filtered via [hidden] */
.alke-pc-card[hidden] {
  display: none !important;
}

/* Ensure desktop sizing overrides win the cascade */
@media (min-width: 769px) {
  .alke-pc-grid {
    gap: 28px;
  }

  .alke-pc-card {
    /* Override base sizing with a slightly narrower width on desktop */
    flex: 0 0 clamp(260px, 24vw, 300px);
  }
}