/* P5 revision: constrain known overflow; P4 colours, fonts and slide gutters remain authoritative. */
@media (min-width: 769px) and (max-width: 1419.98px) {
  #thanhtuu .thanhtuu-slick { max-width: 100%; }
}
@media (min-width: 993px) and (max-width: 1239.98px) {
  #taisao .taisao-slick { max-width: 100%; }
}

/* Allow the original flex columns to shrink around technical tables. */
.thongtin-left, .thongtin-right, .tabs-pro-detail, .content-tabs-pro-detail,
.desc-pro-detail { min-width: 0; }
.responsive-item {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.svn-p5-table-scroll:focus-visible {
  outline: 2px solid var(--color-main);
  outline-offset: 3px;
}

/* A delayed/failed animation must not leave the existing product header blank. */
#container .grid-pro-detail-top { visibility: visible !important; }

/* The model 161 price card overflow was measured at 320px; wider layouts keep P4 typography. */
@media (max-width: 359.98px) {
  html.svn-p5-model-161 .normal-pro-detail .content-tabs-pro-detail .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  html.svn-p5-model-161 .normal-pro-detail .content-tabs-pro-detail .price-section { padding: 14px; }
  html.svn-p5-model-161 .normal-pro-detail .content-tabs-pro-detail .price-grid { grid-template-columns: minmax(0, 1fr); }
  html.svn-p5-model-161 .normal-pro-detail .content-tabs-pro-detail .price-card {
    min-width: 0;
    max-width: 100%;
    padding: 12px;
  }
  html.svn-p5-model-161 .normal-pro-detail .content-tabs-pro-detail .price-card .price {
    font-size: 20px;
    white-space: nowrap;
  }
  html.svn-p5-model-161 .normal-pro-detail .content-tabs-pro-detail .price-card .currency {
    display: block;
    font-size: 0.6em;
  }
}

/* Reserve only the space occupied by the unchanged mobile toolbar. */
@media (max-width: 768px) {
  #footer { padding-bottom: max(45px, var(--svn-p5-toolbar-height, 45px)); }
}
