/* LOVESILK v6 – styly přesunuté z pole HTML kódy v Shoptetu. */

/* Mobilní produktový detail: nákupní formulář před delším popisem. */
@media (max-width: 767px) {
  body.type-detail .p-data-wrapper {
    display: flex !important;
    flex-direction: column !important;
  }

  body.type-detail .p-data-wrapper #product-detail-form {
    order: 1 !important;
  }

  body.type-detail .p-data-wrapper .p-short-description {
    order: 2 !important;
    margin-top: 20px !important;
  }

  body.type-detail .p-data-wrapper .social-buttons-wrapper {
    order: 3 !important;
  }

  .advice-window {
    display: none !important;
  }
}

/* Desktopová hlavička: plná při otevření, kompaktní po posunutí. */
@media (min-width: 768px) {
  #header .header-top {
    height: 105px !important;
    padding: 10px 0 5px !important;
  }

  #header :is(.header-top-wrapper, .site-name, .site-name > a, .site-name img) {
    height: 90px !important;
  }

  #header .site-name img {
    width: auto !important;
  }

  #header .navigation-buttons {
    top: 45px !important;
  }

  #header .header-bottom {
    height: 65px !important;
    padding: 10px 0 !important;
  }

  html.scrolled #header {
    height: 76px !important;
  }

  html.scrolled #header .header-top {
    height: 76px !important;
    padding: 0 !important;
  }

  html.scrolled #header :is(.header-top-wrapper, .site-name, .site-name > a) {
    height: 76px !important;
  }

  html.scrolled #header .site-name {
    justify-content: flex-start !important;
  }

  html.scrolled #header .site-name > a {
    display: flex !important;
    align-items: center !important;
  }

  html.scrolled #header .site-name img {
    height: 58px !important;
  }

  html.scrolled #header .navigation-buttons {
    top: 38px !important;
    z-index: 4;
  }

  html.scrolled #header .header-bottom {
    position: absolute !important;
    top: 0;
    left: max(185px, calc((100% - 1418px) / 2 + 150px));
    right: max(170px, calc((100% - 1418px) / 2 + 130px));
    height: 76px !important;
    padding: 15px 0 !important;
    background: transparent !important;
    z-index: 3;
  }

  html.scrolled #header .header-bottom-wrapper,
  html.scrolled #header #navigation {
    height: 46px !important;
    width: 100% !important;
    padding: 0 !important;
  }

  html.scrolled #header .menu-level-1 > li > a {
    padding-left: 9px !important;
    padding-right: 9px !important;
    font-size: 12px !important;
  }

  html.scrolled #header .menu-level-1 > li.ext > a {
    padding-right: 42px !important;
  }

  html.scrolled #header .menu-helper > span {
    font-size: 12px !important;
  }
}

/* Široký desktop: Více zůstává blíž poslední viditelné kategorii. */
@media (min-width: 1500px) {
  html.scrolled #header .menu-helper {
    right: 100px !important;
  }
}

/* Mobilní názvy produktů: až tři řádky, aby zůstala vidět barva. */
@media (max-width: 767px) {
  .products .product .name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    line-height: 1.35 !important;
    min-height: 4.05em;
  }
}

/* Nejužší tablety: druhá položka se přesune pod Více, aby se texty nepřekrývaly. */
@media (min-width: 768px) and (max-width: 799px) {
  html.scrolled #header .navigation-in > .menu-level-1 > .menu-item-993 {
    display: none !important;
  }
}

/* Titulní stránka: konverzní pořadí hlavních bloků. */
body.in-index main#content {
  display: flex;
  flex-direction: column;
}

body.in-index main#content > .banners-row {
  order: 0;
}

body.in-index main#content > .homepage-products-heading-5 {
  order: 1;
}

body.in-index main#content > .homepage-products-heading-5 + .products-wrapper {
  order: 2;
}

body.in-index main#content > .homepage-products-heading-5 + .products-wrapper > .products {
  margin-bottom: 0 !important;
}

body.in-index main#content > .benefitBanner {
  order: 3;
  margin-top: 32px;
  margin-bottom: 0 !important;
  padding-top: 36px;
}

body.in-index main#content > .lovesilk-media-strip {
  order: 4;
}

body.in-index main#content > .container-narrow {
  order: 5;
  margin-top: 70px;
}

body.in-index main#content > .homepage-products-heading-8 {
  order: 6;
}

body.in-index main#content > .homepage-products-heading-8 + .products-wrapper {
  order: 7;
}

body.in-index main#content > .lovesilk-silk-education {
  order: 8;
}

