/* Nanolab mobile header, 2026-11-27.
 * Keep the logo/tools and search in one stable layout. The product-detail
 * compact class may still toggle, but must not move individual header items.
 * Desktop and the checkout's existing search visibility are left to the theme.
 */
@media (max-width: 767px) {
  html body .top-navigation-bar,
  html.nl-mpd body .top-navigation-bar {
    position: sticky !important;
    top: 0 !important;
    height: 56px !important;
    min-height: 56px !important;
    transform: none !important;
    transition: none !important;
    background: #fff;
    z-index: 55 !important;
  }

  html body #header,
  html.nl-mpd body #header {
    position: sticky !important;
    top: 56px !important;
    height: auto !important;
    min-height: 0 !important;
    transform: none !important;
    transition: none !important;
    background: #fff;
    z-index: 55 !important;
  }

  html body .top-navigation-bar > .container,
  html body .top-navigation-tools,
  html body .responsive-tools,
  html.nl-mpd body .responsive-tools {
    height: 56px !important;
    min-height: 56px !important;
  }

  html body .responsive-tools,
  html.nl-mpd body .responsive-tools {
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  html body #header .header-top,
  html.nl-mpd body #header .header-top {
    height: auto !important;
    min-height: 0 !important;
  }

  html body #header .site-name,
  html.nl-mpd body.nl-mpd-compact #header .site-name {
    position: absolute !important;
    top: -56px !important;
    left: 12px !important;
    right: auto !important;
    height: 56px !important;
    width: calc(100% - 168px) !important;
    max-width: 160px;
    display: flex !important;
    align-items: center !important;
    transform: none !important;
  }

  html body #header .site-name a {
    display: flex;
    align-items: center;
    max-width: 100%;
    height: 56px;
  }

  html body #header .site-name img,
  html.nl-mpd body.nl-mpd-compact #header .site-name img {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    max-height: 42px !important;
    object-fit: contain;
  }

  html body #header .navigation-wrapper .navigation-buttons a.cart-count,
  html.nl-mpd body.nl-mpd-compact #header .navigation-buttons a.cart-count {
    position: absolute !important;
    top: -56px !important;
    right: 48px !important;
    width: 44px !important;
    height: 56px !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    transform: none !important;
  }

  html body #header .navigation-buttons a.cart-count::before {
    position: static !important;
    display: block !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  html body #header .navigation-buttons a.cart-count i {
    top: 26px !important;
    left: auto !important;
    right: 0 !important;
    margin: 0 !important;
  }

  html body .responsive-tools > [data-target="login"],
  html body .responsive-tools > [data-target="navigation"] {
    position: absolute !important;
    top: 6px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }

  html body .responsive-tools > [data-target="login"] {
    right: 96px !important;
  }

  html body.ordering-process .responsive-tools > [data-target="login"] {
    right: 48px !important;
  }

  html body .responsive-tools > [data-target="navigation"] {
    right: 0 !important;
    flex-direction: column;
  }

  html body .responsive-tools > [data-target="navigation"]::before {
    position: static !important;
    display: block !important;
    height: 28px !important;
    line-height: 28px !important;
    margin: 0 !important;
  }

  html body .responsive-tools > [data-target="navigation"]::after {
    position: static !important;
    display: block !important;
    height: 12px !important;
    line-height: 12px !important;
  }

  html body .responsive-tools > [data-target="search"],
  html.nl-mpd body.nl-mpd-compact .responsive-tools > [data-target="search"] {
    display: none !important;
  }

  html.nl-mpd body #header .search,
  html.nl-mpd body.nl-mpd-compact #header .header-top .search {
    display: block !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
  }

  /* No transformed ancestor: the fixed navigation uses the viewport again. */
  html body #navigation,
  html.nl-mpd body #navigation,
  html body #navigation::before,
  html.nl-mpd body #navigation::before {
    top: 56px !important;
    height: calc(100vh - 56px) !important;
    height: calc(100dvh - 56px) !important;
  }
}

/* Mobile product quantity: show Shoptet's existing sign spans consistently. */
@media (max-width: 767px) {
  html.nl-mpd body.type-detail #content .buy-box .quantity button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #162329 !important;
    background: #f4f7f8 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
  }

  html.nl-mpd body.type-detail #content .buy-box .quantity button::before {
    content: none !important;
    display: none !important;
  }

  html.nl-mpd body.type-detail #content .buy-box .quantity .increase__sign,
  html.nl-mpd body.type-detail #content .buy-box .quantity .decrease__sign {
    display: block !important;
    color: inherit !important;
    font: inherit;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none;
  }

  html.nl-mpd body.type-detail #content .buy-box .quantity button:hover,
  html.nl-mpd body.type-detail #content .buy-box .quantity button:focus,
  html.nl-mpd body.type-detail #content .buy-box .quantity button:active {
    color: #162329 !important;
    background: #e9f8fc !important;
  }

  html.nl-mpd body.type-detail #content .buy-box .quantity .amount {
    color: #162329;
    font-size: 16px;
    font-weight: 600;
  }

  /* Keep the existing delivery action and its dynamically calculated date. */
  html.nl-mpd body.type-detail #content .availability-value .nl-mpd-delivery {
    flex: 0 0 100%;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 3px 0 6px;
    padding: 8px 12px;
    border: 1px solid #bde8f0;
    border-radius: 8px;
    background: #e9f8fc;
    color: #162329;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-align: left;
    text-decoration: none;
    white-space: normal;
    justify-content: flex-start;
  }

  html.nl-mpd body.type-detail #content .availability-value .nl-mpd-delivery:hover,
  html.nl-mpd body.type-detail #content .availability-value .nl-mpd-delivery:focus {
    background: #dff3f8;
    color: #162329;
  }
}

