/* One product card design for home tabs, catalog items, and recommendations.
* Page files own the grid or carousel; this file owns the card and its content.
*/
.eshop-product-card {
  --product-card-hover-bg: #FAF8FC;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--eshop-border);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(41, 34, 52, .035);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  cursor: pointer;
}

.eshop-product-card:is(:hover, :focus-within) {
  border-color: var(--eshop-main-color-hover);
  background: var(--product-card-hover-bg);
  box-shadow: var(--eshop-shadow);
}

@media (hover: hover) and (pointer: fine) {
  .eshop-product-card:hover { transform: translateY(-3px); }
}

.eshop-product-card:focus-within {
  outline: 2px solid var(--eshop-main-color);
  outline-offset: -2px;
}

.eshop-product-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  aspect-ratio: 1;
  padding: 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--eshop-border);
  background: linear-gradient(180deg, #fff 65%, #faf8fc);
  transition: background-color .2s ease;
}

.eshop-product-card:is(:hover, :focus-within) .eshop-product-card-image {
  background: var(--product-card-hover-bg);
}

/* The title link covers the card; the action remains an independent native link. */
.eshop-product-card-title .stretched-link::after {
  z-index: 1;
}

.eshop-product-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
  transition: transform .25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .eshop-product-card:hover .eshop-product-card-image img {
    transform: scale(1.035);
  }
}

.eshop-product-card-body {
  color: var(--eshop-ink);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 20px;
  text-align: left;
}

.eshop-product-card .eshop-product-card-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
  min-height: 0;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.eshop-product-card-title a {
  display: block;
  color: var(--eshop-ink);
}

.eshop-product-card-title a:hover {
  color: var(--eshop-ink);
}

.eshop-product-card-code {
  font-size: 11px;
  line-height: 1.5;
  color: var(--eshop-muted, #716a7b);
  letter-spacing: .05em;
  margin: 0 0 16px;
}

.eshop-product-card-price {
  margin-top: auto;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}

.eshop-product-card-current {
  display: block;
  color: var(--eshop-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.eshop-product-card-price .eshop-product-card-comparison {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 8px 0 0;
  line-height: 1.5;
  font-size: 12px;
}

.eshop-product-card-comparison del {
  color: var(--eshop-muted, #716a7b);
}

.eshop-product-card-saving {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--eshop-main-color-light);
  color: var(--eshop-ink, #292234);
  font-size: 11px;
  font-weight: 700;
}

.eshop-product-card-price-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--eshop-ink);
}

.eshop-product-card .eshop-product-card-price-label {
  color: var(--eshop-muted, #716a7b);
  text-transform: uppercase;
  letter-spacing: .045em;
}

.eshop-product-card-member-price {
  margin-bottom: 12px;
}

/* Catalog price comparisons remain visible to public shoppers. */
.eshop-product-card-retail-price:not(.eshop-product-card-primary-retail) {
  border-top: 1px solid var(--eshop-border);
  padding-top: 12px;
}

.eshop-product-card-retail-price:not(.eshop-product-card-primary-retail) .eshop-product-card-current {
  font-size: 14px;
  font-weight: 500;
  color: var(--eshop-ink);
}

.eshop-product-card .eshop-product-card-body,
.eshop-product-card :is(.eshop-product-card-title a, .eshop-product-card-current, .eshop-product-card-code, .eshop-product-card-comparison del, .eshop-product-card-price-label, .eshop-product-card-saving) {
  transition: color .2s ease;
}

.eshop-product-card:is(:hover, :focus-within) .eshop-product-card-body,
.eshop-product-card:is(:hover, :focus-within) :is(.eshop-product-card-title a, .eshop-product-card-current) {
  color: var(--eshop-ink);
}

.eshop-product-card .btn.btn-primary {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 11px 12px;
  font-size: 13px;
}


/* Shared carousel presentation; Owl owns item widths and margins. */
/* Leave room for the hover lift and shadow in home and recommendation carousels. */
@media (hover: hover) and (pointer: fine) {
  .eshop-product-carousel .owl-stage-outer {
    padding: 12px 0 24px;
    margin: -12px 0 -24px;
  }
}

.eshop-product-carousel .owl-stage {
  display: flex;
}

.eshop-product-carousel .owl-item {
  display: flex;
  flex: 0 0 auto;
  float: none;
  padding: 0;
}

.eshop-product-carousel .owl-nav {
  position: static;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.eshop-product-carousel .owl-nav.disabled {
  display: none;
}

.eshop-product-carousel .owl-nav :is(.owl-prev, .owl-next),
.eshop-home-hero :is(.carousel-control-prev, .carousel-control-next) {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--eshop-border);
  border-radius: 50%;
  background: #fff;
  color: var(--eshop-ink);
  font-size: 20px;
  transition: background-color .2s ease, border-color .2s ease;
}

.eshop-product-carousel .owl-nav :is(.owl-prev, .owl-next) {
  position: static;
  transform: none;
}

.eshop-home-hero :is(.carousel-control-prev, .carousel-control-next) {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  opacity: 1;
}

.eshop-home-hero .carousel-control-prev { left: 16px; }
.eshop-home-hero .carousel-control-next { right: 16px; }

.eshop-home-hero :is(.carousel-control-prev-icon, .carousel-control-next-icon) {
  width: auto;
  height: auto;
  background-image: none;
  filter: none;
}

.eshop-product-carousel .owl-nav :is(.owl-prev, .owl-next):hover,
.eshop-home-hero :is(.carousel-control-prev, .carousel-control-next):hover {
  color: var(--eshop-ink);
  background: var(--eshop-main-color-light);
  border-color: var(--eshop-main-color-hover);
}

.eshop-product-carousel .owl-nav .disabled {
  opacity: .4;
  cursor: default;
}

@media (max-width: 575px) {
  .eshop-product-card {
    border-radius: 12px;
  }
  .eshop-product-card-image {
    padding: 12px;
  }
  .eshop-product-card-body {
    padding: 14px 12px;
  }
  .eshop-product-card .eshop-product-card-title {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .eshop-product-card-current {
    font-size: 19px;
  }
  .eshop-product-card-price {
    margin-bottom: 16px;
  }
  .eshop-product-card .btn.btn-primary {
    padding: 10px 6px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eshop-product-card:hover { transform: none; }
  .eshop-product-card,
  .eshop-product-card-image img,
  .eshop-product-card .eshop-product-card-body,
  .eshop-product-card :is(.eshop-product-card-title a, .eshop-product-card-current, .eshop-product-card-code, .eshop-product-card-comparison del, .eshop-product-card-price-label, .eshop-product-card-saving) {
    transition: none;
  }
  .eshop-product-card:hover .eshop-product-card-image img {
    transform: none;
  }
}
