/*!
 * SMGP Carousel Front Styles
 * Version: 1.5.5 (14/02/2026)
 *
 * - Mobile breakpoint no longer forces a fixed height (was overriding admin/frontend height)
 * - No other changes
 */

/* ---------------------------------------------------------
   BASE — LIGHT THEME (DEFAULT, FLOATING LIQUID GLASS CARDS)
--------------------------------------------------------- */
.smgp-carousel {
  --smgp-carousel-height: 160px;
  --smgp-carousel-radius: 18px;

  /* ✅ NEW: card width is now controllable from PHP/admin via CSS var */
  --smgp-carousel-item-width: 140px;

  --smgp-bg-outer: #ffffff;
  --smgp-bg-card: rgba(255, 255, 255, 0.16);
  --smgp-text: #111827;
  --smgp-text-muted: #6b7280;

  --smgp-badge-bg: rgba(255, 255, 255, 0.42);
  --smgp-badge-text: #1e293b;
  --smgp-badge-border: rgba(255, 255, 255, 0.9);

  --smgp-card-border: rgba(255, 255, 255, 0.8);

  padding: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;

  background: transparent;
  border-radius: 22px;
  box-shadow: none;
  overflow: hidden;
  position: relative;
}

/* ---------------------------------------------------------
   OPTIONAL DARK THEME
--------------------------------------------------------- */
.smgp-carousel.smgp-carousel--dark {
  --smgp-bg-outer: linear-gradient(135deg, #020617, #111827);
  --smgp-bg-card: rgba(15, 23, 42, 0.72);
  --smgp-text: #f8fafc;
  --smgp-text-muted: #cbd5e1;

  --smgp-badge-bg: rgba(15, 23, 42, 0.85);
  --smgp-badge-text: #e5e7eb;
  --smgp-badge-border: rgba(148, 163, 184, 0.9);

  --smgp-card-border: rgba(148, 163, 184, 0.85);

  background: var(--smgp-bg-outer);
}

/* ---------------------------------------------------------
   TRACK
--------------------------------------------------------- */
.smgp-carousel-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px;
  scrollbar-width: none;
}

.smgp-carousel-track::-webkit-scrollbar {
  display: none;
}

/* ---------------------------------------------------------
   ITEM
--------------------------------------------------------- */
.smgp-carousel-item {
  flex: 0 0 auto;

  /* ✅ now driven by CSS variable */
  width: var(--smgp-carousel-item-width);

  height: var(--smgp-carousel-height);
  border-radius: var(--smgp-carousel-radius);
  overflow: hidden;
  position: relative;

  background: var(--smgp-bg-card);
  border: 1px solid var(--smgp-card-border);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: none;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.smgp-carousel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background: rgba(255, 255, 255, 0.08);
  box-shadow:
      inset -12px -10px 0px -13px rgba(255, 255, 255, 0.9),
      inset 0px -10px 0px -9px rgba(255, 255, 255, 0.9);
  opacity: 0.6;
  filter: blur(1px) brightness(1.05);
}

.smgp-carousel-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 1);
}

/* ---------------------------------------------------------
   MEDIA
--------------------------------------------------------- */
.smgp-carousel-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.smgp-carousel-media img,
.smgp-carousel-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.smgp-carousel-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.22), rgba(0,0,0,0.02));
}

/* ---------------------------------------------------------
   META AREA
--------------------------------------------------------- */
.smgp-carousel-meta {
  position: static; /* important for badge absolute positioning */
  z-index: 1;
  padding: 10px;
  color: var(--smgp-text);
}

/* ---------------------------------------------------------
   BADGE — ALWAYS TOP RIGHT
--------------------------------------------------------- */
.smgp-carousel-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 2px 10px;
  border-radius: 999px;

  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;

  background: var(--smgp-badge-bg);
  color: var(--smgp-badge-text);
  border: 1px solid var(--smgp-badge-border);

  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);

  margin: 0;
  pointer-events: none;
}

.smgp-carousel-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,0.9), transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(255,255,255,0.25), transparent 55%);
  opacity: 0.7;
}

/* ---------------------------------------------------------
   TITLE / SUBTITLE
--------------------------------------------------------- */
.smgp-carousel-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.28;
  margin: 1px 0 1px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.smgp-carousel-sub {
  font-size: 11px;
  color: var(--smgp-text-muted);
  line-height: 1.28;
}

/* ---------------------------------------------------------
   ARROWS
--------------------------------------------------------- */
.smgp-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15,23,42,0.55);
  color: #fff;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
  transition: all .18s ease;
  z-index: 10;
}

.smgp-carousel-nav:hover {
  transform: translateY(-50%) scale(1.1);
  background: rgba(15,23,42,0.75);
}

.smgp-carousel-prev { left: 10px; }
.smgp-carousel-next { right: 10px; }

/* ---------------------------------------------------------
   DOTS
--------------------------------------------------------- */
.smgp-carousel-dots {
  text-align: center;
  margin-top: 10px;
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */
@media (max-width: 768px) {

  .smgp-carousel {
    padding: 10px;
    border-radius: 16px;

    /* ✅ keep your existing mobile default but still overridable */
    --smgp-carousel-item-width: 112px;
  }

  .smgp-carousel-item {
    /* ✅ height must NOT be forced on mobile; admin/front setting should win */
  }

  .smgp-carousel-nav {
    display: none;
  }
}
