/* ===========================
   Buttons
   =========================== */

.btn {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-accent);
  color: white;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
}

.btn-login:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-glow);
}

.btn-login svg {
  flex-shrink: 0;
}

.btn-admin {
  background: var(--color-verified);
  padding: var(--space-sm);
}

.btn-admin:hover {
  background: var(--color-verified);
  filter: brightness(1.2);
}

.filter-actions {
  display: inline-flex;
  gap: var(--space-sm);
  align-items: center;
}

.btn-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  padding: var(--space-sm) var(--space-md);
  letter-spacing: 0.02em;
  transition: all var(--transition-base);
}

.btn-verified svg {
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity var(--transition-base);
}

.btn-verified:hover {
  border-color: var(--color-verified);
  color: var(--color-verified);
}

.btn-verified:hover svg {
  opacity: 0.7;
}

.btn-verified.active {
  background: var(--color-verified-bg);
  border-color: var(--color-verified);
  color: var(--color-verified);
}

.btn-verified.active svg {
  opacity: 1;
}

.btn-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: var(--space-sm);
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.btn-clear svg {
  flex-shrink: 0;
}

.btn-clear:hover {
  background: rgba(214, 90, 90, 0.1);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.btn-primary { background: var(--color-accent); color: white; }
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover { border-color: var(--color-text-muted); }

.btn-danger { background: var(--color-danger); color: white; }
.btn-danger:hover { opacity: 0.9; }

/* ===========================
   Filter Select
   =========================== */

.filter-select {
  padding: var(--space-sm) var(--space-md);
  padding-right: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  min-width: 120px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235d5f76' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-select.has-value {
  border-color: var(--color-accent);
  color: var(--color-text-primary);
  background-color: rgba(200, 75, 75, 0.06);
}

.filter-select:hover {
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(200, 75, 75, 0.15);
}

/* ===========================
   Filter Chips
   =========================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  background: var(--color-accent);
  color: white;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  animation: chipIn 0.2s ease;
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.chip-remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.chip-remove:hover { opacity: 1; }

/* ===========================
   Company Card
   =========================== */

.company-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cardIn 0.5s ease backwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.company-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-3px);
}

.company-card {
  position: relative;
}

.card-hero {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--color-border);
}

.card-vote-group {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  gap: 4px;
  z-index: 2;
}

.card-vote-corner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--border-radius-full);
  background: rgba(15, 16, 24, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-base);
}

.card-vote-corner svg {
  flex-shrink: 0;
}

.card-vote-corner:hover {
  border-color: #4a90d9;
  color: #4a90d9;
  background: rgba(15, 16, 24, 0.9);
}

.card-vote-corner.voted {
  background: #4a90d9;
  color: white;
  border-color: #4a90d9;
}

.card-love-corner:hover {
  border-color: #e4405f;
  color: #e4405f;
}

.card-love-corner.loved {
  background: #e4405f;
  color: white;
  border-color: #e4405f;
}

.card-hero-placeholder {
  width: 100%;
  height: 160px;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(200, 75, 75, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(201, 169, 110, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(91, 168, 140, 0.06) 0%, transparent 60%),
    linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-card) 50%, var(--color-surface) 100%);
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

.card-hero-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 40px,
      rgba(200, 75, 75, 0.02) 40px,
      rgba(200, 75, 75, 0.02) 41px
    );
  pointer-events: none;
}

.card-hero-placeholder::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.25;
}

.card-body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.company-card-header {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.company-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.company-logo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  color: var(--color-accent);
  flex-shrink: 0;
  font-weight: var(--font-weight-bold);
  border: 1px solid var(--color-border);
}

.company-info { flex: 1; min-width: 0; }

.company-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.company-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.verified-icon {
  color: var(--color-verified);
  flex-shrink: 0;
  display: inline-flex;
  vertical-align: middle;
}

.verified-icon svg { display: block; }

