:root {
  --hekso-ink: #171713;
  --hekso-paper: #f4f0e8;
  --hekso-paper-2: #e9e1d5;
  --hekso-white: #fffdf8;
  --hekso-amber: #d99736;
  --hekso-amber-hover: #e5a64a;
  --hekso-muted: #6f6b62;
  --hekso-line: rgba(23, 23, 19, .15);
}

/*
  HEKSO vzhledová vrstva pro Shoptet.
  Zachovává hlavní strukturu šablony a cíleně upravuje barvy, menu a košík.
*/
body.hekso-theme {
  color: var(--hekso-ink);
  background-color: var(--hekso-paper);
}

body.hekso-theme :focus-visible {
  outline-color: #5d9cec;
}

/* Horní informační lišta je skrytá; přihlášení lze ponechat v hlavním menu. */
body.hekso-theme .top-navigation-bar {
  display: none !important;
}

/*
  Rozložení řádku s logem, hledáním a košíkem zůstává původnímu Shoptetu.
  Níže se mění pouze jeho barevnost.
*/

/* Řádek s logem, hledáním a košíkem zůstává jemně sladěný s HEKSO. */
body.hekso-theme #header {
  background-color: var(--hekso-paper);
  border-color: var(--hekso-line);
}

body.hekso-theme #header .site-name a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

body.hekso-theme #header .hekso-wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--hekso-ink);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
}

body.hekso-theme #header .hekso-wordmark__o {
  position: relative;
  width: .8em;
  height: .88em;
  display: inline-block;
  margin-left: .03em;
  background-color: var(--hekso-amber);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
}

body.hekso-theme #header .hekso-wordmark__o::after {
  content: "";
  position: absolute;
  inset: 5px;
  background-color: var(--hekso-paper);
  clip-path: inherit;
}

body.hekso-theme #header .hekso-wordmark-note {
  color: var(--hekso-muted);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.hekso-theme #header .search-form {
  background-color: var(--hekso-white);
  border-color: var(--hekso-line);
}

body.hekso-theme #header .search-form input {
  color: var(--hekso-ink);
  background-color: var(--hekso-paper-2) !important;
}

body.hekso-theme #header .search-form button {
  color: var(--hekso-paper);
  background-color: var(--hekso-ink);
  border-color: var(--hekso-ink);
}

body.hekso-theme #header .cart-count {
  color: var(--hekso-ink);
  background-color: transparent;
  border-color: var(--hekso-line);
}

body.hekso-theme #header .cart-count:hover {
  color: var(--hekso-ink);
  background-color: var(--hekso-amber);
  border-color: var(--hekso-amber);
}

/* Stabilní mobilní řádek se značkou a skutečným odkazem na košík. */
body.hekso-theme #header .hekso-mobile-header {
  display: none;
}

/* Pouze hlavní menu; kontaktní lišta a řádek s logem zůstávají beze změny. */
body.hekso-theme #navigation {
  position: relative;
  isolation: isolate;
}

body.hekso-theme #navigation .navigation-in {
  background-color: var(--hekso-amber) !important;
}

body.hekso-theme #header .menu-helper {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.hekso-theme #navigation .navigation-in,
body.hekso-theme #navigation .menu-level-1,
body.hekso-theme #navigation .menu-level-1 > li,
body.hekso-theme #navigation .menu-level-1 > li > a {
  visibility: visible !important;
  opacity: 1 !important;
}

body.hekso-theme #navigation .menu-level-1 {
  display: flex !important;
}

body.hekso-theme #navigation .menu-level-1 > li {
  display: block !important;
}

body.hekso-theme #navigation .menu-level-1 > li > a {
  display: block !important;
  color: #fff !important;
}

body.hekso-theme #navigation::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  background-color: var(--hekso-amber);
  transform: translateX(-50%);
}

body.hekso-theme #navigation .menu-level-1 > li > a:hover,
body.hekso-theme #navigation .menu-level-1 > li.active > a,
body.hekso-theme #navigation .menu-level-1 > li.exp > a {
  background-color: var(--hekso-amber-hover) !important;
}

/* Navigace v obsahu */
body.hekso-theme .breadcrumbs {
  color: var(--hekso-muted);
}

body.hekso-theme .breadcrumbs a:hover,
body.hekso-theme .sidebar a:hover {
  color: var(--hekso-amber);
}

body.hekso-theme .sidebar-inner {
  background-color: var(--hekso-white);
  border-color: var(--hekso-line);
}

