/* Product details – responsive description, tabs & Word/summernote tables */

.products-details-section .description-wrapper {
  width: 100%;
  max-width: 100%;
}

.products-details-section .description-tabs {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.products-details-section .description-tabs .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  border-bottom: 1px solid var(--bc, #e5e5e5);
  padding-bottom: 0;
}

.products-details-section .description-tabs .nav-item {
  flex: 0 0 auto;
}

.products-details-section .description-tabs .nav-link {
  white-space: nowrap;
  margin-right: 0;
}

/* Scroll wrapper for wide spec tables; normal text still wraps in paragraphs */
.products-details-section .description-content-box {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.products-details-section .description-content-box > p {
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.products-details-section .description-content-box img,
.products-details-section .description-content-box video,
.products-details-section .description-content-box iframe,
.products-details-section .description-content-box embed,
.products-details-section .description-content-box object {
  max-width: 100% !important;
  height: auto !important;
}

.products-details-section .description-content-box iframe {
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
}

/* Preserve table layout from Word / Summernote (do NOT use display:block on table) */
.products-details-section .description-content-box table {
  display: table;
  width: max-content;
  min-width: min(100%, max-content);
  max-width: none;
  margin: 1rem 0 1.5rem;
  border-collapse: collapse;
  table-layout: auto;
  border: 1px solid #e0e0e0;
}

.products-details-section .description-content-box table thead,
.products-details-section .description-content-box table tbody,
.products-details-section .description-content-box table tfoot {
  display: table-row-group;
}

.products-details-section .description-content-box table tr {
  display: table-row;
}

.products-details-section .description-content-box table th,
.products-details-section .description-content-box table td {
  display: table-cell;
  padding: 8px 16px;
  vertical-align: top;
  text-align: left;
  border: 1px solid #e8e8e8;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  line-height: 1.5;
}

/* Summernote / Word often wrap cell text in <p> – keep on one line like Word */
.products-details-section .description-content-box table th p,
.products-details-section .description-content-box table td p,
.products-details-section .description-content-box table th span,
.products-details-section .description-content-box table td span {
  margin: 0;
  padding: 0;
  white-space: nowrap;
  display: inline;
}

.products-details-section .description-content-box table th strong,
.products-details-section .description-content-box table td strong,
.products-details-section .description-content-box table th b,
.products-details-section .description-content-box table td b {
  font-weight: 700;
}

.products-details-section .description-content-box pre,
.products-details-section .description-content-box code {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
  overflow-x: auto;
}

.products-details-section .description-content-box ul,
.products-details-section .description-content-box ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.products-details-section .tab-content {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 767px) {
  .products-details-section {
    padding-top: 80px;
    padding-bottom: 60px;
  }

  .products-details-section .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .products-details-section .description-tabs .nav-link {
    font-size: 0.95rem;
    padding-bottom: 8px;
  }

  .products-details-section .tab-content.mt-30 {
    margin-top: 20px !important;
  }

  .products-details-section .description-content-box {
    font-size: 0.95rem;
  }

  .products-details-section .description-content-box table th,
  .products-details-section .description-content-box table td {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .products-details-section .shop-review-area .shop-review-user {
    flex-direction: column;
    align-items: flex-start;
  }

  .products-details-section .shop-review-area .shop-review-user .thumb {
    margin-right: 0;
    margin-bottom: 12px;
  }
}

@media (max-width: 575px) {
  .products-details-section .description-tabs .nav-tabs {
    gap: 4px 12px;
  }
}
