/*** Keranad product cards (coloured media panel, spec chips, corner CTA) ***/

/* Carousel: neighbours shrink (without fading), the centred card stays full size */
.kp-carousel .owl-stage-outer {
  padding: 30px 0 50px;
}

.kp-carousel .owl-stage {
  display: flex;
}

.kp-carousel .owl-item {
  display: flex;
}

/* Carousel spans wider than .auto-container so five cards fit in a line */
.kp-wide {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 20px;
}

.kp-slide {
  container-type: inline-size;
  width: 100%;
  transform: scale(0.86);
  transition: transform 600ms ease;
}

.kp-carousel .owl-item:not(.center) .kp-slide {
  cursor: pointer;
}

.kp-carousel .owl-item.center .kp-slide {
  transform: scale(1);
}

.kp-carousel .owl-nav,
.kp-carousel .owl-nav.disabled {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

.kp-carousel .owl-nav .owl-prev,
.kp-carousel .owl-nav .owl-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  background: #ffffff;
  color: var(--theme-color3);
  font-size: 14px;
  box-shadow: 0 10px 25px -10px rgba(22, 67, 51, 0.35);
  transition: background 200ms ease, color 200ms ease;
}

.kp-carousel .owl-nav .owl-prev:hover,
.kp-carousel .owl-nav .owl-next:hover {
  background: var(--theme-color1);
  color: #ffffff;
}

.kp-carousel .owl-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.kp-carousel .owl-dot span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: #d6d6d6;
  transition: all 300ms ease;
}

.kp-carousel .owl-dot.active span {
  width: 26px;
  background: var(--theme-color1);
}

.kp-card {
  --kp: var(--theme-color1);
  --kp-ink: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 25px 50px -20px rgba(22, 67, 51, 0.25);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.kp-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 35px 60px -20px rgba(22, 67, 51, 0.35);
}

/* Coloured top panel */
.kp-media {
  position: relative;
  height: 330px;
  background: var(--kp);
  border-bottom-left-radius: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 46px;
}

.kp-carousel .owl-item .kp-media img,
.kp-media img {
  height: 250px;
  width: auto;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.25));
  transition: transform 400ms ease;
}

.kp-card:hover .kp-media img {
  transform: translateY(-6px) rotate(-4deg);
}

.kp-tag {
  position: absolute;
  top: 30px;
  left: 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--kp-ink);
  opacity: 0.9;
}

/* White notch holding the cart icon */
.kp-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 78px;
  height: 78px;
  background: #ffffff;
  border-bottom-left-radius: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #1c1c1c;
}

.kp-corner:after {
  content: "";
  position: absolute;
  top: 24px;
  right: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kp);
}

.kp-corner:hover {
  color: var(--kp);
}

/* Body */
.kp-body {
  flex: 1;
  padding: 30px 28px 10px;
}

.kp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.kp-head h4 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 400;
}

.kp-head h4 strong {
  font-weight: 700;
}

.kp-head h4 a {
  color: #111111;
}

.kp-fav {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--kp);
  color: var(--kp-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 10px 20px -6px var(--kp);
  transition: transform 200ms ease;
}

.kp-fav:hover {
  color: var(--kp-ink);
  transform: scale(1.08);
}

/* Wishlist toggle */
button.kp-fav {
  padding: 0;
  border: 0;
  cursor: pointer;
}

.kp-fav.is-active i {
  animation: kp-heart-pop 450ms cubic-bezier(0.2, 0, 0, 1);
}

@keyframes kp-heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.kp-fav:focus-visible,
.kp-btn:focus-visible,
.kp-corner:focus-visible {
  outline: 3px solid var(--kp);
  outline-offset: 2px;
}

.kp-body p {
  font-size: 15px;
  line-height: 1.6;
  color: #9a9a9a;
  margin-bottom: 0;
}

/* Price + corner button */
.kp-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 26px;
}

.kp-price {
  padding: 0 0 22px 28px;
  font-size: 26px;
  font-weight: 700;
  color: #111111;
}

.kp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 22px 34px;
  background: var(--kp);
  color: var(--kp-ink);
  border-top-left-radius: 36px;
  font-weight: 600;
  transition: filter 200ms ease;
}

.kp-btn:hover {
  color: var(--kp-ink);
  filter: brightness(0.92);
}

.kp-btn.is-loading {
  pointer-events: none;
  filter: saturate(0.8);
}

.kp-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: kp-spin 700ms linear infinite;
}

@keyframes kp-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1199px) {
  .kp-head h4 {
    font-size: 21px;
  }
  .kp-btn {
    padding: 20px 26px;
  }
}

@media (max-width: 575px) {
  .kp-media {
    height: 300px;
  }
  .kp-media img {
    height: 225px;
  }
}

/* Compact card when it is narrow (five-up carousel) */
@container (max-width: 300px) {
  .kp-card {
    border-radius: 28px;
  }
  .kp-media {
    height: 250px;
    padding-bottom: 30px;
    border-bottom-left-radius: 36px;
  }
  .kp-carousel .owl-item .kp-media img,
  .kp-media img {
    height: 195px;
  }
  .kp-tag {
    top: 22px;
    left: 20px;
    font-size: 10px;
  }
  .kp-corner {
    width: 60px;
    height: 60px;
    border-bottom-left-radius: 28px;
    font-size: 16px;
  }
  .kp-corner:after {
    top: 18px;
    right: 16px;
    width: 6px;
    height: 6px;
  }
  .kp-body {
    padding: 22px 20px 6px;
  }
  .kp-head h4 {
    font-size: 18px;
  }
  .kp-fav {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }
  .kp-body p {
    font-size: 13px;
    margin-bottom: 0;
  }
  .kp-foot {
    margin-top: 18px;
  }
  .kp-price {
    padding: 0 0 16px 20px;
    font-size: 20px;
  }
  .kp-btn {
    padding: 16px 20px;
    border-top-left-radius: 28px;
    font-size: 14px;
  }
}

@container (max-width: 220px) {
  .kp-tag {
    display: none;
  }
}

/* "View all products" link under the home page carousel */
.kp-view-all {
  margin-top: 36px;
}

.kp-view-all i {
  transition: transform 300ms cubic-bezier(0.2, 0, 0, 1);
}

.kp-view-all:hover i {
  transform: translateX(4px);
}