.verified-icon-lg { margin-left: 4px; }

.card-type-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.company-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.badge {
  padding: 2px 8px;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
}

.badge-manufacturer {
  background: var(--color-badge-manufacturer);
  color: var(--color-badge-text);
}

.badge-retailer {
  background: var(--color-badge-retailer);
  color: var(--color-badge-retailer-text);
}

.badge-verified-sm {
  background: var(--color-verified-bg);
  color: var(--color-verified);
}

.badge-verified {
  background: var(--color-verified);
  color: white;
}

.card-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.meta-item {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.meta-sep { color: var(--color-border); font-size: 8px; }

.company-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.product-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  font-weight: var(--font-weight-medium);
}

.vote-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.vote-btn.voted {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.view-details {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
  opacity: 0;
  transition: opacity var(--transition-base);
  letter-spacing: 0.04em;
  margin-left: auto;
}

.company-card:hover .view-details { opacity: 1; }

/* ===========================
   Modal
   =========================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal[hidden] { display: none; }

.modal-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--color-overlay);
  animation: overlayIn 0.3s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-small { max-width: 420px; }

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-sm);
  background: rgba(15, 16, 24, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 20px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

#modal-body { padding: 0; }

@media (max-width: 768px) {
  .modal { padding: 0; }
  .modal-content {
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* ===========================
   Company Detail (Modal)
   =========================== */

.company-detail {
  position: relative;
}

.detail-hero-banner {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.detail-hero-placeholder {
  width: 100%;
  height: 160px;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(200, 75, 75, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(201, 169, 110, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(91, 168, 140, 0.06) 0%, transparent 60%),
    linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-card) 50%, var(--color-surface) 100%);
  position: relative;
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.detail-hero-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 40px,
      rgba(200, 75, 75, 0.02) 40px,
      rgba(200, 75, 75, 0.02) 41px
    );
  pointer-events: none;
  border-radius: inherit;
}

.detail-hero-placeholder::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.3;
}

.detail-header {
  padding: var(--space-lg) var(--space-2xl) 0;
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  margin-top: -40px;
  position: relative;
  z-index: 1;
}

.detail-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-md);
  object-fit: contain;
  border: 3px solid var(--color-bg-elevated);
  background: var(--color-bg-elevated);
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.detail-logo-placeholder {
  width: 80px;
  height: 80px;
  border: 3px solid var(--color-bg-elevated);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  font-size: 32px;
}

.detail-header-info { flex: 1; min-width: 0; padding-top: 24px; }

.detail-vote-corner {
  position: absolute;
  top: var(--space-md);
  right: 58px;
  z-index: 9;
  display: flex;
  gap: 6px;
}

.vote-btn-float {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--border-radius-full);
  background: rgba(15, 16, 24, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.vote-btn-float svg {
  flex-shrink: 0;
}

.vote-btn-float:hover {
  border-color: #4a90d9;
  color: #4a90d9;
  background: rgba(15, 16, 24, 0.9);
}

.vote-btn-float.voted {
  background: #4a90d9;
  color: white;
  border-color: #4a90d9;
}

.vote-btn-love:hover {
  border-color: #e4405f;
  color: #e4405f;
}

.vote-btn-love.loved {
  background: #e4405f;
  color: white;
  border-color: #e4405f;
}

.detail-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.detail-site-btns {
  display: flex;
  gap: 6px;
  margin-left: 4px;
}

.detail-name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.detail-sample-model {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal, 400);
  margin-left: 4px;
}

.detail-meta-line {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.detail-product-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.detail-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.detail-site-btn-alt {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
}

.detail-site-btn:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-muted);
  background: var(--color-surface);
}

