.section--instagram-reels {
  position: relative;
  left: 50%;
  z-index: 2;
  width: 100vw;
  max-width: none;
  overflow: hidden;
  margin-right: -50vw;
  margin-left: -50vw;
  padding: clamp(66px, 8vw, 112px) 0;
  background: transparent !important;
}

.section--instagram-reels::before {
  position: absolute;
  top: 8%;
  right: -12%;
  width: min(520px, 48vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(177, 20, 255, .12), transparent 68%);
  content: "";
  pointer-events: none;
}

.reels-carousel__header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin: 0 auto 34px;
}

.reels-carousel__heading { min-width: 0; }

.reels-carousel__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reels-carousel__eyebrow svg,
.reels-carousel__profile svg,
.reels-card__brand svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.reels-carousel__profile svg .instagram-icon-dot { fill: currentColor; stroke: none; }

.reels-carousel__header h2 {
  max-width: 780px;
  margin: 20px 0 10px;
  color: var(--brand-white, #fff);
  font-family: "Kanit", sans-serif;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: .96;
  letter-spacing: -.04em;
}

.reels-carousel__header p {
  max-width: 680px;
  margin: 0;
  color: var(--brand-muted, #b9b9c0);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.55;
}

.reels-carousel__header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.reels-carousel__profile {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 21px;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  border-radius: 12px;
  background: linear-gradient(135deg, #c429ff, #b114ff 58%, #8d0dcc) !important;
  box-shadow: 0 12px 30px rgba(177, 20, 255, .27), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
  color: #fff !important;
  font-family: "Kanit", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: filter .2s ease, box-shadow .2s ease, transform .2s ease;
}

.reels-carousel__profile:hover,
.reels-carousel__profile:focus-visible {
  color: #fff !important;
  filter: brightness(1.09);
  transform: translateY(-2px);
  box-shadow: 0 17px 38px rgba(177, 20, 255, .36), inset 0 1px 0 rgba(255, 255, 255, .26) !important;
}

.reels-carousel__nav { display: flex; gap: 8px; }

.reels-carousel__button {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  color: #fff;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease, opacity .2s ease;
}

.reels-carousel__button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.reels-carousel__button:hover:not(:disabled) {
  border-color: rgba(214, 107, 255, .62);
  background: rgba(177, 20, 255, .14);
  transform: translateY(-1px);
}

.reels-carousel__shell {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
}

.reels-carousel__viewport {
  --reels-gap: 20px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
}

.reels-carousel__viewport::-webkit-scrollbar { display: none; }

.reels-carousel__track {
  display: flex;
  align-items: stretch;
  gap: var(--reels-gap);
}

.reels-card {
  position: relative;
  display: block;
  min-width: 0;
  flex: 0 0 calc((100% - 60px) / 4);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  background: #252527;
  color: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  isolation: isolate;
}

.section--instagram-reels[style*="--reels-per-view:3"] .reels-card {
  flex-basis: calc((100% - 40px) / 3);
}

.section--instagram-reels[style*="--reels-per-view:5"] .reels-card {
  flex-basis: calc((100% - 80px) / 5);
}

.reels-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.reels-card > img {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px) !important;
  height: calc(100% + 2px) !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  transition: filter .5s ease, transform .65s cubic-bezier(.2, .7, .2, 1);
}

.reels-card__fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  background:
    radial-gradient(circle at 75% 18%, rgba(198, 61, 255, .42), transparent 34%),
    linear-gradient(145deg, #34283a, #171619 70%);
  color: #e39bff;
  font-family: "Kanit", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.reels-card__fallback > svg {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.reels-card__topline {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px;
  background: linear-gradient(180deg, rgba(13, 9, 15, .68), transparent);
}

.reels-card__brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Kanit", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.reels-card__open {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(20, 20, 22, .42);
  font-size: 16px;
  backdrop-filter: blur(10px);
}

.reels-card__content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  height: 20%;
  box-sizing: border-box;
  flex-direction: column;
  gap: 3px;
  justify-content: flex-end;
  padding: 13px 14px 9px;
  background: linear-gradient(180deg, rgba(11, 8, 13, 0), rgba(11, 8, 13, .72) 38%, rgba(11, 8, 13, .98) 100%);
}

.reels-card__content strong {
  display: block;
  min-height: 1.15em;
  flex: 0 0 auto;
  overflow: hidden;
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reels-card__content > span {
  color: #e3a2fb;
  font-size: 12px;
  font-weight: 600;
}

.reels-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(24, 18, 27, .52);
  color: #fff;
  transform: translate(-50%, -50%);
  transition: background-color .25s ease, transform .25s ease;
  backdrop-filter: blur(12px);
}

.reels-card__play span { margin-left: 3px; font-size: 18px; }

.reels-card:hover > img,
.reels-card:focus-visible > img { filter: saturate(1.08) brightness(.82); transform: scale(1.045); }

.reels-card:hover .reels-card__play,
.reels-card:focus-visible .reels-card__play {
  background: rgba(177, 20, 255, .78);
  transform: translate(-50%, -50%) scale(1.07);
}

.primible-reels-editor-notice {
  display: grid;
  gap: 4px;
  padding: 24px;
  border: 1px dashed #b114ff;
  border-radius: 12px;
  background: #29242c;
  color: #fff;
}
.primible-reels-editor-notice span { color: #c6bdca; }

@media (max-width: 1100px) {
  .section--instagram-reels .reels-card { flex-basis: calc((100% - 40px) / 3); }
  .reels-carousel__header { align-items: flex-start; flex-direction: column; }
  .reels-carousel__header-actions { width: 100%; justify-content: space-between; }
}

@media (max-width: 760px) {
  .reels-carousel__viewport { --reels-gap: 16px; }
  .section--instagram-reels[style] .reels-card {
    flex: 0 0 calc(66.6667% - 10.6667px);
  }
  .reels-carousel__profile { min-height: 46px; }
  .reels-carousel__button { width: 46px; height: 46px; }
}

@media (max-width: 520px) {
  .section--instagram-reels { padding: 58px 0; }
  .reels-carousel__header { margin-bottom: 25px; }
  .reels-carousel__header h2 { font-size: clamp(36px, 11vw, 48px); }
  .reels-carousel__header-actions { align-items: stretch; flex-direction: column; }
  .reels-carousel__profile { width: 100%; }
  .reels-carousel__nav { align-self: flex-end; }
  .section--instagram-reels[style] .reels-card { border-radius: 18px; }
  .reels-card__content { gap: 3px; padding: 11px 14px 10px; }
  .reels-card__content strong { font-size: 16px; }
  .reels-card__content > span { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .reels-carousel__viewport { scroll-behavior: auto; }
  .reels-card > img,
  .reels-card__play { transition: none; }
}
