.smyk-top {
  padding-block: var(--smyk-section-py);
  background: #fff;
}
.smyk-top__wrap { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }

/* Header */
.smyk-top__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(20px, 2.5vw, 32px);
  text-align: left;
}
.smyk-top__header-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* Circular nav buttons — branded outline style */
.smyk-top__nav {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.smyk-top__nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  color: #222222;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.smyk-top__nav-btn:hover {
  border-color: #e41d56;
  color: #e41d56;
  box-shadow: 0 6px 14px -6px rgba(228, 29, 86, 0.45);
  transform: translateY(-1px);
}
.smyk-top__nav-btn:active { transform: translateY(0); }
.smyk-top__nav-btn:focus-visible {
  outline: 2px solid #e41d56;
  outline-offset: 2px;
}
.smyk-top__nav-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.smyk-top__nav-btn[disabled]:hover {
  border-color: #e5e7eb;
  color: #222222;
  box-shadow: none;
  transform: none;
}
.smyk-top__heading {
  font-family: var(--smyk-font, inherit);
  font-size: clamp(1.8rem, 3.2vw, 45px);
  font-weight: 800;
  color: #222222;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 8px;
}
.smyk-top__heading-accent {
  color: #e41d56;
  margin-left: 0.3em;
}
.smyk-top__subtitle {
  font-size: clamp(14px, 1.1vw, 17px);
  color: #6b7280;
  margin: 0;
}

/* Staggered 4-column layout — each column is an independent flex
   stack, even columns offset down for the Hostelworld-style stagger.
   Cards have varied aspect ratios for visual variety. */
.smyk-top__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
}

.smyk-top__col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Even columns (2 + 4) shift down to create the staggered look */
.smyk-top__col--2 { margin-top: 64px; }
.smyk-top__col--4 { margin-top: 64px; }

/* Card — uniform size, slightly less elongated than 4:5 so cards
   read as balanced compositions rather than tall slivers. */
.smyk-top__card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: transparent;
  isolation: isolate;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  aspect-ratio: 4 / 5;
  transition: transform .2s ease, box-shadow .2s ease;
}
.smyk-top__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.smyk-top__card:focus-visible {
  outline: 3px solid #e41d56;
  outline-offset: 3px;
}

/* Force every card to the standard 3:4 ratio — including tall variant (Fix Prompt #5) */
.smyk-top__card--tall { aspect-ratio: 3 / 4; }

/* Image fills the card */
.smyk-top__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Unified dark gradient overlay on every card (Fix Prompt #5) */
.smyk-top__card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 50%);
  pointer-events: none;
}

/* Top-left content stack — consistent 16px padding (Fix Prompt #5) */
.smyk-top__content {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* Dark label chip — title only */
.smyk-top__label {
  background: #000000;
  color: #fff;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: var(--smyk-font, inherit);
}
.smyk-top__label-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Price — white text on the image, BELOW the chip */
.smyk-top__price {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  padding: 0 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  font-family: var(--smyk-font, inherit);
}

/* Photographer credit (bottom-right) */
.smyk-top__credit {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
  pointer-events: none;
}
.smyk-top__credit svg { opacity: 0.95; }

.smyk-top__empty {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  padding: 40px 0;
}

/* Responsive — at narrower viewports the column wrappers become
   `display: contents` so all cards become direct grid items of the
   parent, re-flowing in source order via the inline `--card-order`
   custom property. Stagger offsets are zeroed out so cards align
   into a clean 2- or 1-column grid. */
@media (max-width: 1099px) {
  /* Tablet — horizontal carousel with circular nav buttons */
  .smyk-top__wrap { padding-inline: 0; }
  .smyk-top__header { padding-inline: clamp(20px, 4vw, 32px); }
  .smyk-top__col { display: contents; }
  .smyk-top__col--2,
  .smyk-top__col--3,
  .smyk-top__col--4 { margin-top: 0; }

  .smyk-top__grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(220px, 32vw, 300px);
    grid-template-columns: unset !important;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    padding-inline: 24px;
    padding-block: 4px 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }
  .smyk-top__grid::-webkit-scrollbar { display: none; }
  .smyk-top__card {
    scroll-snap-align: start;
    order: var(--card-order, 0);
  }
}
@media (max-width: 749px) {
  /* Horizontal swipe carousel — replaces the stacked grid on mobile */
  .smyk-top__wrap {
    padding-inline: 0;
  }
  .smyk-top__header {
    padding-inline: clamp(16px, 5vw, 24px);
  }
  .smyk-top__col { display: contents; }
  .smyk-top__col--2,
  .smyk-top__col--3,
  .smyk-top__col--4 { margin-top: 0; }

  .smyk-top__grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 68vw;
    grid-template-columns: unset !important;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    padding-inline: 16px;
    padding-block: 4px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }
  .smyk-top__grid::-webkit-scrollbar { display: none; }

  .smyk-top__card {
    scroll-snap-align: center;
    order: var(--card-order, 0);
    border-radius: 14px;
    aspect-ratio: 4 / 5 !important;
  }
  .smyk-top__content { top: 14px; left: 14px; gap: 8px; }
  .smyk-top__label { padding: 7px 12px; }
  .smyk-top__label-title { font-size: 14px; }
  .smyk-top__price { font-size: 13px; }
}

@media (max-width: 420px) {
  .smyk-top__grid {
    grid-auto-columns: 76vw;
  }
}

/* Hide nav buttons where the grid doesn't scroll (>=1100px, static grid).
   The buttons appear only where the carousel actually exists (<1100px). */
@media (min-width: 1100px) {
  .smyk-top__nav { display: none; }
  .smyk-top__header { text-align: center; justify-content: center; }
  .smyk-top__header-text { flex: 0 1 auto; }
}

/* Stack header on small phones so heading + buttons don't fight for space */
@media (max-width: 420px) {
  .smyk-top__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}
