/* ============================================
   PROSPORT - Professional Sports Equipment B2B
   Design System & Global Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #0F3460;
  --primary-light: #1A4A7A;
  --primary-dark: #0A2545;
  --accent: #E63946;
  --accent-light: #FF4D5A;
  --green: #10B981;
  --green-light: #34D399;
  --bg-light: #F8FAFC;
  --gray: #64748B;
  --gray-light: #94A3B8;
  --gray-dark: #475569;
  --dark: #1E293B;
  --dark-light: #334155;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-md: 0 10px 40px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--dark);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

.section-title {
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 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: 8px;
  padding: 12px 28px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(15, 52, 96, 0.3);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(230, 57, 70, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-image {
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-spring);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  padding: 8px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  border: 1px solid rgba(0,0,0,0.06);
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dropdown-menu a:hover {
  background: var(--bg-light);
  color: var(--primary);
  padding-left: 24px;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: var(--white);
  z-index: 2000;
  padding: 80px 24px 24px;
  transition: right var(--transition);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.mobile-menu.active { right: 0; }

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.mobile-menu .submenu {
  padding-left: 16px;
  display: none;
}

.mobile-menu .submenu.active { display: block; }

.mobile-menu .submenu a {
  font-size: 13px;
  color: var(--gray);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

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

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--primary);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,52,96,0.92) 0%, rgba(15,52,96,0.78) 50%, rgba(15,52,96,0.65) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.hero-stat {
  text-align: center;
  padding: 0 24px;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.hero-stat:last-child { border-right: none; }

/* --- Page Header --- */
.page-header {
  padding: 160px 0 80px;
  background: var(--primary);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.page-header-content {
  position: relative;
  z-index: 1;
}

/* --- Product Card --- */
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.product-card .tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
}

.tag-hot { background: rgba(230,57,70,0.1); color: var(--accent); }
.tag-new { background: rgba(16,185,129,0.1); color: var(--green); }
.tag-oem { background: rgba(15,52,96,0.1); color: var(--primary); }

/* --- Floating Contact Widget --- */
.floating-widget {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.floating-widget .widget-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.floating-widget .widget-btn:hover {
  transform: translateX(-4px);
  box-shadow: var(--shadow-md);
}

.widget-btn.phone { background: var(--primary); color: var(--white); }
.widget-btn.email { background: var(--accent); color: var(--white); }
.widget-btn.wechat { background: var(--green); color: var(--white); }

.widget-tooltip {
  position: absolute;
  right: 60px;
  background: var(--dark);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.widget-btn:hover .widget-tooltip {
  opacity: 1;
  visibility: visible;
}

.widget-qr {
  position: absolute;
  right: 60px;
  bottom: 0;
  width: 160px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.wechat:hover .widget-qr {
  opacity: 1;
  visibility: visible;
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Stats Counter --- */
.stat-number {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1;
}

/* --- Form Elements --- */
.form-input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--bg-light);
  color: var(--dark);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,52,96,0.08);
  background: var(--white);
}

.form-input::placeholder { color: var(--gray-light); }

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

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
}

.breadcrumb a {
  color: var(--gray);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--primary); }

.breadcrumb .separator { color: var(--gray-light); }

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  color: var(--dark);
}

.pagination a:hover { background: var(--bg-light); }
.pagination .active { background: var(--primary); color: var(--white); }

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
}

.footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover { color: var(--white); }

.footer-heading {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

/* --- Tab --- */
.tab-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm);
}

.tab-btn.active {
  background: var(--primary);
  color: var(--white);
}

.tab-btn:hover:not(.active) {
  color: var(--primary);
  background: rgba(15,52,96,0.05);
}

/* --- Gallery --- */
.gallery-thumb {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  opacity: 0.6;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--primary);
  opacity: 1;
}

/* --- Filter Tags --- */
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--white);
  color: var(--gray);
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

/* --- Loading Skeleton --- */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* --- Responsive Nav --- */
@media (max-width: 1024px) {
  .desktop-nav { display: none !important; }
  .mobile-menu-btn { display: flex !important; }
}

@media (min-width: 1025px) {
  .mobile-menu-btn { display: none !important; }
}

/* --- Media Queries --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .hero .grid-2 { grid-template-columns: 1fr !important; gap: 40px !important; }
}

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr !important; }
  .hero { min-height: auto; padding: 60px 0; }
  .hero-content { padding-top: 100px !important; padding-bottom: 40px !important; }
  .hero-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); padding: 12px 0; }
  .hero-stat:last-child { border-bottom: none; }
  .floating-widget { right: 8px; gap: 6px; }
  .floating-widget .widget-btn { width: 40px; height: 40px; }
  #contact .grid-2 { grid-template-columns: 1fr !important; }
  section { padding: 60px 0 !important; }
  .page-header { padding: 120px 0 48px !important; }
  .footer .grid-4 { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
}
