/* =========================================================================
   RESPONSIVE LAYER - Uny WordPress Theme
   =========================================================================

   Additive override layer. It never edits main.css or woocommerce.css - those
   are treated as read-only. This file is enqueued LAST, so equal-specificity
   rules here win the cascade.

   -------------------------------------------------------------------------
   BREAKPOINT CONTRACT - the only tiers allowed in this file
   -------------------------------------------------------------------------

     T1  <=1200  laptop, large tablet landscape
     T2  <=1024  tablet: iPad Pro portrait 1024, Air 820, mini 744, iPad 810
                 ^ BURGER MENU STARTS HERE
     T3  <=768   large phone, phone landscape, classic iPad portrait
     T4  <=576   phone
     T5  <=380   narrow phone: iPhone SE 375, Galaxy S 360

   Why max-width rather than Bootstrap's mobile-first min-width: the existing
   base is desktop-first - base rules describe desktop and narrowing happens
   through max-width. Flipping that would mean rewriting the base, which is not
   allowed here. Mixing min-width tiers into a max-width base also creates dead
   zones where neither rule applies.

   Why whole pixels rather than 991.98px or em: the base already uses whole px
   (1024, 768, 576, 480). A 991.98 boundary next to the existing 1024 would
   leave 992-1024 covered by neither the old nor the new rule.

   ORDER OF MEDIA BLOCKS IS LOAD-BEARING: 1200 -> 1024 -> 768 -> 576 -> 380.
   Equal specificity means the last matching rule wins, so a wider block placed
   after a narrower one would silently override it on small screens.

   -------------------------------------------------------------------------
   ON !important
   -------------------------------------------------------------------------
   Used only where the base already uses !important (layout-critical width /
   height / display), and every occurrence names the rule it defeats. Nowhere
   else.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Gutter token
   -------------------------------------------------------------------------
   One variable drives container padding, mirroring Bootstrap's --bs-gutter-x.

   Held at 24px on every tier, per the user's instruction: the side inset should not
   shrink on narrow screens. The token previously stepped 24 -> 20 -> 16 -> 12, which
   made the theme's pages sit at a different inset than the plugin's sections (those use
   `var(--ewub-inset)`, a flat 24px), so a page mixing theme chrome with builder sections
   had two different left edges. One value removes that.

   The token is only read by `.ewut-container` and `.ewut-container-fluid` below, so
   editing the ladder here is the whole change - nothing else depends on the smaller
   values. */
:root {
  --ewut-gutter: 24px;
}

@media (max-width: 1024px) {
  :root {
    --ewut-gutter: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --ewut-gutter: 24px;
  }
}

@media (max-width: 380px) {
  :root {
    --ewut-gutter: 24px;
  }
}

/* -------------------------------------------------------------------------
   Stepped container
   -------------------------------------------------------------------------
   The base container is single-step: max-width 1200px with a fixed padding and
   one media block for narrow screens. Below the widest tier the cap is dropped
   so the container is full width plus gutter - the same thing Bootstrap does
   below its smallest tier. */
.ewut-container {
  --ewut-container-max: 1200px;
  width: 100%;
  max-width: var(--ewut-container-max);
  margin-inline: auto;
  padding-inline: var(--ewut-gutter);
}

@media (max-width: 1200px) {
  .ewut-container {
    --ewut-container-max: 100%;
  }
}

/* Always full width with the same gutter. No bare .container-fluid: that name
   belongs to Bootstrap, WooCommerce themes and many plugins, and shipping it in
   a marketplace product creates collisions the buyer cannot debug. */
.ewut-container-fluid {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-inline: var(--ewut-gutter);
}

.ewut-container-fluid--flush {
  padding-inline: 0;
}

/* -------------------------------------------------------------------------
   Images never exceed their box
   -------------------------------------------------------------------------
   Checked: main.css has no global img rule, so an image whose intrinsic width
   is wider than the viewport pushes the document out and creates horizontal
   scroll. This is an addition, not a replacement. */
img {
  max-width: 100%;
  height: auto;
}

