/* Product catalog responsive layout, 2026-10-21. */
.catalog-products .shopping-box { min-width: 0; }
.catalog-products .shopping-item,
.catalog-products .shopping-item .goods-content,
.catalog-products .shopping-item .goods-name { min-width: 0; }
.catalog-products .goods-list-div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media screen and (max-width: 1100px) {
  .main-content-box.catalog-products { flex-direction: column; gap: 20px; }
  .catalog-products > .search-box { box-sizing: border-box; width: 100%; max-width: none; min-width: 0; }
  .catalog-products > .shopping-box { width: 100%; overflow: visible; }
  .catalog-products .goods-list-div { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .catalog-products .search-box .sec-nav { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 8px 16px 16px; }
  .catalog-products .shopping-item .goods-name { align-items: flex-start; gap: 12px; }
  .catalog-products .shopping-item .goods-name-text { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.5; }
  .catalog-products .shopping-item .price-box { flex-wrap: wrap; gap: 12px; }
  .catalog-products .shopping-item .price-box-left { min-width: 0; }
  .catalog-products .shopping-item .item-price { white-space: nowrap; }
  .catalog-products .shopping-item .buy-btn { min-height: 36px; }
}

@media screen and (max-width: 750px) {
  .catalog-products .second-desc {
    box-sizing: border-box;
    height: auto;
    min-height: 40px;
    padding: 8px 12px;
    line-height: 1.5;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .catalog-products .shopping-item .goods-description {
    min-width: 0;
    max-width: 100%;
    max-height: none;
    min-height: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .catalog-products .shopping-item .goods-description table {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
  }

  .catalog-products .shopping-item .goods-description td,
  .catalog-products .shopping-item .goods-description th {
    max-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .catalog-products .shopping-item .goods-description pre,
  .catalog-products .shopping-item .goods-description code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Resilient catalog states and narrow-screen layout. */
.catalog-load-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 0.64rem;
  padding: 0.12rem 0.16rem;
  color: #d93025;
  text-align: center;
  flex-wrap: wrap;
}
.catalog-load-error .el-button { min-width: 0.72rem; min-height: 0.4rem; }
@media screen and (max-width: 420px) {
  .main-content-box { display: block; }
  .search-box { width: 100%; margin-bottom: 0.12rem; }
  .search-box .sec-nav { flex-direction: row; overflow-x: auto; white-space: nowrap; gap: 0.08rem; padding: 0.08rem; }
  .search-box .sec-nav .sec-nav-item { flex: 0 0 auto; min-height: 0.44rem; padding: 0.1rem 0.14rem; }
  .shopping-box { min-width: 0; overflow-x: hidden; }
  .shopping-item .goods-description { max-height: none; min-height: 0; overflow: visible; overflow-wrap: anywhere; }
  .shopping-item .goods-description table { display: block; max-width: 100%; overflow-x: auto; }
}

/* Mobile category strip, 2026-10-24. Loaded after goodsList.css. */
@media screen and (max-width: 420px) {
  .catalog-products .search-box .sec-nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .catalog-products .search-box .sec-nav .sec-nav-item { flex: 0 0 auto; }
}
