/* Topmarkt: postranni a rozbalovaci kosik v1, 24. 11. 2026.
   Pouze vzhled. Puvodni formulare, mnozstvi, mazani a rozbalovani ridi Shoptet. */

body .sidebar .cart-sidebar-box {
  background: #e4f2fa !important;
  border: 1px solid #cce5f2 !important;
  border-radius: 26px !important;
  padding: 12px !important;
  box-shadow: 0 8px 24px rgba(6,70,93,.07);
  isolation: isolate;
}
body .sidebar .cart-sidebar-box::before,
body .sidebar .cart-sidebar-box::after { display: none !important; }
body .sidebar .cart-sidebar-box > h4 {
  color: #06465d;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 8px;
  min-height: 44px;
  padding: 9px 46px 9px 8px;
}
body .sidebar .cart-sidebar-box > h4::before { margin-right: 8px; }
body .sidebar .cart-sidebar-box > h4::after {
  top: 4px;
  right: 2px;
  width: 36px !important;
  height: 36px !important;
  color: #06465d;
  background: rgba(255,255,255,.8);
  box-shadow: 0 1px 4px rgba(6,70,93,.06);
}
body .sidebar .cart-sidebar-box > h4:hover::after { background: #fff; }
body .sidebar .cart-sidebar-box .cart-sidebar-inner { padding-top: 0; }

/* ID je spolecne i pro puvodni mobilni vyskakovaci kosik. */
body #cart-widget {
  --tm-cart-ink: #06465d;
  --tm-cart-line: #d5e8f1;
  color: var(--tm-cart-ink) !important;
  background: #e4f2fa !important;
  border-radius: 24px !important;
}
body .sidebar #cart-widget { border-radius: 16px !important; }
body #cart-widget .cart-widget-inner {
  background: transparent !important;
  scrollbar-width: thin;
  scrollbar-color: #9dc7da transparent;
}
body #cart-widget .cart-widget-products {
  background: transparent !important;
  border-radius: 16px !important;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #9dc7da transparent;
}
body #cart-widget .cart-widget-products-inner {
  gap: 10px;
  padding: 1px;
}
body #cart-widget .cart-widget-product {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 9px;
  align-items: start;
  position: relative;
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  padding: 12px !important;
  border: 1px solid var(--tm-cart-line) !important;
  border-radius: 16px;
  background: #fff;
  box-sizing: border-box;
}
body #cart-widget .cart-widget-product > div { min-width: 0; }
body #cart-widget .cart-widget-product-image {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 52px !important;
  height: auto !important;
  padding: 0 !important;
  align-self: start;
}
body #cart-widget .cart-widget-product-image a {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
body #cart-widget .cart-widget-product-image img {
  width: 52px;
  height: 62px;
  object-fit: contain;
  max-width: 100%;
  max-height: none;
}
body #cart-widget .cart-widget-product-name {
  display: block !important;
  grid-column: 2;
  grid-row: 1;
  padding: 0 25px 0 0 !important;
  width: auto !important;
  overflow-wrap: anywhere;
}
body #cart-widget .cart-widget-product-name > strong { display: block; font-weight: 600; }
body #cart-widget .cart-widget-product-name a {
  color: #193f50;
  font-size: 14px !important;
  line-height: 1.4;
  margin: 0 !important;
  text-decoration: none;
}
body #cart-widget .cart-widget-product-name a:hover { color: #007ca8; text-decoration: underline; }
body #cart-widget .cart-widget-product-name > span {
  display: block;
  min-width: 0 !important;
  margin-top: 5px;
  color: var(--tm-cart-ink);
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.35;
  text-align: left !important;
}
body #cart-widget .cart-widget-product-amount {
  grid-column: 2;
  grid-row: 2;
  width: auto !important;
  padding: 0 !important;
}
body #cart-widget .quantity-form { margin: 0; }
body #cart-widget .quantity {
  display: inline-flex !important;
  align-items: center;
  gap: 2px;
  position: relative !important;
  inset: auto !important;
  float: none !important;
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  margin: 0 !important;
  padding: 3px;
  border: 1px solid #c9dfe9 !important;
  border-radius: 999px !important;
  background: #fff;
  box-sizing: border-box;
}
body #cart-widget .quantity > label {
  order: 2;
  display: block;
  flex: 0 0 40px;
  width: 40px;
  margin: 0;
  padding: 0;
}
body #cart-widget .quantity input[name="amount"] {
  display: block;
  width: 40px !important;
  height: 36px !important;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #fff;
  color: var(--tm-cart-ink);
  font-size: 16px !important;
  font-weight: 700;
  line-height: 36px;
  text-align: center;
  box-shadow: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