.detail-site-btn svg {
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.detail-site-btn:hover svg { opacity: 1; }

.detail-inner { padding: var(--space-lg) var(--space-2xl) var(--space-2xl); }

@media (max-width: 768px) {
  .detail-header { padding: var(--space-md) var(--space-md) 0; }
  .detail-inner { padding: var(--space-md); }
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.detail-body.no-sidebar { grid-template-columns: 1fr; }

@media (max-width: 768px) {
  .detail-body { grid-template-columns: 1fr; }
}

.detail-main { min-width: 0; }

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.detail-section { margin-bottom: var(--space-xl); }

.detail-section h3 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  position: relative;
  padding-left: 14px;
}

.detail-section h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background: var(--color-accent);
  border-radius: 2px;
}

.detail-description {
  font-size: var(--font-size-base);
  line-height: 1.85;
  color: var(--color-text-secondary);
}

.sidebar-section { margin-bottom: var(--space-md); }

.sidebar-section h4 {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.official-site-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--color-accent);
  color: white;
  border-radius: var(--border-radius-sm);
  text-align: center;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
  letter-spacing: 0.03em;
}

.official-site-btn:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-glow);
}

.site-preview {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.site-preview-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}

.site-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.site-preview-thumb:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.site-preview-thumb:hover img {
  transform: scale(1.12);
}

.quick-info {
  background: var(--color-bg);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
}

.quick-info h4 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: var(--font-size-sm);
}

.info-row:not(:last-child) {
  border-bottom: 1px solid var(--color-border-light);
}

.info-label { color: var(--color-text-muted); }

.info-value {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.spec-group h3 {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-left: 14px;
  position: relative;
}

.spec-group h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 2px;
}

.pill-list {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.pill {
  padding: 4px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
  color: var(--color-text-secondary);
}

.pill:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex: 1 1 auto;
  min-width: 120px;
  padding: 9px var(--space-md);
  border-radius: var(--border-radius-sm);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
}

.social-link svg {
  flex-shrink: 0;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.15);
}

.social-youtube { background: var(--color-youtube); }
.social-instagram { background: var(--color-instagram); }
.social-twitter { background: var(--color-twitter); }
.social-discord { background: var(--color-discord); }
.social-email { background: var(--color-email); }
.social-facebook { background: var(--color-facebook); }
.social-reddit { background: var(--color-reddit); }
.social-telegram { background: var(--color-telegram); }
.social-tiktok { background: var(--color-tiktok); color: var(--color-bg); }
.social-website { background: var(--color-website); }
.social-store { background: var(--color-store); }

/* ===========================
   Image Gallery
   =========================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-sm);
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.gallery-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-sm);
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-overlay span {
  font-size: var(--font-size-xs);
  color: white;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.04em;
}

.detail-notes {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  background: var(--color-bg);
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  border-left: 3px solid var(--color-accent);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
}

/* ===========================
   Lightbox
   =========================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  animation: overlayIn 0.2s ease;
}

.lightbox-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--border-radius-md);
  animation: lightboxImgIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxImgIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-close:hover { background: var(--color-accent); border-color: var(--color-accent); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.08);
}

.lightbox-prev { left: var(--space-lg); }
.lightbox-next { right: var(--space-lg); }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.15); }

.lightbox-counter {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.04em;
}

/* ===========================
   Auth Form
   =========================== */

#auth-body { padding: var(--space-2xl); }

.auth-form h2 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.01em;
}

.form-group { margin-bottom: var(--space-md); }

.form-group label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  color: var(--color-text-primary);
}

