/* product-card.css */


.grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 479px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.card {
  background: var(--card);
  border-radius: 8px;
  border: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: none;
  container-type: inline-size;
  container-name: productcard;
}



.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  min-height: 310px;
  background: #f1f5f9;
  color: #94a3b8;
  overflow: hidden;
}

.thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: none;
}

.card:hover .thumb img {
  transform: none;
}

.metric-pill {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.card[data-status="sold"] .metric-pill,
.card[data-status="pending"] .metric-pill {
  border-radius: 0px 8px 8px 0px;
}

.js-like-count.is-empty {
  display: none;
}

.metric-pill svg {
  width: 14px;
  height: 14px;
}

.metric-pill--views {
    left: 8px;
    bottom: 8px;
    background: rgba(15, 26, 40, 0.62);
    color: #fff;
    backdrop-filter: blur(6px);
}
.metric-pill--sold {
  left: 14px;
  bottom: 14px;
  background: #c8102e;
  color: #fff;
}

.metric-pill--likes {
    right: 8px;
    bottom: 8px;
    background: rgba(255, 255, 255, 1);
    color: #475569;
    border: 1px solid rgba(15, 26, 40, 0.08);
    cursor: pointer;
    border: none;
    font: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}

.metric-pill--likes .heart-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.metric-pill--likes .heart-icon svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.metric-pill--likes:hover {
  background: #fff;
  color: #c8102e;
}

.metric-pill--likes:hover .heart-icon svg {
  transform: scale(1.08);
}

.metric-pill--likes:focus-visible {
  outline: 2px solid rgba(200, 16, 46, 0.35);
  outline-offset: 2px;
}

.metric-pill--likes.is-active {
  color: #c8102e;
  border-color: rgba(200, 16, 46, 0.4);
}

.metric-pill--likes.is-active svg path {
  fill: #c8102e;
  stroke: #c8102e;
}

.card-status {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 8px;
    padding: 0 12px;
    height: 32px;
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 400;
    color: #fff;
    text-align: left;
    letter-spacing: 0.02em;
    /* text-transform: uppercase; */
    background: rgba(15, 26, 40, 0.72);
}
.card-status--sold {
  background: #b91c1c;
}

.card-status--pending {
  background: #b45309;
  color: #fff7ed;
}

.card[data-status] .metric-pill--views {
  display: none;
}

.ct {
    padding: 8px 8px 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.ttl {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.card:hover .ttl {
  color: var(--brand);
}

.ttl a {
color: inherit;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    font-weight: 500;
    font-size: 0.85rem;
}


.description {
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
    font-size: 0.68rem;
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    background: #eef2ff;
    color: #1f2a44;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.tag svg {
  width: 11px;
  height: 11px;
}

.tag--time {
  display: none;
}

.tag--category {
  display: none;
}

.tag--negotiable {
  display: none;
}

.attr-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card .attr-list {
  gap: 4px 0;
}

.card .attr-label + .attr-label::before {
  content: "\00B7";
  display: inline-block;
  margin: 0 4px;
  color: var(--muted);
  font-weight: 400;
}

.attr-label {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  min-width: 0;
}

.attr-gender-icon {
    width: 13px;
    height: 13px;
    margin-left: -2px;
    margin-right: -3px;
    flex: 0 0 auto;
    display: inline-block;
}
.attr-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  display:none;
}

.attr-icon svg {
  width: 12px;
  height: 12px;
}

.attr-label--flag .attr-icon {
  border-radius: 6px;
  background: var(--flag-bg, #f8fafc);
  border-color: var(--line);
  overflow: hidden;
}

.attr-label--flag .attr-icon svg {
  display: none;
}

.attr-label--flag[data-flag="nl"] .attr-icon {
  --flag-bg: linear-gradient(180deg, #ae1c28 0 33.33%, #ffffff 33.33% 66.66%, #21468b 66.66% 100%);
}

.attr-label--flag[data-flag="pl"] .attr-icon {
  --flag-bg: linear-gradient(180deg, #ffffff 0 50%, #dc143c 50% 100%);
}

.attr-label--flag[data-flag="be"] .attr-icon {
  --flag-bg: linear-gradient(90deg, #000000 0 33.33%, #ffcd00 33.33% 66.66%, #ef3340 66.66% 100%);
}

.attr-label--flag[data-flag="de"] .attr-icon {
  --flag-bg: linear-gradient(180deg, #000000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%);
}

.attr-label--flag[data-flag="fr"] .attr-icon {
  --flag-bg: linear-gradient(90deg, #0055a4 0 33.33%, #ffffff 33.33% 66.66%, #ef4135 66.66% 100%);
}

.attr-label--flag[data-flag="eng"] .attr-icon {
  --flag-bg:
    linear-gradient(90deg, transparent 0 42%, #cf142b 42% 58%, transparent 58% 100%),
    linear-gradient(180deg, transparent 0 42%, #cf142b 42% 58%, transparent 58% 100%),
    #ffffff;
}

.attr-label--flag[data-flag="es"] .attr-icon {
  --flag-bg: linear-gradient(180deg, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%);
}

.attr-label--flag[data-flag="it"] .attr-icon {
  --flag-bg: linear-gradient(90deg, #009246 0 33.33%, #ffffff 33.33% 66.66%, #ce2b37 66.66% 100%);
}

.attr-label--flag[data-flag="ro"] .attr-icon {
  --flag-bg: linear-gradient(90deg, #002b7f 0 33.33%, #fcd116 33.33% 66.66%, #ce1126 66.66% 100%);
}

.attr-label--flag[data-flag="tr"] .attr-icon {
  --flag-bg:
    radial-gradient(circle at 40% 50%, #ffffff 0 28%, transparent 30%),
    radial-gradient(circle at 46% 50%, #e30a17 0 24%, transparent 26%),
    radial-gradient(circle at 62% 50%, #ffffff 0 6%, transparent 7%),
    #e30a17;
}

.attr-label--flag[data-flag="ma"] .attr-icon {
  --flag-bg:
    radial-gradient(circle at 50% 50%, #006233 0 20%, transparent 22%),
    #c1272d;
}

.attr-label--flag[data-flag="other"] .attr-icon {
  --flag-bg: repeating-linear-gradient(135deg, #e5e7eb 0 4px, #cbd5e1 4px 8px);
}

.request-preferences .attr-label--flag .attr-icon {
  background: var(--flag-bg, #f8fafc);
}

.attr-text {
  min-width: 0;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  align-self: flex-start;
  padding: 0.3em 0.95em;
  border-radius: 6px;
  background: rgba(200, 16, 46, 0.12);
  color: #c8102e;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 6px;
    padding-top: 7px;
    border-top: 1px solid rgba(15, 26, 40, 0.06);
}

.price-stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}

.price-main {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 400;
    display: flex;
    gap: 6px;
    align-items: center;
}

.price-sub {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    width: 117px;
    overflow: hidden;
}

.price-sub > :not(.shield-icon) {
  order: 1;
}

.price-sub .shield-icon {
  order: 2;
}

.price-sub svg {
  width: 14px;
  height: 14px;
}

.price-protect-word {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.price-protect-prefix {
  display: inline;
}

.price-protect-short {
  display: none;
}

.price-protect-suffix {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .price-protect-word {
    gap: 0;
  }
  .price-protect-label {
    display: inline-flex;
  }
  .price-protect-label .price-protect-prefix {
    display: none;
  }
  .price-protect-label .price-protect-short {
    display: inline;
  }
}

@container productcard (max-width: 360px) {
  .price-protect-label {
    display: inline-flex;
  }
  .price-protect-label .price-protect-prefix {
    display: none;
  }
  .price-protect-label .price-protect-short {
    display: inline;
  }
}

.shield-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #C8102E;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.meta-line strong {
  color: var(--ink);
  font-weight: 700;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.55rem 1.15rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  border-color: rgba(200, 16, 46, 0.4);
  color: #c8102e;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn.primary:hover {
  background: #8f0b22;
  border-color: #8f0b22;
}

.seller-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0px;
  flex: 0 0 auto;
  height:42px;
}

.seller-avatar {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
    box-sizing: border-box;
    background: #f1f5f9;
}

.seller-stack .seller-avatar {
  margin-right: 0;
}

.seller-avatar.is-online {
  border: 2px solid #10b981;
}
.seller-stack .seller-rating {
    display: none;
    align-items: center;
    gap: 2px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.seller-stack .seller-rating svg {
    width: 12px;
    height: 12px;
    color: var(--brand);
}

.seller-stack .seller-rating .seller-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  display: none;
}

.seller-stack .seller-rating .seller-status-dot.is-online {
  background: #10b981;
}

.seller-stack .seller-rating--empty {
  color: #9ca3af;
  font-weight: 500;
  gap: 6px;
}

.seller-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  display: none;
}

.seller-status-dot.is-online {
  background: #10b981;
}

.card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.price-protect-word {
  display: inline;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.price-protect-word:hover,
.price-protect-word:focus {
  color: inherit;
  outline: none;
}

.price-protect-amount {
  font-weight: 500;
}

.price-protect-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .price-protect-label {
    display: inline-flex;
  }
}

@container productcard (max-width: 360px) {
  .price-protect-label {
    display: inline-flex;
  }
}

/* Skeleton shimmer */
.product-grid .sk {
  background: linear-gradient(90deg, #f1f5f9 25%, #e5e7eb 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.2s ease-in-out infinite;
  border-radius: 10px;
}

@keyframes sk-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.card.card--skeleton {
  overflow: hidden;
}

.card--skeleton .thumb {
  min-height: 310px;
}

.card--skeleton .sk-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.card--skeleton .sk-pill {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 84px;
  height: 32px;
  border-radius: 8px;
}

.card--skeleton .sk-pill-right {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 72px;
  height: 32px;
  border-radius: 8px;
}

.card--skeleton .sk-ct {
  padding: 8px 8px 13px;
}

.card--skeleton .sk-line {
  height: 12px;
  border-radius: 8px;
  margin: 8px 0;
}

.card--skeleton .sk-line.sm { width: 45%; }
.card--skeleton .sk-line.md { width: 65%; }
.card--skeleton .sk-line.lg { width: 85%; }

.card--skeleton .sk-price {
  height: 16px;
  width: 110px;
  border-radius: 8px;
}

.card--skeleton .sk-sub {
  height: 14px;
  width: 140px;
  border-radius: 8px;
  margin-top: 6px;
}

.card--skeleton .sk-avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}
