/* ============================================================
   WordPress-layout overrides
   The shared.css and pages.css files were extracted from the static
   demohotel-dev HTML where some elements (booking bar, mobile menu,
   etc.) sit inside specific parent wrappers. In WordPress the blocks
   become top-level siblings, so a few rules need re-targeting.
   ============================================================ */

/* ---- Booking bar as a top-level block following the hero -----------
   In the static HTML, .book-bar-shell was nested inside .hero-wrap and
   used position:absolute to float over the hero. As a sibling block it
   has no positioned ancestor, so we cancel the absolute positioning
   and let it flow normally below the previous block. */
.wp-block-nuvho-booking-bar {
  position: relative;
  z-index: 10;
  margin-top: -200px;
  margin-bottom: 40px;
}
.wp-block-nuvho-booking-bar .book-bar-shell {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 0 48px;
}

@media (max-width: 1100px) {
  .wp-block-nuvho-booking-bar { margin-top: -140px; }
  .wp-block-nuvho-booking-bar .book-bar-shell { padding: 0 24px; }
}
@media (max-width: 760px) {
  .wp-block-nuvho-booking-bar { margin-top: 0; padding: 24px 0 0; }
  .wp-block-nuvho-booking-bar .book-bar-shell { padding: 0 16px; }
}

/* ---- Page-hero "full" variant (explore) ----------------------------
   pages.css resolves .page-hero / .page-hero-inner to the two-column
   (deals) variant; the explore hero is a single full-width text column. */
.page-hero.full { padding: 64px 48px 32px; }
.page-hero.full .page-hero-inner { display: block; max-width: 1320px; margin: 0 auto; }
@media (max-width: 1080px) { .page-hero.full { padding: 48px 24px 24px; } }

/* ---- Breadcrumb band — disambiguate per-page variants --------------
   pages.css defines .crumb-band two ways; the room variant (margin-top to
   clear the fixed nav after a full-height hero) is last and wins globally.
   Restore the stay/contact band variant on every non-room view. */
body:not(.single-room) .crumb-band { margin-top: 0; padding: 110px 48px 0; }
@media (max-width: 1080px) { body:not(.single-room) .crumb-band { padding: 96px 24px 0; } }
@media (max-width: 480px)  { body:not(.single-room) .crumb-band { padding: 88px 16px 0; } }

/* ---- Block alignfull spacing ---------------------------------------
   theme.json's content-size cap means full-width blocks need to break
   out of the constraint. WP handles this with .alignfull but our
   sections (hero, marquee, packages, etc.) expect to span 100%. */
.wp-block-nuvho-hero-slideshow,
.wp-block-nuvho-marquee,
.wp-block-nuvho-stats-band,
.wp-block-nuvho-package-rail,
.wp-block-nuvho-ledger,
.wp-block-nuvho-quote-band,
.wp-block-nuvho-showcase,
.wp-block-nuvho-location,
.wp-block-nuvho-newsletter,
.wp-block-nuvho-page-hero,
.wp-block-nuvho-gallery-grid,
.wp-block-nuvho-reviews,
.wp-block-nuvho-highlights,
.wp-block-nuvho-property-intro,
.wp-block-nuvho-breadcrumb,
.wp-block-nuvho-hours-grid,
.wp-block-nuvho-intro-sidebar,
.wp-block-nuvho-menu-grid,
.wp-block-nuvho-chef-bio,
.wp-block-nuvho-reserve-band,
.wp-block-nuvho-category-grid,
.wp-block-nuvho-getting-here,
.wp-block-nuvho-map-block,
.wp-block-nuvho-booking-note,
.wp-block-nuvho-crossover,
.wp-block-nuvho-wedding-options,
.wp-block-nuvho-capacity-table,
.wp-block-nuvho-contact-cards,
.wp-block-nuvho-tours-grid,
.wp-block-nuvho-feature-grid {
  width: 100%;
}

/* ---- Editor-canvas tweaks ------------------------------------------
   The editor iframe sometimes wraps blocks in extra divs that break
   our 100vh hero. Constrain it inside the editor only. */
.block-editor-iframe__body .wp-block-nuvho-hero-slideshow .hero {
  min-height: 480px;
  height: 60vh;
}

/* ---- Reset main padding for the home/page templates ----------------
   front-page.php and page.php use <main class="page"> with no padding,
   which is what we want for full-bleed blocks. Guard against themes
   that add default padding via Gutenberg layout settings. */
main.page > .wp-block-group.alignfull,
main.page > .alignfull {
  margin-left: 0;
  margin-right: 0;
}

/* ---- Home: cancel the global inner-page body top padding -----------
   pages.css concatenates every kit page's inline <style>, each with its own
   body{padding-top} — inner pages use 88px to clear the fixed nav; the home
   uses 0 for its full-bleed hero. Merged, the 88px variant wins for every
   page, leaving a blank band above the home hero. The front-page nav is a
   transparent overlay, so restore padding-top:0. (Solid-nav pages keep 88px.) */
body.home { padding-top: 0; }
