/* ==========================================
   QIFAN SPORTS EQUIPMENT - COMMON STYLES
   Global utilities, design system, carousel
   ========================================== */

/* === CSS Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Roboto', 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  transition: all 0.3s ease;
}

/* === CSS Variables === */
:root {
  /* Colors */
  --primary-color: #F04F61;
  --primary-dark: #D13D4F;
  --primary-light: #F76B7C;
  --secondary-color: #f8f9fb;
  --accent-color: #2C3E50;
  --text-dark: #1a1a1a;
  --text-medium: #4a4a4a;
  --text-light: #6a6a6a;
  --border-color: #e0e0e0;
  --white: #ffffff;
  --black: #000000;

  /* Spacing */
  --container-max-width: 1600px;
  --section-padding: 50px 0;
  --section-padding-mobile: 50px 0;

  /* Transitions */
  --transition-base: all 0.3s ease;
  --transition-slow: all 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 12px 32px rgba(215, 122, 58, 0.2);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* === Breadcrumbs === */
.breadcrumbs {
  background: var(--bg-light, #f8f9fa);
  padding: 15px 0;
  box-shadow: var(--shadow-sm);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  margin-bottom: 20px;
  gap: 10px;
  font-size: 0.9rem;
}

.breadcrumb-item a {
  color: var(--text-light);
  transition: var(--transition-base);
}

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

.breadcrumb-item::after {
  content: '/';
  margin-left: 10px;
  color: var(--border-color);
}

.breadcrumb-item:last-child::after {
  display: none;
}

.breadcrumb-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* === Sidebar Styles === */
.sidebar-wrapper {
  position: sticky;
  top: 150px;
  height: fit-content;
}

.sidebar-widget {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--secondary-color);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-color);
}

/* Category List inside Sidebar */
.side-cat-list {
  list-style: none;
  padding: 0;
}

.side-cat-item {
  margin-bottom: 12px;
}

.side-cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-medium);
  padding: 10px 15px;
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  background: #fcfcfc;
}

.side-cat-link:hover,
.side-cat-link.active {
  background: var(--primary-color);
  color: var(--white);
  transform: translateX(5px);
}

.side-cat-link span {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Sidebar Contact Widget */
.side-contact-widget {
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b3d 100%);
  color: var(--white);
  text-align: center;
  padding: 40px 25px;
}

.side-contact-widget .widget-title {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.side-contact-widget .widget-title::after {
  background: var(--white);
}

.side-contact-widget p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.side-contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  text-align: left;
}

.side-contact-item i {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-contact-info a {
  color: var(--white);
  font-weight: 600;
}

/* === Sticky Contact Sidebar === */
.sticky-contact-sidebar {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-item {
  position: relative;
  width: 50px;
  height: 50px;
  background: var(--white);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 5px;
}

.sidebar-item i {
  font-size: 1.25rem;
}

.sidebar-item:hover {
  background: var(--primary-color);
  color: var(--white);
  width: 60px;
  margin-left: -10px;
}

.sidebar-item .tooltip {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  color: var(--white);
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.sidebar-item .tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent var(--primary-color);
}

.sidebar-item:hover .tooltip {
  opacity: 1;
  visibility: visible;
  right: 65px;
}

/* banner-sm */
.banner-sm {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
}

.banner-sm::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: var(--primary-color);
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: 0.05;
  z-index: 1;
}

.banner-sm .banner-content {
  text-align: start;
}

.banner-sm .banner-content p {
  color: var(--text-medium);
  margin: 0;
}

/* WeChat QR Tooltip */
.sidebar-item.wechat .qr-tooltip {
  position: absolute;
  right: 60px;
  bottom: -10px;
  background: var(--white);
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  text-align: center;
  width: 150px;
}

.sidebar-item.wechat:hover .qr-tooltip {
  opacity: 1;
  visibility: visible;
  right: 65px;
}

.qr-tooltip img {
  width: 120px;
  height: 120px;
  margin-bottom: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.qr-tooltip span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dark);
  font-weight: 600;
}

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

  .banner-sm {
    min-height: auto;
  }
}

