/* Product card - core/includes/_product_card.html
   One card for every listing page: image with the offer flash, stock pill and
   wishlist heart on it; brand pill, name, price, saving and the button
   below. */

.kk-card {
  --kk-card-blue: #0b4fb3;
  --kk-card-navy: #0f1f3d;
  --kk-card-ink: #64748b;
  --kk-card-line: #e3e9f2;
  position: relative;
  display: flex;
  flex-direction: column;
  /* The grid column is itself a flex box, so without this a card with a short
     name shrinks to its content and the gap beside it looks wider. */
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--kk-card-line);
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(15, 31, 61, .06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

/* The site uppercases text globally; card copy reads as written. */
.kk-card, .kk-card * { text-transform: none !important; letter-spacing: normal; }

.kk-card:hover {
  transform: translateY(-3px);
  border-color: #b9cdef;
  box-shadow: 0 14px 34px rgba(11, 79, 179, .12);
}

/* ---- Image ---- */

/* Above the stretched link (see "The whole card is the link" below), so the
   photograph gets its own hover - the photos step on - and its own link. */
.kk-card-media {
  position: relative;
  z-index: 2;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f4f8;
}

.kk-card-img-link { display: block; width: 100%; height: 100%; }

.kk-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.kk-card:hover .kk-card-img { transform: scale(1.05); }

.kk-card-off,
.kk-card-stock {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
}

.kk-card-off { left: 10px; background: #f0243d; color: #fff; }
.kk-card-off i { font-size: 14px; }

.kk-card-stock { right: 10px; background: #e3f8e9; color: #0f6b30; border-radius: 999px; }
.kk-card-dot { width: 10px; height: 10px; border-radius: 50%; background: #16a34a; }
.kk-card-stock.is-out { background: #fde8e8; color: #b42318; }
.kk-card-stock.is-out .kk-card-dot { background: #dc2626; }

.kk-card-wish {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--kk-card-navy);
  font-size: 21px;
  box-shadow: 0 4px 14px rgba(15, 31, 61, .14);
  cursor: pointer;
  transition: transform .18s ease, color .18s ease;
}

.kk-card-wish:hover { transform: scale(1.08); color: #e11d48; }

/* One dot a photo, along the bottom of the photograph, while it is hovered
   and the product has more than one. product-card.js adds them. */
.kk-card-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(15, 31, 61, .35);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.kk-card-media.is-cycling .kk-card-dots { opacity: 1; }
.kk-card-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: background .18s ease, transform .18s ease; }
.kk-card-dots span.is-on { background: #fff; transform: scale(1.25); }
.kk-card-wish .kk-wish-on { display: none; }
.kk-card-wish.is-on { color: #e11d48; }
.kk-card-wish.is-on .kk-wish-on { display: inline; }
.kk-card-wish.is-on .kk-wish-off { display: none; }
.kk-card-wish[disabled] { opacity: .6; cursor: progress; }

/* ---- Body ---- */

.kk-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  padding: 14px 4px 2px;
}

.kk-card-brand {
  display: inline-block;
  max-width: 100%;
  padding: 4px 12px;
  border-radius: 8px;
  background: #e8f0fc;
  color: var(--kk-card-navy);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kk-card-title {
  margin: 10px 0 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kk-card-title a { color: var(--kk-card-navy); text-decoration: none; }

/* The whole card is the link: the name's link is stretched over the card, so
   a click anywhere on it opens the product. The photograph, the heart and the
   button sit above it and keep their own clicks. */
.kk-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.kk-card:hover .kk-card-title a { color: var(--kk-card-blue); }
.kk-card-title a:hover { color: var(--kk-card-blue); }

.kk-card-sub { margin: 0 0 8px; font-size: 14px; color: var(--kk-card-ink); }

.kk-card-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 2px 0 8px;
}

.kk-card-now { font-size: 27px; font-weight: 800; color: var(--kk-card-blue); line-height: 1.15; }
.kk-card-unit { font-size: 15px; color: var(--kk-card-ink); font-weight: 500; }
.kk-card-mrp { font-size: 15px; color: #94a3b8; margin-left: 6px; }
.kk-card-ask { font-size: 17px; font-weight: 700; color: var(--kk-card-navy); }

.kk-card-save {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #e5f7ea;
  color: #11703a;
  font-size: 13.5px;
  font-weight: 700;
}

.kk-card-save small { font-size: 13px; font-weight: 500; }

.kk-card-btn {
  position: relative;
  z-index: 2;
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--kk-card-blue);
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease;
}

.kk-card-btn i { font-size: 19px; }
.kk-card-btn:hover { background: #083c8a; }

/* ---- Dark mode ---- */

.dark-mode .kk-card { background: #111827; border-color: #1f2a3c; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); }
.dark-mode .kk-card:hover { border-color: #2b4a7a; }
.dark-mode .kk-card-media { background: #1e293b; }
.dark-mode .kk-card-brand { background: #1c2d4a; color: #cfe0ff; }
.dark-mode .kk-card-title a,
.dark-mode .kk-card-ask { color: #f1f5f9; }
.dark-mode .kk-card-sub,
.dark-mode .kk-card-unit { color: #94a3b8; }
.dark-mode .kk-card-now { color: #60a5fa; }
.dark-mode .kk-card-save { background: #0f3320; color: #6ee7a0; }
.dark-mode .kk-card-wish { background: #1e293b; color: #e2e8f0; }
.dark-mode .kk-card-btn { background: #2563eb; }

/* ---- Two cards to a row on a phone ---- */

@media (max-width: 575px) {
  .kk-card { padding: 8px; border-radius: 14px; }
  .kk-card-media { border-radius: 10px; }
  .kk-card-off, .kk-card-stock { top: 6px; padding: 3px 7px; font-size: 10.5px; gap: 4px; }
  .kk-card-off { left: 6px; }
  .kk-card-stock { right: 6px; }
  .kk-card-dot { width: 7px; height: 7px; }
  .kk-card-wish { width: 32px; height: 32px; right: 6px; bottom: 6px; font-size: 16px; }
  .kk-card-body { padding: 10px 2px 0; }
  .kk-card-brand { font-size: 11px; padding: 3px 8px; }
  .kk-card-title { font-size: 14px; margin-top: 8px; }
  .kk-card-sub { font-size: 12px; }
  .kk-card-now { font-size: 19px; }
  .kk-card-unit, .kk-card-mrp { font-size: 12px; }
  .kk-card-mrp { margin-left: 0; }
  /* Each piece wraps whole: "You save ₹0.25" on one line, the percentage
     under it if there is no room - not "(5%" and "OFF)" on two. */
  .kk-card-save { font-size: 11px; padding: 4px 8px; gap: 0 4px; flex-wrap: wrap; white-space: nowrap; }
  .kk-card-save small { font-size: 10.5px; }
  .kk-card-btn { font-size: 13px; padding: 10px 8px; gap: 6px; border-radius: 10px; }
  .kk-card-btn i { font-size: 15px; }
  .kk-card-btn .ri-shopping-cart-2-line { display: none; }
}

/* ==========================================================================
   Compact card - the same small card as New Arrivals on the home page:
   padded tile with a short photo, a quiet grey brand line, small round
   wishlist heart top-right, stock pill bottom-left, slim button.
   ========================================================================== */
.kk-card {
  padding: 8px;
  border-radius: 14px;
  border-color: #e8ecf3;
  box-shadow: 0 1px 6px rgba(15, 31, 61, .05);
}
.kk-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(24, 72, 144, .12); border-color: #b9cdef; }

.kk-card-media { aspect-ratio: auto; height: 150px; border-radius: 10px; background: #f3f5f9; }

.kk-card-off, .kk-card-stock {
  padding: 2.5px 8px; font-size: 10px; gap: 5px; border-radius: 999px;
}
.kk-card-off { top: 7px; left: 7px; }
.kk-card-off i { font-size: 11px; }
.kk-card-stock { top: auto; right: auto; left: 7px; bottom: 7px; }
.kk-card-dot { width: 7px; height: 7px; }

.kk-card-wish { top: 7px; right: 7px; bottom: auto; width: 28px; height: 28px; font-size: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.kk-card-dots { bottom: 7px; }

.kk-card-body { padding: 9px 2px 2px; }
.kk-card-brand {
  padding: 0; background: transparent; border-radius: 0; font-size: 9.5px; font-weight: 700;
  letter-spacing: .6px; color: #64748b; text-transform: uppercase !important;
}
.kk-card-title { margin: 3px 0 2px; font-size: 13px; font-weight: 700; line-height: 1.3; }
.kk-card-sub { margin: 0 0 6px; font-size: 11.5px; }
.kk-card-price { margin: 2px 0 7px; gap: 2px 5px; }
.kk-card-now { font-size: 16px; }
.kk-card-unit { font-size: 11px; }
.kk-card-mrp { font-size: 11.5px; margin-left: 0; }
.kk-card-ask { font-size: 13px; }
.kk-card-save { margin-bottom: 8px; padding: 3px 8px; font-size: 10.5px; border-radius: 6px; }
.kk-card-save small { font-size: 10px; }
.kk-card-btn { padding: 0 12px; height: 34px; border-radius: 10px; font-size: 11.5px; gap: 6px; text-transform: uppercase !important; letter-spacing: .4px; }
.kk-card-btn i { font-size: 14px; }

.dark-mode .kk-card-media { background: #0f172a; }
.dark-mode .kk-card-brand { background: transparent; color: #94a3b8; }

@media (max-width: 575px) {
  .kk-card-media { height: 124px; }
  .kk-card-title { font-size: 12.5px; }
  .kk-card-now { font-size: 15px; }
  .kk-card-btn { font-size: 11px; height: 32px; }
}

/* The button is one line on every card. On a narrow phone (two cards across
   a 320-400px screen, ~140px each) the cart icon, "VIEW DETAILS" in spaced
   capitals and the arrow did not fit: the words wrapped, and the fixed-height
   button let the second line spill out of it. */
.kk-card-btn { white-space: nowrap; line-height: 1; }
.kk-card-save { line-height: 1.35; }
@media (max-width: 400px) {
  /* .kk-grid: the category page sizes its buttons with that selector too. */
  .kk-card-btn, .kk-grid .kk-card-btn { padding: 0 8px; gap: 4px; letter-spacing: .2px; font-size: 10.5px; }
  .kk-card-btn .ri-shopping-cart-2-line { display: none; }
  .kk-card-btn i { font-size: 13px; }
}
@media (max-width: 340px) {
  /* The very narrowest phones: the arrow goes too, the words stay whole. */
  .kk-card-btn .ri-arrow-right-line { display: none; }
}
