/* ===== Darl Kitchen – UX layer (animations, mobile nav, product extras) ===== */

/* scroll reveal (only when JS is running) */
.dk-rv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rv-d, 0s); }
.dk-rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .dk-rv { opacity: 1; transform: none; transition: none; } }

/* page loading bar */
.dk-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 9999; background: linear-gradient(90deg, var(--c-primary), #f2a900); box-shadow: 0 0 8px rgba(0,0,0,.15); pointer-events: none; opacity: 0; }
.dk-progress.is-on { opacity: 1; animation: dkProg 6s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes dkProg { 0% { width: 0; } 20% { width: 45%; } 100% { width: 92%; } }

/* header shadow once scrolled */
.header--sticky { transition: box-shadow .25s ease; }
.dk-scrolled .header--sticky { box-shadow: 0 6px 18px -10px rgba(0,0,0,.25); }

/* accordions open smoothly */
.faq details[open] .faq__answer, details.collapsible[open] .collapsible__content { animation: dkOpen .35s ease-out; }
@keyframes dkOpen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* buttons: light lift + shine on the order button */
.btn { transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:active { transform: scale(.98); }
@media (hover: hover) { .btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px var(--c-primary); } }
.cod__submit { position: relative; overflow: hidden; }
.cod__submit::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: dkShine 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes dkShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .cod__submit::after { display: none; } }

/* product cards: soft lift on hover */
@media (hover: hover) { .card { transition: transform .25s ease, box-shadow .25s ease; } .card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(0,0,0,.35); } }

/* form highlight when the buyer taps "Commander" */
.dk-flash { animation: dkFlash 1.4s ease-out 1; }
@keyframes dkFlash { 0% { box-shadow: 0 0 0 0 rgba(217,58,30,.55); } 60% { box-shadow: 0 0 0 14px rgba(217,58,30,0); } 100% { box-shadow: none; } }

/* price in "millions" */
.dk-mil { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--c-text-soft); }
.dk-mil b { color: var(--c-text); }
.sticky-bar .dk-mil { margin: 0; font-size: 12px; }

/* ---------- product gallery: counter + arrows ---------- */
.gallery__wrap { position: relative; }
.gallery__count { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(255,255,255,.92); border: 1px solid var(--c-border); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.gallery__arrow { position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; border: 1px solid var(--c-border); background: rgba(255,255,255,.95); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 16px -10px rgba(0,0,0,.4); transition: transform .15s ease, opacity .2s; }
.gallery__arrow:hover { transform: scale(1.06); }
.gallery__arrow[disabled] { opacity: .35; cursor: default; }
.gallery__arrow--prev { left: 10px; } .gallery__arrow--prev .icon { transform: rotate(90deg); }
.gallery__arrow--next { right: 10px; } .gallery__arrow--next .icon { transform: rotate(-90deg); }
.gallery__main { scroll-behavior: smooth; }

/* ---------- delivery card ---------- */
.dk-deliv { border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; overflow: hidden; margin: 14px 0; }
.dk-deliv__row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; }
.dk-deliv__row + .dk-deliv__row { border-top: 1px solid var(--c-border); }
.dk-deliv__ic { flex: 0 0 38px; height: 38px; border-radius: 12px; background: var(--c-soft); color: var(--c-primary); display: flex; align-items: center; justify-content: center; }
.dk-deliv__ic .icon { width: 20px; height: 20px; }
.dk-deliv__row b { display: block; font-size: 15px; }
.dk-deliv__row span { display: block; font-size: 13.5px; color: var(--c-text-soft); line-height: 1.45; }
.dk-deliv__dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dk-deliv__dates em { font-style: normal; font-size: 13px; font-weight: 700; background: #eef8f1; color: #1f7a4a; border-radius: 8px; padding: 3px 9px; }
.dk-deliv__cut { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--c-primary); }
.dk-ask { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 4px; font-weight: 700; font-size: 14px; color: #128c4a; text-decoration: none; }
.dk-ask .icon { width: 18px; height: 18px; }
.dk-ask:hover { text-decoration: underline; }

/* ---------- home: buy steps + wilaya checker ---------- */
.dk-steps { display: grid; gap: 16px; }
@media (min-width: 990px) { .dk-steps { grid-template-columns: 1.1fr 1fr; } }
.dk-steps__box { border-radius: calc(var(--radius) + 6px); padding: 26px 24px; }
.dk-steps__box--a { background: #fbeee9; }
.dk-steps__box--b { background: #fff; border: 1px solid var(--c-border); }
.dk-steps__title { margin: 0 0 18px; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; font-weight: 800; }
.dk-steps__title span { display: block; color: var(--c-primary); }
.dk-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.dk-steps__list li { display: flex; gap: 14px; align-items: flex-start; }
.dk-steps__n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--c-primary); font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px -6px rgba(0,0,0,.25); }
.dk-steps__list b { display: block; }
.dk-steps__list small { color: var(--c-text-soft); font-size: 14px; }
.dk-check h3 { margin: 0 0 12px; font-size: 20px; }
.dk-check select { width: 100%; height: 48px; border: 1px solid var(--c-border); border-radius: 12px; padding: 0 12px; font: inherit; background: #fff; }
.dk-check__out { margin-top: 14px; display: grid; gap: 8px; }
.dk-check__line { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--c-soft); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.dk-check__line b { font-size: 16px; }
.dk-check__line--free b { color: #1f7a4a; }
.dk-check__note { font-size: 13px; color: var(--c-text-soft); margin: 10px 0 0; display: flex; gap: 6px; align-items: center; }
.dk-check__note .icon { width: 16px; height: 16px; }
.dk-check__out[hidden] { display: none; }
.dk-steps__cta { margin-top: 16px; }

/* ---------- mobile bottom navigation ---------- */
.dk-tabbar { display: none; }
@media (max-width: 749px) {
  .dk-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--c-border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); transition: transform .3s ease; }
  .dk-tabbar a, .dk-tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--c-text); text-decoration: none; background: none; border: 0; padding: 4px 0; font-family: inherit; position: relative; }
  .dk-tabbar .icon, .dk-tabbar svg { width: 22px; height: 22px; }
  .dk-tabbar .is-wa { color: #128c4a; }
  .dk-tabbar .is-on { color: var(--c-primary); }
  .dk-tabbar__count { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--c-primary); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
  .dk-tabbar__count[hidden] { display: none; }
  body.dk-has-tabbar { padding-bottom: 64px; }
  body.dk-has-tabbar .wa-float { display: none; }
  .dk-tabbar.is-hidden { transform: translateY(110%); }
}

/* speed: the second (hover) photo of product cards is never downloaded on touch phones */
@media (hover: none) { .card__img--hover { display: none; } }