/* Mobile header search: the submit button shares the input's exact edges. */
@media (max-width: 767px) {
  html body #header #formSearchForm button[type="submit"] {
    top: 0 !important;
    right: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: normal !important;
    transform: none !important;
  }
}

/* Homepage product sliders: separate finger-sized controls, 2026-11-27. */
@media (max-width: 767px) {
  body.in-index #content .homepage-group-title[class*="homepage-products-heading-"] {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 48px;
    padding-right: 120px;
    margin-bottom: 12px;
    line-height: 1.25;
  }

  body.in-index #content .homepage-group-title + .products.slick-slider > .slick-arrow {
    top: -60px !important;
    left: auto !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transform: none !important;
    touch-action: manipulation;
  }

  body.in-index #content .homepage-group-title + .products.slick-slider > .slick-prev {
    right: 72px !important;
  }

  body.in-index #content .homepage-group-title + .products.slick-slider > .slick-next {
    right: 12px !important;
  }
}

/* Keep long headings intact on the narrowest phones. */
@media (max-width: 359px) {
  body.in-index #content .homepage-group-title[class*="homepage-products-heading-"] {
    min-height: 0;
    padding-right: 0;
    margin-bottom: 72px;
  }
}

/* Add-to-cart confirmation: a clear status and a highlighted shipping goal. */
#colorbox .advanced-order > .h1:not(.advanced-order-suggestion) {
  position: relative;
  margin: 0;
  padding: 0 0 0 72px;
  color: #162329;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}
#colorbox .advanced-order > .h1:not(.advanced-order-suggestion)::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #178a56;
  color: #fff;
  font-size: 20px;
  line-height: 56px;
  text-align: center;
  transform: none;
}
#colorbox .advanced-order > .h2 {
  margin: 6px 0 26px;
  padding: 0 0 0 72px;
  color: #42565f;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#colorbox .advanced-order > .extras-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 0 -8px;
  padding: 0 0 24px;
  background: transparent;
}
#colorbox .advanced-order > .extras-wrap > .do-obchodu,
#colorbox .advanced-order > .extras-wrap > .extra.step {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}
#colorbox .advanced-order > .extras-wrap > .extra.delivery {
  display: block;
  order: 0;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid #bde8f0;
  border-top: 4px solid #27c0dc;
  border-radius: 14px;
  background: #e9f8fc;
  color: #263e47;
  text-align: center;
}
#colorbox .advanced-order .extra.delivery > span {
  display: block;
  width: 100%;
  color: #263e47;
  font-size: 16px;
  line-height: 1.5;
}
#colorbox .advanced-order .extra.delivery > span::before {
  position: relative;
  top: 3px;
  left: 0;
  margin: 0 8px 0 0;
  color: #0d8298;
  font-size: 24px;
  line-height: 1;
}
#colorbox .advanced-order .extra.delivery strong {
  color: #086479;
  font-size: inherit;
  font-weight: 700;
  text-transform: none;
  white-space: nowrap;
}
#colorbox .advanced-order .extra.delivery strong:first-of-type {
  display: block;
  margin: 4px 0 5px;
  color: #162329;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}
#colorbox .advanced-order .extra.delivery strong:only-of-type {
  white-space: normal;
}
#colorbox .advanced-order .extra.delivery .price-range {
  width: 100%;
  height: 10px;
  margin: 14px 0 0;
  border: 0;
  border-radius: 99px;
  background: #c8e7ee;
  overflow: hidden;
}
#colorbox .advanced-order .extra.delivery .price-range > div {
  height: 100%;
  border-radius: inherit;
  background: #27c0dc;
}
#colorbox .advanced-order > .advanced-order-suggestion {
  margin: 0 -8px;
  padding-top: 24px;
  border-top: 1px solid #e1eaed;
}
@media (min-width: 768px) and (max-width: 1023px) {
  #colorbox .advanced-order > .extras-wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  #colorbox .advanced-order > .extras-wrap > .extra.delivery {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  #colorbox .advanced-order > .extras-wrap > .do-obchodu {
    grid-column: 1;
    grid-row: 2;
  }
  #colorbox .advanced-order > .extras-wrap > .extra.step {
    grid-column: 2;
    grid-row: 2;
  }
}
@media (max-width: 767px) {
  #colorbox .advanced-order > .h1:not(.advanced-order-suggestion) {
    padding: 60px 0 0;
    font-size: 22px;
    text-align: center;
  }
  #colorbox .advanced-order > .h1:not(.advanced-order-suggestion)::before {
    left: 50%;
    width: 48px;
    height: 48px;
    font-size: 18px;
    line-height: 48px;
    transform: translateX(-50%);
  }
  #colorbox .advanced-order > .h2 {
    margin: 6px 0 20px;
    padding: 0;
    font-size: 16px;
    text-align: center;
  }
  #colorbox .advanced-order > .extras-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 20px;
  }
  #colorbox .advanced-order > .extras-wrap > .extra.delivery {
    order: -1;
    padding: 16px;
  }
  #colorbox .advanced-order .extra.delivery strong:first-of-type {
    font-size: 26px;
  }
}
@media (max-width: 359px) {
  #colorbox .advanced-order .extra.delivery > span { font-size: 15px; }
}
