/* ============================================================
   Dingli Medical - Global Styles
   鼎力医疗企业官网全局样式
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* ----------------------------------------------------------
   1. CSS Variables / Design Tokens
   ---------------------------------------------------------- */
:root {
  /* Brand Colors */
  --primary: #2db9ba;
  --primary-hover: #24a3a4;
  --accent: #efb695;
  --accent-hover: #e5a07a;

  /* Neutral Colors */
  --heading-color: #111827;
  --body-text: #374151;
  --bg-white: #ffffff;
  --bg-gray: #f9fafb;
  --border-light: #e5e7eb;

  /* Semantic Colors */
  --success: #10b981;
  --error: #ef4444;

  /* Typography */
  --font-family: "Poppins", system-ui, -apple-system, sans-serif;

  /* Layout */
  --container-max: 1440px;
  --radius-default: 4px;
  --radius-md: 6px;

  /* Spacing */
  --section-py: 80px;
  --section-py-lg: 96px;

  /* Animation */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------------------------------------
   13. Global Swiper Component Styles (rd-swiper)
   ---------------------------------------------------------- */
.rd-swiper {
  width: 100%;
  height: 100%;
}

.rd-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Control Buttons (Arrows) */
.rd-swiper .swiper-button-prev,
.rd-swiper .swiper-button-next {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.3s ease,
    background 0.3s ease;
}

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

.rd-swiper .swiper-button-prev:hover,
.rd-swiper .swiper-button-next:hover {
  background: var(--accent) !important;
}

.rd-swiper .swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Pagination (Dots) */
.rd-swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  opacity: 1;
  border-radius: 4px;
  margin: 0 4px !important;
  transition: all 0.3s ease;
}

.rd-swiper .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.8);
}

.rd-swiper .swiper-pagination-bullet-active {
  width: 24px;
  background: var(--accent);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body-text);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

textarea {
  font-family: inherit;
}

/* Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--body-text);
  text-wrap: balance;
}

h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.15;
}

h2 {
  font-size: 42px;
  font-weight: 600;
  line-height: 1.2;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}

h4 {
  font-size: 20px;
}

.highlight {
  color: var(--accent);
}

p {
  margin-bottom: 1em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-base);
}

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

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

/* ----------------------------------------------------------
   3. Layout Components
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.ks-breadcrumbs {
  --ks-bc: rgba(55, 65, 81, 0.72);
  --ks-bc-link: rgba(55, 65, 81, 0.92);
  --ks-bc-sep: rgba(55, 65, 81, 0.35);
  --ks-bc-current: rgba(55, 65, 81, 0.98);
  margin-top: 18px;
  display: flex;
}

.ks-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px !important;
  line-height: 1.4;
  color: var(--ks-bc);
}

.ks-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: inherit !important;
}

.ks-breadcrumbs__item + .ks-breadcrumbs__item::before {
  content: "/";
  color: var(--ks-bc-sep);
  margin: 0 10px;
}

.ks-breadcrumbs__link {
  color: var(--ks-bc-link);
  text-decoration: none;
  transition: var(--transition-base);
}

.ks-breadcrumbs__link:hover {
  color: var(--accent);
}

.ks-breadcrumbs__item[aria-current="page"] {
  color: var(--ks-bc-current);
  font-weight: 600;
}

/* 产品详情页特定：面包屑链接颜色覆盖为深色/黑色 */
.sp-breadcrumbs {
  font-size: 14px;
  color: rgba(55, 65, 81, 0.45); /* 分隔符颜色降级 */
}

.sp-breadcrumbs a {
  color: rgba(55, 65, 81, 0.72) !important; /* 基础层级颜色，不喧宾夺主 */
  text-decoration: none;
  transition: var(--transition-base);
}

.sp-breadcrumbs a:hover {
  color: var(--accent) !important;
}

.sp-breadcrumbs span {
  color: rgba(55, 65, 81, 0.98); /* 当前页面权重略高 */
  font-weight: 500;
}

.about-hero .ks-breadcrumbs,
.contact-hero .ks-breadcrumbs,
.journey-hero .ks-breadcrumbs,
.hero .ks-breadcrumbs,
#products-hero .ks-breadcrumbs {
  --ks-bc: rgba(255, 255, 255, 0.7);
  --ks-bc-link: rgba(255, 255, 255, 0.92);
  --ks-bc-sep: rgba(255, 255, 255, 0.38);
  --ks-bc-current: rgba(255, 255, 255, 0.98);
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

.section-lg {
  padding-top: var(--section-py-lg);
  padding-bottom: var(--section-py-lg);
}

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

.section-gray {
  background-color: var(--bg-gray);
}

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

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

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

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

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

/* ----------------------------------------------------------
   4. Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  border: 2px solid transparent; /* Set base transparent border to keep sizes identical */
  border-radius: var(--radius-default);
  cursor: pointer;
  transition: var(--transition-base);
  min-height: 48px;
  box-sizing: border-box; /* Ensure border is included in dimensions */
}

.btn-primary {
  background-color: var(--accent);
  color: #111827;
  border-color: var(--accent); /* Give primary a border matching its bg */
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover); /* Update border color on hover */
  box-shadow: 0 12px 30px rgba(241, 191, 160, 0.4);
  color: #111827;
}

