/* === UPSELL V DETAILU PRODUKTU === */

/* Odsazení sekce */
.up-product-wrapper.up-upsell-wrapper {
  margin: 24px 0 0;
}

/* Vnější obal */
.up-product-wrapper.up-upsell-wrapper .up-container.up-type-product_upsell {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Nadpis: písmo e-shopu a červený akcent */
.up-product-wrapper.up-upsell-wrapper .up-container .up-products-header {
  position: static;
  display: block;
  margin: 0 0 18px !important;
  padding: 2px 0 2px 12px !important;

  background: transparent !important;
  border: 0 !important;
  border-left: 3px solid var(--color-primary, #d73530) !important;
  border-radius: 3px !important;

  color: #222 !important;
  -webkit-text-fill-color: #222 !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  text-align: left;
  text-transform: none;
  text-shadow: none;
  opacity: 1;
}

.up-product-wrapper.up-upsell-wrapper .up-container .up-products-header * {
  background: transparent !important;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  text-shadow: none;
}

/* Seznam produktů */
.up-product-wrapper.up-upsell-wrapper .up-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Produktová karta */
.up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;

  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 16px;

  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: none;
    
  transition:
  border-color .18s ease,
  box-shadow .18s ease,
  transform .18s ease;
}

/* Jemné zvýraznění a nadzvednutí produktové karty */
@media (hover: hover) {
  .up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product:hover {
    border-color: #888;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
  }
}

/* Horní řádek a odstup fotografie od roletky.
   8px margin + 10px gap karty = 18px odstup. */
.up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product .up-product-information {
  position: static;
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  gap: 14px;

  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0 0 8px !important;
  padding: 0 !important;
}

/* Fotografie */
.up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product .up-image {
  position: static;
  display: block;
  flex: 0 0 72px;

  box-sizing: border-box;
  width: 72px;
  height: 72px;
  margin: 0;
  padding: 0;

  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 8px;
}

.up-product-wrapper.up-upsell-wrapper .up-image a {
  display: block;
}

.up-product-wrapper.up-upsell-wrapper .up-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 72px;
  margin: 0;
  object-fit: contain;
}

/* Informace o produktu */
.up-product-wrapper.up-upsell-wrapper .up-product-details {
  flex: 1;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* Název produktu */
.up-product-wrapper.up-upsell-wrapper .up-product-name {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.up-product-wrapper.up-upsell-wrapper .up-product-name a {
  color: #292929 !important;
  text-decoration: none !important;
}

.up-product-wrapper.up-upsell-wrapper .up-product-name a:hover {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* Ceny a sleva */
.up-product-wrapper.up-upsell-wrapper .up-price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
}

/* Aktuální cena */
.up-product-wrapper.up-upsell-wrapper .up-price .up-price-current {
  order: -1;
  display: inline-block;
  margin: 0;

  color: #191919 !important;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.up-product-wrapper.up-upsell-wrapper .up-price-current .up-price-value {
  color: inherit !important;
  font-size: inherit;
  font-weight: inherit;
}

/* Červená cena pouze při uvedené slevě nebo původní ceně */
.up-product-wrapper.up-upsell-wrapper .up-price:has(
  .up-price-common,
  .up-price-common-percentage
) .up-price-current,
.up-product-wrapper.up-upsell-wrapper .up-price:has(
  .up-price-common,
  .up-price-common-percentage
) .up-price-current .up-price-value {
  color: var(--color-primary, #d73530) !important;
  -webkit-text-fill-color: var(--color-primary, #d73530) !important;
}

/* Původní cena */
.up-product-wrapper.up-upsell-wrapper .up-price-common {
  color: #777;
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
}

/* Štítek slevy */
.up-product-wrapper.up-upsell-wrapper .up-price .up-price-common-percentage {
  order: 2;
  margin: 0;
  padding: 3px 6px;

  background: #f9eae8;
  border-radius: 5px;
  color: #a9362e;

  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

/* Kompaktní šířka výběru varianty */
.up-product-wrapper.up-upsell-wrapper .up-product-variants {
  flex: 0 1 200px;
  width: 200px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.up-product-wrapper.up-upsell-wrapper .up-product-variants:empty {
  display: none;
}

/* Nižší roletka s vlastní šipkou */
.up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product select.up-variants {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0 34px 0 12px;

  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23444444' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;

  border: 1px solid #dcdcdc;
  border-radius: 8px;
  box-shadow: none;

  color: #333;
  -webkit-text-fill-color: #333;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  text-align: left;
  color-scheme: light;
  cursor: pointer;
}

.up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product select.up-variants:not(:disabled):hover {
  border-color: #aaa;
}

.up-product-wrapper.up-upsell-wrapper select.up-variants:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* Umístění CTA vpravo */
.up-product-wrapper.up-upsell-wrapper .up-product.with-button :is(
  .up-product-add-to-cart,
  .up-product-remove-from-cart,
  .up-product-select-addon-button
) {
  position: static;
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 0 auto;
  padding: 0;
}

/* Zaoblené CTA podle stylu e-shopu */
.up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product.with-button :is(
  .up-product-add-to-cart,
  .up-product-remove-from-cart,
  .up-product-select-addon-button
) a {
  display: flex;
  justify-content: center;
  align-items: center;

  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 10px 22px;

  background: #fff;
  border: 1px solid var(--color-primary, #d73530);
  border-radius: 999px;
  box-shadow: none;

  color: var(--color-primary, #d73530);
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;

  transition:
    background-color .15s ease,
    border-color .15s ease,
    color .15s ease;
}

.up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product.with-button :is(
  .up-product-add-to-cart,
  .up-product-remove-from-cart,
  .up-product-select-addon-button
) a:hover {
  background: var(--color-primary-hover, #b92a26);
  border-color: var(--color-primary-hover, #b92a26);
  color: #fff;
}

/* Ovládání klávesnicí */
.up-product-wrapper.up-upsell-wrapper :is(a, select):focus-visible {
  outline: 2px solid #333;
  outline-offset: 3px;
}

/* Menší displeje */
@media (max-width: 380px) {
  .up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product {
    padding: 12px;
    column-gap: 10px;
  }

  .up-product-wrapper.up-upsell-wrapper .up-product-variants {
    flex-basis: 180px;
    width: 180px;
  }
}

/* Omezení animací */
@media (prefers-reduced-motion: reduce) {
  .up-product-wrapper.up-upsell-wrapper a,
  .up-product-wrapper.up-upsell-wrapper .up-product {
    transition: none !important;
  }

  .up-product-wrapper.up-upsell-wrapper .up-container .up-products .up-product:hover {
    transform: none;
  }
}