/* ============================================================
   Cajun Corner — Custom Slider v2.1
   Slider Revolution replacement | Modern burger-brand design
   ============================================================ */

/* CAJUNCORNER font — Use Any Font sources directly (bypasses plugin delay) */
@font-face {
  font-family: 'cajuncorner';
  src: url('https://cajuncorner.com.tr/wp-content/uploads/useanyfont/7842CajunCorner.woff2') format('woff2'),
       url('https://cajuncorner.com.tr/wp-content/uploads/useanyfont/7842CajunCorner.woff') format('woff');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* Bebas Neue + Barlow Condensed — Google Fonts fallback chain */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Condensed:wght@400;500;700;800;900&display=swap');

:root {
  --cs-yellow: #fbba00;
  --cs-yellow-hi: #ffcc19;
  --cs-red: #c33130;
  --cs-dark: #1a0f0a;
  --cs-white: #fff;
  --cs-cream: #fff8e7;
  --cs-title-font: 'cajuncorner', 'Bebas Neue', 'Barlow Condensed', system-ui, sans-serif;
  --cs-body-font: 'Barlow Condensed', system-ui, sans-serif;
  --cs-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ============ WRAPPER ============ */
.cs-slider {
  position: relative;
  width: 100%;
  height: 880px;
  overflow: hidden;
  background: var(--cs-dark);
  font-family: var(--cs-body-font);
}

/* Explicit heights per breakpoint — ensures bg always covers content area */
@media (max-width: 1450px) { .cs-slider { height: 800px; } }
@media (max-width: 1240px) { .cs-slider { height: 700px; } }
@media (max-width: 1024px) { .cs-slider { height: 720px; } }
@media (max-width: 778px)  { .cs-slider { height: 78vh; min-height: 620px; max-height: 740px; } }

.cs-slider * { box-sizing: border-box; }

.cs-slider .swiper,
.cs-slider .swiper-wrapper,
.cs-slider .swiper-slide { height: 100%; }

/* ============ SLIDE ============ */
.cs-slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Background image */
.cs-slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Gradient overlay for text readability — KEY FIX */
.cs-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg,
      rgba(10, 5, 0, 0.75) 0%,
      rgba(10, 5, 0, 0.45) 35%,
      rgba(10, 5, 0, 0.1) 65%,
      rgba(10, 5, 0, 0) 100%),
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.3) 0%,
      transparent 25%,
      transparent 75%,
      rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* Subtle vignette */
.cs-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

/* ============ INNER LAYOUT ============ */
.cs-slide__inner {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

@media (max-width: 1024px) {
  .cs-slide__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 20px 56px;
    gap: 14px;
    grid-template-columns: none;
    grid-template-rows: none;
  }
}

@media (max-width: 778px) {
  .cs-slide__inner {
    padding: 56px 20px 50px;
    gap: 10px;
  }
}

/* ============ TEXT COLUMN ============ */
.cs-slide__text {
  color: var(--cs-white);
  max-width: 580px;
  position: relative;
  z-index: 6;
}

@media (max-width: 1024px) {
  .cs-slide__text {
    margin: 0 auto;
    order: 2;
  }
}

/* Pretitle as yellow badge/tag */
.cs-pretitle {
  display: inline-block;
  padding: 9px 18px;
  background: var(--cs-yellow);
  color: var(--cs-dark);
  font-family: var(--cs-body-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 6px;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(251, 186, 0, 0.3);
}

@media (max-width: 778px) {
  .cs-pretitle { font-size: 13px; padding: 7px 14px; margin-bottom: 18px; }
}

/* Title — outlined stamp style with animated underline */
.cs-title {
  position: relative;
  font-family: var(--cs-title-font);
  font-size: clamp(40px, 7vw, 110px);
  font-weight: 900;
  line-height: 0.95;
  margin: 0 0 24px;
  padding-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: -1px;
  color: var(--cs-cream);
  text-shadow:
    0 2px 0 var(--cs-dark),
    0 4px 0 rgba(26, 15, 10, 0.7),
    0 12px 30px rgba(0, 0, 0, 0.6);
}

@media (max-width: 778px) {
  .cs-title { margin-bottom: 14px; padding-bottom: 10px; }
  .cs-title::after { width: 0; height: 3px; }
  .swiper-slide-active .cs-title::after { width: 80px; }
}

.cs-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cs-yellow), var(--cs-yellow-hi));
  border-radius: 2px;
  transition: width 1s var(--cs-ease) .6s;
}

