/* Flash Sale Section Layout */

/* Scroll Animation Keyframes */
@keyframes fs-scroll-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes fs-scroll-ltr {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.flash-sale-section.fs-modern {
  margin: 2rem 5%;
  padding: 1.5rem 3%;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  border-radius: 1.25rem;
  color: white;
  --fs-card-gap: 0.75rem;
  overflow: hidden;
}

/* Responsive section padding */
@media (min-width: 87.5rem) {
  .flash-sale-section.fs-modern {
    margin-left: auto;
    margin-right: auto;
    max-width: 87.5rem;
  }
}

@media (max-width: 62em) {
  .flash-sale-section.fs-modern {
    margin: 1.5rem 3%;
    padding: 1.25rem 2.5%;
  }
}

@media (max-width: 48em) {
  .flash-sale-section.fs-modern {
    margin: 1.25rem 2%;
    padding: 1rem 2%;
  }
}

@media (max-width: 36em) {
  .flash-sale-section.fs-modern {
    margin: 1rem 1.5%;
    padding: 0.75rem 1.5%;
  }
}

.flash-sale-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.flash-sale-header .fs-header-meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}
.flash-sale-header .fs-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.flash-sale-header .fs-badge-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #ffffff;
  color: #ef4444;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.0375rem;
  box-shadow: 0 0.5rem 1.125rem rgba(0,0,0,0.18);
}
.flash-sale-header .fs-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
}
.flash-sale-header .section-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: white;
  margin: 0;
}

.flash-sale-countdown {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(0.625rem);
}

.countdown-timer {
  font-weight: 700;
  font-size: 1.2rem;
}

/* Flash Sale Carousel Layout - Auto-scroll */
.flash-sale-section.fs-modern .flash-sale-products {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: var(--fs-card-gap, 0.75rem) !important;
  width: max-content !important;
  max-width: none !important;
  /* DISABLED - using button navigation */
  animation: none !important;
  will-change: transform;
}

/* Pause on hover */
.flash-sale-section.fs-modern:hover .flash-sale-products {
  animation-play-state: paused;
}

/* LTR direction override */
.flash-sale-section.fs-modern[data-autoplay-direction="ltr"] .flash-sale-products {
  animation-name: fs-scroll-ltr;
}

/* Responsive Card Widths for Carousel */
@media (min-width: 87.5em) {
  .flash-sale-section.fs-modern .flash-sale-products .flash-sale-card {
    --fs-card-width: 280px;
    flex: 0 0 280px;
    width: 280px;
  }
}

@media (min-width: 75em) and (max-width: 87.49em) {
  .flash-sale-section.fs-modern .flash-sale-products .flash-sale-card {
    --fs-card-width: 260px;
    flex: 0 0 260px;
    width: 260px;
  }
}

@media (min-width: 62em) and (max-width: 74.99em) {
  .flash-sale-section.fs-modern .flash-sale-products .flash-sale-card {
    --fs-card-width: 240px;
    flex: 0 0 240px;
    width: 240px;
  }
}

@media (min-width: 48em) and (max-width: 61.99em) {
  .flash-sale-section.fs-modern .flash-sale-products .flash-sale-card {
    --fs-card-width: 220px;
    flex: 0 0 220px;
    width: 220px;
  }
  
  .flash-sale-card {
    min-height: 24rem;
    padding: 0.875rem;
  }
  
  .fs-title {
    font-size: 0.92rem !important;
  }
  
  .fs-main-price {
    font-size: 1.6rem;
  }
}

@media (min-width: 36em) and (max-width: 47.99em) {
  .flash-sale-section.fs-modern .flash-sale-products .flash-sale-card {
    --fs-card-width: 200px;
    flex: 0 0 200px;
    width: 200px;
  }
  
  .flash-sale-card {
    min-height: 22.75rem;
    padding: 0.75rem;
  }
  
  .fs-title {
    font-size: 0.88rem !important;
  }
  
  .fs-main-price {
    font-size: 1.55rem;
  }
  
  .fs-description {
    font-size: 0.8rem;
  }
}

@media (max-width: 36em) {
  .flash-sale-section.fs-modern .flash-sale-products .flash-sale-card {
    --fs-card-width: 180px;
    flex: 0 0 180px;
    width: 180px;
  }
  
  .flash-sale-card {
    min-height: 21.5rem;
    padding: 0.7rem;
  }
  
  .fs-title {
    font-size: 0.9rem !important;
  }
  
  .fs-main-price {
    font-size: 1.5rem;
  }
  
  .fs-description {
    font-size: 0.78rem;
  }
}

