/**
 * Single product page table (wheels/tires)
 * Redesigned: table always fits viewport (100% width), no scroll, no crop.
 * Minimal padding/margin and compact typography so all columns fit; content wraps.
 */

.single-product-page .single-product-container {
  max-width: 1360px;
}

.single-product-page .sp-tables {
  width: 100%;
  max-width: 100%;
}

.gp-flex-table.product-table {
  width: 100%;
  max-width: 100%;
}

/* No scroll: table is always 100% of container; columns share space equally */
.gp-flex-table.product-table .table-overflow {
  width: 100%;
  max-width: 100%;
  overflow: visible;
  border: none;
}

/* Fixed layout, full width; colgroup gives Availability and Add to Cart slightly more space */
.gp-flex-table.product-table table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.75rem;
  line-height: 1.25;
  box-sizing: border-box;
}

.gp-flex-table.product-table col.col-stock { width: 12%; }
.gp-flex-table.product-table col.col-add_to_cart { width: 11%; }

/* Redesigned spacing: minimal padding and margin so more fits */
.gp-flex-table.product-table th,
.gp-flex-table.product-table td {
  padding: 0.25em 0.35em;
  text-align: left;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
}

.gp-flex-table.product-table th {
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gp-flex-table.product-table .cell-inner {
  min-width: 0;
}

.gp-flex-table.product-table .cell-inner p {
  margin: 0.1em 0;
  line-height: 1.3;
}

.gp-flex-table.product-table .cell-inner p.sep {
  margin: 0.12em 0;
}

/* Availability: wrap in place */
.gp-flex-table.product-table .cell-stock .stock-level-indicator,
.gp-flex-table.product-table .cell-stock_mobile .stock-level-indicator,
.gp-flex-table.product-table .cell-stock .sl-bg,
.gp-flex-table.product-table .cell-stock_mobile .sl-bg {
  display: block;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.gp-flex-table.product-table .cell-stock .sl-text,
.gp-flex-table.product-table .cell-stock_mobile .sl-text {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Add to Cart: compact, no extra border emphasis */
.gp-flex-table.product-table .cell-add_to_cart {
  padding-left: 0.5em;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.gp-flex-table.product-table .cell-add_to_cart .add-to-cart-wrapper {
  white-space: nowrap;
}

.gp-flex-table.product-table th.cell-add_to_cart {
  padding-left: 0.5em;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

/* Scroll hint hidden when table fits (no scroll) */
.gp-flex-table.product-table .scroll-indicator {
  display: none;
}

/* Responsive: table scrolls inside wrapper; Add to Cart column sticky so it stays visible */
@media (max-width: 900px) {
  .single-product-page .sp-tables {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -0.5em;
    margin-right: -0.5em;
    padding-left: 0.5em;
    padding-right: 0.5em;
  }

  .gp-flex-table.product-table .table-overflow {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
  }

  .gp-flex-table.product-table table {
    min-width: 720px;
  }

  /* Sticky Add to Cart column so it stays visible when scrolling horizontally */
  .gp-flex-table.product-table .cell-add_to_cart {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 2;
    box-shadow: -6px 0 12px rgba(0, 0, 0, 0.08);
    min-width: 120px;
  }

  .gp-flex-table.product-table th.cell-add_to_cart {
    box-shadow: -6px 0 12px rgba(0, 0, 0, 0.08);
  }

  .gp-flex-table.product-table .scroll-indicator {
    display: block;
  }
}
