/* ===== MODERNÍ PRODUKTOVÉ KARTY ===== */

.product .p {
  --card-accent: #66308b;
  --card-accent-hover: #50236f;
  --card-text: #202026;
  --card-muted: #85838c;

  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid #eeedf1;
  border-radius: 24px;
  box-shadow: 0 4px 18px rgb(30 20 45 / 3%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

/* Fotografie */

.product .p > .image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 16px;
  overflow: hidden;
  border-radius: 17px;
  background: #f7f7f8;
  box-sizing: border-box;
}

.product .p > .image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.4s ease;
}

/* Obsah karty */

.product .p .p-in {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  padding: 0 6px 6px;
  box-sizing: border-box;
}

.product .p .p-in-in {
  margin: 0;
  padding: 0;
}

/* Hodnocení */

.product .p .stars-wrapper {
  min-height: 18px;
  margin: 0 0 10px;
  line-height: 1;
}

.product .p .stars {
  display: inline-flex;
  gap: 3px;
}

.product .p .star {
  margin: 0;
  color: #f5ad18;
}

/* Název a varianta */

.product .p a.name {
  display: block;
  height: auto;
  min-height: 55px;
  margin: 0 0 14px;
  overflow: visible;
  color: var(--card-text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}

.product .p a.name:hover {
  color: var(--card-accent);
}

.product .p .product-appendix {
  display: block;
  margin-top: 5px;
  color: var(--card-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

/* Dostupnost */

.product .p .ratings-wrapper {
  margin: 0 0 18px;
  padding: 0;
}

.product .p .availability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.product .p .availability .availability-amount {
  margin-left: 0;
  color: var(--card-muted);
  font-size: inherit;
  font-weight: inherit;
}

/* Tyrkysová tečka pouze u skladových produktů */

.product .p:has(
  [data-micro-availability="https://schema.org/InStock"]
) .availability::before {
  content: "";
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border-radius: 50%;
  background: #409f90;
}

.product .p:has(
  [data-micro-availability="https://schema.org/InStock"]
) .availability > span {
  color: #363636 !important;
}

/* Cena a nákup */

.product .p .p-bottom {
  margin-top: auto;
  padding: 0;
}

.product .p .p-bottom > [data-micro="offer"] {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.product .p .prices {
  margin: 0 0 16px;
  padding: 0;
}

.product .p .price-final {
  color: var(--card-text);
  font-size: 23px;
  line-height: 1.2;
}

.product .p .price-final strong {
  font-weight: 700;
  letter-spacing: -0.6px;
}

.product .p .p-tools {
  width: 100%;
  margin: 0;
  padding: 0;
}

.product .p .p-tools form.pr-action {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin: 0;
}

/* Množství */

.product .p .p-tools .quantity {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  flex: 0 0 100px;
  align-items: center;
  width: 100px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 1px solid #ecebf0;
  border-radius: 14px;
  background: #f7f7f9;
  box-sizing: border-box;
}

.product .p .quantity label {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0;
}

.product .p .quantity input.amount {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--card-text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.product .p .quantity input.amount::-webkit-inner-spin-button,
.product .p .quantity input.amount::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.product .p .quantity .increase,
.product .p .quantity .decrease {
  position: static;
  display: flex;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--card-text);
  font-size: 16px;
  line-height: 1;
  transform: none;
  cursor: pointer;
}

.product .p .quantity .decrease {
  grid-column: 1;
}

.product .p .quantity .increase {
  grid-column: 3;
}

/* Skrytí původních znamének */

.product .p .quantity .decrease__sign,
.product .p .quantity .increase__sign {
  display: none;
  font-size: 16px;
}

/* Náhradní znaménka */

.product .p .quantity .decrease::before,
.product .p .quantity .increase::before {
  display: block;
  position: static;
  width: auto;
  height: auto;
  background: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  transform: none;
}

.product .p .quantity .decrease::before {
  content: "−";
}

.product .p .quantity .increase::before {
  content: "+";
}

.product .p .quantity .decrease::after,
.product .p .quantity .increase::after {
  content: none;
}

.product .p .quantity button:hover {
  color: var(--card-accent);
}

/* Tlačítko */

.product .p .p-tools .btn {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--card-accent);
  border-radius: 14px;
  background: var(--card-accent);
  box-shadow: none;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.product .p .p-tools .btn:hover {
  border-color: var(--card-accent-hover);
  background: var(--card-accent-hover);
  color: #fff;
}

/* Skrytí dlouhého popisu a kódu */

.product .p .p-desc,
.product .p > .p-code {
  display: none;
}

/* Ovládání klávesnicí */

.product .p a:focus-visible,
.product .p button:focus-visible,
.product .p input:focus-visible {
  outline: 2px solid var(--card-accent);
  outline-offset: 3px;
}

/* Hover na zařízeních s myší */

@media (hover: hover) {
  .product .p:hover {
    border-color: #d9cbe5;
    box-shadow: 0 10px 28px rgb(54 30 76 / 8%);
  }

  .product .p:hover > .image img {
    transform: scale(1.045);
  }
}

/* Mobil */

@media (max-width: 575px) {
  .product .p {
    padding: 8px;
    border-radius: 18px;
  }

  .product .p > .image {
    padding: 10px;
    border-radius: 12px;
  }

  .product .p .p-in {
    padding: 0 3px 3px;
  }

  .product .p a.name {
    font-size: 14px;
  }

  .product .p .product-appendix {
    font-size: 11px;
  }

  .product .p .availability {
    font-size: 12px;
  }

  .product .p .price-final {
    font-size: 20px;
  }

  .product .p .p-tools form.pr-action {
    flex-wrap: wrap;
    gap: 8px;
  }

  .product .p .p-tools .quantity,
  .product .p .p-tools .btn {
    flex: 1 0 100%;
    width: 100%;
  }
}

/* Omezení animací podle nastavení uživatele */

@media (prefers-reduced-motion: reduce) {
  .product .p,
  .product .p > .image img,
  .product .p .p-tools .btn {
    transition: none;
  }

  .product .p:hover > .image img {
    transform: none;
  }
}





/* Obal obrázku – zrušit vynucený poměr stran */
div:is([class$="-description"], [class*="-description "])
div:is([class$="-image"], [class*="-image "]) {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

/* Obrázek – celý, bez ořezu a deformace */
div:is([class$="-description"], [class*="-description "])
div:is([class$="-image"], [class*="-image "]) > img {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  box-sizing: border-box !important;
}