/* Jednotné teplé pozadí hlavního obsahu a produktových výpisů. */
body.hekso-theme .content-wrapper,
body.hekso-theme .content-wrapper-in,
body.hekso-theme .content-wrapper.homepage-box,
body.hekso-theme .homepage-products,
body.hekso-theme .products,
body.hekso-theme .products-block,
body.hekso-theme .products .product,
body.hekso-theme .products .product .p,
body.hekso-theme .products .product .image {
  background-color: var(--hekso-paper);
}

/* Původní tlačítka zůstávají tvarově i rozměrově beze změny. */
body.hekso-theme .btn-primary,
body.hekso-theme .btn-conversion,
body.hekso-theme .add-to-cart-button {
  color: var(--hekso-paper);
  background-color: var(--hekso-amber);
  border-color: var(--hekso-amber);
}

body.hekso-theme .btn-primary:hover,
body.hekso-theme .btn-conversion:hover,
body.hekso-theme .add-to-cart-button:hover {
  color: var(--hekso-paper);
  background-color: var(--hekso-amber-hover);
  border-color: var(--hekso-amber-hover);
}

body.hekso-theme input[type="text"],
body.hekso-theme input[type="email"],
body.hekso-theme input[type="tel"],
body.hekso-theme input[type="number"],
body.hekso-theme input[type="password"],
body.hekso-theme input[type="search"],
body.hekso-theme select,
body.hekso-theme textarea {
  color: var(--hekso-ink);
  background-color: var(--hekso-white);
  border-color: var(--hekso-line);
}

body.hekso-theme input:focus,
body.hekso-theme select:focus,
body.hekso-theme textarea:focus {
  border-color: var(--hekso-amber);
}

/* Produktové výpisy */
body.hekso-theme .products .product {
  border-color: var(--hekso-line);
}

/*
  Všechny současné i budoucí stránky kategorií používají stejné
  světlé HEKSO pozadí.
  Prolnutí je omezené na PIFFKO fotografie, aby zmizely bílé okraje
  uložené přímo v obrazových souborech a neovlivnily se HEKSO moduly.
*/
body.hekso-theme.type-category .sidebar,
body.hekso-theme.type-category .sidebar-inner,
body.hekso-theme.type-category .sidebar .box,
body.hekso-theme.type-category .filter-sections,
body.hekso-theme.type-category .category-header,
body.hekso-theme.type-category .listSorting__control {
  background-color: var(--hekso-paper) !important;
}

/*
  Product photos use one rule everywhere: homepage, categories, product detail,
  cart and benefit icons. It does not depend on product, file or alt-text names.
*/
body.hekso-theme .products .product .image img,
body.hekso-theme.type-product .p-image-wrapper img,
body.hekso-theme.ordering-process .cart-p-image img,
body.hekso-theme .benefitBanner__img {
  mix-blend-mode: multiply !important;
}

body.hekso-theme .products .product .name,
body.hekso-theme .products .product .price,
body.hekso-theme .products .product .price-final {
  color: var(--hekso-ink);
}

/*
  Zdrojové fotografie PIFFKO na titulní straně obsahují bílé pixely po okrajích.
  Režim multiply je opticky spojí s teplým podkladem bez zásahu do rozložení.
*/
body.hekso-theme .flag {
  color: var(--hekso-paper);
  background-color: var(--hekso-ink);
}

body.hekso-theme .flag.flag-new,
body.hekso-theme .flag.flag-tip,
body.hekso-theme .flag.flag-action {
  color: var(--hekso-ink);
  background-color: var(--hekso-amber);
}

/* Detail produktu */
body.hekso-theme.type-product .p-detail-inner,
body.hekso-theme.type-product .p-image-wrapper,
body.hekso-theme.type-product .p-image,
body.hekso-theme.type-product .p-main-image,
body.hekso-theme.type-product .p-info-wrapper,
body.hekso-theme.type-product .p-thumbnails-wrapper,
body.hekso-theme.type-product .p-thumbnail,
body.hekso-theme.type-product .amount,
body.hekso-theme.type-product .social-buttons,
body.hekso-theme.type-product .shp-tabs-holder,
body.hekso-theme.type-product .shp-tabs,
body.hekso-theme.type-product .shp-tabs .shp-tab-link,
body.hekso-theme.type-product .tab-content {
  background-color: var(--hekso-paper) !important;
  border-color: var(--hekso-line);
}

