/**
 * Feeds Widgets - Featured Recommendation Banner (Image 2 Design + Multi-Provider Personalities)
 */

:root {
  --feedswidget-theme-bg: linear-gradient(135deg, #e63f08 0%, #fa470d 45%, #ff5e28 100%);
  --feedswidget-accent: #fa470d;
}

.feedswidget {
  display: block !important;
  list-style: none !important;
  margin: 22px 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   Provider-Specific Color Palettes & Gradients
   ========================================================================== */

/* Blogs: Signature Vibrant Kizmio Orange */
.feedswidget--blogs {
  --feedswidget-theme-bg: linear-gradient(135deg, #e63f08 0%, #fa470d 45%, #ff5e28 100%);
  --feedswidget-accent: #fa470d;
  --feedswidget-badge-bg: #e11d48;
}

/* Places: Tropical Lagoon Emerald & Turquoise */
.feedswidget--places {
  --feedswidget-theme-bg: linear-gradient(135deg, #064e3b 0%, #0d9488 45%, #059669 100%);
  --feedswidget-accent: #0d9488;
  --feedswidget-badge-bg: #059669;
}

/* Food: Culinary Sunset Ruby Crimson & Spice */
.feedswidget--food {
  --feedswidget-theme-bg: linear-gradient(135deg, #881337 0%, #e11d48 45%, #ea580c 100%);
  --feedswidget-accent: #e11d48;
  --feedswidget-badge-bg: #ea580c;
}

/* ==========================================================================
   Banner Shell & Background
   ========================================================================== */

.feedswidget-banner {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--feedswidget-theme-bg);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  color: #ffffff;
  padding: 24px;
  box-sizing: border-box;
  width: 100%;
}

/* Specific Glow & Dots Tint per Provider */
.feedswidget-banner--blogs {
  box-shadow: 0 10px 28px rgba(250, 71, 13, 0.24);
}
.feedswidget-banner--places {
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.24);
}
.feedswidget-banner--food {
  box-shadow: 0 10px 28px rgba(225, 29, 72, 0.24);
}

.feedswidget-bg-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

.feedswidget-bg-dots {
  position: absolute;
  bottom: 14px;
  left: 18px;
  width: 120px;
  height: 48px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1.5px, transparent 1.5px);
  background-size: 8px 8px;
  pointer-events: none;
  z-index: 1;
}

/* Desktop Banner Layout: 34% Left Intro | 66% Right Cards */
.feedswidget-banner-layout {
  display: grid;
  grid-template-columns: 34% 66%;
  align-items: center;
  gap: 20px;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Left Intro / Hero Area */
.feedswidget-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-right: 6px;
}

.feedswidget-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.feedswidget-eyebrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 11px;
  backdrop-filter: blur(4px);
}

.feedswidget-eyebrow-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.95);
}

.feedswidget-headline {
  font-size: 23px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}

.feedswidget-headline-script {
  display: block;
  font-family: inherit;
  font-style: italic;
  color: #ffe58f;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.feedswidget--places .feedswidget-headline-script {
  color: #a7f3d0;
}

.feedswidget--food .feedswidget-headline-script {
  color: #fde047;
}

.feedswidget-subtitle {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
  margin: 0 0 20px 0;
  max-width: 95%;
}

.feedswidget-cta-wrap {
  margin-top: auto;
}

.feedswidget-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--feedswidget-accent, #fa470d) !important;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 12px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.feedswidget-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  background: #fffcfb;
  color: var(--feedswidget-accent, #fa470d) !important;
}

.feedswidget-mobile-see-all {
  display: none;
}

/* Right Cards Container */
.feedswidget-cards-container {
  position: relative;
  width: 100%;
  min-width: 0;
}

/* Horizontal Scrollable Track */
.feedswidget-cards-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 14px;
  overflow-x: auto !important;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100% !important;
  box-sizing: border-box;
  padding: 4px 2px;
}

.feedswidget-cards-track::-webkit-scrollbar {
  display: none;
}