.form-group input {
  width: 100%;
  padding: 10px var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
  background: var(--color-bg);
  color: var(--color-text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(200, 75, 75, 0.15);
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.form-actions button {
  flex: 1;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  font-weight: var(--font-weight-semibold);
}

.form-toggle {
  text-align: center;
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.form-toggle button {
  color: var(--color-accent);
  font-weight: var(--font-weight-semibold);
}

.form-toggle button:hover { text-decoration: underline; }

.error-message {
  background: rgba(214, 90, 90, 0.1);
  color: var(--color-danger);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(214, 90, 90, 0.2);
}

.success-message {
  background: rgba(91, 168, 140, 0.1);
  color: var(--color-verified);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(91, 168, 140, 0.2);
}

/* ===========================
   Searchable Select
   =========================== */

.ss-wrapper {
  position: relative;
  display: inline-block;
}

.ss-display {
  padding: var(--space-sm) var(--space-md);
  padding-right: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  min-width: 120px;
  text-align: left;
  white-space: nowrap;
  position: relative;
  font-family: inherit;
}

.ss-display::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.ss-wrapper.ss-open .ss-display::after { content: '▴'; }

.ss-display.has-value {
  border-color: var(--color-accent);
  color: var(--color-text-primary);
  background: rgba(200, 75, 75, 0.06);
}

.ss-display:hover {
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}

.ss-wrapper.ss-open .ss-display {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(200, 75, 75, 0.15);
}

.ss-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  max-width: 300px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: chipIn 0.15s ease;
  overflow: hidden;
}

.ss-search {
  width: 100%;
  padding: 10px var(--space-md);
  border: none;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-family: inherit;
}

.ss-search::placeholder { color: var(--color-text-muted); }
.ss-search:focus { outline: none; }

.ss-list {
  max-height: 200px;
  overflow-y: auto;
}

.ss-list::-webkit-scrollbar { width: 4px; }
.ss-list::-webkit-scrollbar-track { background: transparent; }
.ss-list::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.ss-option {
  padding: 8px var(--space-md);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--color-text-secondary);
}

.ss-option:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.ss-empty {
  padding: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* ===========================
   Admin UI
   =========================== */

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-2xl);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .admin-toolbar { padding: var(--space-sm) var(--space-md); flex-wrap: wrap; }
}

.admin-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-verified);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  background: var(--color-verified-bg);
  border-radius: var(--border-radius-sm);
}

.btn-sm {
  padding: 4px 12px;
  font-size: var(--font-size-xs);
  border-radius: var(--border-radius-sm);
}

.btn-edit {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-edit:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.admin-edit-panel {
  padding: var(--space-2xl);
}

.admin-edit-panel h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
}

.edit-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.edit-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.edit-row label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.edit-input {
  padding: 8px var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.edit-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(200, 75, 75, 0.15);
}

.edit-textarea {
  resize: vertical;
  min-height: 80px;
}

.edit-section-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.edit-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.admin-img-section {
  margin-bottom: var(--space-xl);
}

.admin-img-section h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.admin-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.admin-image-item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.admin-image-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.admin-logo-item {
  width: 80px;
  margin-bottom: var(--space-sm);
}

.admin-img-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-danger);
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.admin-image-item:hover .admin-img-remove { opacity: 1; }

.admin-image-item.marked-for-removal {
  opacity: 0.35;
  border-color: var(--color-danger);
}

.admin-image-item.marked-for-removal .admin-img-remove {
  opacity: 1;
  background: var(--color-text-muted);
}

.admin-img-section .edit-row {
  flex-direction: row;
  align-items: center;
  gap: var(--space-sm);
}

.admin-img-section .edit-input { flex: 1; }

.admin-upload-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.admin-upload-row .edit-input { flex: 1; min-width: 0; }

.admin-upload-btn {
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-upload-btn.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.admin-upload-or {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  flex-shrink: 0;
}

.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: var(--space-sm);
  border: 2px solid var(--color-border);
}

.banner-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.banner-select-item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-base);
}

.banner-select-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.banner-select-item.selected {
  border-color: var(--color-verified);
  box-shadow: 0 0 0 2px rgba(91, 168, 140, 0.3);
}

.banner-select-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.banner-position-section {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.banner-position-section h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.banner-pos-controls {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.banner-selected-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  background: var(--color-verified);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  border-radius: var(--border-radius-sm);
}

.text-muted {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* ===========================
   Tag Picker
   =========================== */

.tag-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--color-accent);
  color: white;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  animation: chipIn 0.15s ease;
}