/* Informační panel se čtyřmi ikonami je sjednocený na všech typech stránek. */
body.hekso-theme.type-product .p-code,
body.hekso-theme.type-product .p-short-description {
  color: var(--hekso-muted);
}

body.hekso-theme.type-product .p-final-price {
  color: var(--hekso-ink);
}

body.hekso-theme.type-product .p-thumbnail,
body.hekso-theme.type-product .detail-parameters,
body.hekso-theme.type-product .detail-parameters th,
body.hekso-theme.type-product .detail-parameters td,
body.hekso-theme.type-product .quantity {
  border-color: var(--hekso-line);
}

body.hekso-theme.type-product .p-thumbnail.highlighted {
  border-color: var(--hekso-amber);
}

body.hekso-theme .benefitBanner,
body.hekso-theme .benefitBanner__item,
body.hekso-theme .benefitBanner__picture,
body.hekso-theme .benefitBanner__content {
  background-color: var(--hekso-paper) !important;
  border-color: var(--hekso-line);
}

body.hekso-theme .shp-tabs .shp-tab-link {
  color: var(--hekso-muted);
  border-color: var(--hekso-line);
}

body.hekso-theme .shp-tabs .active .shp-tab-link {
  color: var(--hekso-ink);
  background-color: var(--hekso-amber) !important;
  border-color: var(--hekso-amber);
}

/* Košík a objednávka */
body.hekso-theme .cart-wrapper,
body.hekso-theme .cart-inner,
body.hekso-theme .order-summary,
body.hekso-theme .checkout-box,
body.hekso-theme .co-box {
  background-color: var(--hekso-white);
  border-color: var(--hekso-line);
}

body.hekso-theme .cart-table,
body.hekso-theme .cart-table tr,
body.hekso-theme .cart-table td,
body.hekso-theme .cart-table th {
  border-color: var(--hekso-line);
}

body.hekso-theme .cart-summary {
  color: var(--hekso-ink);
  background-color: var(--hekso-paper-2);
  border-color: var(--hekso-line);
}

/* Košík: jedna světlá plocha bez míchání bílé a béžové. */
body.hekso-theme.ordering-process,
body.hekso-theme.ordering-process #content-wrapper,
body.hekso-theme.ordering-process .content-wrapper-in,
body.hekso-theme.ordering-process #cart-wrapper,
body.hekso-theme.ordering-process .cart-inner,
body.hekso-theme.ordering-process .cart-content,
body.hekso-theme.ordering-process .cart-header,
body.hekso-theme.ordering-process .cart-table,
body.hekso-theme.ordering-process .cart-table tr,
body.hekso-theme.ordering-process .cart-table td,
body.hekso-theme.ordering-process .cart-table th,
body.hekso-theme.ordering-process .checkout-box-wrapper,
body.hekso-theme.ordering-process .summary-wrapper,
body.hekso-theme.ordering-process .box-bg-default,
body.hekso-theme.ordering-process .checkout-box,
body.hekso-theme.ordering-process .co-box,
body.hekso-theme.ordering-process .order-summary,
body.hekso-theme.ordering-process .cart-summary {
  background-color: var(--hekso-paper) !important;
}

/* PIFFKO miniatury v košíku opticky splynou se světlým podkladem. */
/* Nadpis slev a informace o dopravě jsou na široké obrazovce v jednom řádku. */
body.hekso-theme.ordering-process .cart-summary {
  display: grid !important;
  grid-template-columns: minmax(150px, .55fr) minmax(0, 1.45fr);
  align-items: center;
  gap: 24px;
}

body.hekso-theme.ordering-process .cart-summary > .h4 {
  width: auto !important;
  margin: 0 !important;
}

