.supplier-page { padding-top: 60px; }

.profile-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(0,230,118,0.08), rgba(100,100,255,0.05));
  padding: 80px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(10,10,15,0.8));
}

.hero-content { position: relative; z-index: 1; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.1);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #00E676, #00B0FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #000;
}

.verified-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #00B0FF;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 2px solid #0a0a0f;
}

/* Presence dot (online/offline) — on avatar corner */
.presence-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9ca3af;
  border: 3px solid var(--bg, #0a0a0f);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}
.presence-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 0 10px rgba(34,197,94,0.7);
  animation: pulse-online 2s infinite;
}
@keyframes pulse-online {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.65); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.profile-presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin: 4px 0 6px;
}
.profile-presence .dot {
  width: 9px; height: 9px; border-radius: 50%; background: #9ca3af;
}
.profile-presence .dot.online { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.7); }

.profile-info { flex: 1; }

.profile-name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.blue-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00B0FF;
  color: #fff;
  font-size: 0.7rem;
  margin-left: 6px;
  vertical-align: middle;
}

.profile-location {
  color: rgba(255,255,255,0.5);
  font-size: 0.95rem;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent, #00E676);
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

.profile-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Body */
.profile-body { padding: 32px 0 60px; }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.profile-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.profile-sidebar::-webkit-scrollbar { width: 6px; }
.profile-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; max-height: none; overflow: visible; }
}

.profile-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.profile-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Products grid — professional cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-pro-card {
  position: relative;
  background: var(--card, rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}
.product-pro-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,149,246,0.4);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

.product-pro-imgwrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}
.product-pro-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}
.product-pro-card:hover .product-pro-img { transform: scale(1.04); }