/* =========================================================================
   BURGER MENU
   =========================================================================

   Two confirmed defects in the theme, both verified by reading the code:

   1. The button is INVISIBLE. main.css contains exactly two rules for
      .ewut-site-header__burger:

          .ewut-site-header__burger { display: none }
          @media (max-width: 1024px) { .ewut-site-header__burger { display: flex } }

      and nothing else - no width, no height, no flex-direction, no background
      reset, and not a single rule for the three empty <span> elements the markup
      puts inside it. The bars were never drawn, so even when display:flex kicked
      in the visitor saw an empty button. Geometry below is taken from the
      plugin's working burger so the two look identical.

   2. The button carries a second class, .ewut-nav__burger, which is not styled
      anywhere in the theme - but main.js binds a delegated handler to it that
      looks for a .ewut-nav ancestor. The site header has no .ewut-nav, so that
      handler found nothing while still toggling .is-open on the button, fighting
      the real handler. The real one (fixed separately in main.js to use
      closest() instead of a mismatched id) is now the single working path; this
      file styles only .ewut-site-header__burger, so the stray class has no
      visual effect.

   The submenu accordion markup (.ewut-submenu-toggle) is injected by
   assets/js/ewut-nav-mobile.js - submenus open on :hover in the base, which never
   fires on a touch device, leaving second and third level items unreachable.
   ========================================================================= */

.ewut-site-header__burger {
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
}

/* Touch target: the visible box is 24x18, but the tappable area has to be at
   least 44x44. A pseudo-element grows the hit area without changing the bars. */
.ewut-site-header__burger::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.ewut-site-header__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ewut-uny-dark);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.ewut-site-header__burger.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.ewut-site-header__burger.is-open span:nth-child(2) {
  opacity: 0;
}

.ewut-site-header__burger.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Dark header: dark bars on a dark background are invisible. */
.ewut-site-header.ewut-bg-dark .ewut-site-header__burger span,
.ewut-site-header--dark .ewut-site-header__burger span {
  background: var(--ewut-uny-white);
}

/* The chevron injected into each submenu link only belongs to the mobile panel, so
   it is hidden by default and switched on inside the burger tier. Order is
   deliberate: media queries add no specificity, so a `display: none` written AFTER
   the tier would silently kill it on mobile. */
.ewut-nav__chevron {
  display: none;
}

