/* =========================================================
   SOHOGLAM — KARTA PRODUKTU (v1.5.0)
   Jeden wygląd dla sklepu, kategorii, wyszukiwarki, marek,
   strony głównej, produktów powiązanych i koszyka.
   ========================================================= */

.sg-card-grid {
  --sg-card-text: #292525;
  --sg-card-muted: #8c8580;
  --sg-card-soft: #f7f6f4;
  --sg-card-rose: #9f5863;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 38px 18px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.sg-card-grid::before,
.sg-card-grid::after {
  display: none !important;
}

.sg-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  text-align: left;
}

.sg-card::marker {
  content: "";
}

/* MEDIA */

.sg-card__media {
  position: relative;
  aspect-ratio: 1 / 1.12;
  margin-bottom: 15px;
  overflow: hidden;
  background: var(--sg-card-soft);
}

.sg-card__image-link {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-decoration: none !important;
}

.sg-card__image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .55);
  opacity: 0;
  transition: opacity .18s ease;
}

.sg-card__image-link img,
.sg-card__image {
  width: auto !important;
  height: auto !important;
  max-width: 88% !important;
  max-height: 100% !important;
  display: block;
  margin: 0 auto !important;
  object-fit: contain;
  background: transparent !important;
  mix-blend-mode: multiply;
  transition: transform .25s ease;
}

.sg-card__image--placeholder {
  max-width: 46% !important;
  opacity: .5;
}

.sg-card__cta {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  min-width: 126px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: #191919;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity .18s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .sg-card:hover .sg-card__image-link::after,
  .sg-card:hover .sg-card__cta {
    opacity: 1;
  }

  .sg-card:hover .sg-card__image-link img {
    transform: scale(1.03);
  }
}

@media (hover: none) {
  .sg-card__cta,
  .sg-card__image-link::after {
    display: none;
  }
}

/* BADGE */

.sg-card__badge {
  position: absolute;
  z-index: 3;
  top: 11px;
  left: 11px;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 100px;
  background: #191919;
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
}

.sg-card__badge--muted {
  background: #fff;
  border: 1px solid #ddd6d2;
  color: #6f6763;
}

/* WISHLIST (YITH) */

.sg-card__wishlist {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
}

.sg-card__wishlist .yith-add-to-wishlist-button-block,
.sg-card__wishlist .yith-wcwl-add-to-wishlist {
  margin: 0 !important;
}

.sg-card__wishlist a,
.sg-card__wishlist button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e2ddda !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 4px 14px rgba(25, 25, 25, .05);
  color: #8f676a !important;
  cursor: pointer;
  font-size: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;
  transition: transform .18s ease, border-color .18s ease;
}

.sg-card__wishlist a:hover,
.sg-card__wishlist button:hover {
  transform: translateY(-1px);
  border-color: #d2c8c3 !important;
}

.sg-card__wishlist svg {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  color: #8f676a;
}

.sg-card__wishlist [class*="--added"] svg,
.sg-card__wishlist .yith-wcwl-add-to-wishlist-button--added svg,
.sg-card__wishlist .exists svg {
  fill: currentColor;
}

.sg-card__wishlist .yith-wcwl-add-to-wishlist-button__label,
.sg-card__wishlist .feedback,
.sg-card__wishlist .separator,
.sg-card__wishlist br {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* TREŚĆ */

.sg-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.sg-card__brand {
  margin-bottom: 5px;
  color: var(--sg-card-muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sg-card__title {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  color: var(--sg-card-text);
  font-size: 12px !important;
  font-weight: 550 !important;
  line-height: 1.4 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sg-card__title a {
  color: inherit !important;
  text-decoration: none !important;
}

.sg-card__title a:hover {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.sg-card__title a:focus-visible {
  outline: 2px solid #191919;
  outline-offset: 2px;
}

.sg-card__price {
  margin-top: 8px;
  color: var(--sg-card-text);
  font-size: 13px;
  font-weight: 650;
}

.sg-card__price del {
  margin-right: 5px;
  color: #a49c97;
  font-size: 11px;
  font-weight: 500;
  opacity: 1;
}

.sg-card__price ins {
  color: var(--sg-card-rose);
  text-decoration: none;
}

/* PRZYCISK */

.sg-card__actions {
  margin-top: 14px;
}

.sg-card__actions .button,
.sg-card__button {
  width: 100% !important;
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid #191919 !important;
  border-radius: 100px !important;
  background: #191919 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 10px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  text-align: center;
  text-decoration: none !important;
  transition: background .18s ease, border-color .18s ease;
}

.sg-card__actions .button::after,
.sg-card__actions .button::before {
  display: none !important;
}

.sg-card__actions .button:hover {
  background: #3a3634 !important;
  border-color: #3a3634 !important;
}

.sg-card__actions .button.loading {
  opacity: .6;
}

.sg-card__actions .button.added {
  background: #fff !important;
  color: #191919 !important;
}

.sg-card__button--ghost {
  background: transparent !important;
  color: #191919 !important;
}

.sg-card__button--ghost:hover {
  color: #fff !important;
}

.sg-card__actions .added_to_cart {
  display: block;
  margin-top: 8px;
  color: var(--sg-card-rose);
  font-size: 10px;
  font-weight: 650;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sg-card.is-out-of-stock .sg-card__image-link img {
  opacity: .55;
}

/* SIATKI W KONTEKSTACH */

.sg-shop-results-area .sg-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .sg-card-grid,
  .sg-shop-results-area .sg-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sg-card-grid--home {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sg-card-grid,
  .sg-card-grid--home,
  .sg-shop-results-area .sg-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 12px;
  }
}

@media (max-width: 650px) {
  .sg-card__media {
    margin-bottom: 11px;
  }

  .sg-card__image-link {
    padding: 14px;
  }

  .sg-card__title {
    font-size: 11px !important;
  }

  .sg-card__price {
    font-size: 12px;
  }

  .sg-card__actions .button,
  .sg-card__button {
    min-height: 40px !important;
    font-size: 9.5px !important;
  }

  .sg-card__wishlist a,
  .sg-card__wishlist button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
  }
}
