/* Shared public card for real, API-backed sofreh cards on home and listings. */
.sofre-card {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  color: #172b3a;
  background: #fff;
  border: 1px solid #e2ebe5;
  border-radius: 17px;
  box-shadow: 0 4px 14px #173c2c0d;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.sofre-card:hover { border-color: #cfe4d4; box-shadow: 0 8px 22px #173c2c13; }
.sofre-card .card-top-bar { display: none !important; }
.sofre-card .sofre-header {
  margin: 8px 8px 0;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #e0f1e6;
  border: 1px solid #cce6d4;
  border-radius: 12px;
}
.sofre-card .host-avatar-wrapper { flex: 0 0 auto; }
.sofre-card [hidden] { display: none !important; }
.sofre-card .host-avatar {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 2px solid #168451;
  border-radius: 50%;
}
.sofre-card .host-avatar--initials {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,#e4f2e9,#f3ead4);
  color: #397357;
  font-size: 13px;
  font-weight: 800;
}
.sofre-card .sofre-title-info { flex: 1 1 auto; min-width: 0; }
.sofre-card .sofre-name {
  display: block;
  overflow: hidden;
  margin: 0 0 2px;
  color: #20352b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sofre-card .host-name-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 5px;
  color: #7b8780;
  font-size: 10px;
  line-height: 1.4;
}
.sofre-card .host-name-sub b { color: #63736b; font-weight: 600; }
.sofre-card .host-rating { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: transparent; color: #77827d; font: inherit; font-size: 9px; font-weight: 600; direction: ltr; cursor: pointer; }
.sofre-card .host-rating:hover { text-decoration: underline; }
.sofre-card .host-rating i { color: #c6a557; font-size: 8px; }
.sofre-card .members-location { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-start; gap: 3px; margin-inline-start: auto; }
.sofre-card .members-count {
  padding: 3px 7px;
  border-radius: 20px;
  background: #eef5f0;
  color: #557466;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.sofre-card .location-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
  overflow: hidden;
  color: #71827a;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sofre-card .location-badge i { flex: 0 0 auto; color: #648a79; font-size: 10px; }
.sofre-card .location-badge span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sofre-card .products-section { flex: 1; padding: 0 16px; }
.sofre-card .product-list { display: flex; flex-direction: column; gap: 0; }
.sofre-card .product-row {
  min-width: 0;
  padding: 9px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #f0f3f2;
  border-radius: 0;
}
.sofre-card .product-row:last-child { border-bottom: 0; }
.sofre-card .product-main-info { display: flex; align-items: center; justify-content: space-between; min-width: 0; margin: 0; }
.sofre-card .product-title { display: flex; align-items: center; gap: 6px; color: #293a33; font-size: 12.5px; font-weight: 700; }
.sofre-card .product-unit { color: #7d8983; font-size: 9.5px; font-weight: 500; }
.sofre-card .price-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 4px; margin: 5px 0; font-size: 10px; }
.sofre-card .current-price { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 4px; min-width: 0; white-space: nowrap; }
.sofre-card .group-price { display: inline-flex; align-items: baseline; gap: 2px; color: #176b48; font-size: 12.5px; font-weight: 800; }
.sofre-card .group-price-label { font-size: 11.5px; }
.sofre-card .group-price-value { font-size: inherit; }
.sofre-card .discount-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 20px; padding: 0 7px; border: 0; border-radius: 999px; background: #faf6ea; color: #8a7847; font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.sofre-card .unit-discount { flex: 0 0 auto; color: #77816d; font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.sofre-card .sofreh-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: 7px; direction: rtl; margin: 7px 0 4px; }
.sofre-card .product-progress-track { display: block; position: relative; width: 100%; min-width: 0; height: 8px; margin: 0; overflow: visible; border-radius: 99px; background: #e2e8f0; direction: rtl; }
.sofre-card .product-progress-fill { position: relative; display: block; height: 100%; overflow: visible; border-radius: inherit; background: linear-gradient(90deg, #10b981, #059669); }
.sofre-card .product-progress-current { position: absolute; z-index: 2; top: 50%; right: calc(100% + 3px); display: block; min-width: 24px; transform: translateY(-50%); color: #526159; font-size: 10px; font-weight: 800; line-height: 1.5; text-align: center; white-space: nowrap; }
.sofre-card .product-progress-fill.is-full .product-progress-current { right: auto; left: 4px; color: #fff; }
.sofre-card .product-progress-target { min-width: 24px; color: #526159; font-size: 10px; font-weight: 800; line-height: 1.5; text-align: center; white-space: nowrap; }
.sofre-card .product-meta-stat { display: none !important; }
.sofre-card .extra-products-pill { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 4px; padding: 7px 0 0; border: 0; background: transparent; color: #78847f; font-size: 10px; line-height: 1.7; }
.sofre-card .extra-products-pill > i { color: #83978d !important; }
.sofre-card .extra-names { color: #596761; font-weight: 500; }
.sofre-card .sofre-footer { display: flex; gap: 8px; margin-top: 5px; padding: 10px 14px 13px; border-top: 1px solid #edf1ef; }
.sofre-card .btn-join {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #11804c;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.sofre-card .btn-join:hover { background: #0d6e40; }
.sofre-card .btn-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  border: 1px solid #e8efea;
  border-radius: 10px;
  background: #fafcfb;
  color: #60716a;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .sofre-card { border-radius: 15px; }
  .sofre-card .sofre-header {
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3px 7px;
    margin: 7px 7px 0;
    padding: 8px;
    background: #edf7f0;
  }
  .sofre-card .host-avatar-wrapper { grid-column: 1; grid-row: 1 / 3; }
  .sofre-card .host-avatar { width: 36px; height: 36px; }
  .sofre-card .sofre-title-info { display: contents; }
  .sofre-card .sofre-name { grid-column: 2; grid-row: 1; min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.45; }
  .sofre-card .host-name-sub { grid-column: 2; grid-row: 2; min-width: 0; font-size: 9px; line-height: 1.35; }
  .sofre-card .members-location { grid-column: 3; grid-row: 1 / 3; align-self: center; gap: 3px; }
  .sofre-card .members-count { padding: 2px 6px; font-size: 9.5px; }
  .sofre-card .location-badge { max-width: 112px; }
  .sofre-card .products-section { padding: 0 10px; }
  .sofre-card .product-row { padding: 9px 0; }
  .sofre-card .product-title { min-width: 0; flex-wrap: wrap; font-size: 12px; line-height: 1.55; }
  .sofre-card .product-unit { font-size: 9px; }
  .sofre-card .price-row { margin: 5px 0; font-size: 10px; }
  .sofre-card .price-row { gap: 3px; }
  .sofre-card .group-price { font-size: 12px; white-space: nowrap; }
  .sofre-card .group-price-label { font-size: 10px; }
  .sofre-card .discount-pill { min-height: 18px; padding: 0 4px; font-size: 8px; }
  .sofre-card .unit-discount { font-size: 8px; }
  .sofre-card .sofre-footer { margin-top: 4px; padding: 9px 10px 11px; }
  .sofre-card .btn-join { padding: 10px 8px; font-size: 10.5px; }
  .sofre-card .btn-share { min-width: 0; padding: 0 9px; font-size: 10px; }
}