@media (max-width: 1024px) {
  /* The header must be a containing block, otherwise the absolutely positioned
     panel escapes to <body>. .ewut-site-header is already sticky, which creates
     one, but relative is stated explicitly so the panel does not depend on a
     Customizer setting that might change position. */
  .ewut-site-header {
    position: relative;
  }

  .ewut-site-header__nav {
    display: none;
  }

  /* Brand: icon only. The site name is dropped because the header row has to fit
     the mark, both action buttons and the burger; with the text in place the
     "Demo" button was overlapping it. Same breakpoint as the burger, so the text
     disappears exactly when the row switches to its compact arrangement.

     `display: none` rather than a visually-hidden clip: the name is still in the
     logo's alt text and in the <h1> markup, so nothing is lost for screen
     readers or for SEO. */
  .ewut-site-header__logo-text {
    display: none;
  }

  /* Without the text the flex gap between icon and name is dead space that
     shifts the mark off the container's left edge. */
  .ewut-site-header__logo--icon-text {
    gap: 0;
  }

  /* ── Action buttons sit next to the burger, not next to the logo ──
     The row is `justify-content: space-between` (main.css:7829) over three visible
     boxes on mobile: brand, actions, burger (the nav is display:none here, so it
     takes no space). Space-between spreads the free room BETWEEN the boxes, and on
     top of that the burger carries `margin-left: auto` (:156 in this file) which
     eats whatever is left. Result measured at 425px: "Demo"/"Buy Now" started at
     x=92 - only 32px off the 36px logo - while the gap to the burger was 72px. The
     pair read as belonging to the logo instead of to the burger.

     Pushing the actions block right with `margin-left: auto` moves all the free
     space to the left of it, so the group lands beside the burger. The burger's own
     auto margin then has nothing left to claim.

     The 30px comes from the row's own `gap`, NOT from a margin on the actions
     block: the parent gap already sits between the two boxes, so a margin adds to
     it rather than replacing it (first attempt with `margin-right: 30px` measured
     62px = 32 gap + 30 margin). Setting the gap itself keeps a single source for
     that distance. It also applies between brand and actions, which is harmless -
     the auto margin there is far wider than 30px anyway. */
  .ewut-site-header__inner {
    gap: 30px;
  }

  .ewut-site-header__actions {
    margin-left: auto;
  }

  .ewut-site-header__burger {
    margin-left: 0;
  }

  /* Panel anchored to the bottom of the header rather than a hard-coded 64px:
     a taller header (bigger logo, .has-actions row) would otherwise leave a gap
     or overlap the content.

     Full height and opaque: a short menu used to leave the page showing through
     underneath, which reads as a broken overlay. dvh comes after vh so browsers
     without dvh keep the vh value and the mobile address bar does not make the
     panel jump. No padding of its own - the rows carry their 24px, and panel
     padding would push the first row's border away from the header edge. */
  .ewut-site-header.is-open .ewut-site-header__nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ewut-uny-white);
    padding: 0;
    height: calc(100vh - 100%);
    height: calc(100dvh - 100%);
    /* Scrolling belongs to the list inside, not to this box: two nested scroll boxes
       mean the inner one only starts moving after the outer one bottoms out. */
    overflow: hidden;
    z-index: 100;
    /* The base (main.css:8137) closes the panel with a bottom border and a drop
       shadow, which made sense for a short dropdown. A full-height panel has no
       bottom edge on screen, so both would only show up as a line and a smudge at
       the fold. */
    border-bottom: 0;
    box-shadow: none;
  }

  .ewut-site-header.ewut-bg-dark.is-open .ewut-site-header__nav,
  .ewut-site-header--dark.is-open .ewut-site-header__nav {
    background: var(--ewut-uny-dark);
  }

  /* ── Row geometry ──────────────────────────────────────────────────────
     Four boxes and nothing else. Every earlier attempt failed because padding was
     spread across the <ul>, the <li> AND the <a>, so three sources fought over the
     same 24px: rows came out different heights (parents 8px taller, padded by the
     base for the desktop flyout) with separators that doubled up.

       ul - zero padding, zero margin, full width
       li - zero padding, 1px top border, that is the only separator
       a  - the row: flex, space-between, 60px, padding 0 24px
       span + chevron - two flex children, both in normal flow            */

  /* Rows start at the top and the list is only as tall as they are.
     The base centres the menu box because on the desktop it is a horizontal row in
     the header bar; once the panel got the full screen height that centring applied
     vertically and pushed the list into the middle of the panel, leaving a big empty
     block under the header. flex: 0 0 auto stops the list from stretching, which
     otherwise distributed the extra height over the rows and made them look taller
     than the height their links computed. */
  .ewut-site-header__menu,
  .ewut-site-header__menu .sub-menu {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    align-content: flex-start;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .ewut-site-header.is-open .ewut-site-header__menu {
    justify-content: flex-start;
    align-content: flex-start;
  }

  /* The OUTER list is the scroller and fills the screen. overflow-x: hidden (there
     is no overflow-x: none - the keywords are visible, hidden, clip, scroll, auto),
     so a long label or a wide form can never push the panel sideways.

     Child combinator on purpose: giving a nested .sub-menu its own scroll box and
     its own 100vh would nest scrollers and stretch every open branch to full screen
     height. */
  .ewut-site-header.is-open .ewut-site-header__nav > .ewut-site-header__menu {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* .is-open is in the selector to match the base's weight, not for effect.
     main.css:8155 writes `.ewut-site-header.is-open .ewut-site-header__menu li`
     (0-3-1) and 8165 `... li a` (0-3-2). A plain `.ewut-site-header__menu li` is
     0-1-1 and loses no matter how late this sheet loads - which is exactly why the
     rows kept their 48px height and their border-bottom after the first attempt.

     height: auto because a fixed row height clips an expanded branch: the nested
     <ul> lives inside the <li>. */
  .ewut-site-header.is-open .ewut-site-header__menu li {
    position: relative;
    height: auto;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 0;
    border-top: 1px solid var(--ewut-uny-border);
  }

  /* The base removes the border on the last row (8161). With the separator moved to
     border-top the equivalent is the FIRST row of a nested list - handled below -
     so this reset has to be undone, otherwise the last top-level row loses its line. */
  .ewut-site-header.is-open .ewut-site-header__menu li:last-child {
    border-bottom: 0;
  }

  /* The list needs a line under its LAST row too. With separators drawn as
     border-top, every row got a line above it and the bottom of the list stayed
     open - measured: the last item ("Contact") ends at y=369 with
     border-bottom: 0, while the white panel continues to the bottom of the screen.
     The rows then read as hanging in an empty sheet with no edge to close them.

     Only the outer list gets it: a nested branch already has the next top-level
     row's border-top right underneath, and a second line there would double up. */
  .ewut-site-header.is-open .ewut-site-header__nav > .ewut-site-header__menu > li:last-child {
    border-bottom: 1px solid var(--ewut-uny-border);
  }

  /* Every row keeps its top border, the first row of a nested list included: that
     line separates a parent from its own children, and dropping it made the branch
     look glued to its parent. (Revised after seeing it on screen.) */

  .ewut-site-header.ewut-bg-dark.is-open .ewut-site-header__menu li,
  .ewut-site-header--dark.is-open .ewut-site-header__menu li {
    border-top-color: rgba(255, 255, 255, 0.12);
  }

  /* Same for the closing line on a dark header: --ewut-uny-border is a light grey
     and would draw a bright bar across the dark panel. */
  .ewut-site-header.ewut-bg-dark.is-open .ewut-site-header__nav > .ewut-site-header__menu > li:last-child,
  .ewut-site-header--dark.is-open .ewut-site-header__nav > .ewut-site-header__menu > li:last-child {
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }

  /* The row. 60px, comfortably above the 44px minimum touch target.
     .is-open again for weight: the base's `... li a` is 0-3-2 and sets height 48px. */
  .ewut-site-header.is-open .ewut-site-header__menu li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
    margin: 0;
    padding: 0 24px;
  }

  /* Sub-rows are the SAME row as the top level, only indented, so every property is
     restated rather than just the padding.

     main.css:8042 writes `.ewut-site-header__menu .sub-menu li a { display: block;
     padding: 10px 20px }` (0-3-1). `display: block` beat the flex row, so
     justify-content and align-items did nothing and the label sat at the top of the
     60px box instead of centred; and because padding is a shorthand, declaring
     padding-left alone left its 10px top/bottom and 20px right in place. */
  .ewut-site-header.is-open .ewut-site-header__menu .sub-menu li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
    margin: 0;
    padding: 0 24px 0 44px;
  }

  .ewut-site-header.is-open .ewut-site-header__menu .sub-menu .sub-menu li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
    margin: 0;
    padding: 0 24px 0 64px;
  }

  /* A form or a button dropped straight into a row is content, not a row: same
     24px gutter, centred in the 60px band. */
  .ewut-site-header.is-open .ewut-site-header__menu li > form,
  .ewut-site-header.is-open .ewut-site-header__menu li > button {
    display: flex;
    align-items: center;
    min-height: 60px;
    margin: 0 24px;
  }

  /* Submenu: from absolute flyout to static accordion, hidden until its branch is
     opened. The flyout's 1px box and shadow go with it - the separator is the
     border-top on each <li> and nothing else.

     A nested branch is a plain block in the flow, with no scroll box of its own. */
  .ewut-site-header__nav .sub-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    min-width: 0;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
  }

  /* The scroll box the base puts on a flat branch has to be undone with a selector of
     the same shape. main.css:8026 writes
     `.ewut-site-header__menu > li > .sub-menu:not(:has(.sub-menu))` (0-3-2) with
     max-height: 78vh + overflow-y: auto - sensible for a desktop flyout taller than
     the screen. A plain `.ewut-site-header__nav .sub-menu` is 0-2-1 and lost, so the
     branch kept a 678px cap and its own scroller nested inside the list's scroller
     (measured: overflow auto, max-height 678.6px on every open branch). */
  .ewut-site-header__nav .ewut-site-header__menu > li > .sub-menu,
  .ewut-site-header__nav .ewut-site-header__menu .sub-menu .sub-menu {
    max-height: none;
    overflow: visible;
    min-height: 0;
  }

  .ewut-site-header__nav li.ewut-submenu-open > .sub-menu {
    display: block;
  }

  /* ── The two flex children of the row ─────────────────────────────────
     The chevron is NOT positioned. The previous absolute caret is what made rows
     unpredictable: it needed a z-index to be clickable at all, because the
     stretched <a> covered it, and it never contributed to the row height. */
  .ewut-nav__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 44px wide, not 24px, because the whole row is a link to the parent page: a
     tap that misses the caret navigates instead of opening the branch. A finger
     contact patch is around 40px, so a 24px strip was missed more often than it
     was hit, and the visitor was thrown onto the parent page. 44px is the
     minimum touch target both platform guidelines ask for.
     The negative margin keeps the ARROW itself where it was: the icon is centred
     in this box by ::before, so widening the box by 20px and pulling it 10px
     further right leaves the optical centre unmoved. */
  .ewut-nav__chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 60px;
    margin-right: -18px;
    cursor: pointer;
  }

  .ewut-nav__chevron::before {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s;
    opacity: 0.6;
  }

  li.ewut-submenu-open > a > .ewut-nav__chevron::before {
    transform: rotate(-135deg) translateY(2px);
    opacity: 1;
  }

  /* The base draws its own caret with ::after on submenu parents - two arrows on
     one row otherwise. */
  .ewut-site-header__menu li.menu-item-has-children > a::after {
    display: none;
  }
}