/* Desktop Featured Card: Exactly 2 Cards Visible Side-by-Side */
.feedswidget-card {
  display: flex !important;
  flex-direction: column !important;
  flex: 0 0 calc((100% - 14px) / 2) !important;
  width: calc((100% - 14px) / 2) !important;
  max-width: calc((100% - 14px) / 2) !important;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  text-decoration: none !important;
  color: #1e293b !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedswidget-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

/* Card Media / Image */
.feedswidget-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
  overflow: hidden;
  flex-shrink: 0;
}

.feedswidget-card__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  transition: transform 0.3s ease;
}

.feedswidget-card:hover .feedswidget-card__media img {
  transform: scale(1.06);
}

.feedswidget-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--feedswidget-badge-bg, #e11d48);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
}

/* Card Body */
.feedswidget-card__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  justify-content: space-between;
  gap: 4px;
  box-sizing: border-box;
  background: #ffffff;
}

.feedswidget-card__category {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--feedswidget-accent, #fa470d);
  margin-bottom: 2px;
  display: block;
}

.feedswidget-card__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  min-height: 2.7em;
}

.feedswidget-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  color: #64748b;
}

.feedswidget-card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.feedswidget-card__author,
.feedswidget-card__location,
.feedswidget-card__seller {
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feedswidget-card__dot {
  opacity: 0.6;
}

.feedswidget-card__time,
.feedswidget-card__distance-tag {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feedswidget-card__distance-tag {
  background: #f0fdf4;
  color: #166534;
  font-weight: 700;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
}

.feedswidget-card__price {
  font-weight: 800;
  color: #e11d48;
  font-size: 12px;
  margin-left: auto;
}

.feedswidget-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f8fafc;
  color: var(--feedswidget-accent, #fa470d);
  font-size: 11px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.feedswidget-card:hover .feedswidget-card__action {
  background: var(--feedswidget-accent, #fa470d);
  color: #ffffff;
}

/* Floating Navigation Arrows */
.feedswidget-floating-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: #1e293b;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.feedswidget-floating-arrow--prev {
  left: -12px;
}

.feedswidget-floating-arrow--next {
  right: -12px;
}

.feedswidget-floating-arrow:hover {
  background: #ffffff;
  color: var(--feedswidget-accent, #fa470d);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Location Enhancement Bar */
.feedswidget-location-bar {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.feedswidget-location-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
}

.feedswidget-location-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   Mobile Responsive Adaptation
   ========================================================================== */

@media (max-width: 767.98px) {
  .feedswidget {
    margin: 16px 0 !important;
  }

  .feedswidget-banner {
    padding: 16px 14px;
    border-radius: 14px;
  }

  .feedswidget-banner-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .feedswidget-intro {
    padding-right: 0;
  }

  .feedswidget-eyebrow {
    margin-bottom: 4px;
  }

  .feedswidget-headline {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .feedswidget-headline-script {
    display: inline;
    margin-left: 4px;
  }

  .feedswidget-subtitle {
    display: none;
  }

  .feedswidget-cta-wrap {
    display: none;
  }

  .feedswidget-mobile-see-all {
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none !important;
    backdrop-filter: blur(4px);
    z-index: 5;
  }

  .feedswidget-cards-track {
    gap: 10px;
    padding: 2px 0;
  }

  /* Exactly 2 cards side-by-side on mobile */
  .feedswidget-card {
    flex: 0 0 calc((100% - 10px) / 2) !important;
    width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
    border-radius: 12px;
  }

  .feedswidget-card__body {
    padding: 9px 10px;
  }

  .feedswidget-card__title {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .feedswidget-floating-arrow {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
}

/* ==========================================================================
   Dark Mode Support (body.night-mode)
   ========================================================================== */

body.night-mode .feedswidget-card {
  background: #0f172a;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.night-mode .feedswidget-card__body {
  background: #0f172a;
}

body.night-mode .feedswidget-card__title {
  color: #f1f5f9;
}

body.night-mode .feedswidget-card__footer {
  border-top-color: #1e293b;
  color: #94a3b8;
}

body.night-mode .feedswidget-card__author,
body.night-mode .feedswidget-card__location,
body.night-mode .feedswidget-card__seller {
  color: #cbd5e1;
}

body.night-mode .feedswidget-card__action {
  background: #1e293b;
}

body.night-mode .feedswidget-floating-arrow {
  background: #0f172a;
  color: #f1f5f9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
