﻿/* ============================================================
   Koshda Jewellery House — Component Styling (Centralized CSS)
   ============================================================ */

/* ── Badges / Tags ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge-gold    { background: rgba(212,175,55,0.15); color: var(--gold-500); border: 1px solid rgba(212,175,55,0.3); }
.badge-green   { background: rgba(16,185,129,0.12); color: var(--green-500); border: 1px solid rgba(16,185,129,0.3); }
.badge-red     { background: rgba(239,68,68,0.12);  color: var(--red-500);   border: 1px solid rgba(239,68,68,0.3); }
.badge-yellow  { background: rgba(245,158,11,0.12); color: var(--yellow-500);border: 1px solid rgba(245,158,11,0.3); }
.badge-blue    { background: rgba(59,130,246,0.12); color: var(--blue-500);  border: 1px solid rgba(59,130,246,0.3); }
.badge-violet  { background: rgba(212,175,55,0.15); color: var(--gold-500); border: 1px solid rgba(212,175,55,0.3); }
.badge-gray    { background: rgba(255,255,255,0.06);color: var(--text-muted); border: 1px solid var(--border-subtle); }
.badge-orange  { background: rgba(249,115,22,0.12); color: var(--orange-500);border: 1px solid rgba(249,115,22,0.3); }

/* Status-specific badges */
.badge-standard  { background: rgba(59,130,246,0.1); color: var(--blue-500); border: 1px solid rgba(59,130,246,0.25); }
.badge-premium   { background: rgba(212,175,55,0.1); color: var(--gold-500); border: 1px solid var(--border-gold); }
.badge-exclusive { background: rgba(212,175,55,0.2); color: var(--gold-300); border: 1px solid var(--border-gold-strong); }

/* ── Avatars ────────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-700), var(--gold-500));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--bg-primary);
  flex-shrink: 0;
  border: 2px solid var(--border-gold);
}
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 80px; height: 80px; font-size: 26px; }

/* ── Product Card ───────────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}

.product-card-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-elevated);
}
.product-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-image img { transform: scale(1.05); }

.product-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  transition: background var(--ease-normal);
}
.product-card:hover .product-card-overlay { background: rgba(0,0,0,0.55); }
.product-card-actions {
  display: flex; gap: var(--space-2);
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--ease-normal);
}
.product-card:hover .product-card-actions { opacity: 1; transform: translateY(0); }
.product-action-btn {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--ease-fast);
  font-size: 14px;
}
.product-action-btn:hover { background: var(--gold-600); border-color: var(--gold-600); }
.product-action-btn.in-wishlist { background: rgba(212,175,55,0.6); border-color: var(--gold-500); }

.product-new-badge {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, var(--gold-600), var(--gold-400));
  color: var(--bg-primary);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-card-info {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.product-code {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: var(--gold-600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.product-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.product-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.product-tags { display: flex; gap: var(--space-1); flex-wrap: wrap; margin-top: 2px; }
.product-tag {
  padding: 2px 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Toast Notifications ────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 380px;
  pointer-events: all;
  animation: toast-in 0.35s var(--ease-spring) forwards;
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}
.toast.toast-success::before { background: var(--green-500); }
.toast.toast-error::before   { background: var(--red-500); }
.toast.toast-warning::before { background: var(--yellow-500); }
.toast.toast-info::before    { background: var(--blue-500); }
.toast.toast-gold::before    { background: var(--gold-500); }

.toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 13px; color: var(--text-primary); margin-bottom: 2px; }
.toast-msg   { font-size: 12px; color: var(--text-secondary); }
.toast-close { cursor: pointer; color: var(--text-muted); font-size: 16px; flex-shrink: 0; line-height: 1; padding: 2px; }
.toast-close:hover { color: var(--text-primary); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); max-height: 200px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(40px); max-height: 0; margin-bottom: -12px; }
}
.toast.dismissing { animation: toast-out 0.3s ease forwards; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-normal);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--ease-spring);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }

.modal-header {
  padding: var(--space-6) var(--space-6) var(--space-4);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title { font-family: var(--font-display); font-size: 1rem; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  border: none;
  transition: all var(--ease-fast);
  font-size: 18px;
}
.modal-close:hover { background: var(--bg-glass); color: var(--text-primary); }
.modal-body   { padding: var(--space-6); }
.modal-footer {
  padding: var(--space-4) var(--space-6) var(--space-6);
  display: flex; justify-content: flex-end; gap: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

/* ── Gold Buttons ───────────────────────────────────────────── */
.btn-filled-gold {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: #FFFFFF !important;
  border-color: var(--gold-500);
  box-shadow: 0 4px 12px var(--gold-glow);
  transition: all var(--ease-normal);
}
.btn-filled-gold:hover {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  box-shadow: 0 6px 20px var(--gold-glow-strong);
  transform: translateY(-2px) scale(1.02);
  color: #FFFFFF !important;
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold-500) !important;
  border: 1px solid var(--gold-500);
  transition: all var(--ease-normal);
}
.btn-outline-gold:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--gold-400);
  color: var(--gold-400) !important;
  transform: translateY(-1px);
}

/* Navbar branding logo styling override */
.navbar-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
}

/* Confirm modal modifiers */
.confirm-modal-w-480 {
  max-width: 480px !important;
}
.confirm-modal-msg {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Shared footer styling */
.shared-footer {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.shared-footer-links {
  margin-top: 4px;
}
.shared-footer-link {
  color: var(--text-muted);
}
.shared-footer-link:hover {
  color: var(--text-secondary);
}


