/*
Theme Name:    FabXPress
Theme URI:     https://example.com/fabxpress
Author:        Chabeland
Author URI:    https://chabeland.com
Description:   Minimal, elegant theme for Chabeland with gold accents and separated supplier/customer flows.
Version:       1.3.5
License:       GNU General Public License v2 or later
License URI:   https://www.gnu.org/licenses/gpl-2.0.html
Tags:          custom-colors, full-site-editing, block-patterns, responsive-layout, one-column, two-columns
Text Domain:   fabxpress
*/

:root {
  --primary: #D4A017;
  --primary-hover: #B98C14;
  --text: #D4AF37;
  --muted: #555555;
  --bg: #111111;
  --dark: #0f0f0f;
  --border: #1f2937;
  --hero-bg: #000000;
  --hero-text: #ffffff;
  --hero-accent: #B98C14;
}

/* ==================== GLOBAL RESET ==================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ==================== HEADINGS – GUTENBERG COLOR PICKER ==================== */
.wp-block-heading,
.wp-block-heading h1,
.wp-block-heading h2,
.wp-block-heading h3,
.wp-block-heading h4,
.wp-block-heading h5,
.wp-block-heading h6,
h1, h2, h3, h4, h5, h6 {
  color: inherit !important;
  margin: 1.25rem 0 .75rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Default colour when NO inline colour is set */
.wp-block-heading:not([style*="color"]) h1,
.wp-block-heading:not([style*="color"]) h2,
.wp-block-heading:not([style*="color"]) h3,
.wp-block-heading:not([style*="color"]) h4,
.wp-block-heading:not([style*="color"]) h5,
.wp-block-heading:not([style*="color"]) h6,
h1:not([style*="color"]),
h2:not([style*="color"]),
h3:not([style*="color"]),
h4:not([style*="color"]),
h5:not([style*="color"]),
h6:not([style*="color"]) {
  color: var(--text) !important;
}

/* ==================== HEADER ==================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(15,15,15,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
}
.logo svg { width: 32px; height: 32px; fill: var(--primary); }
.logo span { transition: color .3s ease; }
.logo:hover span { color: var(--primary-hover); }

.brand-title {
  font-family: "Playfair Display", ui-serif, Georgia, serif;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.5rem;
}

/* ==================== HERO ==================== */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  text-align: center;
  padding: 3.5rem 1rem;
}
.hero h1, .hero p.lead { color: var(--hero-text); margin: .3rem 0; }
.hero p.lead { color: #f5f5f5; }
.hero h3 { color: var(--hero-accent); font-weight: 500; margin-top: 1.25rem; }
.hero .cta { display: flex; justify-content: center; gap: 1rem; margin-top: .5rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: .5rem;
  font-weight: 700;
  transition: background .2s ease, transform .2s ease;
}
.btn-primary {
  background: var(--hero-accent);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
  background: #9f7610;
  transform: translateY(-1px);
}

/* Notice */
.notice {
  background: #111;
  color: #e5e7eb;
  border: 1px solid #333;
  border-radius: .6rem;
  max-width: 900px;
  margin: 3rem auto 1rem;
  padding: .9rem 1rem;
}

/* ==================== BODY GRID ==================== */
.section { padding: 1.25rem 0 2rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

.card {
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  padding: 1.25rem;
  background: #fff;
}
.card h3 { margin-top: 0; }
.muted { color: var(--muted); }

.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  transition: all .2s ease;
}
.btn-outline:hover,
.btn-outline:focus {
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}

/* ==================== AUTHENTICATION DESIGNS (LOGIN) ==================== */
.fabxpress-auth-wrap {
  width: 100%;
  max-width: 440px;
  margin: 40px auto;
  padding: 35px 25px;
  background-color: var(--dark);
  border: 2px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  box-sizing: border-box;
}

.fabxpress-auth-wrap h1 {
  color: var(--primary) !important;
  font-size: 1.85rem !important;
  margin-top: 0 !important;
  margin-bottom: 25px !important;
  font-weight: 700 !important;
}

.fabxpress-error {
  background-color: #721c24;
  color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-align: left;
}

.fabxpress-auth-wrap form p {
  margin-bottom: 20px !important;
  text-align: left !important;
}

.fabxpress-auth-wrap label {
  display: block !important;
  color: var(--primary) !important;
  margin-bottom: 8px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
}

.fabxpress-auth-wrap input[type="text"],
.fabxpress-auth-wrap input[type="password"] {
  width: 100% !important;
  height: auto !important;
  padding: 12px 16px !important;
  border: 1px solid #333333 !important;
  border-radius: 8px !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  font-size: 1rem !important;
  box-sizing: border-box !important;
  display: block !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.fabxpress-auth-wrap input[type="text"]:focus,
.fabxpress-auth-wrap input[type="password"]:focus {
  border-color: var(--primary-hover) !important;
  outline: none !important;
  box-shadow: 0 0 8px rgba(212, 160, 23, 0.3) !important;
}

.fabxpress-auth-wrap button[type="submit"] {
  width: 100% !important;
  padding: 14px !important;
  background-color: var(--primary) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
  font-weight: bold !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  margin-top: 10px !important;
}

.fabxpress-auth-wrap button[type="submit"]:hover,
.fabxpress-auth-wrap button[type="submit"]:focus {
  background-color: var(--primary-hover) !important;
}

.fabxpress-auth-wrap p a {
  color: var(--primary) !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  display: inline-block !important;
  margin-top: 12px !important;
  transition: color 0.2s ease !important;
}

.fabxpress-auth-wrap p a:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

@media screen and (min-width: 768px) {
  .fabxpress-auth-wrap {
    margin: 80px auto;
    padding: 45px 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  }
  .fabxpress-auth-wrap h1 {
    font-size: 2.1rem !important;
  }
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: #0d0d0d;
  color: #e5e7eb;
  margin-top: 3rem;
  padding: 2rem 0;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) { .site-footer .cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .site-footer .cols { grid-template-columns: 1fr; } }

.site-footer h3 { margin-top: 0; color: #fff; }
.site-footer a { color: #e5e7eb; }
.site-footer a:hover { color: var(--primary-hover); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }

.copy {
  margin-top: 1.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: .95rem;
}

/* ==================== DARK-MODE FALLBACK (optional) ==================== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --dark: #000;
  }
}

/* ============================================= */
/* === ANIMATIONS & SPINNER === */
/* ============================================= */
@keyframes fade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade { animation: fade 0.5s ease-out; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.animate-pulse { animation: pulse 1.5s infinite; }

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dark mode override (works with JS toggle) */
html.dark {
    --bg: #0f0f0f;
    --text: #f3f4f6;
    --primary: #fbbf24;
    --primary-hover: #f59e0b;
    background: var(--bg) !important;
    color: var(--text) !important;
}