/* Page lock while the panel is open. A class on <html> rather than
   position: fixed on <body>, which would reset the scroll position and jump the
   visitor to the top when the menu closes. */
html.ewut-nav-locked,
html.ewut-nav-locked body {
  overflow: hidden;
}

/* =========================================================================
   Cart line item: narrow screens
   =========================================================================
   On desktop the text blocks stack in the product cell and the stepper is taken
   out of flow, centred against the whole stack, with a 40% right padding holding
   its column open (see woocommerce.css).

   WooCommerce turns the row's cells into blocks below its own breakpoint, so the
   product cell gets narrow and that reserved column no longer makes sense. Below
   768px the stepper returns to normal flow and reads as the next line of the same
   column, aligned left with the text rather than centred beside it.

   Both overrides are needed together: dropping the padding without putting the
   stepper back in flow would leave it floating over the text, and vice versa the
   text would keep a 40% gutter with nothing in it. */
@media (max-width: 768px) {
  table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__wrap,
  .wc-block-cart-item__wrap {
    align-items: flex-start;
    row-gap: 8px;
    /* The stepper is back in flow, so its column is not reserved any more. */
    padding-right: 0;
  }

  .wc-block-cart-item__wrap > .wc-block-cart-item__quantity {
    position: static;
    transform: none;
    justify-content: flex-start;
    margin-top: 8px;
  }
}

