/*
Theme Name: Reseller Wholesale Theme
Theme URI: https://example.com/reseller-wholesale-theme
Author: Reseller Wholesale Team
Author URI: https://example.com
Description: Modern frontend theme for the Reseller Wholesale B2B Portal. Provides public pages, login/register, and the complete portal shell. Requires the Reseller Wholesale Core plugin.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reseller-wholesale-theme
Tags: b2b, wholesale, ecommerce, woocommerce, portal, responsive
*/

/* Public site base styles */
:root {
  --theme-primary: #3b82f6;
  --theme-bg: #0f1419;
  --theme-text: #e8eef7;
  --theme-muted: #8b9bb4;
  --theme-surface: #1a2332;
  --theme-radius: 12px;
  --theme-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --theme-bg: #f8fafc;
    --theme-text: #0f172a;
    --theme-muted: #64748b;
    --theme-surface: #ffffff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--theme-font);
  background: var(--theme-bg);
  color: var(--theme-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--theme-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: var(--theme-surface);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-logo { font-weight: 700; font-size: 1.15rem; color: var(--theme-text); text-decoration: none; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { color: var(--theme-muted); font-size: .9rem; text-decoration: none; }
.site-nav a:hover { color: var(--theme-text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .6rem 1.25rem; border-radius: 8px; font-weight: 500;
  font-size: .9rem; border: none; cursor: pointer; text-decoration: none;
  min-height: 44px; transition: .15s;
}
.btn-primary { background: var(--theme-primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent; color: var(--theme-text);
  border: 1px solid rgba(255,255,255,.15);
}
.btn-outline:hover { background: rgba(255,255,255,.05); text-decoration: none; }

.hero {
  padding: 5rem 1.5rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; line-height: 1.2; }
.hero p { color: var(--theme-muted); font-size: 1.15rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 3rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  background: var(--theme-surface);
  border-radius: var(--theme-radius);
  padding: 1.75rem;
  border: 1px solid rgba(255,255,255,.06);
}
.feature-card h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--theme-muted); font-size: .9rem; }

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--theme-muted);
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 3rem;
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--theme-surface);
  border-radius: var(--theme-radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(255,255,255,.08);
}
.auth-card h1 { margin: 0 0 .5rem; font-size: 1.5rem; }
.auth-card .subtitle { color: var(--theme-muted); margin-bottom: 1.75rem; font-size: .9rem; }
.auth-card label { display: block; margin-bottom: .35rem; font-size: .85rem; color: var(--theme-muted); }
.auth-card input {
  width: 100%; padding: .7rem 1rem; margin-bottom: 1rem;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.2); color: var(--theme-text); font-size: .95rem;
  min-height: 44px;
}
.auth-card .btn { width: 100%; margin-top: .5rem; }
.auth-card .links { margin-top: 1.25rem; text-align: center; font-size: .85rem; color: var(--theme-muted); }

@media (max-width: 640px) {
  .site-nav .hide-mobile { display: none; }
  .hero { padding: 3rem 1rem; }
}

/* ===== Homepage v2 ===== */
.hero-v2 {
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-color: #0c1220;
  padding: 4rem 1.5rem;
  text-align: center;
}
.hero-inner { max-width: 780px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 1rem;
}
.hero-v2 h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
}
.hero-lead {
  font-size: 1.15rem;
  color: #94a3b8;
  line-height: 1.65;
  margin: 0 auto 2rem;
  max-width: 560px;
}
.btn-lg { padding: .85rem 1.75rem; font-size: 1rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.section-inner { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 2rem;
  text-align: center;
  color: var(--theme-text);
}
.section-cats { padding: 4rem 0; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.cat-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3/2;
  display: block;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,0,0,.3); text-decoration: none; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; }
