/*
 * Blidensol Theme frontend foundation — fixed0141
 * Structural baseline distilled from the previously stable Proteo frontend.
 * No Bootstrap dependency is loaded. These rules are intentionally small and
 * live after style.css so layout primitives have one predictable baseline.
 */

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: clip;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  overflow-wrap: break-word;
}

/* Proteo-style stable gutters without importing Bootstrap's .container/.row API. */
.bds-header-inner,
.bds-footer-inner,
.bds-main {
  width: 100%;
  max-width: calc(var(--bds-max) + 32px);
  padding-left: 16px;
  padding-right: 16px;
  margin-left: auto;
  margin-right: auto;
}

.bds-site,
.bds-main,
.bds-content-layout,
.bds-primary-content,
.bds-entry-content,
.bds-woocommerce-content,
.woocommerce-content,
.woocommerce,
.woocommerce-page {
  min-width: 0;
}

.bds-primary-content,
.bds-entry-content,
.bds-woocommerce-content,
.woocommerce-content {
  max-width: 100%;
}

/* Media should never make the document wider than its owning content box. */
.bds-site img,
.bds-site video,
.bds-site canvas,
.bds-site svg,
.bds-site iframe,
.woocommerce img {
  max-width: 100%;
}

.bds-site img,
.woocommerce img {
  height: auto;
}

/* A predictable form baseline, equivalent to the browser-normalization Proteo supplied. */
.bds-site button,
.bds-site input,
.bds-site optgroup,
.bds-site select,
.bds-site textarea {
  margin: 0;
  font: inherit;
  line-height: inherit;
}

.bds-site button,
.bds-site input {
  overflow: visible;
}

.bds-site select,
.bds-site textarea,
.bds-site input:not([type="checkbox"]):not([type="radio"]) {
  max-width: 100%;
}

.bds-site textarea {
  overflow: auto;
  resize: vertical;
}

/* Tables remain usable on narrow WooCommerce/account/cart screens. */
.bds-entry-content table,
.bds-woocommerce-content table,
.woocommerce table {
  max-width: 100%;
}

/* WooCommerce content uses the theme's single semantic <main>; keep its inner wrapper stable. */
.bds-woocommerce-content {
  width: 100%;
  margin: 0;
  padding: 0;
}

.woocommerce .woocommerce-notices-wrapper,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message {
  max-width: 100%;
}

/* Grid/flex children must be allowed to shrink instead of forcing page overflow. */
.bds-site :where(.bds-builder-row-inner,.bds-builder-col,.bds-builder-col-inner,.bds-wc-grid,.bds-product-card,.bds-product-filter,.bds-product-search,.woocommerce-cart-form,.cart-collaterals) {
  min-width: 0;
}

/* The previous theme provided consistent responsive gutters. Preserve BD's max width but tighten gutters on phones. */
@media (max-width: 480px) {
  .bds-header-inner,
  .bds-footer-inner,
  .bds-main {
    max-width: calc(var(--bds-max) + 20px);
    padding-left: 10px;
    padding-right: 10px;
  }
}