/* ── Blog list view on small screens: keep the row, shrink the thumb ──────
   Reported on /blog/ with the list toggle active at 425px: the cards looked
   broken - a small thumbnail alone on its own line, and the title and excerpt
   running off the right edge under a hard clip.

   Two causes, both in main.css.

   1. `@media (max-width: 768px)` set `flex-direction: column` on the card
      (main.css:6463). The intent written in the comment was to stop the thumb
      and the text being cramped side by side. What it actually produced was a
      stacked card where the thumb still carried its fixed 120px square from the
      row layout, so the image sat as a small tile with the full card width empty
      beside it. `flex-basis:auto; max-width:100%` was applied to the thumb in
      the same block, but neither touches `width: 120px`, so the square stayed.

   2. The list layout caps the title and excerpt to a single line with
      `white-space: nowrap` + `text-overflow: ellipsis` (main.css:6406, :6414).
      That cap exists so the text column cannot grow taller than the fixed square
      thumb beside it. Once the card is a column that reasoning is gone, but the
      nowrap stays: measured, `.ewut-post-card__body` was 723px wide inside a
      393px card, clipped by the card's `overflow: hidden`. Hence the sentences
      disappearing off the right edge.

   The fix keeps the list layout as a ROW, which is what a list view is for, and
   makes the thumb small enough to earn its place: 28% of the card with
   `aspect-ratio: 1/1`, so it scales with the viewport instead of holding a
   pixel value (project rule: percentages, not pixels). The text is allowed to
   wrap again and is capped by line count instead of by a single line, so it
   fills the column it has rather than being clipped. */
