/* ===================== B2B Toys Theme Styles ===================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --primary-subtle: rgba(37, 99, 235, 0.08);
  --primary-glow: rgba(37, 99, 235, 0.2);
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #0f172a;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-hover: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-light: #f8fafc;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* ===================== Reset & Base ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
}

/* ===================== Utility Classes ===================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.section-padding {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section-padding { padding: 48px 0; }
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text);
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .section-title { font-size: 22px; }
  .section-subtitle { margin-bottom: 32px; }
}

/* ===================== Header ===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: 72px;
  transition: box-shadow 0.3s;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover { color: var(--primary); }

.site-logo img {
  height: 40px;
  width: auto;
}

/* -- Navigation -- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a,
.main-nav .nav-item {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}

.main-nav a:hover,
.main-nav .nav-item:hover {
  color: var(--text);
  background: var(--primary-subtle);
}

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

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s;
  padding: 8px;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 6px;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  color: var(--text);
  background: var(--primary-subtle);
}

/* -- Header Actions -- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-actions button,
.lang-switch button {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.header-actions button:hover,
.lang-switch button:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-switch button {
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 600;
}

.lang-switch button.active {
  color: var(--primary);
  background: var(--primary-subtle);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }

  .main-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    gap: 2px;
  }

  .main-nav.mobile-open .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
  }
}

/* ===================== Hero Slider ===================== */
.hero-section {
  margin-top: 72px;
  position: relative;
  overflow: hidden;
}

.hero-slide {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero-slide { min-height: 90vh; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 60px 24px;
}

.hero-content .hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.15);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.hero-content h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s;
}

.hero-cta:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}

/* Swiper overrides */
.hero-section .swiper-button-next,
.hero-section .swiper-button-prev {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}

.hero-section .swiper-button-next:after,
.hero-section .swiper-button-prev:after {
  font-size: 18px;
}

.hero-section .swiper-button-next:hover,
.hero-section .swiper-button-prev:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-section .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.hero-section .swiper-pagination-bullet-active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .hero-content { padding: 40px 16px; }
  .hero-content p { font-size: 14px; }
  .hero-cta { padding: 12px 24px; font-size: 13px; }
}

/* ===================== Awards Section ===================== */
.awards-section {
  background: var(--bg-alt);
  padding: 48px 0;
  overflow: hidden;
}

.awards-track {
  display: flex;
  align-items: center;
  gap: 48px;
  animation: scroll-awards 30s linear infinite;
  width: max-content;
}

.awards-track:hover {
  animation-play-state: paused;
}

@keyframes scroll-awards {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.award-item {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  padding: 12px 24px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.award-item .award-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===================== Product Carousel ===================== */
.brand-section {
  padding: 80px 0;
}

.brand-section:nth-child(even) {
  background: var(--bg-alt);
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.brand-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.brand-header .brand-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}

.brand-header .brand-link:hover {
  text-decoration: underline;
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all 0.3s;
}

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

.product-card .product-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
}

.product-card .product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-thumb img {
  transform: scale(1.08);
}

.product-card .product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.product-card .product-info {
  padding: 20px;
}

.product-card .product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.product-card .product-sku {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.product-card .product-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* Product swiper */
.product-swiper {
  overflow: hidden;
}

.product-swiper .swiper-slide {
  height: auto;
}

.product-swiper .swiper-button-next,
.product-swiper .swiper-button-prev {
  color: var(--text);
  background: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

.product-swiper .swiper-button-next:after,
.product-swiper .swiper-button-prev:after {
  font-size: 16px;
}

.product-swiper .swiper-button-next:hover,
.product-swiper .swiper-button-prev:hover {
  box-shadow: var(--shadow-lg);
  color: var(--primary);
}

@media (max-width: 768px) {
  .brand-section { padding: 48px 0; }
  .brand-header h2 { font-size: 20px; }
}

/* ===================== Story Section ===================== */
.story-section {
  padding: 100px 0;
  background: var(--bg-dark);
  color: white;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.story-content .story-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.15);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.story-content h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.story-content p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.9;
  margin-bottom: 32px;
}

.story-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: white;
  color: var(--bg-dark);
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s;
}

.story-cta:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

.story-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.stat-card {
  text-align: center;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card .stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .story-section { padding: 64px 0; }
  .story-grid { grid-template-columns: 1fr; gap: 40px; }
  .story-content h2 { font-size: 24px; }
  .stat-card .stat-value { font-size: 28px; }
}

/* ===================== Instagram Section ===================== */
.instagram-section {
  padding: 80px 0;
  background: var(--bg-alt);
}

.instagram-header {
  text-align: center;
  margin-bottom: 40px;
}

.instagram-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
}

.instagram-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.instagram-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}

.instagram-follow-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.instagram-post {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--border-light);
  position: relative;
  border-radius: 8px;
}

.instagram-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.instagram-post:hover img {
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .instagram-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== Contact / Locations Section ===================== */
.locations-section {
  padding: 80px 0;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.location-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: white;
}

.location-card .location-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 16px;
}

.location-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.location-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.contact-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  text-align: center;
  transition: border-color 0.2s;
}

.contact-card:hover {
  border-color: var(--primary-subtle);
}

.contact-card .contact-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.contact-card .contact-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

@media (max-width: 768px) {
  .locations-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ===================== Footer ===================== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .site-logo {
  color: white;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 0;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: white;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  padding: 0;
  transition: all 0.2s;
}

.footer-social a:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.1);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===================== Product Archive ===================== */
.archive-header {
  margin-top: 72px;
  padding: 60px 0 40px;
  background: var(--bg-alt);
  text-align: center;
}

.archive-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.archive-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 48px 0;
}

@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ===================== Single Product ===================== */
.product-detail {
  margin-top: 72px;
  padding: 48px 0;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-detail .product-gallery {
  position: sticky;
  top: 96px;
}

.product-detail .product-gallery img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.product-detail .product-meta h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-detail .product-meta .product-sku {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.product-detail .product-meta .product-price-box {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.product-detail .product-meta .product-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 32px;
}

.product-detail .product-meta .product-inquiry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s;
  border: none;
  cursor: pointer;
}

.product-detail .product-meta .product-inquiry-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}

@media (max-width: 768px) {
  .product-detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .product-detail .product-gallery { position: static; }
}

/* ===================== Animations ===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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