.tag-remove {
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  margin-left: 2px;
}

.tag-remove:hover { opacity: 1; }

.tag-input-wrap {
  position: relative;
}

.tag-input-wrap .tag-search {
  width: 100%;
}

.tag-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: chipIn 0.12s ease;
}

.tag-dropdown[hidden] { display: none; }

.tag-suggestion {
  padding: 8px var(--space-md);
  font-size: var(--font-size-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: background var(--transition-fast);
}

.tag-suggestion:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.tag-empty {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
  font-style: italic;
}

.tag-dropdown::-webkit-scrollbar { width: 4px; }
.tag-dropdown::-webkit-scrollbar-track { background: transparent; }
.tag-dropdown::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
}

.admin-table th {
  text-align: left;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.admin-table td {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-border-light);
}

.admin-table .edit-input {
  padding: 4px 8px;
}

/* Scrollbar */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* ===========================
   Product Cards
   =========================== */

.products-section { margin-top: var(--space-lg); }

.products-scroll {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-md);
  scroll-snap-type: x mandatory;
}
.products-scroll::-webkit-scrollbar { height: 4px; }
.products-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.product-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.product-card-image {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--color-surface);
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  color: var(--color-text-muted);
}
.product-image-count {
  position: absolute;
  bottom: var(--space-xs);
  right: var(--space-xs);
  background: rgba(0,0,0,0.7);
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
}

.product-card-body {
  padding: var(--space-sm) var(--space-md);
}
.product-card-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-xs);
}
.product-card-price {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: var(--font-weight-semibold);
}
.product-price-old {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}
.product-card-brand {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.products-empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-xl);
}

.products-login-prompt {
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  font-style: italic;
}

/* ===========================
   Product Detail Modal
   =========================== */

.product-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) var(--space-xl);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border-light);
  width: 100%;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.product-back-btn:hover {
  color: var(--color-text-primary);
}

.product-back-btn svg { flex-shrink: 0; }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl);
}
@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
    padding: var(--space-md);
    gap: var(--space-lg);
  }
  .product-main-image {
    max-height: 50vh;
  }
  .product-main-image img {
    max-height: 50vh;
  }
}

.product-main-image {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-surface);
  max-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-main-image img {
  width: 100%;
  max-height: 60vh;
  display: block;
  object-fit: contain;
}
.product-image-nav-hint {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: var(--font-size-xs);
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
}
.product-no-image {
  aspect-ratio: 3/4;
  max-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(200, 75, 75, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(201, 169, 110, 0.06) 0%, transparent 50%),
    var(--color-surface);
  border-radius: var(--border-radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
}

.product-detail-gallery {
  min-width: 0;
}

.product-thumbnails {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
}
.product-thumb {
  flex: 0 0 60px;
  height: 60px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
}
.product-thumb.active, .product-thumb:hover {
  opacity: 1;
  border-color: var(--color-accent);
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.product-detail-name {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}
.product-detail-pricing {
  margin-bottom: var(--space-md);
}
.product-detail-price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
}
.product-detail-price-old {
  font-size: var(--font-size-base);
  text-decoration: line-through;
  color: var(--color-text-muted);
  margin-right: var(--space-sm);
}

.product-detail-actions {
  margin: var(--space-md) 0;
}
.product-store-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-xl);
  background: var(--color-accent);
  color: white;
  border-radius: var(--border-radius-md);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
}
.product-store-btn:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.product-company-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  margin: var(--space-md) 0;
  transition: border-color var(--transition-fast);
  cursor: pointer;
}
.product-company-link:hover { border-color: var(--color-accent); }
.product-company-logo { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.product-company-initial {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--font-size-xs); font-weight: var(--font-weight-bold);
}
.product-company-arrow { color: var(--color-text-muted); }

