/*
 * THB Katalog Mobile Buttons v3
 * Fixes flex-basis width contraction on the + Tambah form button.
 * Mobile-only; desktop styles are untouched.
 */
@media screen and (max-width: 640px) {
  html body main.page-shell #katalog #catalog-grid > article.card.catalog-card .card-body .card-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 10px 0 0 !important;
    padding: 8px 0 0 !important;
    gap: 7px !important;
    box-sizing: border-box !important;
  }

  /* Keep the form full width. Do not assign a 34px flex-basis here. */
  html body main.page-shell #katalog #catalog-grid > article.card.catalog-card .card-body .card-bottom > form {
    display: block !important;
    flex: 0 0 auto !important;
    align-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* Same full-width footprint and compact height for BOTH actions. */
  html body main.page-shell #katalog #catalog-grid > article.card.catalog-card .card-body .card-bottom > button.product-open,
  html body main.page-shell #katalog #catalog-grid > article.card.catalog-card .card-body .card-bottom > form > button {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 0 9px !important;
    border-radius: 999px !important;
    font-size: 10.5px !important;
    font-weight: 750 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    text-align: center !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
}

@media screen and (max-width: 380px) {
  html body main.page-shell #katalog #catalog-grid > article.card.catalog-card .card-body .card-bottom > button.product-open,
  html body main.page-shell #katalog #catalog-grid > article.card.catalog-card .card-body .card-bottom > form > button {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    font-size: 10px !important;
    padding: 0 7px !important;
  }
}
