/* ============================================
   VISION TV v2.0 — COMPONENTS
   Buttons, Cards, Inputs, Modals, Badges, etc.
   ============================================ */

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--ease-normal);
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.96);
}

.btn-gold {
  background: var(--gold-gradient);
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--ease-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--bg-elevated);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

.card-gold-border {
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.card-clickable {
  cursor: pointer;
}
.card-clickable:active {
  transform: scale(0.98);
}

/* Section Card (Home Grid) */
.section-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--ease-normal);
  border: 1px solid transparent;
  text-align: center;
}

.section-card:active {
  transform: scale(0.95);
}

.section-card:hover {
  border-color: rgba(212, 175, 55, 0.15);
  background: var(--bg-elevated);
}

.section-card .card-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border-radius: var(--radius-md);
}

.section-card .card-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: var(--space-xs);
}

/* Product Card (Marketplace) */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease-normal);
  cursor: pointer;
}

.product-card:active {
  transform: scale(0.98);
}

.product-card .product-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-elevated);
}

.product-card .product-info {
  padding: var(--space-md);
}

.product-card .product-price {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gold);
  font-size: 18px;
}

.product-card .product-title {
  color: var(--text-primary);
  font-size: 14px;
  margin-top: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .product-location {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: var(--space-xs);
}

/* Profile Card (Marriage) */
.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  cursor: pointer;
  transition: all var(--ease-normal);
}

.profile-card:active {
  transform: scale(0.98);
}

.profile-card .avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

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

.profile-card .profile-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
}

.profile-card .profile-detail {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 2px;
}

/* ============================================
   INPUTS & FORMS
   ============================================ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input {
  background: var(--bg-input);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-size: 16px;
  transition: border-color var(--ease-normal);
  width: 100%;
}

.input:focus {
  border-color: var(--gold);
  background: var(--bg-card);
}

.input::placeholder {
  color: var(--text-muted);
}

textarea.input {
  min-height: 100px;
  resize: vertical;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23A8A8A8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* OTP Input */
.otp-container {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-heading);
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  transition: border-color var(--ease-normal);
}

.otp-input:focus {
  border-color: var(--gold);
}

/* ============================================
   BADGES & PILLS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
}

.badge-success {
  background: rgba(78, 203, 113, 0.15);
  color: var(--success);
}

.badge-error {
  background: rgba(255, 107, 107, 0.15);
  color: var(--error);
}

.badge-info {
  background: rgba(91, 158, 255, 0.15);
  color: var(--info);
}

.badge-premium {
  background: var(--gold-gradient);
  color: var(--text-inverse);
}

/* Tab Pills */
.tabs {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
  padding: var(--space-xs) 0;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease-normal);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid transparent;
}

.tab.active {
  background: var(--gold);
  color: var(--text-inverse);
  font-weight: 600;
}

.tab:not(.active):hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--ease-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: var(--max-width);
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-xl);
  transform: translateY(100%);
  transition: transform var(--ease-slow);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  margin: 0 auto var(--space-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-header h3 {
  font-family: var(--font-heading);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 18px;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--bg-elevated);
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 72px; height: 72px; }
.avatar-xl { width: 96px; height: 96px; }

.avatar-gold {
  border: 2px solid var(--gold);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  gap: var(--space-md);
}

.empty-state .empty-icon {
  font-size: 48px;
  opacity: 0.5;
}

.empty-state .empty-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
}

.empty-state .empty-text {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 260px;
}

/* ============================================
   LOADING / SKELETON
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

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

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-elevated);
  border-top-color: var(--gold);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: calc(100% - 32px);
  max-width: var(--max-width);
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: toastIn 0.3s var(--ease-spring);
  pointer-events: auto;
  border-left: 3px solid var(--gold);
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--error); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: var(--space-lg) 0;
}

.divider-gold {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.3;
}

/* ============================================
   UTILITIES
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }

.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }
