/* ===================================================================================
   Product Technical Parameters Page Styles
   Страница технических параметров товара
   =================================================================================== */

/* Page Container */
.prd-params-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main Content Container */
.prd-params-content {
  flex: 1;
}

/* Article / Content Block */
.prd-params-article {
  background: var(--bg-primary);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-6);
  margin-bottom: var(--spacing-7);
  overflow-x: auto;
  max-width: 100%;
}

.prd-params-article * {
  max-width: 100%;
}

.prd-params-article table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* Page Title - Main h1 */
.prd-params-title {
  font-size: var(--heading-h1);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: var(--spacing-6);
  line-height: var(--line-height-tight);
}

.prd-params-title b {
  font-weight: var(--font-weight-extrabold);
  color: var(--secondary-color);
}

/* Parameters Container */
.prd-params-container {
  width: 100%;
}

/* Headings hierarchy within tech params content */
.prd-params-container h1 {
  font-size: var(--heading-h2);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: var(--spacing-5);
  line-height: var(--line-height-tight);
}

.prd-params-container h2 {
  font-size: var(--heading-h3);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: var(--spacing-4);
  line-height: var(--line-height-tight);
}

.prd-params-container h3 {
  font-size: var(--heading-h4);
  font-weight: var(--font-weight-semibold);
  color: var(--primary-color);
  margin-bottom: var(--spacing-3);
  line-height: var(--line-height-tight);
}

.prd-params-container h4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-3);
  line-height: var(--line-height-tight);
}

/* Handle tables from tech_params */
.prd-params-container table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
}

.prd-params-container table td,
.prd-params-container table th {
  white-space: normal;
  word-wrap: break-word;
  max-width: 300px;
}

/* Table Styles */
.prd-params-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--spacing-4);
}

.prd-params-table th,
.prd-params-table td {
  padding: var(--spacing-3) var(--spacing-4);
  text-align: left;
  border-bottom: 1px solid var(--border-secondary);
}

.prd-params-table th {
  font-weight: var(--font-weight-semibold);
  color: var(--primary-color);
  background: var(--bg-tertiary);
  font-size: var(--text-base);
}

.prd-params-table td {
  font-size: var(--text-base);
  color: var(--text-body);
}

.prd-params-table tr:hover {
  background: var(--bg-tertiary);
}

.prd-params-table tr:last-child td {
  border-bottom: none;
}

/* Responsive table wrapper */
.prd-params-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Parameter Groups */
.prd-params-group {
  margin-bottom: var(--spacing-6);
}

.prd-params-group__title {
  font-size: var(--heading-h3);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: var(--spacing-4);
  padding-bottom: var(--spacing-2);
  border-bottom: 2px solid var(--secondary-color);
}

/* Back Link */
.prd-params-back {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-top: var(--spacing-6);
  padding: var(--spacing-3) var(--spacing-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  color: var(--primary-color);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: all var(--transition-base);
}

.prd-params-back:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--text-inverse);
}

/* Empty State */
.prd-params-empty {
  text-align: center;
  padding: var(--spacing-10) var(--spacing-5);
  color: var(--text-muted);
}

.prd-params-empty__icon {
  font-size: var(--text-24xl);
  margin-bottom: var(--spacing-4);
  opacity: 0.5;
}

.prd-params-empty__text {
  font-size: var(--text-lg);
}

/* ===================================================================================
   Responsive Styles
   =================================================================================== */

@media (max-width: 768px) {
  .prd-params-article {
    padding: var(--spacing-4);
    border-radius: var(--radius-lg);
  }

  .prd-params-title {
    font-size: var(--heading-h1-mobile);
    margin-bottom: var(--spacing-4);
  }

  /* Responsive headings within container */
  .prd-params-container h1 {
    font-size: var(--heading-h2-mobile);
    margin-bottom: var(--spacing-4);
  }

  .prd-params-container h2 {
    font-size: var(--heading-h3-mobile);
    margin-bottom: var(--spacing-3);
  }

  .prd-params-container h3 {
    font-size: var(--heading-h4-mobile);
    margin-bottom: var(--spacing-3);
  }

  .prd-params-container h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--spacing-2);
  }

  .prd-params-table th,
  .prd-params-table td {
    padding: var(--spacing-2) var(--spacing-3);
    font-size: var(--text-sm);
  }

  .prd-params-group__title {
    font-size: var(--heading-h3-mobile);
  }
}

@media (max-width: 576px) {
  .prd-params-article {
    padding: var(--spacing-3);
    border-radius: var(--radius-md);
    overflow-x: auto;
  }

  .prd-params-title {
    font-size: var(--heading-h2-mobile);
  }

  /* Mobile headings within container */
  .prd-params-container h1 {
    font-size: var(--heading-h3-mobile);
  }

  .prd-params-container h2 {
    font-size: var(--heading-h4-mobile);
  }

  .prd-params-container h3 {
    font-size: var(--text-xl);
  }

  .prd-params-container h4 {
    font-size: var(--text-lg);
  }

  /* Force tables to scroll horizontally on mobile */
  .prd-params-container table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .prd-params-container table thead,
  .prd-params-container table tbody {
    display: table;
    width: 100%;
  }

  .prd-params-table {
    display: block;
  }

  .prd-params-table thead {
    display: none;
  }

  .prd-params-table tbody,
  .prd-params-table tr,
  .prd-params-table td {
    display: block;
    width: 100%;
  }

  .prd-params-table tr {
    margin-bottom: var(--spacing-3);
    border-bottom: 1px solid var(--border-secondary);
  }

  .prd-params-table td {
    padding: var(--spacing-2) 0;
    border-bottom: none;
    position: relative;
    padding-left: 50%;
  }

  .prd-params-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
  }

  .prd-params-back {
    width: 100%;
    justify-content: center;
  }
}
