/* PremiumStore UX fixes v2 – 2026-10-02 (zlúčená verzia: živý súbor + doplnky z auditu)
   Samostatný doplnkový súbor, načítať ako POSLEDNÝ stylesheet (po premiumstore-cro.css / main.css).
   Rollback = odstrániť <link>. Nemení markup ani správanie formulárov. */

/* 1) Košík (desktop): tlačidlo „Odstrániť" bolo opacity:0 -> vždy viditeľné */
.cart-table .remove-item,
.cart-table tr.removeable .remove-item {
  opacity: 1 !important;
  visibility: visible !important;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

/* 2) Okno „Pridané do košíka" – kompaktné, jasná primárna/sekundárna akcia */
#colorbox,
#cboxWrapper,
#cboxContent,
#cboxLoadedContent {
  max-width: calc(100vw - 32px);
}
@media (min-width: 768px) {
  #colorbox,
  #cboxWrapper,
  #cboxContent,
  #cboxLoadedContent {
    width: 520px !important;
    max-width: 520px;
  }
  #colorbox { left: calc(50% - 260px) !important; }
}
.advanced-order .extras-wrap:empty { display: none; }
.advancedOrder__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.advancedOrder__buttons .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.advancedOrder__buttons .next-step-back {
  background: #fff !important;
  color: #167450 !important;
  border: 2px solid #167450 !important;
  border-radius: 999px;
  font-weight: 600;
}
.advancedOrder__buttons .next-step-back:hover,
.advancedOrder__buttons .next-step-back:focus-visible {
  background: #eefaf5 !important;
  color: #145e41 !important;
  border-color: #145e41 !important;
}
/* Košík a objednávka: „Späť do obchodu" / „Späť" ako tlačidlo s obrysom */
body.ordering-process .btn.next-step-back {
  background: #fff !important;
  color: #167450 !important;
  border: 2px solid #167450 !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
body.ordering-process .btn.next-step-back:hover,
body.ordering-process .btn.next-step-back:focus-visible {
  background: #eefaf5 !important;
  color: #145e41 !important;
  border-color: #145e41 !important;
}
@media (max-width: 767px) {
  /* primárna akcia navrchu, sekundárna pod ňou */
  .advancedOrder__buttons { flex-direction: column-reverse; }
  .advancedOrder__buttons .btn { width: 100%; }
}

/* 3) Dotykové ciele (mobil) – min. 44 px */
@media (max-width: 767px) {
  .quantity .increase,
  .quantity .decrease {
    min-width: 44px;
    min-height: 44px;
  }
  .navigation-buttons > a,
  .navigation-buttons .btn-icon {
    min-width: 44px;
    min-height: 44px;
  }
  .link-icons .link-icon,
  .link-icon.print,
  .link-icon.chat,
  .link-icon.watchdog,
  .link-icon.share {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .p-detail-inner .availability-label,
  .p-detail-info a,
  .breadcrumbs a {
    display: inline-block;
    padding-block: 12px;
  }
  footer a {
    display: inline-block;
    padding-block: 10px;
  }
}

/* 4) Dlaždice podkategórií – bez automatického delenia slov, názvy produktov do 3 riadkov */
body.type-category #content [id^="ps-cat-"]:not([id$="-help"]) a,
body.type-category #content [id^="ps-cat-"]:not([id$="-help"]) [class*="tile"],
body.type-category #content [id^="ps-cat-"]:not([id$="-help"]) [class*="label"],
body.type-category #content [id^="ps-cat-"]:not([id$="-help"]) [class*="title"],
.ps-tile,
.ps-tile *,
.subcategories a,
.category-navigation a {
  hyphens: none !important;
  -webkit-hyphens: none !important;
  overflow-wrap: normal;
  word-break: normal;
}
@media (max-width: 767px) {
  .products .product .name span,
  .products .product a.name {
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
  }
}

/* 5) Krok 2 – pole Telefón na celú šírku, indikátor hotových krokov */
.phone-combined-input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.phone-combined-input #phone,
.phone-combined-input .js-phone-form-control {
  flex: 1 1 auto;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
}
.cart-header .step.completed > a::before {
  content: "✓";
  color: #fff;
  background: #167450;
  border-radius: 50%;
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 12px;
  margin-right: 6px;
  vertical-align: middle;
}

/* 6) Mobil: lepkavý CTA – košík (sticky) a krok 1 (fixný spodný panel, súhrn je až na konci stránky) */
@media (max-width: 767px) {
  .next-step.next-step--cart {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: #fff;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .08);
  }
  /* premiumstore-cro.css má #checkoutSidebar .order-summary-inner .next-step { margin:0 -24px !important; width:calc(100% + 48px) !important; padding:20px 24px 24px !important }
     – preto rovnako špecifický selektor (ID) a neskoršie poradie. */
  #checkoutSidebar .order-summary-inner .next-step.next-step--step-1 {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)) !important;
    background: #fff !important;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .12);
  }
  #checkoutSidebar .order-summary-inner .next-step.next-step--step-1 .btn {
    width: 100% !important;
    min-height: 52px;
    margin: 0 !important;
  }
  .order-summary-inner { padding-bottom: 96px; }
}

/* 7) Detail produktu (mobil + tablet): rezerva pod lepkavým buybarom (.ps-buybar skrytý od 1024 px) */
@media (max-width: 1023px) {
  body.type-detail { padding-bottom: 84px; }
}

/* 8) Košík/objednávka: medzera medzi primárnym a sekundárnym tlačidlom (na iPhone sa dotýkali) */
body.ordering-process .next-step .btn + .btn,
body.ordering-process .next-step .next-step-back {
  margin-top: 12px;
}