.product-detail-description {
  margin: var(--space-md) 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.7;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
}
.product-detail-description h4 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.product-detail-description p {
  white-space: pre-line;
  max-height: 250px;
  overflow-y: auto;
}
.product-detail-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}
.product-detail-meta span:first-child {
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  min-width: 50px;
}

.product-videos { margin-top: var(--space-md); }
.product-videos h4 { color: var(--color-text-primary); margin-bottom: var(--space-sm); }
.product-video-link {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface);
  border-radius: var(--border-radius-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  margin-right: var(--space-sm);
  margin-bottom: var(--space-xs);
}
.product-video-link:hover { color: var(--color-text-primary); }

/* ===========================
   Interaction Buttons
   =========================== */

.interaction-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin: var(--space-md) 0;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.interaction-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-full);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.interaction-btn:hover {
  border-color: var(--interaction-color, var(--color-accent));
  color: var(--interaction-color, var(--color-accent));
}
.interaction-btn.active {
  background: color-mix(in srgb, var(--interaction-color, var(--color-accent)) 15%, transparent);
  border-color: var(--interaction-color, var(--color-accent));
  color: var(--interaction-color, var(--color-accent));
}
.interaction-icon { font-size: 1.1em; }
.interaction-count {
  background: var(--color-bg-card);
  padding: 1px 6px;
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-xs);
}

.interaction-login-prompt {
  margin: var(--space-md) 0;
}

/* ===========================
   Profile Page
   =========================== */

.profile-page {
  padding: var(--space-xl) 0;
  max-width: 960px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
@media (max-width: 640px) {
  .profile-header { flex-direction: column; align-items: center; text-align: center; }
}

.profile-avatar, .profile-avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
}
.profile-avatar { object-fit: cover; }
.profile-avatar-placeholder {
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
}

.profile-display-name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}
.profile-username {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}
.profile-bio {
  color: var(--color-text-secondary);
  margin-top: var(--space-sm);
  line-height: 1.5;
}
.profile-social-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}
.profile-social-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--space-sm);
  background: var(--color-surface);
  border-radius: var(--border-radius-full);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-size-xs);
}
.profile-social-link:hover { color: var(--color-text-primary); }
.profile-member-since {
  display: block;
  margin-top: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.profile-edit-btn {
  position: absolute;
  top: 0;
  right: 0;
}
@media (max-width: 640px) {
  .profile-edit-btn { position: static; margin-top: var(--space-sm); }
}

.profile-tabs {
  display: flex;
  gap: var(--space-xs);
  margin: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}
.profile-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.profile-tab svg {
  flex-shrink: 0;
}
.profile-tab:hover { color: var(--color-text-secondary); }
.profile-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.profile-tab-count {
  background: var(--color-surface);
  padding: 1px 6px;
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-xs);
  margin-left: 4px;
}

.profile-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}
.profile-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-2xl);
}

.profile-section-title {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.profile-section-title:first-of-type {
  border-top: none;
  margin-top: var(--space-lg);
  padding-top: 0;
}

.profile-companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

.profile-company-card {
  display: block;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  text-decoration: none;
  color: inherit;
}

.profile-company-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.profile-company-hero {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.profile-company-hero-placeholder {
  width: 100%;
  height: 100px;
  background: var(--color-surface);
}

.profile-company-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
}

.profile-company-logo {
  width: 28px;
  height: 28px;
  border-radius: var(--border-radius-sm);
  object-fit: contain;
  flex-shrink: 0;
}

.profile-company-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-edit-form {
  max-width: 500px;
  margin: var(--space-xl) auto;
}
.profile-edit-form h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
}
.profile-edit-form h4 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--color-text-secondary);
}

/* ===========================
   Logout Button
   =========================== */

.btn-logout {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  padding: var(--space-sm);
}
.btn-logout:hover {
  background: var(--color-danger);
  color: white;
}

.btn-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-xs);
}