@media (max-width: 768px) {
  .ewut-posts--list > .ewut-post-card,
  .ewut-layout-sidebar__main .ewut-posts--list > .ewut-post-card {
    flex-direction: row;
    align-items: flex-start;
  }

  .ewut-posts--list > .ewut-post-card .ewut-post-card__thumb {
    flex: 0 0 28%;
    width: 28%;
    max-width: 28%;
    /* No `aspect-ratio` and `align-self: stretch`: the thumb takes whatever height
       the row ends up being, so it fills the left side of the card top to bottom
       and comes out as a portrait rectangle rather than a square with dead space
       under it. `height: 100%` alone would not do it - the flex item's height is
       resolved from `align-items: flex-start` on the card, which sizes it to its
       own content. Stretch overrides that for this one item, and the row height
       is then set by the text column, which is the taller of the two. */
    align-self: stretch;
    height: auto;
  }

  .ewut-posts--list > .ewut-post-card .ewut-post-card__thumb img {
    /* The img is 600x400 landscape; in a portrait box `object-fit: cover` (already
       set in main.css:6387) crops it to fill instead of letterboxing. Height needs
       to be 100% of the stretched anchor rather than the square it used to be. */
    height: 100%;
  }

  .ewut-posts--list > .ewut-post-card .ewut-post-card__body {
    /* Side by side again, so the body needs its horizontal padding back but not
       the desktop amount - 16px reads as a gap next to a 28% thumb. The right and
       bottom sides need it just as much: measured, the excerpt ran to the card
       border with 0px to spare on both, which under the card's `overflow:hidden`
       reads as text cut off by the frame rather than text inside a card. */
    padding: 16px;
  }

  /* Wrapping restored. The single-line cap belonged to the desktop row, where a
     taller text column would have broken the square thumb's ratio; here the
     thumb is a percentage and follows the row height instead of dictating it.
     Line clamps keep long titles and excerpts from pushing the card tall. */
  .ewut-posts--list > .ewut-post-card .ewut-post-card__title,
  .ewut-posts--list > .ewut-post-card .ewut-post-card__excerpt,
  .ewut-posts--list > .ewut-post-card .ewut-post-card__excerpt p {
    white-space: normal;
  }

  .ewut-posts--list > .ewut-post-card .ewut-post-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .ewut-posts--list > .ewut-post-card .ewut-post-card__excerpt,
  .ewut-posts--list > .ewut-post-card .ewut-post-card__excerpt p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
  }
}

/* ── Single post prev/next nav, stacked: same treatment as blog-9 ─────────
   The theme's `.ewut-article__nav` is the same component as the builder's
   `.ewub-blog--9__nav` - same markup shape, same rules, same three leftovers when
   it stacks. main.css already turns it into a column at 768 (:5695) and drops
   `margin-left: auto` off `next` (:5762), but stops there:

   1. `.ewut-article__nav-link` keeps `max-width: 48%` (main.css:5705), the cap that
      let the two links sit side by side without colliding. Measured at 425px: each
      link 189px inside 393px of row.
   2. `.ewut-article__next .ewut-article__nav-text` keeps `text-align: right`
      (:5743). The @768 block resets it on the link but not on the inner text span,
      so the label stayed right-aligned inside a full-width row.
   3. The thumbnail sits after the text in `next` and before it in `prev`, so side
      by side they mirror around the middle of the row. Measured stacked: prev's
      text at 16, next's thumb at 157 - the two rows read as unrelated instead of
      as one list.

   Fixed the same way as the builder section: full width, left alignment, and the
   `next` thumbnail moved to the visual front. DOM order untouched. */
