/* ===== OFFER CARD COMPONENT ===== */

.offer-card{
  width:100%;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* IMAGE */

.offer-image{
  position:relative;
  width:100%;
  aspect-ratio:4 / 3;
  background:#f3f4f6;
  overflow:hidden;
}

.offer-image img,
.offer-image video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.offer-cover-video{
  background:#111827;
}

.offer-video-badge{
  display:none !important;
}

/* AMOUNT BADGE */

.offer-amount-badge{
  position:absolute;
  top:8px;
  right:8px;
  z-index:3;
  background:rgba(0,0,0,0.75);
  color:#fff;
  font-size:13px;
  font-weight:800;
  padding:4px 8px;
  border-radius:999px;
  pointer-events:none;
  backdrop-filter:blur(4px);
}

/* BODY */

.offer-body{
  padding:12px;
  display:flex;
  flex-direction:column;
  flex:1;
}

/* TITLE */

.offer-title{
  font-size:14px;
  font-weight:700;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:76px;
  word-break:break-word;
  overflow-wrap:anywhere;
}

/* PRICE */

.offer-price{
  font-size:18px;
  font-weight:800;
  margin:6px 0;
}

/* SELLER */

.offer-seller{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:auto;
}

.offer-seller > div{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
}

.offer-seller--compact{
  align-items:center;
}

.offer-seller--compact .seller-card-meta{
  min-width:0;
  height:32px;
  min-height:32px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:0;
}

.offer-seller--compact .seller-name{
  display:flex;
  align-items:center;
  min-height:32px;
  line-height:1.2;
  padding:0;
  margin:0;
}

.offer-seller--compact .seller-rating,
.offer-seller--compact .seller-since{
  display:none !important;
}


/* AVATAR */

.seller-avatar{
  position:relative;
  width:32px;
  height:32px;
  border-radius:50%;
  background:#e5e7eb;
  flex-shrink:0;
}

.seller-avatar img{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
  display:block;
}

/* ONLINE DOT */

.seller-status{
  position:absolute;
  width:14px;
  height:14px;
  border-radius:50%;
  right:-3px;
  bottom:-3px;
  background:#22c55e;
  border:2px solid #fff;
  z-index:3;
}

/* SELLER TEXT */

.seller-name{
  font-size:13px;
  line-height:1.25;
  font-weight:600;
}

.seller-rating{
  font-size:12px;
  color:#6b7280;
  font-weight:400;
}

.rating-hidden{
  color:#6b7280;
  font-weight:600;
}

/* STARS */

.stars{
  display:inline-flex;
  gap:2px;
  font-size:14px;
  line-height:1;
}

.star{ color:#9ca3af; }
.star.filled{ color:currentColor; }

.stars.r5{ color:#facc15; }
.stars.r4{ color:#fbbf24; }
.stars.r3{ color:#f59e0b; }
.stars.r2{ color:#ef4444; }
.stars.r1{ color:#991b1b; }

/* HEART */

.offer-heart{
  position:absolute;
  bottom:12px;
  right:12px;
  width:34px;
  height:34px;
  border-radius:50%;
  background:rgba(255,255,255,0.9);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:5;
  border:1px solid #e5e7eb;
}

.offer-heart svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:#6b7280;
  stroke-width:2;
}

.offer-heart.active svg{
  fill:#ef4444;
  stroke:#ef4444;
}

.offer-filter-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
  color:#6b7280;
  font-size:12px;
  line-height:1.2;
}

.offer-filter-meta span{
  display:inline-flex;
  max-width:100%;
  padding:4px 8px;
  border-radius:999px;
  background:#f3f4f6;
  color:#6b7280;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

html[data-tp-theme="dark"] .offer-filter-meta span{
  background:#1f2937;
  color:#aeb8ca;
}

.offer-image[data-tp-image-aspect="portrait"] img,
.offer-image[data-tp-image-aspect="square"] img{
  object-fit:contain;
}

/* ===== TyPlace final offer-card polish ===== */

/* Offer covers stay cover thumbnails. */
.offer-card .offer-image img,
.offer-card .offer-image img[data-tp-image-aspect="portrait"],
.offer-card .offer-image img[data-tp-image-aspect="square"],
.offer-card .offer-image[data-tp-image-aspect="portrait"] img,
.offer-card .offer-image[data-tp-image-aspect="square"] img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center center !important;
}

/* Filter chips are already reflected by title/category UI. Keep cards clean. */
.offer-card .offer-filter-meta{
  display:none !important;
}

.offer-card .offer-seller{
  min-width:0;
}

.offer-card .seller-card-meta{
  min-width:0;
  flex:1 1 auto;
}

/* Compact seller row is used when there are no visible public reviews. */
.offer-card .offer-seller--compact{
  display:flex !important;
  align-items:center !important;
  gap:9px !important;
  min-height:36px !important;
}

.offer-card .offer-seller--compact .seller-avatar{
  align-self:center !important;
  width:32px !important;
  height:32px !important;
  flex:0 0 32px !important;
}

.offer-card .offer-seller--compact .seller-card-meta{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  height:32px !important;
  min-height:32px !important;
  min-width:0 !important;
  flex:1 1 auto !important;
  gap:0 !important;
  padding:0 !important;
  margin:0 !important;
  transform:translateY(7px) !important;
  overflow:hidden !important;
}

.offer-card .offer-seller--compact .seller-name{
  display:block !important;
  position:static !important;
  top:auto !important;
  left:auto !important;
  right:auto !important;
  transform:none !important;
  min-height:0 !important;
  height:auto !important;
  line-height:1.2 !important;
  padding:0 !important;
  margin:0 !important;
  max-width:100% !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.offer-card .offer-seller--compact .seller-rating,
.offer-card .offer-seller--compact .seller-since,
.offer-card .offer-seller--compact .rating-hidden{
  display:none !important;
}

@media (max-width:640px){
  .offer-card .seller-name{
    max-width:118px;
  }
}


/* ===== Offer SVG status badges ===== */
.offer-card-badges{
  position:absolute;
  top:9px;
  left:9px;
  z-index:6;
  display:flex;
  align-items:center;
  gap:6px;
  pointer-events:none;
}

.offer-card-badge{
  width:28px;
  height:28px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 8px 20px rgba(15,23,42,.16);
  backdrop-filter:blur(7px);
}

.offer-card-badge svg{
  width:16px;
  height:16px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.offer-card-badge--featured{
  color:#f59e0b;
}

.offer-card-badge--featured svg{
  fill:currentColor;
  stroke:none;
}

.offer-card-badge--safe{
  color:#1E50D4;
}

html[data-tp-theme="dark"] .offer-card-badge{
  background:rgba(17,24,39,.82);
  border-color:rgba(148,163,184,.24);
  box-shadow:0 8px 22px rgba(0,0,0,.36);
}

html[data-tp-theme="dark"] .offer-card-badge--safe{
  color:#8fb3ff;
}

@media (max-width:640px){
  .offer-card-badges{
    top:8px;
    left:8px;
    gap:5px;
  }

  .offer-card-badge{
    width:26px;
    height:26px;
  }

  .offer-card-badge svg{
    width:15px;
    height:15px;
  }
}

/* Public portfolio watermark */
.offer-media-watermark{
  position:absolute;
  left:10px;
  bottom:8px;
  z-index:4;
  max-width:calc(100% - 32px);
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#fff;
  font-size:11px;
  font-weight:800;
  letter-spacing:.018em;
  line-height:1;
  text-shadow:0 1px 8px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.55);
  pointer-events:none;
  user-select:none;
  opacity:.42;
  mix-blend-mode:normal;
  backdrop-filter:none;
}


.seller-rating .reviews-count{
  color:var(--muted, #6b7280);
  font-weight:700;
}
