/* =========================================================
   eHAUL - JESENJA TEMA (autumn)
   Ucitava se samo kad je $seasonTheme = 'autumn' u season.php
   Sva pravila su pod html.theme-autumn, pa ne diraju sajt
   kad je tema iskljucena.
   ========================================================= */

html.theme-autumn{
  --eh-season:#B5651D;        /* cilibar / terakota - glavni jesenji akcenat */
  --eh-season-deep:#8E4B1F;   /* tamni kesten */
  --eh-season-soft:#F6E9DA;   /* topla krem */
  --eh-season-line:rgba(181,101,29,.22);
}

/* Mali SVG list koji se koristi pored naslova */
html.theme-autumn{
  --eh-leaf-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23B5651D' d='M20.5 3.5C12 3 5.5 6.8 4.2 13.6c-.3 1.6-.2 3.2.3 4.6L2.6 20.1l1.3 1.3 1.9-1.9c1.4.6 3 .7 4.6.4C17.2 18.6 21 12 20.5 3.5z'/%3E%3Cpath fill='none' stroke='%23F6E9DA' stroke-width='1.2' stroke-linecap='round' d='M6.2 17.8C10 13.5 13.5 10 17.5 6.5'/%3E%3C/svg%3E");
}

/* ---------- 1) Hero - lisce (kontejner pravi autumn.js) ---------- */
html.theme-autumn .eh-hero .eh-hero-frame{
  position:relative;
}
html.theme-autumn .eh-season-leaves{
  position:absolute;
  inset:0;
  z-index:5;              /* iznad slike, ispod strelica/paginacije swipera (z-index 10) */
  overflow:hidden;
  pointer-events:none;    /* lisce se ne moze kliknuti, baner ostaje klikabilan */
}
html.theme-autumn .eh-leaf{
  position:absolute;
  top:-48px;
  left:var(--x, 50%);
  width:var(--size, 22px);
  height:var(--size, 22px);
  opacity:0;
  will-change:transform, opacity;
  animation:ehLeafFall var(--dur, 12s) linear var(--delay, 0s) infinite;
}
html.theme-autumn .eh-leaf > span{
  display:block;
  width:100%;
  height:100%;
  animation:ehLeafSway var(--sway, 3.2s) ease-in-out var(--delay, 0s) infinite alternate;
}
html.theme-autumn .eh-leaf svg{
  display:block;
  width:100%;
  height:100%;
  filter:drop-shadow(0 2px 3px rgba(51,51,51,.18));
}
html.theme-autumn .eh-season-leaves.is-paused .eh-leaf,
html.theme-autumn .eh-season-leaves.is-paused .eh-leaf > span{
  animation-play-state:paused;
}
@keyframes ehLeafFall{
  0%  { transform:translate3d(0, 0, 0); opacity:0; }
  8%  { opacity:var(--alpha, .85); }
  85% { opacity:var(--alpha, .85); }
  100%{ transform:translate3d(var(--wind, 40px), var(--fall, 560px), 0); opacity:0; }
}
@keyframes ehLeafSway{
  0%  { transform:translateX(calc(var(--drift, 18px) * -1)) rotate(-28deg); }
  100%{ transform:translateX(var(--drift, 18px)) rotate(38deg); }
}

/* ---------- 2) Kicker naslovi - mali list ispred ---------- */
html.theme-autumn .eh-category-kicker,
html.theme-autumn .eh-brand-kicker,
html.theme-autumn .eh-action-promos-kicker{
  color:var(--eh-season);
}
html.theme-autumn .eh-category-kicker::before,
html.theme-autumn .eh-brand-kicker::before,
html.theme-autumn .eh-action-promos-kicker::before{
  content:"";
  display:inline-block;
  width:14px;
  height:14px;
  margin:0 7px -2px 0;
  background:var(--eh-leaf-icon) center / contain no-repeat;
}
/* na mobilnom je kicker centriran - ostaje lepo poravnat */
html.theme-autumn .eh-action-promos-kicker{ display:inline-block; }

