/* BeliTech v4.17.23 — Wider, balanced desktop canvases.
   Cosmetic layout only; original navigation, cards, sidebars, form flow,
   booking/payment logic and mobile/tablet breakpoints are unchanged.

   Source caps addressed:
   - v4.17.00 --bst-redesign-container:1320px
   - v4.17.02 header max-width:1520px
   - legacy Explorer workspace main > section max-width:1100px
   - v4.17.17 .bst-cart max-width:1180px
   - Operator editorial directory max-width:1400px

   Only apply on wide viewports. Smaller screens keep established rules. */

@media (min-width: 1360px) {
  :root {
    --bst-redesign-container: 1640px;
    --bst-layout-max: 1640px;
    --bst-content: 1640px;
    --bt-page-width: 1640px;
    --bst-redesign-gutter: clamp(24px, 2.2vw, 42px);
    --bst-layout-gutter: clamp(24px, 2.2vw, 42px);
  }

  /* Both header implementations track the same desktop canvas width.
     Keep the canonical header's grid, logo, central brand and right controls. */
  body:is(body,#belitec-desktop-scope):not(.wp-admin)
  :is(.bst-php-header .bst-php-header__inner,
      #bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace .bst-app-header__inner) {
    max-width: 1640px !important;
  }

  /* Explorer account, cart, My Trips, Saved, Messages and Reviews.
     No sidebar reordering, no new columns at mobile sizes. */
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-explorer-workspace {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1640px !important;
    margin-inline: auto !important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root
  .bst-explorer-workspace__main { min-width: 0 !important; }
  body:is(body,#belitec-desktop-scope):not(.wp-admin)
  #bst-marketplace-root#bst-marketplace-root .bst-explorer-workspace__main > section {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  /* Cart: let the items and price summary use the full main panel.
     Preserve current two-column split and sticky summary behavior. */
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-cart {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-cart-layout {
    min-width: 0;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root
  :is(.bst-cart-main,.bst-cart-items,.bst-cart-summary,.bst-cart-item) {
    min-width: 0;
  }

  /* Admin and Operator dashboard shells: same two-column/sidebar structure. */
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-workspace {
    width: 100% !important;
    max-width: 1640px !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
  }

  /* Operator directory matches Explorer, without changing its four-card row. */
  body:not(.wp-admin) #bt-editorial-directory .bt-ed-hero__inner,
  body:not(.wp-admin) #bt-editorial-directory .bt-ed-directory {
    max-width: 1640px !important;
  }

  /* Wider standalone listing and utility pages retain their own text
     measure, internal grids and mobile breakpoints. */
  body:not(.wp-admin) :is(
    .bst-v2-shell,.bst-archive-listings,.bst-single-listing,
    .bst-v3-tool-page,.bst-v3-discovery
  ) {
    max-width: 1640px !important;
  }
}