/* Pás médií se přesune ze zápatí mezi benefity a recenze. */
.lovesilk-media-source-moved {
  display: none !important;
}

.lovesilk-media-strip {
  width: 100%;
  max-width: 1180px;
  margin: 70px auto 0;
  padding: 34px 36px;
  background: #f7f7f6;
  text-align: center;
  box-sizing: border-box;
}

.lovesilk-media-strip__title {
  margin: 0 0 28px;
  color: #6b7173;
  font-size: 25px;
  font-weight: 400;
}

.lovesilk-media-strip .footer-about-us {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 42px;
  width: 100%;
  min-height: 58px;
  overflow: visible;
}

.lovesilk-media-strip .footer-about-us > a,
.lovesilk-media-strip .footer-about-us > span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 58px;
  overflow: visible;
}

.lovesilk-media-strip .footer-about-us img {
  display: block;
  width: auto;
  max-width: 180px;
  height: auto;
  max-height: 50px;
  object-fit: contain;
  overflow: visible;
}

/* Oficiální vektorové logo Svět ženy bez oříznutého prvního písmene. */
.lovesilk-media-strip img[alt="Logo Svět ženy"] {
  max-width: 176px;
  margin: 0;
  padding: 0;
  filter: none;
}

/* Edukační blok na titulní stránce. */
.lovesilk-silk-education {
  margin: 90px auto 10px;
  padding: 56px 40px;
  width: 100%;
  max-width: 1180px;
  background: #f5f4f2;
  text-align: center;
  box-sizing: border-box;
}

.lovesilk-silk-education__eyebrow {
  margin: 0 0 12px;
  color: #73797b;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lovesilk-silk-education h2 {
  margin: 0 0 18px;
  color: #5f6668;
  font-size: 34px;
  font-weight: 400;
}

.lovesilk-silk-education__intro {
  max-width: 780px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.lovesilk-silk-education__points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 34px;
  padding: 0;
  list-style: none;
}

.lovesilk-silk-education__points li {
  padding: 20px 16px;
  background: #fff;
  line-height: 1.5;
}

.lovesilk-silk-education__cta {
  display: inline-block;
  padding: 13px 28px;
  border: 1px solid #62686a;
  color: #62686a !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lovesilk-silk-education__cta:hover,
.lovesilk-silk-education__cta:focus {
  background: #62686a;
  color: #fff !important;
}

@media (max-width: 767px) {
  /* Šablona carousel na mobilu skrývá; homepage ho používá i pro mobilní bannery. */
  body.in-index #carousel,
  body.in-index #carousel .carousel-inner,
  body.in-index #carousel .carousel-inner .item.active,
  body.in-index #carousel .carousel-inner .item.active > a {
    display: block !important;
    width: 100% !important;
  }

  body.in-index #carousel .carousel-inner .item.active img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }

  body.in-index main#content > .benefitBanner,
  body.in-index main#content > .container-narrow {
    margin-top: 45px;
  }

  body.in-index main#content > .benefitBanner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-top: 24px;
    padding: 20px 8px 24px !important;
    background: #f7f7f6;
  }

  body.in-index .benefitBanner .benefitBanner__item {
    min-height: 132px !important;
    padding: 16px 10px !important;
    background: #fff;
    justify-content: flex-start !important;
    box-sizing: border-box;
  }

  body.in-index .benefitBanner .benefitBanner__picture {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 48px;
    margin: 0 0 10px;
  }

  body.in-index .benefitBanner .benefitBanner__img {
    width: auto !important;
    max-width: 54px !important;
    height: 46px !important;
    object-fit: contain;
  }

  body.in-index .benefitBanner .benefitBanner__content {
    width: 100%;
  }

  body.in-index .benefitBanner .benefitBanner__title {
    display: block;
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  body.in-index .benefitBanner .benefitBanner__data {
    display: none !important;
  }

  .lovesilk-media-strip {
    margin-top: 45px;
    padding: 30px 18px;
  }

  .lovesilk-media-strip__title {
    margin-bottom: 24px;
    font-size: 23px;
  }

  .lovesilk-media-strip .footer-about-us {
    gap: 22px 26px;
  }

  .lovesilk-media-strip .footer-about-us > a,
  .lovesilk-media-strip .footer-about-us > span {
    flex: 0 1 calc(50% - 14px);
  }

  .lovesilk-media-strip .footer-about-us img {
    max-width: 145px;
    max-height: 42px;
  }

  .lovesilk-silk-education {
    margin-top: 55px;
    padding: 38px 20px;
  }

  .lovesilk-silk-education h2 {
    font-size: 28px;
    line-height: 1.25;
  }

  .lovesilk-silk-education__points {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