@media (max-width: 768px) {
  .ewut-article__nav-link,
  .ewut-article__prev,
  .ewut-article__next {
    max-width: 100%;
  }

  .ewut-article__next .ewut-article__nav-text {
    text-align: left;
  }

  .ewut-article__next .ewut-article__nav-thumb {
    order: -1;
  }

}

/* ── Checkout order summary on mobile: no inner frame, air above the button ──
   1. WooCommerce draws a frame around the ITEM LIST itself:
      `.checkout-order-summary-block-fill { border: 1px solid
      color-mix(in srgb, currentColor 20%, transparent); border-radius: 5px }`
      (woocommerce/assets/client/blocks/checkout.css). On the desktop sidebar that
      frame is the summary panel's own outline. On mobile the summary already sits
      inside the themed card (accent top border, 8px radius), so the WC frame reads
      as a second box drawn 2px inside the first - a border around the products
      rather than around the card. Dropped here; the card keeps its own outline.

      WC scopes that rule as `.wp-block-woocommerce-checkout-order-summary-block
      .checkout-order-summary-block-fill` (two classes), so a single-class reset
      loses on specificity - measured 1px still applied. Matched the scope here.

   2. On mobile the summary block sits INSIDE `.wc-block-checkout__actions`, so a
      margin on that block moves the whole card, not the button. The row that
      actually holds "Place Order" is `.wc-block-checkout__actions_row`, and it
      carries no spacing of its own (measured `margin-top: 0`, and the button's own
      margin is 0), so the button sat flush against the card - measured gap 0.
      24px on the row puts it clear of the card edge. */
@media (max-width: 768px) {
  .wp-block-woocommerce-checkout-order-summary-block .checkout-order-summary-block-fill {
    border: 0;
    border-radius: 0;
  }

  .wc-block-checkout__actions_row {
    margin-top: 24px;
  }
}

/* ── My Account on mobile: tabs become a full-width block above the content ──
   The desktop layout is two columns held by fixed percentages in
   woocommerce.css:1455 - `.woocommerce-MyAccount-navigation { width: 28%;
   margin-right: 5% }` and `.woocommerce-MyAccount-content { width: 67% }`.
   Those had no mobile counterpart, so at 425px the tabs column measured 101px
   wide with 14px/18px link padding, leaving 63px for the label. "Dashboard" and
   "Downloads" broke mid-word ("Dashbo ard"), and because the two blocks are
   plain block-level elements they stacked anyway - the content started at y=627
   with the 5% gutter still hanging off the menu.

   Both blocks go full width here, the gutter turns into vertical air, and the
   labels get room to sit on one line. */
@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content {
    width: 100%;
    margin-right: 0;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: 32px;
  }
}

/* ── My Account → Addresses on mobile: one column ──
   Same class of defect one level down: the two address cards stayed side by side
   at 425px, measured 190px and 172px. Inside the card title WC floats an "Add
   Billing address" link right; with 190px of card the 120px link had nowhere to
   go and hung out to x=443, past the viewport.

   The width does NOT come from the `48%` float in woocommerce-layout.css - the
   theme turns the wrapper into a flex row (woocommerce.css:1479
   `.woocommerce-Addresses.col2-set { display: flex }`) and gives each card
   `flex: 1 1 0` (:1484). Under those, `float` is ignored and `width: 100%` loses
   to the flex basis, so a width-based reset changed nothing (verified: computed
   stayed 190px). The wrapper already has `flex-wrap: wrap`, so forcing the basis
   to full width is enough to drop each card onto its own line. */
@media (max-width: 768px) {
  .woocommerce-Addresses .woocommerce-Address {
    flex: 0 0 100%;
  }

  .woocommerce-Addresses .woocommerce-Address + .woocommerce-Address {
    margin-top: 32px;
  }
}
