/* ===== Detail Banner ===== */
.detail-banner {
  position: relative;
  overflow: hidden;
  height: clamp(200px, 22vw, 380px);
}

.detail-banner .banner-bg {
  width: 100%;
  height: 100%;
  position: relative;
}

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

.detail-banner .banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
}

.detail-banner .container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-content {
  text-align: center;
  color: #fff;
}

.banner-content h1 {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  margin-bottom: 16px;
}

.banner-divider {
  width: 50px;
  height: 3px;
  background: var(--primary-red);
  margin: 0 auto;
}

/* ===== Detail Main Layout ===== */
.detail-main {
  padding: clamp(40px, 5vh, 80px) 0;
  background: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: clamp(20px, 2.5vw, 40px);
  align-items: start;
}

/* ===== Left Sidebar ===== */
.detail-sidebar {
  background: #fff;
  overflow: hidden;
  border: 1px solid #949494;
  padding: 0 20px;
}

.detail-sidebar .sidebar-title {
  color: #1c1c1c;
  padding: 20px 24px;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 2px;
  border-bottom: 1px solid #949494;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list .category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10px 20px 24px;
  font-size: 15px;
  color: #1c1c1c;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.category-list .category-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #bbbbbb;
  transition: background 0.3s;
}

.category-list .category-item:hover {
  background: #fff5f5;
  color: var(--primary-red);
}

.category-list .category-item:hover::before {
  background: var(--primary-red);
}

.category-list .category-item.active {
  font-weight: 500;
}

.category-list .category-item.active::before {
  background: var(--primary-red);
}

.category-list .category-item span {
  flex: 1;
  font-weight: 700;
}

.category-list .category-item i {
  font-size: 14px;
  color: #999;
  transition: all 0.3s;
}

.category-list .category-item:hover i,
.category-list .category-item.active i {
  color: var(--primary-red);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid #eee;
  font-size: 20px;
  line-height: 1;
}

.breadcrumb a {
  color: #1c1c1c;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 20px;
  font-weight: bold;
}

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

.breadcrumb-sep {
  color: #1c1c1c;
  font-size: 20px;
  margin: 0 2px;
}

.breadcrumb-current {
  color: #1c1c1c;
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
}

/* ===== Center Content ===== */
.detail-content {
  background: #fff;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 8px;
}

.product-title-bar {
  margin-bottom: 24px;
}

.product-title-bar h2 {
  font-size: clamp(22px, 2vw, 28px);
  color: var(--text-dark);
  font-weight: 600;
  margin: 0;
  position: relative;
  padding-left: 16px;
}

.product-title-bar h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary-red);
  border-radius: 2px;
}

/* Product Info Section */
.product-info-section {
  margin-bottom: 30px;
}

.product-main-info {
    display: flex;
}

.product-gallery {
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 50px;
}

.product-gallery .main-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-description {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: clamp(20px, 1.8vw, 26px);
  color: var(--text-dark);
  font-weight: 600;
  padding: 0 0 40px;
  border-bottom: 1px solid #CACACA;
  line-height: 1.4;
  margin-bottom: 40px;
}

.product-spec p {
  font-size: 14px;
  color: #1C1C1C;
  line-height: 2;
  margin: 0;
}

.product-spec .spec-label {
  color: var(--text-dark);
  font-weight: 500;
}

/* ===== Tabs ===== */
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #eee;
  margin-bottom: 28px;
  background-color: #EEEEEE;
  padding: 0 20px;
}

.tab-item {
  padding: 14px 28px;
  font-size: 15px;
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.tab-item:hover {
  color: var(--primary-red);
}

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

.tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--primary-red);
}

/* Tab Content */
.tab-content {
  min-height: 200px;
}

.tab-panel {
  /* display: none; */
}

.tab-panel.active {
  display: block;
}

.panel-title {
  font-size: 20px;
  color: var(--text-dark);
  font-weight: 600;
  margin: 0 0 20px;
}

/* Features List */
.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  font-size: 14px;
  color: var(--text-dark);
  line-height: 2.2;
  padding-left: 4px;
}

/* Spec Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tbody tr {
  border-bottom: 1px solid #eee;
}

.spec-table tbody td {
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.6;
}

.spec-table .spec-name {
  color: var(--text-dark);
  font-weight: 500;
  width: 40%;
  background: #f9f9f9;
}

.spec-table .spec-value {
  color: var(--text-gray);
}

/* Specs dynamic table (without spec-table class) */
.parame-specs table {
  width: 100%;
  border-collapse: collapse;
}
.parame-specs table tr {
  border-bottom: 1px solid #eee;
}
.parame-specs table td {
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.6;
}
.parame-specs table td:first-child {
  color: var(--text-dark);
  font-weight: 500;
  width: 40%;
  background: #f9f9f9;
}
.parame-specs table td:not(:first-child) {
  color: var(--text-gray);
}

/* ===== Right Sidebar ===== */
.detail-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 15px;
  border: 1px solid #949494;
}

.search-box,
.inquiry-form {
  background: #fff;
  border-radius: 8px;
}

/* Search Box */
.search-box {
  padding: 0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  transition: background 0.3s;
  border: 1px solid #949494;
}