body.hekso-theme.ordering-process .cart-summary > .extras-wrapper {
  width: auto !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

body.hekso-theme.ordering-process .cart-summary .extras-col,
body.hekso-theme.ordering-process .cart-summary .extras-wrap {
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
}

@media (max-width: 767px) {
  body.hekso-theme.ordering-process .cart-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  body.hekso-theme.ordering-process .cart-summary > .extras-wrapper {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Systémové hlášky */
body.hekso-theme .msg,
body.hekso-theme .message,
body.hekso-theme .alert,
body.hekso-theme .popup-widget,
body.hekso-theme .popup-widget-inner,
body.hekso-theme .user-action {
  color: var(--hekso-ink);
  background-color: var(--hekso-white);
  border-color: var(--hekso-line);
}

/* Zápatí */
body.hekso-theme #footer {
  color: var(--hekso-ink);
  background-color: var(--hekso-paper);
  border-color: var(--hekso-line);
}

body.hekso-theme #footer .footer-rows,
body.hekso-theme #footer .custom-footer,
body.hekso-theme #footer .custom-footer > div,
body.hekso-theme #footer .footer-bottom,
body.hekso-theme #footer .footer-bottom .container {
  color: var(--hekso-ink);
  background-color: var(--hekso-paper);
}

body.hekso-theme #footer h2,
body.hekso-theme #footer h3,
body.hekso-theme #footer h4,
body.hekso-theme #footer .pageElement__heading {
  color: var(--hekso-ink);
}

body.hekso-theme #footer a:hover {
  color: var(--hekso-amber);
}

body.hekso-theme #footer .footer-bottom {
  color: var(--hekso-muted);
  background-color: var(--hekso-paper);
  border-color: var(--hekso-line);
}

/* Přechod konfigurátoru HEKSO do košíku */
.hekso-cart-loading {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--hekso-paper);
  background-color: rgba(23, 23, 19, .97);
  text-align: center;
}

.hekso-cart-loading__inner {
  width: min(100%, 470px);
}

.hekso-cart-loading__hex {
  width: 70px;
  height: 80px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  color: var(--hekso-ink);
  background-color: var(--hekso-amber);
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
  font-size: 22px;
  font-weight: 900;
}

.hekso-cart-loading strong,
.hekso-cart-loading span {
  display: block;
}

.hekso-cart-loading strong {
  font-size: 24px;
}

.hekso-cart-loading span {
  margin-top: 9px;
  color: rgba(244, 240, 232, .65);
}

.hekso-cart-loading a {
  display: inline-block;
  margin-top: 20px;
  padding: 13px 24px;
  color: var(--hekso-paper);
  background-color: var(--hekso-amber);
}

@media (max-width: 767px) {
  /*
    Mobilní hlavička kopíruje strukturu počítače: nahoře logo s košíkem,
    pod nimi oranžové hlavní menu. Není pevná a nepřekrývá obsah.
  */
  body.hekso-theme .overall-wrapper {
    padding-top: 0 !important;
  }

  body.hekso-theme #header,
  body.hekso-theme #header .navigation-wrapper {
    position: static !important;
    inset: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--hekso-paper) !important;
    border: 0 !important;
  }

  body.hekso-theme #header .header-top {
    display: none !important;
  }

  body.hekso-theme #header .hekso-mobile-header {
    position: relative;
    z-index: 2;
    height: 54px !important;
    min-height: 54px !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 14px;
    color: var(--hekso-ink);
    background: var(--hekso-paper);
    border-bottom: 1px solid var(--hekso-line);
  }

  body.hekso-theme #header .hekso-mobile-header__brand,
  body.hekso-theme #header .hekso-mobile-header__cart {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    height: 54px !important;
    display: flex !important;
    align-items: center !important;
    color: var(--hekso-ink) !important;
    background: transparent !important;
    text-decoration: none !important;
    pointer-events: auto !important;
  }

  body.hekso-theme #header .hekso-mobile-header__brand {
    flex: 0 0 auto;
  }

  body.hekso-theme #header .hekso-mobile-header__cart {
    flex: 0 0 auto;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
  }

  body.hekso-theme #header .hekso-mobile-header__cart svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.hekso-theme #navigation {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 0 !important;
    -webkit-overflow-scrolling: touch;
  }

  body.hekso-theme #navigation .navigation-in,
  body.hekso-theme #navigation .menu-level-1 {
    width: max-content !important;
    min-width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  body.hekso-theme #navigation .menu-level-1 > li,
  body.hekso-theme #navigation .menu-level-1 > li > a {
    width: auto !important;
    height: 48px !important;
    min-height: 48px !important;
    flex: 0 0 auto !important;
  }

  body.hekso-theme #navigation .menu-level-1 > li > a {
    display: flex !important;
    align-items: center !important;
    padding: 0 14px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  body.hekso-theme #navigation .navigationActions,
  body.hekso-theme #navigation .navigation-close {
    display: none !important;
  }

  body.hekso-theme #header .hekso-wordmark {
    font-size: 22px;
  }

  body.hekso-theme #header .hekso-wordmark-note {
    display: none;
  }
}