.btn-outline {
  background-color: transparent;
  color: var(--bg-white);
  border: 2px solid rgba(255, 255, 255, 0.5); /* 2px border */
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--bg-white);
  color: var(--bg-white);
}

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

.btn-secondary:hover {
  background-color: rgba(119, 136, 153, 0.1);
  color: var(--primary);
}

.btn-ghost {
  background-color: transparent;
  color: var(--body-text);
  border: 2px solid var(--border-light);
}

.btn-ghost:hover {
  background-color: rgba(119, 136, 153, 0.05);
  border-color: var(--accent);
  color: var(--accent);
}

/* Single Product / Related Product Button */
.sp-related-btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #0d4a99;
  background-color: #EEFAFC;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.sp-related-btn:hover {
  background-color: var(--accent);
  color: #111;
  box-shadow: 0 4px 15px rgba(239, 182, 149, 0.4);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   5. Cards
   ---------------------------------------------------------- */
.card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-default);
  overflow: hidden;
  transition: var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-bottom: 4px solid var(--accent);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-gray);
  overflow: hidden;
}

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

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

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--body-text);
}

.card-text {
  font-size: 14px;
  color: var(--body-text);
  opacity: 0.8;
  line-height: 1.6;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-default);
}

.badge-accent {
  background-color: var(--accent);
  color: #111827;
}

/* ----------------------------------------------------------
   6. Hero Section
   ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(119, 136, 153, 0.9) 0%,
    rgba(119, 136, 153, 0.7) 50%,
    rgba(119, 136, 153, 0.5) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding-left: 80px;
  color: var(--bg-white);
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--bg-white);
}

.hero-title .highlight {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
  opacity: 0.9;
  max-width: 600px;
}

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

/* ----------------------------------------------------------
   7. Forms
   ---------------------------------------------------------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--body-text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--body-text);
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-default);
  transition: var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(119, 136, 153, 0.2);
}

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

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ----------------------------------------------------------
   8. Tables
   ---------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.table th {
  font-weight: 600;
  color: var(--body-text);
  background-color: var(--bg-gray);
}

.table tr:hover {
  background-color: var(--bg-gray);
}

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

.text-left {
  text-align: left;
}

.text-white {
  color: var(--bg-white);
}

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

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

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

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

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

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

.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mt-4 {
  margin-top: 32px;
}
.mt-5 {
  margin-top: 48px;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.mb-4 {
  margin-bottom: 32px;
}
.mb-5 {
  margin-bottom: 48px;
}

.pt-0 {
  padding-top: 0;
}
.pt-1 {
  padding-top: 8px;
}
.pt-2 {
  padding-top: 16px;
}
.pt-3 {
  padding-top: 24px;
}
.pt-4 {
  padding-top: 32px;
}
.pt-5 {
  padding-top: 48px;
}

.pb-0 {
  padding-bottom: 0;
}
.pb-1 {
  padding-bottom: 8px;
}
.pb-2 {
  padding-bottom: 16px;
}
.pb-3 {
  padding-bottom: 24px;
}
.pb-4 {
  padding-bottom: 32px;
}
.pb-5 {
  padding-bottom: 48px;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------
   10. Responsive Design
   ---------------------------------------------------------- */
@media (max-width: 1199px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

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

  .hero-content {
    padding-left: 40px;
  }
}

@media (max-width: 767px) {
  :root {
    --section-py: 60px;
    --section-py-lg: 72px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 30px !important;
  }

  h3 {
    font-size: 20px;
  }

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

  .hero {
    min-height: auto;
    padding: 120px 0;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .btn {
    width: 100%;
    min-width: 280px;
    border-radius: var(--radius-md);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ----------------------------------------------------------
   11. Animation Keyframes
   ---------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-slide-left {
  animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-right {
  animation: slideInRight 0.6s ease-out forwards;
}

/* ----------------------------------------------------------
   12. Print Styles
   ---------------------------------------------------------- */
@media print {
  .hero::before,
  .btn,
  .card:hover {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .container {
    max-width: 100%;
  }
}

/* ----------------------------------------------------------
   14. Search Form
   ---------------------------------------------------------- */
.search-form {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  margin: 0 auto;
}

.search-form .search-field {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--body-text);
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-right: none;
  border-radius: var(--radius-default) 0 0 var(--radius-default);
  transition: var(--transition-base);
  height: 48px; /* Match button height */
  box-sizing: border-box;
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
  z-index: 1;
}

.search-form .search-submit {
  padding: 0 24px;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  background-color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0 var(--radius-default) var(--radius-default) 0;
  cursor: pointer;
  transition: var(--transition-base);
  height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.search-form .search-submit:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

@media (max-width: 767px) {
  .search-form {
    flex-direction: column;
    gap: 12px;
  }
  
  .search-form .search-field {
    border-right: 1px solid var(--border-light);
    border-radius: var(--radius-default);
    width: 100%;
  }
  
  .search-form .search-field:focus {
    box-shadow: 0 0 0 3px rgba(119, 136, 153, 0.2);
  }
  
  .search-form .search-submit {
    border-radius: var(--radius-default);
    width: 100%;
  }
}