.swiper-slide-active .cs-title::after { width: 120px; }

@media (max-width: 1024px) {
  .cs-title::after { left: 50%; transform: translateX(-50%); }
}

.cs-title em {
  font-style: normal;
  color: var(--cs-yellow);
  display: inline-block;
}

/* Description — editorial style with lead + detail */
.cs-desc {
  position: relative;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.6;
  margin: 0 0 36px;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--cs-yellow);
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  font-weight: 400;
  max-width: 520px;
}

/* Lead sentence — big, bold, yellow accent (sales-driving first line) */
.cs-desc-lead {
  display: block;
  font-family: var(--cs-body-font);
  font-size: clamp(20px, 1.7vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--cs-yellow-hi);
  margin-bottom: 12px;
  letter-spacing: -0.2px;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}

@media (max-width: 1024px) {
  .cs-desc {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    border-left-width: 2px;
    padding-left: 14px;
    margin-bottom: 24px;
  }
}

@media (max-width: 778px) {
  .cs-desc { font-size: 13px; line-height: 1.5; margin-bottom: 20px; padding: 4px 0 4px 12px; }
  .cs-desc-lead { font-size: 17px; margin-bottom: 8px; line-height: 1.25; }
}

/* Button — premium with shimmer sweep, idle glow pulse, 3D hover */
.cs-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 36px;
  background: var(--cs-yellow);
  color: var(--cs-dark);
  font-family: var(--cs-body-font);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 12px;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 10px 28px rgba(251, 186, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color .35s var(--cs-ease),
              color .35s var(--cs-ease),
              transform .25s var(--cs-ease),
              box-shadow .35s var(--cs-ease),
              letter-spacing .35s var(--cs-ease);
  will-change: transform;
  cursor: pointer;
  animation: cs-btn-glow 3s ease-in-out infinite;
}

/* Idle subtle glow pulse */
@keyframes cs-btn-glow {
  0%, 100% { box-shadow: 0 10px 28px rgba(251, 186, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2); }
  50%      { box-shadow: 0 14px 36px rgba(251, 186, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.25); }
}

/* Shimmer sweep on hover */
.cs-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%);
  transform: skewX(-20deg);
  transition: left .8s var(--cs-ease);
  z-index: 1;
}

.cs-btn:hover::before,
.cs-btn:focus-visible::before { left: 100%; }

/* Hide HTML emoji icon — replaced with CSS arrow */
.cs-btn__icon { display: none; }

.cs-btn::after {
  content: '→';
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  transition: transform .35s var(--cs-ease);
  margin-left: 4px;
  position: relative;
  z-index: 2;
}

.cs-btn > * { position: relative; z-index: 2; }

.cs-btn:hover,
.cs-btn:focus-visible {
  background: var(--cs-red);
  color: var(--cs-white);
  transform: translateY(-4px) scale(1.03);
  letter-spacing: 3px;
  box-shadow: 0 18px 40px rgba(195, 49, 48, 0.5), 0 6px 12px rgba(0, 0, 0, 0.3);
  outline: none;
  animation: none;
}

.cs-btn:hover::after,
.cs-btn:focus-visible::after { transform: translateX(8px); }

.cs-btn:active {
  transform: translateY(-1px) scale(0.99);
  box-shadow: 0 6px 16px rgba(195, 49, 48, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  transition-duration: .1s;
}

@media (max-width: 778px) {
  .cs-btn { padding: 14px 28px; font-size: 14px; }
}

/* ============ PRODUCT IMAGE ============ */
.cs-slide__product {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}

@media (max-width: 1024px) {
  .cs-slide__product {
    order: 1;
    height: auto;
    max-height: 36vh;
    width: 100%;
    padding: 0;
  }
  .cs-slide__product img {
    max-height: 100%;
    max-width: 80%;
  }
  .cs-slide__product img[src*="cajun-avantaj-mix"] {
    max-width: 95%;
  }
}

@media (max-width: 778px) {
  .cs-slide__product {
    max-height: 32vh;
  }
}

.cs-slide__product img {
  max-width: 100%;
  max-height: 80%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5))
          drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
  /* Base transform — gives smooth transition something to interpolate FROM on hover */
  transform: scale(1) rotate(0);
  transition: transform .7s var(--cs-ease), filter .5s var(--cs-ease);
}

