.profile-social-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.profile-social-hero {
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.profile-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr);
  gap: 16px;
}

.small-help {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.social-section-title {
  color: #0b5cff;
  font-size: 18px;
  font-weight: 900;
  margin-top: 8px;
}

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

.social-input {
  align-items: center;
  background: #fff;
  border: 1px solid #bcd2ff;
  border-radius: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: 50px minmax(0, 1fr);
  margin: 0;
  min-height: 78px;
  padding: 10px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.social-input:hover,
.social-input:focus-within {
  border-color: #0b5cff;
  box-shadow: 0 14px 28px rgba(11, 92, 255, .10);
  transform: translateY(-1px);
}

.social-input .social-icon {
  align-items: center;
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-size: 25px;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  line-height: 1;
  width: 46px;
}

.social-instagram .social-icon { background: linear-gradient(135deg, #ff7a00, #e1306c, #833ab4); }
.social-tiktok .social-icon { background: #101828; }
.social-x .social-icon { background: #000; }
.social-whatsapp .social-icon { background: #21c063; }
.social-facebook .social-icon { background: #1877f2; }

.social-field {
  display: grid;
  gap: 5px;
}

.social-field strong {
  color: #101828;
  font-size: 14px;
  font-weight: 900;
}

.social-field input {
  border: 0 !important;
  box-shadow: none !important;
  min-height: 30px !important;
  padding: 0 !important;
}

.social-field input:focus {
  outline: 0;
}

.public-social-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.social-link-button {
  align-items: center;
  display: inline-flex !important;
  gap: 8px;
  min-height: 42px;
  padding-inline: 14px !important;
}

.social-link-button span {
  align-items: center;
  background: #eef4ff;
  border-radius: 999px;
  color: #0b5cff;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

@media (max-width: 760px) {
  .profile-main-grid,
  .profile-social-grid {
    grid-template-columns: 1fr;
  }

  .profile-social-hero {
    align-items: flex-start;
  }
}

/* v25: public profile social buttons are compact icon-only links */
.public-social-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.social-icon-link {
  align-items: center;
  border: 1px solid #bcd2ff;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(11, 92, 255, .08);
  color: #fff;
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  width: 42px;
}

.social-icon-link:hover {
  border-color: #0b5cff;
  box-shadow: 0 12px 26px rgba(11, 92, 255, .16);
  transform: translateY(-2px);
}

.social-phone { background: #0b5cff; }
.social-whatsapp-link { background: #21c063; }
.social-instagram-link { background: linear-gradient(135deg, #ff7a00, #e1306c, #833ab4); }
.social-tiktok-link { background: #101828; }
.social-x-link { background: #000; }
.social-facebook-link { background: #1877f2; }

/* v27: public profile icons match the edit-profile icon style */
.public-social-links {
  gap: 8px;
  margin-top: 16px;
}

.public-social-links .social-icon-link {
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  font-size: 17px;
  height: 32px;
  width: 32px;
}

.public-social-links .social-icon-link:hover {
  box-shadow: 0 8px 18px rgba(11, 92, 255, .16);
}

.social-link-button {
  display: none !important;
}

/* v26: compact edit socials + theme selector on top right */
.profile-social-panel {
  position: relative;
}

.profile-theme-top {
  margin: 0;
  position: absolute;
  right: 30px;
  top: -38px;
  width: 160px;
  z-index: 3;
}

.profile-theme-top select {
  background: #fff;
  border: 1px solid #9fbdff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  min-height: 32px;
  padding: 4px 8px;
}

.profile-social-grid {
  gap: 10px;
}

.social-input {
  border-radius: 14px;
  gap: 9px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 52px;
  padding: 7px 10px;
}

.social-input .social-icon {
  border-radius: 10px;
  font-size: 17px;
  height: 32px;
  width: 32px;
}

.social-field {
  gap: 1px;
}

.social-field strong {
  font-size: 12px;
}

.social-field input {
  font-size: 13px !important;
  min-height: 22px !important;
}

.social-section-title {
  font-size: 17px;
  margin-top: 4px;
}

@media (max-width: 760px) {
  .profile-theme-top {
    margin-bottom: 12px;
    position: static;
    width: 100%;
  }
}

/* v227: public profile identity and favorite-style listing cards */
.public-profile-head {
  background: #fff;
}

.public-profile-identity {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.public-profile-avatar-square,
.public-profile-avatar-square.large {
  width: 84px;
  height: 84px;
  min-width: 84px;
  overflow: hidden;
  border-radius: 15px !important;
  background: #eef4f9;
}

.public-profile-avatar-square img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.public-profile-name {
  min-width: 0;
}

.public-profile-name h1 {
  margin: 0 0 5px;
}

.public-profile-identity .profile-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-left: auto;
}

.public-profile-identity .profile-top-actions form {
  margin: 0;
}

.public-profile-identity .profile-top-actions .text-button,
.public-profile-identity .profile-top-actions .primary-action {
  min-width: 104px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 16px;
  border-radius: 12px;
  white-space: nowrap;
}

.public-listings-section-v227 {
  padding: 18px;
  border: 1px solid #e3e6ea;
  border-radius: 18px;
  background: #f5f6f7;
}

.public-listings-section-v227 .section-title {
  margin-bottom: 13px;
}

.public-listing-grid-v227 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.public-listing-card-v227 {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe1e5;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(36, 39, 45, .06);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.public-listing-card-v227:hover {
  border-color: #9ec9ef;
  box-shadow: 0 10px 24px rgba(35, 123, 200, .12);
  transform: translateY(-1px);
}

.public-listing-card-v227 > a {
  height: 100%;
  display: block;
  color: #303238;
  text-decoration: none;
}

.public-listing-image-v227 {
  width: 100%;
  height: 108px;
  display: block;
  object-fit: cover;
  background: #e7edf3;
}

.public-listing-copy-v227 {
  display: grid;
  gap: 3px;
  padding: 8px 9px 10px;
}

.public-listing-copy-v227 strong {
  min-height: 18px;
  color: #df4e49;
  font-size: 14px;
  font-weight: 900;
}

.public-listing-copy-v227 b {
  overflow: hidden;
  color: #303238;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-listing-copy-v227 span {
  overflow: hidden;
  color: #747b84;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .public-listing-grid-v227 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .public-listing-grid-v227 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .public-profile-identity {
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
  }

  .public-profile-avatar-square,
  .public-profile-avatar-square.large {
    width: 68px;
    height: 68px;
    min-width: 68px;
  }

  .public-profile-identity .profile-top-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .public-profile-identity .profile-top-actions form,
  .public-profile-identity .profile-top-actions .text-button,
  .public-profile-identity .profile-top-actions .primary-action {
    flex: 1 1 0;
    width: 100%;
  }

  .public-listing-grid-v227 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v228: larger profile surface, centered identity and larger listing cards */
.public-profile-head {
  padding: 36px 34px !important;
}

.public-profile-identity {
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 24px;
  min-height: 132px;
}

.public-profile-avatar-square,
.public-profile-avatar-square.large {
  width: 116px;
  height: 116px;
  min-width: 116px;
  border-radius: 18px !important;
}

.public-profile-name {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.public-profile-name h1 {
  width: 100%;
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.1;
  text-align: center;
}

.public-profile-name .form-help {
  width: 100%;
  margin: 0;
  text-align: center;
}

.public-listings-section-v227 {
  padding: 24px;
}

.public-listing-grid-v227 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.public-listing-image-v227 {
  height: 142px;
}

.public-listing-copy-v227 {
  gap: 5px;
  padding: 11px 12px 13px;
}

.public-listing-copy-v227 strong {
  font-size: 16px;
}

.public-listing-copy-v227 b {
  font-size: 12px;
}

.public-listing-copy-v227 span {
  font-size: 10px;
}

@media (max-width: 1200px) {
  .public-listing-grid-v227 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .public-profile-head {
    padding: 28px 24px !important;
  }

  .public-listing-grid-v227 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .public-profile-identity {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 15px;
  }

  .public-profile-avatar-square,
  .public-profile-avatar-square.large {
    width: 88px;
    height: 88px;
    min-width: 88px;
  }

  .public-profile-name h1 {
    font-size: 24px;
  }

  .public-listing-grid-v227 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-listing-image-v227 {
    height: 124px;
  }
}
