/**
 * GOM Trading - Luxury Gold + Dark theme
 * Gold: #D4AF37 | Black/Charcoal: #0B0B0B, #1A1A1A
 * Jewellery-brand premium look, soft gold gradients, smooth transitions
 */

:root {
  --gold: #D4AF37;
  --gold-light: #e8c968;
  --gold-dark: #b8942a;
  --gold-soft: rgba(212, 175, 55, 0.15);
  --black: #0B0B0B;
  --charcoal: #1A1A1A;
  --charcoal-light: #2a2a2a;
  --bg-dark: #0d0d0d;
  --text: #f5f5f5;
  --text-muted: #a0a0a0;
  --border: rgba(212, 175, 55, 0.25);
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--black);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--gold-light);
  opacity: 0.9;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Gold gradient text */
.gold-text {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform 0.15s ease, box-shadow var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
  color: var(--black);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold-soft);
  border-color: var(--gold-light);
}

.btn-dark {
  background: var(--charcoal);
  color: var(--gold);
  border: 1px solid var(--border);
}

.btn-dark:hover {
  background: var(--charcoal-light);
  border-color: var(--gold);
}

/* Cards */
.card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--text);
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

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

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  color: var(--text);
}

.form-group {
  margin-bottom: 1.25rem;
}

/* Header / Nav */
.site-header {
  background: var(--charcoal);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.35rem;
}

.logo span:first-child { color: #5ee8a8; }
.logo span:last-child { color: var(--gold); }

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-main a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--text);
}

.nav-main a:hover {
  color: var(--gold);
  background: var(--gold-soft);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 720px;
}

/* Section */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid;
}

.alert-success { background: rgba(34, 197, 94, 0.15); border-color: var(--success); color: #86efac; }
.alert-danger { background: rgba(239, 68, 68, 0.15); border-color: var(--danger); color: #fca5a5; }
.alert-warning { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-light); }
.alert-info { background: rgba(59, 130, 246, 0.15); border-color: #3b82f6; color: #93c5fd; }

/* Table */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--charcoal);
  color: var(--gold);
  font-weight: 600;
}

tr:hover td {
  background: rgba(212, 175, 55, 0.05);
}

/* Sidebar (user/admin panel) */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--charcoal);
  border-right: 1px solid var(--border);
  padding: 1rem 0;
  transition: transform var(--transition), width var(--transition);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--gold-soft);
  border-left-color: var(--gold);
  color: var(--gold);
}

.layout-with-sidebar {
  display: flex;
  min-height: 100vh;
}

.layout-with-sidebar main {
  flex: 1;
  padding: 1.5rem;
  overflow-x: hidden;
}

/* Mobile: sidebar collapse */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    transform: translateX(-100%);
    width: 280px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 199;
    pointer-events: none;
  }

  .sidebar-overlay.open {
    /* display: block; */
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--charcoal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--gold);
    cursor: pointer;
  }
}

@media (min-width: 769px) {
  .nav-toggle { display: none; }
}

/* Mobile nav open state */
@media (max-width: 768px) {
  .site-header .nav-main {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--charcoal);
    border-left: 1px solid var(--border);
    padding: 2rem 1rem 1rem;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    pointer-events: auto;
  }
  body.mobile-nav-open .site-header .nav-main,
  .site-header .nav-main.open {
    display: flex;
  }
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--gold);
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Hero Slider - Luxury Gold + Dark */
.hero-slider {
  --hero-bg-image: url('https://images.unsplash.com/photo-1610375461246-83df859d849d?w=1920');
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: var(--black);
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-slider::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(212, 175, 55, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.hero-slider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 11, 0.75) 0%, rgba(11, 11, 11, 0.9) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  z-index: 1;
}

.hero-slider__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  background: transparent;
}

.hero-slider__slide--active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slider__slide--active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slider__inner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-slider__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.hero-slider__text {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-slider__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gold);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.hero-slider__arrow:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold-light);
}

.hero-slider__arrow--prev { left: 1rem; }
.hero-slider__arrow--next { right: 1rem; }

.hero-slider__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}

.hero-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), border-color var(--transition);
}

.hero-slider__dot:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.hero-slider__dot--active {
  background: var(--gold);
  border-color: var(--gold);
}

@media (max-width: 768px) {
  .hero-slider { min-height: 380px; }
  .hero-slider__track { min-height: 380px; }
  .hero-slider__slide { padding: 3rem 1rem; }
  .hero-slider__arrow { width: 40px; height: 40px; }
  .hero-slider__arrow--prev { left: 0.5rem; }
  .hero-slider__arrow--next { right: 0.5rem; }
}
