/* 斯达文具 - 主样式 */
:root {
  --primary: #1a3a5c;
  --primary-dark: #122a45;
  --accent: #f4a261;
  --accent-hover: #e89554;
  --success: #2a9d8f;
  --bg: #faf9f6;
  --card: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --border: #e8e6e1;
  --shadow: 0 4px 24px rgba(26, 58, 92, 0.08);
  --shadow-hover: 0 12px 40px rgba(26, 58, 92, 0.14);
  --radius: 14px;
  --max-width: 1200px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 80px 0 100px;
  background: linear-gradient(135deg, #f8f6f1 0%, #eef4f7 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(244, 162, 97, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  line-height: 1.15;
  color: var(--primary);
  margin-bottom: 20px;
  font-weight: 800;
}

.hero-content h1 span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(26, 58, 92, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 58, 92, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: #f8fbfd;
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  background: white;
  padding: 24px;
}

.hero-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 600;
  color: var(--primary);
}

.hero-badge strong {
  display: block;
  font-size: 1.5rem;
  color: var(--accent);
}

/* Section */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 56px;
}

.section-title h2 {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* Categories */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.category-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  cursor: pointer;
}

.category-card:hover,
.category-card.active {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.category-card.active {
  background: linear-gradient(135deg, #fff 0%, #fff8f2 100%);
}

.category-icon {
  width: 56px;
  height: 56px;
  background: #f0f4f8;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: var(--primary);
  transition: all 0.25s;
}

.category-card:hover .category-icon,
.category-card.active .category-icon {
  background: var(--accent);
  color: white;
}

.category-card h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Products */
.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.products-count {
  color: var(--text-light);
  font-size: 0.95rem;
}

.search-box {
  position: relative;
  width: 280px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.15);
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: #d8d4cc;
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f5f5;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(26, 58, 92, 0.9);
  color: white;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-info {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.product-info p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.55;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}

.product-price .currency {
  font-size: 0.85rem;
  margin-right: 2px;
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.85rem;
  border-radius: 100px;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* About */
.about {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  background: linear-gradient(135deg, #eef4f7 0%, #f8f6f1 100%);
  border-radius: var(--radius);
  padding: 40px;
  display: grid;
  place-items: center;
  min-height: 360px;
}

.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  max-height: 320px;
  width: auto;
}

.about-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.features-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-item .icon {
  width: 28px;
  height: 28px;
  background: rgba(42, 157, 143, 0.12);
  color: var(--success);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.feature-item span {
  color: var(--text);
  font-weight: 500;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-card {
  background: white;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.25s;
}

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

.contact-card .icon {
  width: 56px;
  height: 56px;
  background: #f0f4f8;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-card h3 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.contact-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 28px;
}

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

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

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer h4 {
  color: white;
  margin-bottom: 18px;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.95rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  opacity: 0.75;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-link {
  opacity: 0.6;
  font-size: 0.85rem;
}

.admin-link:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-inner {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-badge {
    left: 12px;
    bottom: -12px;
    padding: 12px 16px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .categories {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .category-card {
    padding: 20px 14px;
  }

  .section-title h2 {
    font-size: 1.75rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .search-box {
    width: 100%;
  }
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.6s ease forwards;
}
