/* Import common styles */
@import url("../../common/common.css");

/* Product Page Specific Styles */

/* Product Header */
.product-header {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-primary) 100%
  );
  padding: 4rem 2rem 3rem;
  border-bottom: 1px solid var(--border);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.breadcrumb span {
  margin: 0 0.5rem;
}

.product-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.product-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.product-model {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Product Content */
.product-content {
  padding: 4rem 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-primary);
}

.product-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Product Introduction Layout */
.product-intro-layout {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  margin: 2rem 0;
}

.product-image-section {
  flex: 0 0 40%;
  min-width: 300px;
}

.product-image-section img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-intro-description {
  flex: 1;
  min-width: 0;
}

/* Model List */
.model-list {
  margin: 2rem 0;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
}

.model-list-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.model-list ul {
  list-style: none;
}

.model-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.model-list li::before {
  content: "•";
  position: absolute;
  left: 0.5rem;
  color: var(--accent);
  font-weight: bold;
}

/* Feature List */
.feature-list {
  margin: 2rem 0;
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 8px;
}

.feature-list ul {
  list-style: none;
}

.feature-list li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.7;
}

.feature-list li::before {
  content: "▪";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
}

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

/* Specifications Table */
.specs-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.specs-table thead {
  background: var(--bg-secondary);
}

.specs-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.specs-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.specs-table th.sortable:hover {
  background-color: var(--border);
}

.specs-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.specs-table tbody tr:hover {
  background: var(--bg-secondary);
}

.specs-table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.specs-table a:hover {
  color: #1e4380;
  text-decoration: underline;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2rem;
  transition: all 0.2s;
  max-width: 220px;
  width: 100%;
  justify-content: center;
}

.back-button:hover {
  background: var(--border);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Features Section */
.features-section {
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--border-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-icon i {
  color: white;
  font-size: 1.2rem;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Specifications Section */
.specs-section {
  margin-bottom: 4rem;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.specs-table th {
  background: var(--accent);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

.specs-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.specs-table tr:hover {
  background: var(--bg-secondary);
}

.specs-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.specs-table td:first-child a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.specs-table td:first-child a:hover {
  color: var(--text-primary);
}

/* Product Page Layout Styles */
.page-header {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-primary) 100%
  );
  padding: 4rem 2rem 3rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.page-title h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.page-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 800px;
  line-height: 1.7;
}

/* Product Grid Layout */
.products-content {
  padding: 4rem 2rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.product-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
  text-decoration: none;
  color: inherit;
}

.product-card-header {
  background: linear-gradient(
    135deg,
    rgba(44, 90, 160, 0.2) 0%,
    rgba(30, 58, 138, 0.2) 100%
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

/* 각 제품 카드별 배경 이미지 */
.product-card[data-category="servo"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img04.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card[data-category="brushless"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img03.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card[data-category="galvano"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img01.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card[data-category="actuator"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img02.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card[data-category="gearhead"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img06.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card[data-category="coreless"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img05.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card[data-category="driver"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img09.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card[data-category="encoder"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img08.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card[data-category="tachogenerator"] .product-card-header {
  background: linear-gradient(
      135deg,
      rgba(44, 90, 160, 0.2) 0%,
      rgba(30, 58, 138, 0.2) 100%
    ),
    url("../../assets/images/chiba/ca_top_img07.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-card-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.product-card:hover .product-card-header::before {
  transform: scale(1.2);
}

.product-icon {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}

.product-icon i {
  font-size: 2rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.product-card-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.product-card-header p {
  font-size: 1rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.product-card-body {
  padding: 2rem;
}

.product-image {
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.product-info h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.product-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.feature-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--accent);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.feature-tag::before {
  content: "#";
  margin-right: 0.2rem;
  opacity: 0.7;
}

/* Stats Section */
.stats-section {
  background: var(--bg-secondary);
  padding: 3rem;
  border-radius: 16px;
  margin-bottom: 4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Back Button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 2rem;
}

.btn-back:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* Product Page Responsive */
@media (max-width: 768px) {
  .page-header {
    padding: 2rem 1rem 2rem;
  }

  .products-content {
    padding: 2rem 1rem;
  }

  .page-title h1 {
    font-size: 2.2rem;
  }

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

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

  .stats-section {
    padding: 2rem;
  }

  .product-header {
    padding: 2rem 1.5rem 2rem;
  }

  .product-title {
    font-size: 2rem;
  }

  .product-content {
    padding: 2rem 1.5rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .specs-table {
    font-size: 0.85rem;
  }

  .specs-table th,
  .specs-table td {
    padding: 0.75rem 0.5rem;
  }

  .product-intro-layout {
    flex-direction: column !important;
    gap: 2rem !important;
  }

  .product-image-section {
    flex: none !important;
    min-width: auto !important;
    text-align: center;
  }

  .product-intro-description {
    flex: none !important;
    min-width: auto !important;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .product-image {
    height: 180px;
    margin-bottom: 1rem;
  }

  .specs-table {
    font-size: 0.9rem;
  }

  .specs-table th,
  .specs-table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .page-title h1 {
    font-size: 2rem;
  }

  .page-subtitle {
    font-size: 1.1rem;
  }

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

  .stat-number {
    font-size: 2rem;
  }

  .product-header {
    padding: 1.5rem 1rem 1.5rem;
  }

  .product-content {
    padding: 1.5rem 1rem;
  }

  .product-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .breadcrumb {
    flex-wrap: wrap;
  }

  .product-title h1 {
    font-size: 1.8rem;
  }

  .product-subtitle {
    font-size: 1.1rem;
  }

  .specs-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* PDF Download Section Styling */
.pdf-download-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-download-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pdf-download-header i {
  color: var(--accent);
  font-size: 1.2rem;
}

.pdf-language-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pdf-lang-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.pdf-lang-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
}

.pdf-lang-btn.active {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
  transform: translateY(-1px);
}

.pdf-lang-btn .flag {
  font-size: 1.2rem;
}

.pdf-download-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pdf-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

/* Compact PDF Download Styling */
.pdf-download-compact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.pdf-download-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.pdf-download-label i {
  color: var(--accent);
  font-size: 1rem;
}

.pdf-lang-buttons {
  display: flex;
  gap: 0.5rem;
}

.pdf-lang-btn-compact {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 70px;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.pdf-lang-btn-compact:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
}

.pdf-lang-btn-compact.active {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
}

.pdf-lang-btn-compact .flag {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .pdf-download-section {
    padding: 1rem;
  }

  .pdf-language-selector {
    flex-direction: column;
  }

  .pdf-lang-btn {
    padding: 1rem;
  }

  .pdf-download-compact {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .pdf-lang-buttons {
    justify-content: center;
  }

  .pdf-lang-btn-compact {
    flex: 1;
    min-width: auto;
  }
}

/* Case Page Specific Styles */
.case-product-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: block;
  position: relative;
  overflow: hidden;
}

.case-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.case-product-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.case-product-icon {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.case-product-icon i {
  font-size: 1.8rem;
  color: white;
}

.case-product-header-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.case-product-card-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.case-product-card-header h3 .subtitle {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.case-product-card-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.case-product-card-body {
  text-align: left;
}

.case-product-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.case-product-info p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.case-product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.case-feature-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}