.search-input-wrapper:focus-within {
  background: #ebebeb;
}

.search-icon {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  object-fit: contain;
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-dark);
}

.search-input-wrapper input::placeholder {
  color: #999;
}

/* Inquiry Form */
.inquiry-form h4 {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}

.inquiry-form form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  position: relative;
  display: flex;
  align-items: flex-start;
  background: #f5f5f5;
  padding: 0 16px;
  border: 1px solid #949494;
  transition: background 0.3s;
}

.form-group:focus-within {
  background: #ebebeb;
}

.form-group .form-icon {
  padding: 14px 10px 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
}

.form-group .form-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.form-group input,
.form-group textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-dark);
  resize: none;
  font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}

.form-group textarea {
  min-height: 60px;
  padding-top: 14px;
}

.submit-btn {
  background: var(--primary-red);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 6px;
}

.submit-btn:hover {
  background: var(--primary-red-dark);
}

/* ===== Mobile Detail Section ===== */
.mobile-detail-section {
  display: none;
  padding: 20px 0;
}

.mobile-detail-section .container {
  background-color: #fff;
}

/* Mobile Category Tabs */
.mobile-tabs {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.mobile-tabs::-webkit-scrollbar {
  display: none;
}

.mobile-tab {
  flex: 0 0 auto;
  min-width: 110px;
  text-align: center;
  font-size: 16px;
  color: #000;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  background-color: #d7d7d7;
  padding: 12px 20px;
  white-space: nowrap;
}

.mobile-tab:first-child {
  margin-left: 0;
}

.mobile-tab.active {
  background-color: var(--primary-red);
  color: #fff;
}

/* Mobile Product Info */
.mobile-product-info {
  background-color: #e7e7e7;
  padding: 16px;
  margin: 10px 0;
}

.mobile-product-gallery {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f5f5f5;
}

.mobile-product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-product-desc h3 {
  font-size: 18px;
  color: var(--text-dark);
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.4;
}

.mobile-product-desc p {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.8;
  margin: 0 0 6px;
}

.mobile-product-desc .spec-label {
  color: var(--text-dark);
  font-weight: 500;
}

/* Mobile Sub Tabs */
.mobile-sub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #eee;
  margin: 20px 0;
}

.mobile-sub-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.mobile-sub-tab.active {
  color: var(--primary-red);
  font-weight: 600;
}

.mobile-sub-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--primary-red);
}

/* Mobile Tab Content */
.mobile-tab-content {
  padding: 20px;
}

.mobile-tab-panel {
  /* display: none; */
}

.mobile-tab-panel.active {
  display: block;
}

.mobile-tab-panel h4 {
  font-size: 16px;
  color: var(--text-dark);
  font-weight: 600;
  margin: 0 0 16px;
}

.mobile-tab-panel .features-list li {
  font-size: 13px;
  line-height: 2;
}

/* Mobile Spec Table */
.mobile-tab-panel .spec-table {
  display: block;
}

.mobile-tab-panel .spec-table tbody {
  display: block;
}

.mobile-tab-panel .spec-table tr {
  display: flex;
  border-bottom: 1px solid #eee;
}

.mobile-tab-panel .spec-table td {
  padding: 12px 14px;
  font-size: 13px;
}

.mobile-tab-panel .spec-table .spec-name {
  flex: 0 0 40%;
  background: #f9f9f9;
}

.mobile-tab-panel .spec-table .spec-value {
  flex: 1;
}

/* Specs panel dynamic table (no spec-table class) */
.parame-specs table {
  width: 100%;
  border-collapse: collapse;
}
.parame-specs table tbody tr {
  border-bottom: 1px solid #eee;
}
.parame-specs table tbody td {
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.6;
}
.parame-specs table tbody tr td:first-child {
  color: var(--text-dark);
  font-weight: 500;
  width: 40%;
  background: #f9f9f9;
}
.parame-specs table tbody td:not(:first-child) {
  color: var(--text-gray);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .detail-layout {
    grid-template-columns: 200px 1fr 240px;
    gap: 20px;
  }

  .product-main-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .detail-main {
    padding: 30px 0;
  }

  .detail-layout {
    display: none;
  }

  .mobile-detail-section {
    display: block;
  }

  .detail-banner {
    height: 200px;
  }
}

@media (max-width: 767.98px) {
  .detail-banner {
    height: 180px;
    margin-top: 60px;
  }

  .detail-main {
    padding: 20px 0 30px;
  }

  .mobile-tabs {
    flex-wrap: nowrap;
  }

  .mobile-tab {
    padding: 10px 16px;
    font-size: 14px;
    min-width: 100px;
  }

  .mobile-product-desc h3 {
    font-size: 16px;
  }

  .mobile-sub-tab {
    font-size: 14px;
    padding: 10px 0;
  }

  .mobile-tab-panel h4 {
    font-size: 15px;
  }

  .mobile-tab-panel .features-list li {
    font-size: 12px;
    line-height: 1.8;
  }

  .mobile-tab-panel .spec-table td {
    padding: 10px 12px;
    font-size: 12px;
  }
}
