/* Native WooCommerce presentation only: no state, pricing or visibility overrides. */
.woocommerce,
.woocommerce-page .woocommerce,
.dino-shop-layout { color: var(--dino-ink, #080909); }

/* Optional Bricks wrappers. Inner Woo blocks keep the width of their column. */
.dino-shop-shell {
  width: min(1200px, calc(100% - 80px));
  margin-inline: auto;
  padding-block: 48px 80px;
}
.dino-shop-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.dino-shop-layout > *,
.woocommerce .summary,
.woocommerce-MyAccount-content { min-width: 0; }
.dino-shop-sidebar {
  padding: 24px;
  background: var(--dino-surface, #f3f4f4);
}
.dino-shop-sidebar :is(ul, ol) { list-style: none; padding-inline-start: 0; }
.dino-shop-sidebar ul.children { padding-inline-start: 16px; }
.dino-shop-sidebar a { display: inline-block; padding-block: 12px; }
.dino-shop-sidebar .current-cat > a { font-weight: 600; text-decoration: underline; }

.woocommerce .woocommerce-breadcrumb,
.brxe-woocommerce-breadcrumbs {
  margin-block: 0 24px;
  color: var(--dino-muted, #555b60);
  font-size: var(--dino-small);
  overflow-wrap: anywhere;
}
.woocommerce .woocommerce-breadcrumb a { color: var(--dino-ink, #080909); text-underline-offset: 3px; }
/* Breadcrumb links: 44px tap height. */
:is(.woocommerce-breadcrumb, .brxe-woocommerce-breadcrumbs) a { display: inline-flex; align-items: center; min-height: 44px; }
.woocommerce :is(.woocommerce-products-header__title, .product_title) { margin-block: 0 24px; overflow-wrap: anywhere; }
.woocommerce .term-description { max-width: 65ch; margin-bottom: 32px; }
.woocommerce :is(.woocommerce-result-count, .woocommerce-ordering) { margin-block: 0 24px; }
.woocommerce .woocommerce-result-count { color: var(--dino-muted, #555b60); padding-block: 12px; }
.woocommerce .woocommerce-ordering select { max-width: 100%; padding: 10px 36px 10px 12px; }
.woocommerce .bricks-products-widgets { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
  padding: 0;
  margin: 0 0 48px;
  clear: both;
  list-style: none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none; }
.woocommerce ul.products li.product {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--dino-line, #dadddd);
  color: var(--dino-ink, #080909);
}
.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: contain;
  padding: 16px;
  margin: 0 0 16px;
  background: var(--dino-surface, #f3f4f4);
}
.woocommerce ul.products li.product :is(.woocommerce-loop-product__title, .woocommerce-loop-category__title) {
  padding: 0;
  margin-block: 0 12px;
  font-size: var(--dino-card-title);
  font-weight: var(--dino-card-title-weight);
  line-height: var(--dino-card-title-lh);
  overflow-wrap: break-word;
  hyphens: auto;
}
.woocommerce ul.products li.product .price { font-size: 16px; color: var(--dino-ink, #080909); font-weight: 600; }
.woocommerce ul.products li.product .button { margin-top: 12px; max-width: 100%; white-space: normal; }
.woocommerce ul.products li.product .added_to_cart { padding: 12px 0; text-decoration: underline; }
.woocommerce ul.products li.product mark.count { background: transparent; color: var(--dino-muted, #555b60); font-size: var(--dino-small); }
.woocommerce span.onsale {
  min-height: 0;
  min-width: 0;
  padding: 6px 12px;
  border-radius: var(--dino-radius);
  background: var(--dino-red, #c00);
  color: #fff;
  font-size: var(--dino-small);
  font-weight: 600;
  line-height: 1.5;
}
.woocommerce nav.woocommerce-pagination { margin-block: 32px; }
.woocommerce nav.woocommerce-pagination ul { display: inline-flex; flex-wrap: wrap; gap: 8px; border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li :is(a, span) {
  display: grid;
  place-items: center;
  min-width: 48px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--dino-line, #dadddd);
  color: var(--dino-ink, #080909);
  background: #fff;
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--dino-ink, #080909); color: #fff; }
.woocommerce nav.woocommerce-pagination ul li a:hover { background: var(--dino-surface, #f3f4f4); }

/* Tables remain semantic, including public/group tier-pricing tables. */
.woocommerce table.shop_table {
  width: 100%;
  border: 1px solid var(--dino-line, #dadddd);
  border-radius: 0;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.woocommerce table.shop_table :is(th, td) { padding: 16px; border-color: var(--dino-line, #dadddd); vertical-align: middle; }
.woocommerce table.shop_table th { background: var(--dino-surface, #f3f4f4); font-weight: 600; }
.woocommerce :is(table.b2bking_tiered_price_table, table.b2bking_shop_table) { font-size: 14px; }
.woocommerce :is(table.b2bking_tiered_price_table, table.b2bking_shop_table) :is(th, td) { padding: 12px; overflow-wrap: anywhere; }
.woocommerce :is(.b2bking_tiered_total_price_container, .b2bking_tiered_price_table) { max-width: 100%; }
.woocommerce .shop_attributes :is(th, td) { padding: 12px; font-style: normal; }

.woocommerce form .form-row { margin-bottom: 20px; padding: 0; }
.woocommerce form .form-row label { display: block; margin-bottom: 8px; font-weight: 600; line-height: 1.5; }
.woocommerce form .form-row label :is(input[type=checkbox], input[type=radio]) { margin-right: 8px; }
.woocommerce form .form-row textarea { min-height: 120px; }
.woocommerce form .form-row .select2-container { max-width: 100%; }
.woocommerce form :is(.b2bking_custom_registration_field, #b2bking_registration_roles_dropdown):not([type=checkbox]):not([type=radio]):not([type=hidden]) { width: 100%; max-width: 100%; padding: 10px 12px; }
.woocommerce .b2bking_custom_registration_container { margin-block: 20px; }
.woocommerce .b2bking_custom_registration_container label { display: block; margin-bottom: 8px; font-weight: 600; }
.woocommerce :is(.woocommerce-error, .woocommerce-info, .woocommerce-message) { background: var(--dino-surface, #f3f4f4); color: var(--dino-ink, #080909); margin-bottom: 24px; overflow-wrap: anywhere; }
.woocommerce .woocommerce-error { border-top-color: var(--dino-red, #c00); }
.woocommerce .woocommerce-message { border-top-color: var(--dino-success, #21633b); }

@media (max-width: 1199px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dino-shop-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 991px) {
  .dino-shop-shell { width: calc(100% - 64px); }
  .dino-shop-layout { grid-template-columns: minmax(0, 1fr); }
  .dino-shop-sidebar { padding: 20px; }
  .dino-shop-sidebar > ul { display: flex; flex-wrap: wrap; gap: 0 24px; }
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .dino-shop-shell { width: calc(100% - 40px); padding-block: 32px 48px; }
  .woocommerce :is(.woocommerce-result-count, .woocommerce-ordering) { float: none; width: 100%; margin-bottom: 16px; }
  .woocommerce .woocommerce-ordering select { width: 100%; }
  .woocommerce ul.products { gap: 24px 16px; }
  .woocommerce form :is(.form-row-first, .form-row-last) { width: 100%; float: none; }
  .woocommerce table.shop_table :is(th, td) { padding: 12px; }
}
@media (max-width: 479px) {
  .woocommerce ul.products { grid-template-columns: minmax(0, 1fr); }
  .woocommerce ul.products li.product .button { width: 100%; }
  .woocommerce :is(table.b2bking_tiered_price_table, table.b2bking_shop_table) :is(th, td) { padding: 8px; }
}

/* Native Bricks product loops keep their grid settings in the editor. */
.dino-product-card { min-width: 0; overflow-wrap: break-word; }
/* Long Danish/German compounds break at a syllable with a hyphen (html[lang]), not mid-letter. */
.dino-product-card .brxe-post-title { overflow-wrap: break-word; hyphens: auto; text-wrap: pretty; }
/* Price, tier hint and button sit at the card bottom, so buttons line up across a row. */
.dino-product-card > .brxe-product-price { margin-top: auto; }
.dino-product-card .price { color: var(--dino-ink, #080909); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dino-product-card .woocommerce-price-suffix { font-size: var(--dino-small); font-weight: 400; }
.dino-product-card .button { max-width: 100%; white-space: normal; }
.dino-product-summary { min-width: 0; }
.dino-product-gallery img { object-fit: contain; }
.dino-shop-search { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; width: 100%; }
.dino-shop-search label { width: 100%; margin-bottom: 4px; font-weight: 600; color: var(--dino-muted, #555b60); }
.dino-shop-search-controls { display: flex; gap: 12px; width: 100%; }
.dino-shop-search-controls input[type=search] { flex: 1; }
.dino-shop-sidebar { align-self: start; }
.dino-category-navigation ul ul { padding-left: 16px; }
.dino-category-navigation a[aria-current=page] { font-weight: 600; text-decoration: underline; }
@media (max-width: 991px) {
  .dino-category-navigation > ul { display: flex; flex-wrap: wrap; gap: 0 24px; }
}
.dino-shop-search input[type=search] { flex: 1 1 200px; min-width: 0; width: 100%; padding: 10px 12px; color: var(--dino-ink, #080909); background: #fff; }
/* The search button is a .dino-button (site-design.css). */

/* Bricks' base sets input line-height 40px, which makes fields outside Woo's .form-row rules
   62px tall (login, B2B fields, search). One height on every shop screen: --dino-input-min-h. */
#brx-content :where(input:not([type=checkbox], [type=radio], [type=submit], [type=button], [type=hidden], [type=image], [type=file], [type=range], [type=color]), select) { line-height: 1.5; }

/* Bricks commerce elements can sit outside a .woocommerce wrapper. */
body.woocommerce-account form :is(input.input-text, textarea, select) { padding: 10px 12px; background: var(--dino-white, #fff); color: var(--dino-ink, #080909); }
/* Product cards: border, radius and lift come from the card tokens (site-design.css, ux.css). */
.dino-product-card { overflow: hidden; }
.dino-product-card:hover { border-color: var(--dino-control-line, #737a80); }
/* Title link: 44px tap height (it is the card's main link). */
.dino-product-card .brxe-post-title a { display: inline-flex; align-items: center; min-height: var(--dino-tap); color: var(--dino-ink, #080909); text-decoration: none; }
.dino-product-card .brxe-post-title a:hover { color: var(--dino-red, #c00); text-decoration: underline; text-underline-offset: 3px; }

/* Product cards: public quantity-price hint. */
.dino-tier-hint { margin: -4px 0 8px; color: var(--dino-red, #c00); font-size: var(--dino-small); font-weight: 600; }
.dino-tier-hint .amount { font-variant-numeric: tabular-nums; }
