/* =========================================================
   Móda Zuzana – Instagram sekce nad patičkou
   Soubor: instagram.css  (načítat spolu s instagram.js)
   Písma a barvy se berou z šablony e-shopu.
   ========================================================= */

.mz-ig {
  --mz-ig-primary: var(--color-primary, #362626);
  --mz-ig-hover: var(--color-primary-hover, #997070);
  --mz-ig-gap: 12px;
  --mz-ig-visible: 6;

  padding: 56px 0 64px;
  background: #fff;
  border-top: 1px solid #eee;
}

.mz-ig *,
.mz-ig *::before,
.mz-ig *::after { box-sizing: border-box; }

/* ---------- Nadpis (stejný styl jako nadpisy sekcí na úvodní stránce) ---------- */
.mz-ig__head {
  text-align: center;
  margin-bottom: 28px;
}

.mz-ig .mz-ig__title {
  margin: 0 0 8px;
  text-align: center;
}

.mz-ig__lead {
  margin: 0;
  color: var(--mz-ig-primary);
  opacity: .8;
}

.mz-ig__lead strong {
  opacity: 1;
  font-weight: 700;
}

/* ---------- Slider ---------- */
.mz-ig__slider { position: relative; }

.mz-ig__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--mz-ig-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mz-ig__track::-webkit-scrollbar { display: none; }

.mz-ig__slide {
  flex: 0 0 calc((100% - (var(--mz-ig-visible) - 1) * var(--mz-ig-gap)) / var(--mz-ig-visible));
  scroll-snap-align: start;
  margin: 0;
  padding: 0;
}
.mz-ig__slide::before { content: none !important; } /* Shoptet odrážky u li */

.mz-ig__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: #f3efee;
}

.mz-ig__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.mz-ig__hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(54, 38, 38, .35);
  color: #fff;
  opacity: 0;
  transition: opacity .3s ease;
}
.mz-ig__hover svg { width: 34px; height: 34px; }

.mz-ig__item:hover img,
.mz-ig__item:focus-visible img { transform: scale(1.05); }
.mz-ig__item:hover .mz-ig__hover,
.mz-ig__item:focus-visible .mz-ig__hover { opacity: 1; }
.mz-ig__item:focus-visible { outline: 2px solid var(--mz-ig-primary); outline-offset: 2px; }

/* šipky */
.mz-ig__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--mz-ig-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .25s ease, opacity .25s ease;
}
.mz-ig__arrow svg { width: 18px; height: 18px; }
.mz-ig__arrow--prev { left: -21px; }
.mz-ig__arrow--next { right: -21px; }
.mz-ig__arrow:hover { background: var(--mz-ig-hover); }
.mz-ig__arrow:disabled { opacity: 0; pointer-events: none; }
.mz-ig__arrow:focus-visible { outline: 2px solid var(--mz-ig-primary); outline-offset: 2px; }
.mz-ig--static .mz-ig__arrow { display: none; }

/* ---------- Tlačítko (dědí .btn .btn-primary ze šablony) ---------- */
.mz-ig__cta {
  text-align: center;
  margin-top: 28px;
}

.mz-ig .mz-ig__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 28px;
  padding-right: 28px;
  border-radius: 8px !important;
}
.mz-ig__btn-icon { width: 20px; height: 20px; flex: none; }

/* ---------- Původní IG blok v patičce ---------- */
.custom-footer__instagram.mz-ig-source-hidden { display: none !important; }

/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
  .mz-ig { --mz-ig-visible: 4; }
  .mz-ig__arrow--prev { left: -8px; }
  .mz-ig__arrow--next { right: -8px; }
}

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
  .mz-ig {
    --mz-ig-visible: 2.3;
    --mz-ig-gap: 8px;
    padding: 40px 0 44px;
  }
  .mz-ig__head { margin-bottom: 20px; }
  .mz-ig__lead { font-size: 14px; }

  /* posouvání prstem až ke kraji displeje */
  .mz-ig__slider { margin: 0 -15px; }
  .mz-ig__track { padding: 0 15px; scroll-padding: 0 15px; }
  .mz-ig__arrow { display: none; }
  .mz-ig__item { border-radius: 6px; }
  .mz-ig__cta { margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .mz-ig__track { scroll-behavior: auto; }
  .mz-ig__item img { transition: none; }
}
