/**
 * Product Table Styles
 * Filterable product table for quote requests
 * 
 * DBM Website - Product Pages
 */

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.product-filters {
  background: white;
  border: 1px solid #e0e0e0;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 16px 20px;
}

.reset-filters {
  color: var(--bronze);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.reset-filters:hover {
  color: #a85f1a;
  text-decoration: underline;
}

/* Filter Row - Sleeve Bushings (6 columns: Reset, I.D., O.D., Length, Qty placeholder, Cart) */
.filter-row {
  display: grid;
  grid-template-columns: 17% 16% 16% 17% 16% 18%;
  gap: 0;
  align-items: center;
}

.filter-row .filter-col-cart {
  padding: 0;
}

/* Filter Row - Flanged Bushings (8 columns: Reset, I.D., O.D., Length, Fl.OD, Fl.Thk, Qty placeholder, Cart) */
.filter-row-flanged {
  display: grid;
  grid-template-columns: 13% 11% 11% 11% 13% 13% 12% 16%;
  gap: 0;
  align-items: center;
}

.filter-row-flanged .filter-col-cart {
  padding: 0;
}

.filter-row-flanged .filter-select {
  max-width: 110px;
  padding: 10px 30px 10px 10px;
  font-size: 13px;
}

/* Filter Row - Cored Bar (7 columns: Part#, Alloy, I.D., O.D., CutLength, Qty placeholder, Cart) */
.filter-row-cored-bar {
  display: grid;
  grid-template-columns: 14% 13% 14% 14% 15% 13% 17%;
  gap: 0;
  align-items: center;
}

.filter-row-cored-bar .filter-col-part {
  justify-content: center;
}

.filter-row-cored-bar .filter-col-alloy {
  justify-content: center;
}

.filter-row-cored-bar .filter-col-id {
  justify-content: center;
}

.filter-row-cored-bar .filter-col-od {
  justify-content: center;
}

.filter-row-cored-bar .filter-col-cart {
  justify-content: center;
  padding: 0;
}

.filter-row-cored-bar .filter-col-results {
  justify-content: center;
}

/* Filter Row - Solid Bar (6 columns matching table structure)
   Table columns: Part#(15%) Alloy(15%) O.D.(15%) CutLength(18%) Qty(15%) RequestQuote(22%)
   Filter: Part(Reset) | Alloy | O.D. | (empty) | (empty) | Cart */
.filter-row-solid-bar {
  display: grid;
  grid-template-columns: 15% 15% 15% 18% 15% 22%;
  gap: 0;
  align-items: center;
}

.filter-row-solid-bar .filter-col-part {
  justify-content: center;
}

.filter-row-solid-bar .filter-col-alloy {
  justify-content: center;
}

.filter-row-solid-bar .filter-col-od {
  justify-content: center;
}

.filter-row-solid-bar .filter-col-cut-length {
  justify-content: center;
}

.filter-row-solid-bar .filter-col-qty {
  justify-content: center;
}

.filter-row-solid-bar .filter-col-cart {
  justify-content: center;
  padding: 0;
}

/* Filter Row - Sintered Solid Bar (6 columns matching table structure)
   Table columns: Part#(15%) Alloy(15%) O.D.(15%) Length(17%) Qty(16%) RequestQuote(22%)
   Filter: Part(Reset) | Alloy | O.D. | Length | (empty) | Cart
   Note: Length is a HEADER FILTER (not per-row dropdown like cast solid bar) */
.filter-row-sintered-solid-bar {
  display: grid;
  grid-template-columns: 15% 15% 15% 17% 16% 22%;
  gap: 0;
  align-items: center;
}

.filter-row-sintered-solid-bar .filter-col-part {
  justify-content: center;
}

.filter-row-sintered-solid-bar .filter-col-alloy {
  justify-content: center;
}

.filter-row-sintered-solid-bar .filter-col-od {
  justify-content: center;
}

.filter-row-sintered-solid-bar .filter-col-length {
  justify-content: center;
}

.filter-row-sintered-solid-bar .filter-col-qty {
  justify-content: center;
}

.filter-row-sintered-solid-bar .filter-col-cart {
  justify-content: center;
  padding: 0;
}

/* Filter Row - Sintered Cored Bar (7 columns matching table structure)
   Table columns: Part#(14%) Alloy(13%) I.D.(13%) O.D.(13%) Length(13%) Qty(13%) RequestQuote(21%)
   Filter: Part(Reset) | Alloy | I.D. | O.D. | Length | (empty) | Cart
   Note: Length is a HEADER FILTER (not per-row dropdown like cast bar stock) */
.filter-row-sintered-cored-bar {
  display: grid;
  grid-template-columns: 14% 13% 13% 13% 13% 13% 21%;
  gap: 0;
  align-items: center;
}

.filter-row-sintered-cored-bar .filter-col-part {
  justify-content: center;
}

.filter-row-sintered-cored-bar .filter-col-alloy {
  justify-content: center;
}

.filter-row-sintered-cored-bar .filter-col-id {
  justify-content: center;
}

.filter-row-sintered-cored-bar .filter-col-od {
  justify-content: center;
}

.filter-row-sintered-cored-bar .filter-col-length {
  justify-content: center;
}

.filter-row-sintered-cored-bar .filter-col-qty {
  justify-content: center;
}

.filter-row-sintered-cored-bar .filter-col-cart {
  justify-content: center;
  padding: 0;
}

/* Filter Row - Plate (7 columns matching table structure)
   Table columns: Part#(13%) Alloy(13%) Thickness(13%) Width(13%) Length(15%) Qty(13%) RequestQuote(20%)
   Filter: Part(Reset) | Alloy | Thickness | Width | (empty) | (empty) | Cart */
.filter-row-plate {
  display: grid;
  grid-template-columns: 13% 13% 13% 13% 15% 13% 20%;
  gap: 0;
  align-items: center;
}

.filter-row-plate .filter-col-part {
  justify-content: center;
}

.filter-row-plate .filter-col-alloy {
  justify-content: center;
}

.filter-row-plate .filter-col-thickness {
  justify-content: center;
}

.filter-row-plate .filter-col-width {
  justify-content: center;
}

.filter-row-plate .filter-col-length {
  justify-content: center;
}

.filter-row-plate .filter-col-qty {
  justify-content: center;
}

.filter-row-plate .filter-col-cart {
  justify-content: center;
  padding: 0;
}

/* Filter Row - Sintered Plate (7 columns matching table structure)
   Table columns: Part#(13%) Alloy(13%) Thickness(13%) Width(13%) Length(15%) Qty(13%) RequestQuote(20%)
   Filter: Part(Reset) | Alloy | Thickness | Width | Length | (empty) | Cart
   Note: ALL dimensions are fixed (including Length), so Length is a header filter */
.filter-row-sintered-plate {
  display: grid;
  grid-template-columns: 13% 13% 13% 13% 15% 13% 20%;
  gap: 0;
  align-items: center;
}

.filter-row-sintered-plate .filter-col-part {
  justify-content: center;
}

.filter-row-sintered-plate .filter-col-alloy {
  justify-content: center;
}

.filter-row-sintered-plate .filter-col-thickness {
  justify-content: center;
}

.filter-row-sintered-plate .filter-col-width {
  justify-content: center;
}

.filter-row-sintered-plate .filter-col-length {
  justify-content: center;
}

.filter-row-sintered-plate .filter-col-qty {
  justify-content: center;
}

.filter-row-sintered-plate .filter-col-cart {
  justify-content: center;
  padding: 0;
}

.filter-select-alloy {
  width: 100%;
  max-width: 100%;
}

.filter-col {
  display: flex;
  justify-content: center;
  padding: 0 8px;
}

.filter-col-reset {
  justify-content: flex-start;
  padding-left: 20px;
}

.filter-col-cart {
  justify-content: center;
  padding: 0 8px;
}

.filter-col-results {
  justify-content: flex-end;
  padding-right: 20px;
}

.filter-select {
  width: 100%;
  max-width: 140px;
  padding: 10px 36px 10px 14px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--charcoal);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-select:hover {
  border-color: #bbb;
}

.filter-select:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(198, 116, 32, 0.1);
}

