/* ==========================================================================
   MAĞAZA — Ürün kartı ve liste görünümü.
   ========================================================================== */

/* ===== Ürün kartı ======================================================= */
.k-product {
  position: relative;
  background: transparent;
  height: 100%;
  display: grid;
  grid-template-areas: "media" "body";
  grid-template-rows: auto 1fr;
}
.k-product-media {
  grid-area: media;
  position: relative; display: block; border-radius: var(--k-radius); overflow: hidden;
  background: var(--k-surface-2); aspect-ratio: 4 / 5;
}
.k-product-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity .45s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}
.k-product-media img.hover { position: absolute; inset: 0; opacity: 0; }
.k-product:hover .k-product-media img.hover { opacity: 1; }
.k-product:hover .k-product-media img.main { transform: scale(1.03); }

.k-product-badges { position: absolute; top: .6rem; left: .6rem; display: flex; flex-direction: column; gap: .35rem; z-index: 2; }
.k-product-fav {
  position: absolute; top: .6rem; right: .6rem; z-index: 2; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(255, 255, 255, .92); border: none; color: var(--k-ink);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  opacity: 0; transform: translateY(-4px); transition: all .22s ease;
}
.k-product:hover .k-product-fav { opacity: 1; transform: none; }
.k-product-fav.active { color: var(--k-sale); opacity: 1; transform: none; }
/* Karşılaştır düğmesi: favori düğmesinin görünümü; favori açıkken onun altında, seçiliyken koyu zeminli */
.k-product-compare--below { top: calc(.6rem + 40px); }
.k-product-compare.active { background: var(--k-ink); color: var(--k-surface); }

.k-product-quick {
  grid-area: media;
  align-self: end;
  z-index: 2;
  margin: 0 .6rem .6rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all .25s ease;
  pointer-events: none;
}
.k-product:hover .k-product-quick { opacity: 1; transform: none; pointer-events: auto; }
.k-product-quick .btn { width: 100%; background: #fff; border: 1px solid var(--k-line); color: var(--k-ink); }
.k-product-quick .btn:hover { background: var(--k-ink); color: #fff; border-color: var(--k-ink); }

.k-product-body { grid-area: body; padding: .85rem .1rem 0; display: flex; flex-direction: column; }
.k-product-cat { font-size: 11.5px; color: var(--k-muted); letter-spacing: .04em; text-transform: uppercase; }
.k-product-title { font-size: 14.5px; font-weight: 500; margin: .28rem 0 .35rem; line-height: 1.35; }
.k-product-title a:hover { color: var(--k-sale); }
.k-price { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-top: auto; padding-top: .35rem; }
.k-price .now { font-size: 15.5px; font-weight: 600; }
.k-price .was { font-size: 13px; color: var(--k-muted); text-decoration: line-through; }
/* Sepet çekmecesi ve sipariş özetlerinde indirimli satırın eski fiyatı */
.k-was { color: var(--k-muted); text-decoration: line-through; font-weight: 400; margin-right: .35rem; }
.k-price .off { font-size: 12px; font-weight: 600; color: var(--k-sale); }
.k-price .from { font-size: 12px; color: var(--k-muted); }

.k-swatches { display: flex; gap: 5px; margin-top: .5rem; }
.k-swatch-dot { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--k-line-2); }

/* Liste görünümü */
.k-list-view > .k-product-col {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
}
.k-list-view .k-product {
  grid-template-columns: 168px 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "media body"
    "media quick";
  column-gap: 1.25rem;
  row-gap: .75rem;
  align-items: start;
  background: #fff;
  border: 1px solid var(--k-line);
  border-radius: var(--k-radius);
  padding: 1rem;
  height: auto;
}
.k-list-view .k-product-media {
  width: 100%;
  aspect-ratio: auto;
  min-height: 210px;
}
.k-list-view .k-product-media > a {
  display: block;
  height: 100%;
  min-height: 210px;
}
.k-list-view .k-product-media img {
  height: 100%;
  min-height: 210px;
}
.k-list-view .k-product-body {
  padding: 0;
  min-width: 0;
  justify-content: flex-start;
}
.k-list-view .k-product-title { font-size: 15.5px; }
.k-list-view .k-product-fav { opacity: 1; transform: none; }
.k-list-view .k-product-quick {
  grid-area: quick;
  align-self: start;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  margin: 0;
  max-width: 260px;
}
.k-list-view .k-product-quick .btn { width: auto; min-width: 180px; }
.k-list-view .k-price { margin-top: .5rem; }

/* Duyarlılık */
@media (max-width: 767.98px) {
  .k-list-view .k-product {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "body" "quick";
  }
  .k-list-view .k-product-media { min-height: 0; aspect-ratio: 4 / 5; }
  .k-list-view .k-product-media > a,
  .k-list-view .k-product-media img { min-height: 0; height: 100%; }
  .k-list-view .k-product-quick { max-width: none; }
  .k-list-view .k-product-quick .btn { width: 100%; min-width: 0; }
}