.product-pro-oos {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(239,68,68,0.95);
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.product-pro-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-pro-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.product-pro-name:hover { color: var(--accent, #00E676); }
.product-pro-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}
.product-pro-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}
.product-pro-price {
  font-weight: 700;
  color: var(--accent, #00E676);
  font-size: 1rem;
}
.product-pro-save {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all 0.15s;
}
.product-pro-save:hover { color: var(--accent, #00E676); border-color: var(--accent, #00E676); }
.product-pro-save.saved { color: #fbbf24; border-color: #fbbf24; background: rgba(251,191,36,0.1); }

/* Pagination */
.products-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pg-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: inherit;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.pg-btn:hover:not(:disabled) { background: rgba(0,149,246,0.15); border-color: rgba(0,149,246,0.5); }
.pg-btn.active { background: var(--accent, #00E676); color: #000; border-color: var(--accent, #00E676); }
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: rgba(255,255,255,0.05);
}

.project-info { padding: 14px; }
.project-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.project-meta { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.05); }

/* Catalogs */
.catalogs-list { display: flex; flex-direction: column; gap: 10px; }

.catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.catalog-item:hover { background: rgba(255,255,255,0.06); }
.catalog-name { font-weight: 500; }
.catalog-size { color: rgba(255,255,255,0.4); font-size: 0.8rem; }

/* Reviews */
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.review-avg {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent, #00E676);
}

.review-stars { color: #ffc107; font-size: 1.2rem; }
.review-total { color: rgba(255,255,255,0.4); font-size: 0.85rem; }

.reviews-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }

.review-card {
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.review-author { font-weight: 500; }
.review-date { color: rgba(255,255,255,0.4); font-size: 0.8rem; }
.review-rating { color: #ffc107; margin-bottom: 4px; }
.review-text { color: rgba(255,255,255,0.7); font-size: 0.9rem; line-height: 1.5; }

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.reviews-header h2 { margin: 0; }

.review-form-card {
  background: linear-gradient(135deg, rgba(0,149,246,0.05), rgba(0,230,118,0.02));
  border: 1.5px solid rgba(0,149,246,0.25);
  border-radius: 14px;
  padding: 20px;
  margin: 16px 0 18px;
}
.rf-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.rf-head h4 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.rf-sub { margin: 0; color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.rf-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.rf-field label { font-size: 0.82rem; color: rgba(255,255,255,0.65); font-weight: 500; }
.rf-field .form-input {
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: inherit;
  font-size: 0.92rem;
  resize: vertical;
}
.rf-field .form-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,149,246,0.18);
}
.rf-hint { font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-top: 4px; }
.rf-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.btn-icon {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.5);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.btn-icon:hover { color: rgba(255,255,255,0.9); }

.star-rating {
  display: flex;
  gap: 4px;
}
.star-btn {
  font-size: 1.7rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.22);
  transition: color 0.15s, transform 0.15s;
  padding: 0;
}
.star-btn:hover { color: #facc15; transform: scale(1.1); }
.star-btn.active { color: #fbbf24; text-shadow: 0 0 8px rgba(251,191,36,0.4); }

/* Sidebar */
.sidebar-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.sidebar-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}

.info-label { color: rgba(255,255,255,0.4); }
.info-value { color: rgba(255,255,255,0.8); }

.sidebar-actions { margin-top: 14px; }
.sidebar-msg-btn {
  width: 100%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px !important;
  font-weight: 600;
  font-size: 0.92rem !important;
  text-decoration: none;
}
.btn-block { width: 100%; display: block; text-align: center; }

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

.brand-tag {
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.online-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.online-indicator.online { background: #00E676; }
.online-indicator.offline { background: rgba(255,255,255,0.2); }

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-stats { justify-content: center; }
  .profile-actions { justify-content: center; }
}

@media (max-width: 600px) {
  .profile-avatar { width: 70px; height: 70px; }
  .profile-name { font-size: 1.3rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
}

/* ─── Light theme ─── */
[data-theme="light"] .profile-hero {
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(34,197,94,0.04));
  border-bottom-color: var(--border);
}
[data-theme="light"] .hero-overlay {
  background: linear-gradient(to bottom, transparent, rgba(244,246,249,0.85));
}

[data-theme="light"] .profile-avatar img { border-color: var(--border); }
[data-theme="light"] .profile-location { color: var(--text3); }
[data-theme="light"] .stat-label { color: var(--text3); }

[data-theme="light"] .verified-badge { border-color: #fff; }

[data-theme="light"] .profile-section {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--card-shadow);
}

[data-theme="light"] .product-mini-card {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="light"] .product-mini-card:hover { border-color: var(--accent); }
[data-theme="light"] .product-mini-img { background: var(--surface2); }

[data-theme="light"] .project-card { background: var(--surface); }
[data-theme="light"] .project-img { background: var(--surface2); }
[data-theme="light"] .project-meta { color: var(--text3); }

[data-theme="light"] .catalog-item {
  background: var(--surface2);
  color: var(--text);
}
[data-theme="light"] .catalog-item:hover { background: var(--border); }
[data-theme="light"] .catalog-size { color: var(--text3); }

[data-theme="light"] .review-card { background: var(--surface2); }
[data-theme="light"] .review-date { color: var(--text3); }
[data-theme="light"] .review-text { color: var(--text2); }
[data-theme="light"] .review-total { color: var(--text3); }

[data-theme="light"] .star-btn { color: var(--border2); }

[data-theme="light"] .sidebar-card {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--card-shadow);
}
[data-theme="light"] .info-row { border-bottom-color: var(--border); }
[data-theme="light"] .info-label { color: var(--text3); }
[data-theme="light"] .info-value { color: var(--text); }

[data-theme="light"] .brand-tag {
  background: var(--surface2);
  color: var(--text2);
}

[data-theme="light"] .online-indicator.offline { background: var(--border2); }

/* ─── Login Gate Popup ─── */
.login-gate-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: gateIn .3s ease;
}
.login-gate-overlay.hidden { display: none; }
@keyframes gateIn { from { opacity: 0; } to { opacity: 1; } }
.login-gate-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.login-gate-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--text3);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.login-gate-close:hover { color: var(--text); }
.login-gate-icon { margin-bottom: 16px; }
.login-gate-box h3 {
  font-size: 1.3rem; font-weight: 700;
  margin-bottom: 8px; color: var(--text);
}
.login-gate-box p {
  color: var(--text3); font-size: 0.92rem;
  line-height: 1.5; margin-bottom: 24px;
}
.login-gate-btn {
  display: block; width: 100%;
  padding: 14px; font-size: 1rem;
  font-weight: 600; border-radius: 12px;
  margin-bottom: 10px;
}
.login-gate-skip {
  font-size: 0.85rem; color: var(--text3);
  border: none; background: none; cursor: pointer;
}
.login-gate-skip:hover { color: var(--text2); }

/* ─── Supplier Social Links (shared with product page) ─── */
.supplier-social-links {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.social-icon-link {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none;
  color: #fff;
  text-decoration: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
}
.social-icon-link svg {
  width: 17px; height: 17px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.social-icon-link:hover { transform: translateY(-3px) scale(1.06); }
.social-icon-link:hover svg { transform: scale(1.1); }
.social-whatsapp { background: rgba(37,211,102,0.18); color: #34c47c; }
.social-whatsapp:hover { background: rgba(37,211,102,0.32); box-shadow: 0 4px 16px rgba(37,211,102,0.25); }
.social-instagram { background: rgba(225,48,108,0.18); color: #e04680; }
.social-instagram:hover { background: rgba(225,48,108,0.32); box-shadow: 0 4px 16px rgba(225,48,108,0.25); }
.social-youtube { background: rgba(255,0,0,0.15); color: #e04040; }
.social-youtube:hover { background: rgba(255,0,0,0.28); box-shadow: 0 4px 16px rgba(255,0,0,0.2); }
.social-telegram { background: rgba(42,171,238,0.18); color: #2aabee; }
.social-telegram:hover { background: rgba(42,171,238,0.32); box-shadow: 0 4px 16px rgba(42,171,238,0.25); }
.social-website { background: rgba(59,130,246,0.18); color: #4a90e2; }
.social-website:hover { background: rgba(59,130,246,0.32); box-shadow: 0 4px 16px rgba(59,130,246,0.25); }