/* Landscape products (e.g. Cajun Mix) — scale up to fill column width */
.cs-slide__product img[src*="cajun-avantaj-mix"] {
  width: 115%;
  max-width: 115%;
  max-height: none;
  height: auto;
}

@media (max-width: 1024px) {
  .cs-slide__product img[src*="cajun-avantaj-mix"] {
    width: 100%;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-slide__product img { transition: none; }
}

/* ============ DECORATIVE ELEMENTS ============ */
/* ALL decorations sit BEHIND content — atmospheric, no overlap with text/button */
.cs-deco {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  opacity: 0.55;
  will-change: transform;
  transition: opacity 1.2s var(--cs-ease), transform .25s ease-out;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

@media (max-width: 1024px) {
  .cs-deco { opacity: 0.35; } /* even more subtle on tablet */
}

@media (max-width: 778px) {
  .cs-deco { display: none; } /* declutter on mobile */
}

/* ============ ENTRY ANIMATIONS ============ */
.cs-slide__text > *,
.cs-slide__product {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s var(--cs-ease), transform .8s var(--cs-ease);
}

.cs-slide__product {
  transform: translateX(80px) scale(0.9);
}

/* Decos: only fade-in on entry — JS controls translate3d for parallax */
.cs-deco {
  opacity: 0;
  transition: opacity 1.2s var(--cs-ease);
}

.swiper-slide-active .cs-pretitle       { opacity: 1; transform: translateY(0); transition-delay: .15s; }
.swiper-slide-active .cs-title          { opacity: 1; transform: translateY(0); transition-delay: .35s; }
.swiper-slide-active .cs-desc           { opacity: 1; transform: translateY(0); transition-delay: .55s; }
.swiper-slide-active .cs-btn            { opacity: 1; transform: translateY(0); transition-delay: .75s; }
.swiper-slide-active .cs-slide__product { opacity: 1; transform: translateX(0) scale(1); transition-delay: .25s; }

.swiper-slide-active .cs-deco           { opacity: 0.55; }
.swiper-slide-active .cs-deco-1         { transition-delay: .45s; }
.swiper-slide-active .cs-deco-2         { transition-delay: .60s; }
.swiper-slide-active .cs-deco-3         { transition-delay: .85s; }
.swiper-slide-active .cs-deco-4         { transition-delay: .35s; }
.swiper-slide-active .cs-deco-5         { transition-delay: 1.05s; }
.swiper-slide-active .cs-deco-6         { transition-delay: .65s; }

/* ============ PAGINATION ============ */
.cs-slider .swiper-pagination {
  position: absolute;
  bottom: 32px !important;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 778px) {
  .cs-slider .swiper-pagination {
    bottom: 16px !important;
    gap: 8px;
  }
  .cs-slider .swiper-pagination-bullet { width: 28px; height: 3px; }
  .cs-slider .swiper-pagination-bullet-active { width: 44px; }
}

.cs-slider .swiper-pagination-bullet {
  width: 36px;
  height: 4px;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.35);
  border: 0;
  border-radius: 2px;
  opacity: 1;
  cursor: pointer;
  transition: background-color .3s ease, transform .3s ease, width .3s ease;
}

.cs-slider .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.6);
}

.cs-slider .swiper-pagination-bullet-active {
  background: var(--cs-yellow);
  width: 56px;
  box-shadow: 0 0 16px rgba(251, 186, 0, 0.6);
}

/* ============ A11Y / REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .cs-slide__text > *,
  .cs-slide__product,
  .cs-deco {
    transition: opacity .3s ease !important;
    transform: none !important;
  }
  .cs-deco { display: none; }
}

/* ============ SLIDE COUNTER (top-right) ============ */
.cs-counter {
  position: absolute;
  top: 36px;
  right: 48px;
  z-index: 30;
  color: var(--cs-white);
  font-family: var(--cs-body-font);
  font-weight: 700;
  letter-spacing: 2px;
  pointer-events: none;
  display: flex;
  align-items: baseline;
  gap: 6px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.cs-counter-current {
  font-family: var(--cs-title-font);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: var(--cs-yellow);
  min-width: 56px;
  text-align: right;
}

.cs-counter-divider {
  font-size: 24px;
  opacity: 0.4;
  margin: 0 2px;
}

.cs-counter-total {
  font-family: var(--cs-title-font);
  font-size: 22px;
  font-weight: 600;
  opacity: 0.65;
  line-height: 1;
}

@media (max-width: 1024px) {
  .cs-counter { top: 42px; right: 28px; }
}

@media (max-width: 778px) {
  .cs-counter { top: 56px; right: 22px; }
  .cs-counter-current { font-size: 28px; min-width: 38px; }
  .cs-counter-total { font-size: 16px; }
}

/* ============ PROGRESS BAR (top edge) ============ */
.cs-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.cs-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cs-yellow), var(--cs-yellow-hi));
  box-shadow: 0 0 16px rgba(251, 186, 0, 0.7);
  transform-origin: left center;
}