.results-count {
  font-size: 14px;
  color: var(--slate-gray);
}

/* Table Cart Icon */
.table-cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bronze);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.table-cart-link:hover {
  background: #a85f1a;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(198, 116, 32, 0.3);
}

.table-cart-link .cart-icon-svg {
  flex-shrink: 0;
}

/* Table Cart Count - Display inline with parentheses like top bar */
.table-cart-link .cart-count {
  position: relative;
  display: inline;
  top: auto;
  right: auto;
  margin-left: 0;
  padding: 0;
  background: none;
  color: white;
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: inherit;
}

/* ==========================================================================
   Product Table
   ========================================================================== */

.product-table-container {
  overflow-x: auto;
  border: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
  background: white;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

/* Table Header */
.product-table thead {
  background: #f8f8f8;
  border-bottom: 2px solid #e0e0e0;
}

.product-table th {
  padding: 14px 16px;
  font-weight: 600;
  text-align: left;
  color: var(--charcoal);
  white-space: nowrap;
}

.product-table th:first-child {
  padding-left: 20px;
}

.product-table th:last-child {
  padding-right: 20px;
  text-align: center;
}

/* Center-align dimension, alloy, and quantity columns */
.product-table th.col-alloy,
.product-table th.col-id,
.product-table th.col-od,
.product-table th.col-length,
.product-table th.col-cut-length,
.product-table th.col-qty {
  text-align: center;
}

/* Column Widths - Sleeve Bushings (6 columns) */
.col-part { width: 17%; }
.col-id { width: 16%; }
.col-od { width: 16%; }
.col-length { width: 17%; }
.col-qty { width: 16%; }
.col-action { width: 18%; }

/* Center Part # header and cells for Sleeve Bushings */
.product-table th.col-part,
.product-table td.col-part {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Sleeve Bushings */
.product-table th.col-action,
.product-table td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Column Widths - Flanged Bushings (8 columns) */
.product-table-flanged .col-part { width: 13%; }
.product-table-flanged .col-id { width: 11%; }
.product-table-flanged .col-od { width: 11%; }
.product-table-flanged .col-length { width: 11%; }
.product-table-flanged .col-flange-od { width: 13%; }
.product-table-flanged .col-flange-thickness { width: 13%; }
.product-table-flanged .col-qty { width: 12%; }
.product-table-flanged .col-action { width: 16%; }

/* Center Part # header and cells for Flanged Bushings */
.product-table-flanged th.col-part,
.product-table-flanged td.col-part {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Flanged Bushings */
.product-table-flanged th.col-action,
.product-table-flanged td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Column Widths - Cored Bar (7 columns: Part#, Alloy, I.D., O.D., Cut Length, Qty, Action) */
.product-table-cored-bar .col-part { width: 14%; }
.product-table-cored-bar .col-alloy { width: 13%; }
.product-table-cored-bar .col-id { width: 14%; }
.product-table-cored-bar .col-od { width: 14%; }
.product-table-cored-bar .col-cut-length { width: 15%; }
.product-table-cored-bar .col-qty { width: 13%; }
.product-table-cored-bar .col-action { width: 17%; }

/* Center Part # header and cells for Cored Bar */
.product-table-cored-bar th.col-part,
.product-table-cored-bar td.col-part {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Cored Bar */
.product-table-cored-bar th.col-action,
.product-table-cored-bar td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Column Widths - Solid Bar (6 columns: Part#, Alloy, O.D., Cut Length, Qty, Action) */
.product-table-solid-bar .col-part { width: 15%; }
.product-table-solid-bar .col-alloy { width: 15%; }
.product-table-solid-bar .col-od { width: 15%; }
.product-table-solid-bar .col-cut-length { width: 18%; }
.product-table-solid-bar .col-qty { width: 15%; }
.product-table-solid-bar .col-action { width: 22%; }

/* Center Part # header and cells for Solid Bar */
.product-table-solid-bar th.col-part,
.product-table-solid-bar td.col-part {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Solid Bar */
.product-table-solid-bar th.col-action,
.product-table-solid-bar td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Column Widths - Sintered Solid Bar (6 columns: Part#, Alloy, O.D., Length, Qty, Action)
   Note: Length is a fixed data column with header filter (not a dropdown per row) */
.product-table-sintered-solid-bar .col-part { width: 15%; }
.product-table-sintered-solid-bar .col-alloy { width: 15%; }
.product-table-sintered-solid-bar .col-od { width: 15%; }
.product-table-sintered-solid-bar .col-length { width: 17%; }
.product-table-sintered-solid-bar .col-qty { width: 16%; }
.product-table-sintered-solid-bar .col-action { width: 22%; }

/* Center Part # header and cells for Sintered Solid Bar */
.product-table-sintered-solid-bar th.col-part,
.product-table-sintered-solid-bar td.col-part {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Sintered Solid Bar */
.product-table-sintered-solid-bar th.col-action,
.product-table-sintered-solid-bar td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Column Widths - Sintered Cored Bar (7 columns: Part#, Alloy, I.D., O.D., Length, Qty, Action)
   Note: Length is a fixed data column with header filter (not a dropdown per row) */
.product-table-sintered-cored-bar .col-part { width: 14%; }
.product-table-sintered-cored-bar .col-alloy { width: 13%; }
.product-table-sintered-cored-bar .col-id { width: 13%; }
.product-table-sintered-cored-bar .col-od { width: 13%; }
.product-table-sintered-cored-bar .col-length { width: 13%; }
.product-table-sintered-cored-bar .col-qty { width: 13%; }
.product-table-sintered-cored-bar .col-action { width: 21%; }

/* Center Part # header and cells for Sintered Cored Bar */
.product-table-sintered-cored-bar th.col-part,
.product-table-sintered-cored-bar td.col-part {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Sintered Cored Bar */
.product-table-sintered-cored-bar th.col-action,
.product-table-sintered-cored-bar td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Column Widths - Plate (7 columns: Part#, Alloy, Thickness, Width, Length, Qty, Action) */
.product-table-plate .col-part { width: 13%; }
.product-table-plate .col-alloy { width: 13%; }
.product-table-plate .col-thickness { width: 13%; }
.product-table-plate .col-width { width: 13%; }
.product-table-plate .col-length { width: 15%; }
.product-table-plate .col-qty { width: 13%; }
.product-table-plate .col-action { width: 20%; }

/* Center Part # header and cells for Plate */
.product-table-plate th.col-part,
.product-table-plate td.col-part {
  text-align: center;
}

/* Center-align thickness and width columns for Plate */
.product-table th.col-thickness,
.product-table th.col-width,
.product-table td.col-thickness,
.product-table td.col-width {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Plate */
.product-table-plate th.col-action,
.product-table-plate td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Column Widths - Sintered Plate (7 columns: Part#, Alloy, Thickness, Width, Length, Qty, Action)
   Note: Length is a fixed data column with header filter (not a dropdown per row like cast plate) */
.product-table-sintered-plate .col-part { width: 13%; }
.product-table-sintered-plate .col-alloy { width: 13%; }
.product-table-sintered-plate .col-thickness { width: 13%; }
.product-table-sintered-plate .col-width { width: 13%; }
.product-table-sintered-plate .col-length { width: 15%; }
.product-table-sintered-plate .col-qty { width: 13%; }
.product-table-sintered-plate .col-action { width: 20%; }

/* Center Part # header and cells for Sintered Plate */
.product-table-sintered-plate th.col-part,
.product-table-sintered-plate td.col-part {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Sintered Plate */
.product-table-sintered-plate th.col-action,
.product-table-sintered-plate td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Filter Row - Sintered Disc (7 columns matching table structure)
   Table columns: Part#(14%) Alloy(13%) I.D.(13%) O.D.(13%) Thickness(13%) Qty(13%) RequestQuote(21%)
   Filter: Part(Reset) | Alloy | I.D. | O.D. | Thickness | (empty) | Cart
   Note: ALL dimensions are fixed, so all are header filters. I.D. can be "SOLID" for solid discs */
.filter-row-sintered-disc {
  display: grid;
  grid-template-columns: 14% 13% 13% 13% 13% 13% 21%;
  gap: 0;
  align-items: center;
}

.filter-row-sintered-disc .filter-col-part {
  justify-content: center;
}

.filter-row-sintered-disc .filter-col-alloy {
  justify-content: center;
}

.filter-row-sintered-disc .filter-col-id {
  justify-content: center;
}

.filter-row-sintered-disc .filter-col-od {
  justify-content: center;
}

.filter-row-sintered-disc .filter-col-thickness {
  justify-content: center;
}

.filter-row-sintered-disc .filter-col-qty {
  justify-content: center;
}

.filter-row-sintered-disc .filter-col-cart {
  justify-content: center;
  padding: 0;
}

/* Column Widths - Sintered Disc (7 columns: Part#, Alloy, I.D., O.D., Thickness, Qty, Action)
   Note: Thickness is a fixed data column with header filter (not a dropdown per row).
   I.D. can be "SOLID" for solid discs */
.product-table-sintered-disc .col-part { width: 14%; }
.product-table-sintered-disc .col-alloy { width: 13%; }
.product-table-sintered-disc .col-id { width: 13%; }
.product-table-sintered-disc .col-od { width: 13%; }
.product-table-sintered-disc .col-thickness { width: 13%; }
.product-table-sintered-disc .col-qty { width: 13%; }
.product-table-sintered-disc .col-action { width: 21%; }

/* Center Part # header and cells for Sintered Disc */
.product-table-sintered-disc th.col-part,
.product-table-sintered-disc td.col-part {
  text-align: center;
}

/* Symmetric padding on Request Quote column for Sintered Disc */
.product-table-sintered-disc th.col-action,
.product-table-sintered-disc td.col-action {
  padding-left: 16px;
  padding-right: 16px;
}

/* Center-align flanged dimension columns */
.product-table th.col-flange-od,
.product-table th.col-flange-thickness,
.product-table td.col-flange-od,
.product-table td.col-flange-thickness {
  text-align: center;
}

/* Table Body */
.product-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s ease;
}

.product-table tbody tr:last-child {
  border-bottom: none;
}

.product-table tbody tr:hover {
  background-color: #faf8f5;
}

/* Alternating rows using CSS :nth-child - excludes hidden rows */
.product-table tbody tr:not(.hidden):nth-child(even) {
  background-color: var(--warm-white);
}

.product-table tbody tr:not(.hidden):nth-child(even):hover {
  background-color: #f5f2ed;
}

/* Hidden rows (for filtering) */
.product-table tbody tr.hidden {
  display: none;
}

/* In Cart State - button color change only */
.product-table tbody tr.in-cart .add-to-quote-btn {
  background: #4caf50;
}

.product-table tbody tr.in-cart .add-to-quote-btn:hover {
  background: #43a047;
}

/* Table Cells */
.product-table td {
  padding: 12px 16px;
  vertical-align: middle;
  color: var(--charcoal);
}

.product-table td:first-child {
  padding-left: 20px;
}

.product-table td:last-child {
  padding-right: 20px;
  text-align: center;
}

/* Center-align dimension, alloy, and quantity column values */
.product-table td.col-alloy,
.product-table td.col-id,
.product-table td.col-od,
.product-table td.col-length,
.product-table td.col-cut-length,
.product-table td.col-qty {
  text-align: center;
}

/* Cut Length Dropdown Styling */
.cut-length-select {
  width: 120px;
  padding: 8px 30px 8px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--charcoal);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cut-length-select:hover {
  border-color: #bbb;
}

.cut-length-select:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(198, 116, 32, 0.1);
}

/* Part Number Badge */
.part-badge {
  display: inline-block;
  min-width: 120px;
  padding: 6px 12px;
  background: var(--bronze);
  color: white;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-align: center;
}

/* Dimension Values */
.dim-value {
  font-variant-numeric: tabular-nums;
}

/* Quantity Input */
.qty-input {
  width: 70px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qty-input:hover {
  border-color: #bbb;
}

.qty-input:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(198, 116, 32, 0.1);
}

/* Remove spinner buttons for cleaner look */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input[type=number] {
  -moz-appearance: textfield;
}

/* ==========================================================================
   Add to Quote Button
   ========================================================================== */

.add-to-quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--enterprise-green-base);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.add-to-quote-btn:hover {
  background: var(--enterprise-green-light);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(2, 122, 71, 0.3);
}

.add-to-quote-btn:active {
  transform: scale(0.95);
}

.add-to-quote-btn .btn-icon {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.add-to-quote-btn.added {
  background: #4caf50;
  animation: pulse 0.3s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.table-empty-state {
  padding: 60px 20px;
  text-align: center;
}

.table-empty-state p {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--slate-gray);
}

.table-empty-state .reset-filters {
  font-size: 15px;
}

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

@media (max-width: 900px) {
  .filter-row {
    gap: 8px;
  }

  .filter-col {
    padding: 0 4px;
  }

  .filter-select {
    max-width: 120px;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .product-filters {
    padding: 12px 16px;
  }

  .filter-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .filter-col {
    width: 100%;
    padding: 0;
  }

  .filter-col-reset,
  .filter-col-results {
    justify-content: center;
    padding: 0;
  }

  .filter-col-results {
    flex-direction: column;
    gap: 8px;
  }

  .reset-filters {
    text-align: center;
  }

  .results-count {
    text-align: center;
  }

  .filter-select {
    max-width: none;
    width: 100%;
  }
  
  .product-table th,
  .product-table td {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .product-table th:first-child,
  .product-table td:first-child {
    padding-left: 12px;
  }
  
  .product-table th:last-child,
  .product-table td:last-child {
    padding-right: 12px;
  }
  
  .part-badge {
    min-width: 100px;
    padding: 4px 8px;
    font-size: 12px;
  }
  
  .qty-input {
    width: 55px;
    padding: 6px 8px;
    font-size: 13px;
  }
  
  .add-to-quote-btn {
    width: 36px;
    height: 36px;
  }
  
  .add-to-quote-btn .btn-icon {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  /* Stack table for very small screens */
  .product-table-container {
    border-radius: 8px;
  }

  .product-filters {
    border-radius: 8px 8px 0 0;
  }

  .filter-row {
    gap: 8px;
  }

  .filter-col {
    width: 100%;
  }
  
  .product-table thead {
    display: none;
  }
  
  .product-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 8px 16px;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .product-table td {
    padding: 0;
  }
  
  .product-table td:first-child {
    padding-left: 0;
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  
  .product-table td:last-child {
    padding-right: 0;
    text-align: right;
  }
  
  /* Show dimension labels on mobile */
  .product-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 500;
    color: var(--slate-gray);
    font-size: 12px;
  }
  
  .product-table td.col-id,
  .product-table td.col-od,
  .product-table td.col-length {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
  }
  
  .product-table tbody tr:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  /* Filter Bar - Small Phone */
  .product-filters {
    padding: 10px 12px;
  }

  .filter-row {
    gap: 10px;
  }

  .reset-filters {
    font-size: 13px;
  }

  .filter-select {
    padding: 8px 28px 8px 10px;
    font-size: 13px;
    border-radius: 5px;
  }

  .results-count {
    font-size: 13px;
  }

  /* Table Cart Link - Small Phone */
  .table-cart-link {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 5px;
  }

  .table-cart-link .cart-count {
    font-size: 14px;
  }

  /* Product Table Card View - Small Phone */
  .product-table tbody tr {
    padding: 12px;
    gap: 6px 12px;
  }

  .product-table td:first-child {
    margin-bottom: 2px;
  }

  .part-badge {
    min-width: 90px;
    padding: 4px 6px;
    font-size: 11px;
    letter-spacing: 0.2px;
  }

  .product-table td[data-label]::before {
    font-size: 11px;
  }

  .product-table td.col-id,
  .product-table td.col-od,
  .product-table td.col-length {
    font-size: 13px;
    gap: 3px;
  }

  /* Quantity Input - Small Phone */
  .qty-input {
    width: 50px;
    padding: 5px 6px;
    font-size: 13px;
    border-radius: 5px;
  }

  /* Add to Quote Button - Small Phone */
  .add-to-quote-btn {
    width: 34px;
    height: 34px;
  }

  .add-to-quote-btn .btn-icon {
    font-size: 16px;
  }

  /* Cut Length Dropdown - Small Phone */
  .cut-length-select {
    width: 100px;
    padding: 6px 24px 6px 10px;
    font-size: 13px;
    border-radius: 5px;
  }

  /* Empty State - Small Phone */
  .table-empty-state {
    padding: 40px 16px;
  }

  .table-empty-state p {
    font-size: 14px;
  }

  .table-empty-state .reset-filters {
    font-size: 14px;
  }

  /* Table Message - Small Phone */
  .table-message {
    padding: 36px 16px;
    font-size: 14px;
  }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.product-table.loading tbody {
  opacity: 0.5;
  pointer-events: none;
}

.product-table.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid #f0f0f0;
  border-top-color: var(--bronze);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Table Loading States (for dynamic JSON loading)
   ========================================================================== */

.table-message {
  text-align: center;
  padding: 48px 24px;
  color: #64748b;
  font-size: 15px;
}

.table-message.table-loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 12px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--bronze, #C67420);
  border-radius: 50%;
  animation: table-spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes table-spin {
  to { transform: rotate(360deg); }
}

.table-message.table-error {
  color: #dc2626;
  background-color: #fef2f2;
}

.table-message.table-error a {
  color: #dc2626;
  text-decoration: underline;
}

/* Add button feedback state */
.add-to-quote-btn.added {
  background-color: var(--enterprise-green-base);
  color: white;
}