/* ---------- 3) USP traka - toplija pozadina + akcenat ---------- */
html.theme-autumn .eh-usp .eh-usp-grid{
  position:relative;
  overflow:hidden;
  border-color:var(--eh-season-line);
  background:linear-gradient(180deg, #fff 0%, var(--eh-season-soft) 100%);
}
html.theme-autumn .eh-usp .eh-usp-grid::after{
  /* veliki, jedva vidljiv list u uglu */
  content:"";
  position:absolute;
  right:-26px;
  bottom:-34px;
  width:130px;
  height:130px;
  background:var(--eh-leaf-icon) center / contain no-repeat;
  opacity:.10;
  transform:rotate(-18deg);
  pointer-events:none;
}
html.theme-autumn .eh-usp-item{ position:relative; z-index:1; }
html.theme-autumn .eh-usp-item i{ color:var(--eh-season); }

/* ---------- 4) Proizvodi na akciji - topla pozadina + dekor ---------- */
html.theme-autumn .eh-products-action{
  position:relative;
  overflow:hidden;
  background:linear-gradient(180deg, #fff 0%, var(--eh-season-soft) 100%);
}
html.theme-autumn .eh-products-action::before,
html.theme-autumn .eh-products-action::after{
  content:"";
  position:absolute;
  width:170px;
  height:170px;
  background:var(--eh-leaf-icon) center / contain no-repeat;
  opacity:.08;
  pointer-events:none;
  z-index:0;
}
html.theme-autumn .eh-products-action::before{ left:-40px;  top:30px;    transform:rotate(-30deg); }
html.theme-autumn .eh-products-action::after { right:-36px; bottom:20px; transform:rotate(140deg); }
html.theme-autumn .eh-products-action > *{ position:relative; z-index:1; }
html.theme-autumn .eh-products-action h2.background:before{
  border-top-color:var(--eh-season-line);
}
html.theme-autumn .eh-products-action .one-product .product-holder{
  border-color:rgba(181,101,29,.16);
}
html.theme-autumn .eh-products-action .one-product .product-holder:hover{
  border-color:rgba(181,101,29,.32);
}

/* ---------- 5) Kartice kategorija - topliji hover ---------- */
html.theme-autumn .eh-cat-card:hover .eh-cat-overlay{
  background:
    linear-gradient(to top, rgba(142,75,31,.62) 0%, rgba(142,75,31,.12) 48%, rgba(142,75,31,0) 72%),
    linear-gradient(135deg, rgba(184,157,107,.18) 0%, rgba(184,157,107,0) 44%);
}
html.theme-autumn .eh-cat-card .eh-cat-arrow{ color:var(--eh-season); }

/* ---------- 6) Brendovi - topliji okvir na hover ---------- */
html.theme-autumn .eh-brand-carousel .swiperProductBrand .swiper-slide:hover{
  border-color:rgba(181,101,29,.30);
}

/* ---------- 7) Blog - zlatni linkovi postaju cilibar ---------- */
html.theme-autumn .eh-blog-more,
html.theme-autumn .eh-blog-body h3 a:hover{ color:var(--eh-season); }

/* ---------- 8) Newsletter u futeru (cela stranica) ---------- */
html.theme-autumn #ml-newsletter-wrap{
  position:relative;
  overflow:hidden;
}
html.theme-autumn #ml-newsletter-wrap::after{
  content:"";
  position:absolute;
  right:-18px;
  top:-22px;
  width:96px;
  height:96px;
  background:var(--eh-leaf-icon) center / contain no-repeat;
  opacity:.22;
  transform:rotate(25deg);
  pointer-events:none;
}

/* ---------- Mobilni ---------- */
@media (max-width:767px){
  html.theme-autumn .eh-products-action::before,
  html.theme-autumn .eh-products-action::after{ width:110px; height:110px; }
  html.theme-autumn .eh-usp .eh-usp-grid::after{ width:96px; height:96px; }
}

/* Korisnici koji su iskljucili animacije u sistemu - bez lisca */
@media (prefers-reduced-motion: reduce){
  html.theme-autumn .eh-season-leaves{ display:none; }
}