body #cart-widget .quantity input::-webkit-inner-spin-button,
body #cart-widget .quantity input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body #cart-widget .quantity :is(.increase, .decrease) {
  display: inline-flex !important;
  position: static !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px !important;
  min-width: 0;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  border-radius: 50% !important;
  background: #edf5f9;
  color: var(--tm-cart-ink);
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
}
body #cart-widget .quantity .decrease { order: 1; }
body #cart-widget .quantity .increase { order: 3; }
body #cart-widget .quantity :is(.increase, .decrease)::before {
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto;
  height: auto;
  font: 400 22px/1 Arial, sans-serif !important;
}
body #cart-widget .quantity .decrease::before { content: "−" !important; }
body #cart-widget .quantity .increase::before { content: "+" !important; }
body #cart-widget .quantity :is(.increase__sign, .decrease__sign) { display: none !important; }
body #cart-widget .quantity :is(.increase, .decrease):hover { background: #d9edf7; color: #06465d; }
body #cart-widget .quantity :is(.increase, .decrease):disabled { opacity: .4; cursor: not-allowed; }

body #cart-widget .cart-widget-product-delete {
  display: block !important;
  position: absolute;
  top: 8px;
  right: 6px;
  width: 30px !important;
  padding: 0 !important;
}
body #cart-widget .cart-widget-product-delete .remove-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0 !important;
  border-radius: 50%;
  background: transparent;
}
body #cart-widget .cart-widget-product-delete .remove-item::before {
  display: block;
  width: auto;
  height: auto;
  color: #be3333;
  line-height: 1;
  font-size: 11px;
}
body #cart-widget .cart-widget-product-delete .remove-item:hover { background: #fff0f0; }
body #cart-widget .cart-free-shipping {
  flex: 0 0 auto;
  height: auto !important;
  margin: 12px 0 0;
  padding: 0 !important;
  border: 1px solid #cfe3ed !important;
  border-radius: 14px;
  background: rgba(255,255,255,.65) !important;
  color: #31596b;
}
body #cart-widget .cart-free-shipping > div {
  padding: 12px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}
body #cart-widget .cart-free-shipping strong { color: var(--tm-cart-ink); }
body #cart-widget .cart-widget-button {
  position: relative;
  inset: auto;
  padding: 12px 0 0 !important;
}
body #cart-widget .cart-widget-button .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  height: auto !important;
  padding: 14px 10px;
  border: 1px solid #168000 !important;
  border-radius: 999px !important;
  background: #168000 !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  white-space: normal;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 12px rgba(22,128,0,.13);
}
body #cart-widget .cart-widget-button .btn::before {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 0 !important;
  top: 0 !important;
  background-size: 22px;
}
body #cart-widget .cart-widget-button .btn:hover { background: #106b00 !important; border-color: #106b00 !important; }
body #cart-widget :is(a, button, input):focus-visible {
  outline: 2px solid #007ca8 !important;
  outline-offset: 2px;
}

/* Zachovat ukotveni a vysouvani sablony; pouze rezerva pro vyssi ovladace. */
@media (min-width: 769px) {
  body .sidebar .cart-sidebar-box.fixed .popup-widget-inner {
    max-height: calc(100vh - 242px) !important;
    max-height: calc(100dvh - 242px) !important;
  }
}
@media (max-width: 767px) {
  body #cart-widget { border-radius: 22px !important; }
  body #cart-widget .quantity :is(.increase, .decrease) {
    flex-basis: 44px;
    width: 44px !important;
    height: 44px !important;
  }
  body #cart-widget .quantity input[name="amount"] { height: 44px !important; line-height: 44px; }
  body #cart-widget .cart-widget-button .btn { min-height: 54px; font-size: 16px !important; }
}