/* Flash Sale Card Modern Style */
.flash-sale-section.fs-modern .flash-sale-card {
  --fs-card-radius: 1.625rem;
  --fs-card-border: rgba(15, 23, 42, 0.08);
  --fs-card-shadow: 0 1.875rem 3.75rem rgba(15, 23, 42, 0.15);
  background: #fff;
  border-radius: var(--fs-card-radius);
  border: 1px solid var(--fs-card-border);
  padding: 1.125rem 1.125rem 1.375rem;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 32.5rem;
  position: relative;
  display: flex !important;
  flex-direction: column;
  gap: 0.875rem;
  box-shadow: var(--fs-card-shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
}

.flash-sale-card::after {
  content: "";
  position: absolute;
  inset: auto 0 -40% 0;
  height: 55%;
  background: radial-gradient(circle at 50% 10%, rgba(59,130,246,0.08), transparent 70%);
  z-index: 0;
}

.flash-sale-card:hover {
  transform: translateY(-0.375rem);
  box-shadow: 0 2.1875rem 4.375rem rgba(15, 23, 42, 0.18);
}

.fs-top-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  z-index: 1;
}

.flash-sale-card .fs-badge,
.fs-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.375rem 0.875rem;
  border-radius: 62.4375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #f97316, #fb7185);
  color: #fff;
  box-shadow: 0 0.625rem 1.125rem rgba(249, 115, 22, 0.25);
}

.fs-tag.fs-tag-perk {
  background: linear-gradient(135deg, #f472b6, #a855f7);
  box-shadow: 0 0.625rem 1.125rem rgba(168, 85, 247, 0.2);
}

.fs-tag.fs-tag-accent {
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  box-shadow: 0 0.625rem 1.125rem rgba(14, 165, 233, 0.25);
}

.fs-tag.fs-tag-danger {
  background: linear-gradient(135deg, #fb7185, #ef4444);
  box-shadow: 0 0.625rem 1.125rem rgba(239, 68, 68, 0.25);
}

.fs-tag.fs-tag-outline {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.fs-badge.fs-badge-ai {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  z-index: 10;
  box-shadow: 0 0.5rem 1.25rem rgba(6, 182, 212, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.fs-brand-corner {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
}

.fs-brand-corner img {
  height: 2rem;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0.125rem 0.5rem rgba(0, 0, 0, 0.15));
}

.fs-tag.fs-tag-installment {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.375rem 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(59, 130, 246, 0.3);
}

/* Swiper Navigation & Pagination */
.swiper-button-next,
.swiper-button-prev {
  color: white !important;
  background: rgba(255,255,255,0.3);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  backdrop-filter: blur(0.625rem);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(255,255,255,0.5);
}

.swiper-pagination-bullet {
  background: rgba(255,255,255,0.5) !important;
}

.swiper-pagination-bullet-active {
  background: white !important;
}

/* Card Content Styling */
.flash-sale-card .fs-img-link {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 1.375rem;
  padding: 1.125rem;
  min-height: 14.375rem;
  background: radial-gradient(circle at 50% 0%, #f0f5ff 0%, #ffffff 65%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  position: relative;
  z-index: 1;
  aspect-ratio: var(--fs-image-aspect, 4 / 3);
}

@media (max-width: 48em) {
  .flash-sale-card .fs-img-link {
    padding: 0.75rem;
    min-height: 12.5rem;
  }
}

.flash-sale-card .fs-img-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 0, rgba(14,165,233,0.12), transparent 60%);
  pointer-events: none;
}

.fs-product-img {
  width: calc(var(--fs-image-scale, 1) * 100%);
  height: calc(var(--fs-image-scale, 1) * 100%);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
  position: relative;
  z-index: 1;
}

.flash-sale-card:hover .fs-product-img {
  transform: scale(var(--fs-image-hover-scale, 1.08));
}

.fs-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.fs-brand-small {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2563eb;
  opacity: 0.85;
}

.fs-brand-small img.fs-brand-logo-img {
  max-height: 24px;
  max-width: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.fs-title {
  font-size: 1.02rem !important;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin: 0.125rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fs-description {
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fs-price-panel {
  background: linear-gradient(135deg, #f1f5ff, #eef2ff);
  border-radius: 22px;
  padding: 16px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fs-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.fs-main-price {
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
}

.fs-original-price {
  font-size: 0.9rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.fs-discount-pill {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 6px 16px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  border: none !important;
  box-shadow: 0 4px 12px rgba(249,115,22,0.3) !important;
}

.fs-discount-pill::after {
  display: none;
}

.fs-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fs-benefit {
  flex: 1 1 160px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  padding: 8px 12px;
}

.fs-benefit-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fs-benefit-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.fs-footnote {
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.fs-action {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border: none;
  padding: 0.625rem 1rem;
  border-radius: 1.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  box-shadow: 0 4px 12px -4px rgba(14, 165, 233, 0.4);
  letter-spacing: 0.02em;
}

.fs-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 6px 16px -4px rgba(14, 165, 233, 0.5);
}

.fs-action-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fs-action-icon svg {
  width: 1rem;
  height: 1rem;
  fill: #fff;
}

.fs-action-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 56.25em) {
  .flash-sale-card {
    padding: 16px;
    width: var(--fs-card-width, 240px);
  }
}

@media (max-width: 37.5em) {
  .flash-sale-card {
    border-radius: 20px;
    width: var(--fs-card-width, 220px);
  }
}
