:root {
  --primary: #e2211f;
  --accent: #e2211f;
  --accent2: #b91a19;
  --text: #212328;
  --gray: #64748b;
  --light: #f5f7fa;
  --border: #e2e8f0;
}

/* PRODUCT TOP SECTION */
.prod-top {
  padding: 48px 0;
  background: #fff;
}
.prod-layout {
  display: grid;
  grid-template-columns: 590px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 1024px) {
  .prod-layout {
    grid-template-columns: 1fr;
  }
}

/* Gallery */
.gallery-main {
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: #f8f9fb;
}
.swiper-main .swiper-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) {
  .swiper-main .swiper-slide img {
    height: 260px;
  }
}
.gallery-thumbs-wrap {
  margin-top: 10px;
  position: relative;
  padding: 0 32px;
}
.swiper-thumbs .swiper-slide {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s;
}
.swiper-thumbs .swiper-slide-thumb-active {
  border-color: var(--accent);
  opacity: 1;
}
.swiper-thumbs .swiper-slide img {
  width: 100%;
  object-fit: cover;
}
.t-prev,
.t-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 26px;
  height: 26px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.t-prev {
  left: 0;
}
.t-next {
  right: 0;
}
.t-prev:hover,
.t-next:hover {
  background: var(--accent);
}

/* Right panel */
.prod-right h1 {
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 16px;
}
.pcheck {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 7px;
}

/* Price box */
.price-box {
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}
@media (max-width: 640px) {
  .price-box {
    grid-template-columns: 1fr;
  }
}
.price-left .pl {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.price-left .pv {
  font-size: 26px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.price-left .pn {
  font-size: 12px;
  color: var(--gray);
  margin-top: 3px;
}
.btn-contact-main {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 8px;
}
.btn-contact-main:hover {
  background: #0a1535;
}
.btn-tel {
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: all 0.2s;
  background: #fff;
}
.btn-tel:hover {
  background: var(--primary);
  color: #fff;
}

/* Meta */
.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.meta-row:last-child {
  border-bottom: none;
}
.meta-key {
  min-width: 100px;
  font-size: 13px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.meta-val {
  font-size: 13.5px;
  color: var(--primary);
  font-weight: 600;
}
.tag-chip {
  display: inline-block;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray);
  margin: 0 3px 3px 0;
}
.stock-badge {
  color: #16a34a;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sec-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── TABS ── */
.tabs-bar {
  background: #fff;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 90;
}
.tabs-inner {
  display: flex;
  gap: 0;
}
.tab-btn {
  padding: 16px 28px;
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gray);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    color 0.2s,
    border-color 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--primary);
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 640px) {
  .tab-btn {
    padding: 14px 16px;
    font-size: 13px;
  }
  .tab-btn svg {
    display: none;
  }
}

/* TAB PANELS */
.tab-panel {
  display: none;
  padding: 52px 0;
}
.tab-panel.active {
  display: block;
}

/* Spec table */
.spec-wrap {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.spec-wrap table,
.spec-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 0 !important;
  border: none !important;
  min-width: 280px;
}
.spec-wrap table th,
.spec-table th {
  background: #f1f5f9;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--border);
  text-align: left;
}
.spec-wrap table tr,
.spec-table tr {
  transition: background-color 0.15s ease;
}
.spec-wrap table tr:nth-child(even),
.spec-table tr:nth-child(even) {
  background: #f8fafc;
}
.spec-wrap table tr:hover,
.spec-table tr:hover {
  background: #f1f5f9;
}
.spec-wrap table td,
.spec-table td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.5;
  color: var(--text);
}
.spec-wrap table tr:last-child td,
.spec-table tr:last-child td {
  border-bottom: none;
}
.spec-wrap table td:first-child,
.spec-table td:first-child {
  color: #475569;
  font-weight: 600;
  width: 38%;
  border-right: 1px solid var(--border);
}
.spec-wrap table td:last-child,
.spec-table td:last-child {
  color: var(--text);
  font-weight: 500;
}
.spec-wrap table p,
.spec-table p {
  margin: 0;
  padding: 0;
}

/* Detail panel */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
.detail-main-img {
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--border);
}
.detail-main-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.sec-heading {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 3px;
}
.sec-bar {
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 16px;
  margin-top: 6px;
}
.sub-heading {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  margin-top: 20px;
}
.sub-heading:first-child {
  margin-top: 0;
}
.body-text {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 10px;
}
.dcheck {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 8px;
}
.dcheck svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Cấu tạo component thumbnails */
.component-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 640px) {
  .component-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.component-card {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.component-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.component-card-img {
  background: var(--light);
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.component-card-img img {
  max-height: 90px;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s;
}
.component-card:hover .component-card-img img {
  transform: scale(1.08);
}
.component-card-name {
  padding: 8px 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
}

/* Application gallery */
.app-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 640px) {
  .app-gallery {
    grid-template-columns: 1fr 1fr;
  }
}
.app-gallery img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid var(--border);
}

/* RELATED panel */
.related-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
@media (max-width: 1200px) {
  .related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 900px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.rel-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}
.rel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
  border-color: var(--accent);
}
.rel-card-img {
  background: #f0f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.rel-card-img img {
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s;
}
.rel-card:hover .rel-card-img img {
  transform: scale(1.06);
}
.rel-card-body {
  padding: 14px;
}
.rel-card-body h3 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  line-height: 1.3;
}
.rel-link {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-top: 10px;
  width: 100%;
  transition:
    color 0.2s,
    gap 0.2s;
}
.rel-link:hover {
  color: var(--accent);
  gap: 8px;
}
