/* Kampanyalı / indirimli ürün kartları — teşvik edici vitrin tasarımı */
.discount-product-card {
  --dc-red: #c31313;
  --dc-red-deep: #e11d48;
  --dc-red-soft: rgba(195, 19, 19, 0.1);
  --dc-orange: #f97316;
  --dc-save: #10b981;
  --dc-blue: #206bc4;
  border-radius: 14px;
  overflow: visible !important;
  background: linear-gradient(165deg, #fffafa 0%, #ffffff 42%, #fff 100%);
  border: 1px solid rgba(195, 19, 19, 0.14) !important;
  box-shadow: 0 2px 12px rgba(195, 19, 19, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  z-index: 1;
}

.discount-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(195, 19, 19, 0.16) !important;
  border-color: rgba(195, 19, 19, 0.32) !important;
}

.discount-product-card:focus-within {
  z-index: 2 !important;
}

.discount-product-card__media {
  position: relative;
  background: #fff;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  isolation: isolate;
}

.discount-product-card__img-link {
  position: relative;
  z-index: 1;
}

/* İki satırlı indirim rozeti — opak zemin, resmin üstünde */
.discount-product-card__badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.15rem;
  padding: 0.42rem 0.58rem;
  border-radius: 12px;
  background-color: #c31313 !important;
  background-image: linear-gradient(145deg, #c31313 0%, #e11d48 52%, #f97316 100%) !important;
  color: #fff !important;
  opacity: 1 !important;
  border: 2px solid #fff;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(195, 19, 19, 0.45);
  line-height: 1.05;
  pointer-events: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.discount-product-card__badge-pct {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.discount-product-card__badge-lbl {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.discount-product-card__campaign {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--dc-red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discount-product-card__campaign .ti {
  font-size: 0.85rem;
  vertical-align: -1px;
  color: var(--dc-orange);
}

.discount-product-card__title {
  font-size: 0.85rem;
  height: 2.4rem;
  overflow: hidden;
  font-weight: 500;
  margin: 0;
  line-height: 1.35;
}

/* Fiyat bloğu — dikkat çekici arka plan */
.discount-product-card__price-wrap {
  position: relative;
  overflow: visible;
  margin-bottom: 0.5rem;
}

.discount-product-card__price-block {
  background: linear-gradient(90deg, var(--dc-red-soft) 0%, rgba(249, 115, 22, 0.08) 100%);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(195, 19, 19, 0.14);
}

.discount-product-card__price-content {
  min-width: 0;
}

.discount-product-card__old {
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 600;
  line-height: 1.2;
}

.discount-product-card__old small {
  font-size: 0.68rem;
}

.discount-product-card__new {
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--dc-red);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.discount-product-card__new small {
  font-size: 0.75rem;
  font-weight: 700;
}

.discount-product-card__new--solo {
  font-size: 1.25rem;
  color: var(--dc-blue);
}

.discount-product-card__save {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: var(--dc-save);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.3;
}

.discount-product-card__save .ti {
  font-size: 0.85rem;
}

.discount-product-card .actions-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

/* Masaüstü: + butonu fiyat kutusunun sağ üst köşesinde (içerik alanını daraltmaz) */
@media (min-width: 768px) {
  .discount-product-card .card-body,
  .discount-product-card__price-wrap {
    overflow: visible;
  }

  .discount-product-card__price-wrap > .actions-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(42%, -42%);
    width: 40px;
    height: 40px;
    z-index: 5;
  }

  .discount-product-card .btn-init-trigger {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px;
    padding: 0 !important;
    border: 2px solid #fff !important;
    box-shadow: 0 4px 14px rgba(32, 107, 196, 0.32);
  }

  .discount-product-card .btn-init-trigger .ti {
    font-size: 1.35rem !important;
  }
}

.catalog-discount-hero {
  background: linear-gradient(135deg, #c31313 0%, #e11d48 50%, #f97316 100%);
  border-radius: 16px;
  color: #fff;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 28px rgba(195, 19, 19, 0.2);
}

.catalog-discount-hero h2 {
  letter-spacing: -0.02em;
}

/* —— Mobil: kompakt vitrin kartı (masaüstüne dokunulmaz) —— */
@media (max-width: 767.98px) {
  .discount-product-card {
    height: auto !important;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    border-color: rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  }

  .discount-product-card:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(226, 232, 240, 0.95) !important;
  }

  .discount-product-card__media {
    position: relative;
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    max-height: none;
    padding: 0.35rem !important;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .discount-product-card__img-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }

  .discount-product-card__media img,
  .discount-product-card__media picture {
    width: 100%;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  .discount-product-card__badge {
    top: 0.35rem;
    left: 0.35rem;
    flex-direction: row;
    align-items: center;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    border-width: 1.5px;
    box-shadow: 0 2px 8px rgba(195, 19, 19, 0.28);
  }

  .discount-product-card__badge-pct {
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
  }

  .discount-product-card__badge-lbl {
    font-size: 0.48rem;
    letter-spacing: 0.04em;
    line-height: 1;
  }

  .discount-product-card__media .product-card-new-badge--right {
    top: 0.35rem;
    right: 0.35rem;
    padding: 0.16rem 0.36rem;
    font-size: 0.5rem;
    gap: 0.1rem;
  }

  .discount-product-card__media .product-card-new-badge .ti {
    font-size: 0.55rem;
  }

  .discount-product-card .card-body {
    flex: 0 0 auto;
    padding: 0.45rem 0.5rem 0.5rem !important;
  }

  .discount-product-card__campaign {
    display: none;
  }

  .discount-product-card__title {
    font-size: 0.72rem;
    font-weight: 600;
    height: auto;
    max-height: 2.35em;
    margin-bottom: 0 !important;
    line-height: 1.18;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .discount-product-card .card-body > .mt-auto {
    margin-top: 0.35rem !important;
  }

  .discount-product-card__price-wrap {
    position: relative;
    overflow: visible;
    margin-bottom: 0;
  }

  .discount-product-card__price-block {
    background: linear-gradient(95deg, var(--dc-red-soft) 0%, rgba(249, 115, 22, 0.07) 100%);
    border: 1px solid rgba(195, 19, 19, 0.12);
    border-radius: 8px;
    padding: 0.38rem 0.48rem;
  }

  .discount-product-card__price-content {
    min-width: 0;
  }

  .discount-product-card__price-wrap > .actions-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(38%, -38%);
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    flex-shrink: 0;
    z-index: 5;
  }

  .discount-product-card .btn-init-trigger {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    flex-shrink: 0;
    border: 2px solid #fff !important;
    box-shadow: 0 3px 10px rgba(32, 107, 196, 0.28);
    box-sizing: border-box;
  }

  .discount-product-card .btn-init-trigger .ti {
    font-size: 1.05rem !important;
    line-height: 1 !important;
    display: block;
    margin: 0;
  }

  .discount-product-card__old {
    font-size: 0.58rem;
    line-height: 1.1;
    margin-bottom: 0.04rem;
  }

  .discount-product-card__old small {
    font-size: 0.52rem;
  }

  .discount-product-card__new {
    font-size: 0.94rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
  }

  .discount-product-card__new small {
    font-size: 0.56rem;
  }

  .discount-product-card__new--solo {
    font-size: 0.94rem;
  }

  .discount-product-card__save {
    display: none;
  }

  /* Izgara: kartlar satır yüksekliğine gerilmesin */
  .row-cols-2 > .col:has(.discount-product-card),
  .row-cols-2 > .col > .discount-product-card {
    align-self: flex-start;
  }

  .row-cols-2 > .col:has(.discount-product-card) {
    display: flex;
  }

  .row-cols-2 > .col:has(.discount-product-card) > .discount-product-card {
    width: 100%;
  }

  /* İndirimli ürün ızgarası — sayfa kenarından nefes payı */
  .row.row-cols-2:has(.discount-product-card) {
    --bs-gutter-x: 0.5rem;
    margin-left: 0.15rem;
    margin-right: 0.15rem;
  }
}

@media (max-width: 380px) {
  .discount-product-card__badge-lbl {
    display: none;
  }

  .discount-product-card__title {
    font-size: 0.68rem;
    max-height: 2.3em;
  }

  .discount-product-card__new {
    font-size: 0.88rem;
  }

  .discount-product-card .btn-init-trigger {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
  }

  .discount-product-card__price-wrap > .actions-wrapper {
    width: 30px;
    height: 30px;
    min-width: 30px;
    max-width: 30px;
    transform: translate(36%, -36%);
  }
}