h1 {
  font-size: 3rem;
  font-weight: 800;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-medium);
}

/* === Container & Layout === */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.section {
  padding: var(--section-padding);
}

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

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.section-title p {
  font-size: 1.125rem;
  color: var(--text-light);
}

/* === Button Styles === */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

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

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

.btn-white:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.875rem;
}

/* === Card Components === */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-base);
  height: 100%;
}

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

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--secondary-color);
}

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

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

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  transition: var(--transition-base);
}

.card:hover .card-title {
  color: var(--primary-color);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
}

/* === Grid System === */
.grid {
  display: grid;
  gap: 30px;
}

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

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

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

/* === FAQ Section === */
.faq-item {
  background: var(--white);
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition-base);
}

.faq-item:hover {
  border-color: var(--primary-color);
}

.faq-question {
  padding: 20px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.faq-question i {
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.faq-answer {
  padding: 20px;
  display: none;
  color: var(--text-medium);
  line-height: 1.7;
  border-top: 1px solid transparent;
}

.faq-item.active {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.faq-item.active .faq-answer {
  display: block;
  border-top-color: var(--border-color);
}

.faq-item.active .faq-question {
  color: var(--primary-color);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 60px;
}

.page-btn {
  width: 45px;
  height: 45px;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition-base);
}

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

.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* fixedbg */
.fixed-bg {
  position: relative;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--white);
  z-index: 1;
}

.fixed-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

.fixed-bg .section-title h2,
.fixed-bg .section-title p {
  color: var(--white);
}

/* === Swiper/Carousel Styles === */
.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-button-next,
.swiper-button-prev {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

.swiper-button-next:hover:after,
.swiper-button-prev:hover:after {
  color: var(--white);
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgb(240, 79, 97, 0.5);
  opacity: 0.5;
  transition: var(--transition-base);
}

.swiper-pagination-bullet-active {
  background: var(--primary-color);
  opacity: 1;
  width: 30px;
  border-radius: 6px;
}

/* === Form Styles === */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(215, 122, 58, 0.1);
}

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

/* === Modal Overlay === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  backdrop-filter: blur(4px);
}

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

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: var(--transition-base);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition-base);
}

.modal-close:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: rotate(90deg);
}

/* =====内链====== */
a.wpil_keyword_link {
    color: #f04f61;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

a.wpil_keyword_link:hover {
    color: #5399a2;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

/* === Utility Classes === */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.bg-light {
  background-color: var(--secondary-color);
}

.bg-dark {
  background-color: var(--accent-color);
  color: var(--white);
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mb-5 {
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mt-5 {
  margin-top: 3rem;
}

/* === Animation Keyframes === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-100%);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(50px);
}

.fade-in-up.appear {
  animation: fadeInUp 0.8s ease forwards;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
  :root {
    --section-padding: 60px 0;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  .container {
    padding: 0 20px;
  }

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

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

@media (max-width: 768px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

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

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 40px;
    height: 40px;
  }

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

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

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}
/* SEO Section */
.seo-section{
    padding: 0;
}
.seo-container{
    padding: 60px 0;
}
.seo-container:nth-child(even){
    background: #f7f7f7;
}
.seo-container h2{
    position: relative;
    font-weight: bold;
    display: inline-block;
    width: 100%;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}
.seo-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}
@media (max-width: 768px){
    .seo-container h2{
        font-size: 1.5rem;
    }
}

.seo-container h2>strong{
    font-weight: bold;
}
.seo-container>.container>p{
    margin-bottom: 10px;
}
.seo-container>.container>ul{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.seo-container>.container>ul>li{
    position: relative;
}
.seo-container>.container>ul>li>p::before{
    content: '';
    display: inline-block;
    top: 0;
    left: 0;
    width: 12px;
    height: 3px;
    background: var(--primary-red);
    margin-right: 10px;
    vertical-align: middle;
}
.seo-container>.container>ul>li>p>strong{
    margin-right: 10px;
    color: var(--primary-red);
}