/* JS will reset/restart animation on slide change */
.cs-progress-fill.is-running {
  animation: cs-progress-anim 8s linear forwards;
}

@keyframes cs-progress-anim {
  0%   { width: 0; }
  100% { width: 100%; }
}

/* ============ KEN BURNS BG ZOOM ============ */
@keyframes cs-kenburns {
  0%   { transform: scale(1)    translate(0,    0);   }
  100% { transform: scale(1.12) translate(-1.5%, -1%); }
}

.cs-slide__bg {
  transform-origin: center center;
  will-change: transform;
}

.swiper-slide-active .cs-slide__bg {
  animation: cs-kenburns 22s ease-out forwards;
}

/* Mobile: aggressive crop to TOP portion of bg (textured area only) */
@keyframes cs-kenburns-mobile {
  0%   { transform: scale(3.2) translate(0, 0); }
  100% { transform: scale(3.5) translate(-1%, 0); }
}

/* Slide 1 (Yeni Smoky Burger) — its bg has less brick wall in original, needs extra zoom */
@keyframes cs-kenburns-mobile-slide1 {
  0%   { transform: scale(4.5) translate(0, 0); }
  100% { transform: scale(4.8) translate(-0.5%, 0); }
}

@media (max-width: 778px) {
  .cs-slide__bg {
    transform-origin: top center;
    transform: scale(3.2);
  }
  .swiper-slide-active .cs-slide__bg {
    animation: cs-kenburns-mobile 25s ease-out forwards;
  }

  /* Slide 1 specific override */
  .cs-slide__bg[src*="rev_home3_3"] {
    transform: scale(4.5);
  }
  .swiper-slide-active .cs-slide__bg[src*="rev_home3_3"] {
    animation: cs-kenburns-mobile-slide1 25s ease-out forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .swiper-slide-active .cs-slide__bg { animation: none; }
}

/* ============ PRODUCT HOVER ZOOM ============ */
.cs-slider:hover .swiper-slide-active .cs-slide__product img {
  transform: scale(1.07) rotate(-2.5deg);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.55))
          drop-shadow(0 12px 24px rgba(251, 186, 0, 0.15));
}

/* ============ BADGES (YENİ / POPÜLER / etc.) ============ */
/* Positioned relative to product container — sits on top-right of product image */
.cs-slide__product { position: relative; }

.cs-badge {
  position: absolute;
  top: 10%;
  right: 4%;
  z-index: 8;
  padding: 11px 22px;
  font-family: var(--cs-body-font);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cs-white);
  border-radius: 8px;
  transform: rotate(-6deg);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.25);
  animation: cs-badge-pulse 2.4s ease-in-out infinite;
  white-space: nowrap;
  pointer-events: none;
}

.cs-badge--new      { background: var(--cs-red); }
.cs-badge--popular  { background: var(--cs-yellow); color: var(--cs-dark); }
.cs-badge--limited  { background: var(--cs-dark); color: var(--cs-yellow); border: 2px solid var(--cs-yellow); }

@keyframes cs-badge-pulse {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50%      { transform: rotate(-6deg) scale(1.08); }
}

@media (max-width: 1024px) {
  .cs-badge {
    top: 4%;
    right: 8%;
    padding: 8px 16px;
    font-size: 12px;
  }
}

@media (max-width: 778px) {
  .cs-badge {
    padding: 7px 14px;
    font-size: 11px;
    letter-spacing: 1.5px;
  }
}

/* ============ ELEMENTOR ESCAPE — kill any container constraints ============ */
.elementor-widget-html .cs-slider {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}
