/* ============================================
   OFFER BANNER - Premium Coupon Card Design
   ============================================ */

/* Main Offer Section Container */
.offer-banner-section {
  padding: 12px 16px;
  background: #FAFAFA;
}

/* Primary Offer Banner (Best Offer - Always Visible) */
.offer-banner {
  position: relative;
  display: flex;
  align-items: stretch;
  background: linear-gradient(135deg, #1A472A 0%, #2D5A3D 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Left Accent Strip */
.offer-banner__accent {
  width: 6px;
  background: linear-gradient(180deg, #4ADE80 0%, #22C55E 100%);
  flex-shrink: 0;
}

/* Main Content Area */
.offer-banner__content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 14px;
}

/* Tag Icon */
.offer-banner__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offer-banner__icon svg {
  width: 20px;
  height: 20px;
  color: #4ADE80;
}

/* Discount Value (Hero Element) */
.offer-banner__value {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.offer-banner__discount {
  font-size: 28px;
  font-weight: 800;
  color: #4ADE80;
  line-height: 1;
  letter-spacing: -0.5px;
}

.offer-banner__discount-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Offer Details */
.offer-banner__details {
  flex: 1;
  min-width: 0;
}

.offer-banner__title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-banner__condition {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}

.offer-banner__validity {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #4ADE80;
  margin-top: 4px;
}

.offer-banner__validity svg {
  width: 12px;
  height: 12px;
}

/* Coupon Code Badge */
.offer-banner__code {
  flex-shrink: 0;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Festival/Theme Badge */
.offer-banner__theme {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 600;
  color: #FFD700;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   OFFER SLIDER
   ============================================ */
.offer-slider {
  position: relative;
}

/* Clips the scrolling track; arrow buttons are positioned relative to this */
.offer-slider__viewport {
  overflow: hidden;
  position: relative;
}

/* Horizontal flex lane  JS moves it via translateX */
.offer-slider__track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Each slide fills exactly the viewport width */
.offer-slider__slide {
  flex: 0 0 100%;
  width: 100%;
}

/* ── Arrow nav buttons ── */
.offer-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  padding: 0;
}

.offer-carousel__arrow:hover {
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(-50%) scale(1.08);
}

.offer-carousel__arrow--prev { left: 10px; }
.offer-carousel__arrow--next { right: 10px; }

.offer-carousel__arrow svg {
  width: 18px;
  height: 18px;
  color: #1F2937;
  display: block;
}

/* Hide arrows on touch devices  swipe handles navigation */
@media (hover: none) and (pointer: coarse) {
  .offer-carousel__arrow { display: none; }
}

/* On non-touch (where arrows are visible): inset content so it clears the arrows.
   Left arrow: left:10px + width:32px = 42px. Accent strip is 6px → padding-left needs 36px+.
   Right arrow: same 42px from right edge → padding-right 44px. */
@media (hover: hover) and (pointer: fine) {
  .offer-slider .offer-banner__content {
    padding-left: 44px;
    padding-right: 44px;
  }
}

/* Slider Dots */
.offer-slider__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.offer-slider__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D1D5DB;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.offer-slider__dot--active {
  background: #2D5A3D;
  transform: scale(1.2);
}

.offer-slider__dot:hover {
  background: #9CA3AF;
}

.offer-slider__dot--active:hover {
  background: #2D5A3D;
}

/* Platform Offer Banner Variant */
.offer-banner--platform {
  background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
}

.offer-banner--platform .offer-banner__accent {
  background: linear-gradient(180deg, #5EEAD4 0%, #2DD4BF 100%);
}

.offer-banner--platform .offer-banner__discount {
  color: #5EEAD4;
}

.offer-banner--platform .offer-banner__validity {
  color: #5EEAD4;
}

.offer-banner--platform .offer-banner__icon svg {
  color: #5EEAD4;
}

.offer-banner--platform .offer-banner__theme {
  color: #5EEAD4;
  background: rgba(0, 0, 0, 0.25);
}

/* Orange/Restaurant Theme Variant */
.offer-banner--restaurant {
  background: linear-gradient(135deg, #7C2D12 0%, #9A3412 100%);
}

.offer-banner--restaurant .offer-banner__accent {
  background: linear-gradient(180deg, #FB923C 0%, #F97316 100%);
}

.offer-banner--restaurant .offer-banner__discount {
  color: #FDBA74;
}

.offer-banner--restaurant .offer-banner__validity {
  color: #FDBA74;
}

.offer-banner--restaurant .offer-banner__icon svg {
  color: #FDBA74;
}

/* No Offers State */
.no-offers {
  display: none;
}

/* Responsive adjustments for tablets */
@media (max-width: 768px) {
  .offer-banner-section {
    padding: 10px 12px;
  }

  .offer-banner__content {
    padding: 12px 14px;
    gap: 12px;
  }

  .offer-banner__discount {
    font-size: 24px;
  }

  .offer-banner__value {
    padding: 0 10px;
  }

  .offer-banner__title {
    font-size: 13px;
  }

  .offer-banner__condition {
    font-size: 11px;
  }
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
  .offer-banner-section {
    padding: 8px 10px;
  }

  .offer-banner__content {
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .offer-banner__icon {
    display: none;
  }

  .offer-banner__value {
    padding: 0 8px;
    border-right: none;
  }

  .offer-banner__discount {
    font-size: 22px;
  }

  .offer-banner__discount-label {
    font-size: 10px;
  }

  .offer-banner__details {
    flex: 1 1 auto;
    min-width: 100px;
  }

  .offer-banner__title {
    font-size: 12px;
    white-space: normal;
    line-height: 1.3;
  }

  .offer-banner__condition {
    font-size: 10px;
    flex-wrap: wrap;
  }

  .offer-banner__code {
    font-size: 9px;
    padding: 4px 6px;
    letter-spacing: 0.5px;
  }

  .offer-banner__theme {
    font-size: 9px;
    padding: 2px 6px;
    top: 6px;
    right: 6px;
  }

  .offer-slider__dots {
    margin-top: 8px;
  }

  .offer-slider__dot {
    width: 5px;
    height: 5px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .offer-banner__content {
    padding: 8px 10px;
    gap: 8px;
  }

  .offer-banner__discount {
    font-size: 20px;
  }

  .offer-banner__value {
    padding: 0 6px;
  }

  .offer-banner__details {
    min-width: 80px;
  }

  .offer-banner__title {
    font-size: 11px;
  }

  .offer-banner__code {
    font-size: 8px;
    padding: 3px 5px;
  }
}

/* Guest Toast Notification */
.guest-toast {
  position: fixed;
  bottom: 84px;
  /* Above cart bar (64px) + safe margin */
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1A1A1A;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  /* Below cart bar (z-index: 1000) */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  max-width: calc(100% - 32px);
  text-align: center;
}

.guest-toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.guest-toast svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  color: #4ADE80;
}

/* Landscape phones: lower toast position */
@media (max-height: 500px) and (orientation: landscape) {
  .guest-toast {
    bottom: 72px;
    padding: 10px 16px;
    font-size: 13px;
  }
}