.cat-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,12,20,.9) 0%, transparent 60%);
  display: flex; align-items: flex-end; padding: 1rem;
}
.cat-overlay h3 { margin: 0; font-size: 1rem; color: #f1f5f9; font-weight: 600; }

.section-features { padding: 4rem 0; background: rgba(255,255,255,.02); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--theme-surface);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 1.75rem;
}
.feature-icon { font-size: 1.75rem; margin-bottom: .75rem; }
.feature-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--theme-muted); font-size: .9rem; line-height: 1.55; }

.section-cta {
  padding: 4.5rem 0;
  text-align: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}
.cta-inner h2 { margin: 0 0 .75rem; font-size: 1.85rem; color: #f1f5f9; }
.cta-inner p { color: #94a3b8; margin: 0 0 1.75rem; font-size: 1.05rem; }

@media (max-width: 640px) {
  .hero-v2 { min-height: 70vh; padding: 3rem 1rem; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Auth split layout */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-split-visual {
  background: #0c1220 center/cover;
  display: flex;
  align-items: center;
  padding: 3rem;
  color: #e2e8f0;
}
.auth-split-visual-inner { max-width: 420px; }
.auth-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #60a5fa;
  display: block;
  margin-bottom: 1.5rem;
}
.auth-split-visual h2 {
  font-size: 1.85rem;
  line-height: 1.25;
  margin: 0 0 1.5rem;
  color: #f1f5f9;
}
.auth-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
}
.auth-benefits li {
  padding: .5rem 0 .5rem 1.5rem;
  position: relative;
  color: #94a3b8;
  font-size: .95rem;
}
.auth-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 700;
}
.auth-split-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--theme-bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-card h1 { margin: 0 0 .35rem; font-size: 1.6rem; }
.auth-form label {
  display: block;
  margin: .85rem 0 .35rem;
  font-size: .85rem;
  color: var(--theme-muted);
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="url"],
.auth-form input[type="tel"] {
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.2);
  color: var(--theme-text);
  font-size: .95rem;
  min-height: 44px;
}
.auth-remember {
  display: flex !important;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0 !important;
  font-size: .85rem;
  color: var(--theme-muted);
}
.btn-block { width: 100%; margin-top: .5rem; }
.auth-alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.auth-alert-error { background: rgba(239,68,68,.15); color: #fca5a5; }
.auth-alert-warn { background: rgba(245,158,11,.15); color: #fcd34d; }
.auth-alert-ok { background: rgba(34,197,94,.15); color: #86efac; }
.auth-errors { color: #fca5a5; padding-left: 1.25rem; margin-bottom: 1rem; }
.form-section {
  margin: 1.5rem 0 .75rem;
  font-size: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.25rem;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.platform-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-bottom: 1rem;
}
.platform-checks label {
  display: flex !important;
  align-items: center;
  gap: .4rem;
  margin: 0 !important;
  font-size: .875rem;
  color: var(--theme-text);
}
.become-hero {
  text-align: center;
  padding: 3.5rem 1.5rem 1rem;
  background: linear-gradient(180deg, #0c1220 0%, transparent 100%);
}
.become-hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: .5rem 0 1rem; }

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--theme-text);
}

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-split-visual { min-height: 220px; padding: 2rem 1.5rem; }
  .auth-split-visual h2 { font-size: 1.4rem; }
  .auth-benefits { display: none; }
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--theme-surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    gap: .75rem;
    z-index: 90;
  }
  .site-nav.is-open { display: flex; }
  .site-header { position: relative; flex-wrap: wrap; }
  .form-row-2 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}

/* Public page content */
.page-main { min-height: 50vh; }
.page-header-public { margin-bottom: 1.5rem; }
.page-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.page-content { line-height: 1.7; color: var(--theme-text); }
.page-content h2, .page-content h3 { margin-top: 1.75rem; }
.page-content a { color: var(--theme-primary); }
.page-content ol, .page-content ul { padding-left: 1.25rem; }
.page-content li { margin-bottom: .5rem; }
.entry-content { line-height: 1.7; }
