/* DAWNTIDE 2.9.0 — customer-facing polish, mobile image focal point and gallery containment.
   Deliberately LAST in the plugin style chain to supersede older WooCommerce rules. */
@media (max-width:767px) {
  /* Source mobile banners carry generous empty space ABOVE the product.
     Crop that upper space instead of shifting the product further down. */
  body.dawntide-plugin-shell .ds-hero {
    height:clamp(455px,63svh,500px)!important;
    min-height:0!important;max-height:500px!important;
    overflow:hidden!important;
  }
  body.dawntide-plugin-shell .ds-hero-slide picture {
    display:block!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;overflow:hidden!important;
  }
  body.dawntide-plugin-shell .ds-hero-slide picture img {
    display:block!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;max-width:none!important;
    object-fit:cover!important;object-position:center bottom!important;
    transform-origin:50% 96%!important;
    transform:scale(calc(1.40 * var(--ds-image-zoom, 1)))!important;
    transition:transform .22s linear!important;
  }
  body.dawntide-plugin-shell .ds-hero-slide:nth-child(1) picture img {
    object-position:52% 100%!important;
    transform:scale(calc(1.56 * var(--ds-image-zoom, 1)))!important;
  }
  body.dawntide-plugin-shell .ds-hero-slide:nth-child(2) picture img {
    object-position:50% 100%!important;
    transform:scale(calc(1.39 * var(--ds-image-zoom, 1)))!important;
  }
  body.dawntide-plugin-shell .ds-hero-slide:nth-child(3) picture img {
    object-position:50% 100%!important;
    transform:scale(calc(1.14 * var(--ds-image-zoom, 1)))!important;
  }
  body.dawntide-plugin-shell .ds-hero-slide:nth-child(4) picture img {
    object-position:50% 100%!important;
    transform:scale(calc(1.42 * var(--ds-image-zoom, 1)))!important;
  }
  body.dawntide-plugin-shell .ds-hero .ds-shade {
    background:linear-gradient(to top,rgba(2,31,34,.85) 0%,rgba(2,31,34,.59) 35%,rgba(2,31,34,.10) 83%)!important;
  }
  body.dawntide-plugin-shell .ds-hero .ds-hero-content {
    justify-content:center!important;align-items:flex-start!important;
    padding-top:0!important;padding-bottom:35px!important;
    min-height:0!important;box-sizing:border-box!important;
  }
  body.dawntide-plugin-shell .ds-hero .ds-hero-headline {
    font-size:clamp(28px,7.7vw,36px)!important;
    margin-bottom:9px!important;
  }
  body.dawntide-plugin-shell .ds-hero .ds-hero-content > p {
    font-size:12px!important;line-height:1.42!important;
    margin-bottom:12px!important;
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;
    line-clamp:4;overflow:hidden;
  }
  body.dawntide-plugin-shell .ds-hero .ds-hero-content .ds-eyebrow {
    font-size:10px!important;margin-bottom:10px!important;
  }
  body.dawntide-plugin-shell .ds-hero .ds-hero-actions {
    gap:9px!important;flex-wrap:wrap!important;
  }
  body.dawntide-plugin-shell .ds-hero .ds-hero-actions .ds-button {
    min-height:43px!important;padding:0 14px!important;min-width:0!important;
  }
  body.dawntide-plugin-shell .ds-hero .ds-slider-ui {bottom:8px!important;}

  /* WooCommerce gallery: bounded photo viewport with a separately scrollable
     thumbnail rail.  A fixed-size parent and CSS grid product flow are BOTH
     important — older plugin rules positioned the thumbs outside the parent. */
  body.dawntide-plugin-shell .ds-commerce div.product {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    grid-auto-flow:row!important;align-items:start!important;
    row-gap:0!important;overflow:visible!important;max-width:100%!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery {
    --ds-gallery-h:clamp(275px,81vw,350px);
    display:block!important;grid-column:1!important;
    position:relative!important;float:none!important;clear:both!important;
    width:100%!important;max-width:100%!important;
    height:var(--ds-gallery-h)!important;min-height:0!important;
    max-height:var(--ds-gallery-h)!important;
    margin:0 0 0!important;padding:0!important;
    box-sizing:border-box!important;overflow:hidden!important;
    isolation:isolate!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery > .flex-viewport,
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    display:block!important;position:relative!important;
    left:auto!important;top:auto!important;
    width:calc(100% - 62px)!important;max-width:calc(100% - 62px)!important;
    margin:0 0 0 62px!important;padding:0!important;
    height:var(--ds-gallery-h)!important;min-height:0!important;
    max-height:var(--ds-gallery-h)!important;
    box-sizing:border-box!important;overflow:hidden!important;
    border-radius:14px!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper {
    margin:0!important;padding:0!important;width:100%!important;
    max-width:unset!important;height:100%!important;max-height:var(--ds-gallery-h)!important;
    overflow:hidden!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery .woocommerce-product-gallery__image,
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery .woocommerce-product-gallery__image a,
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    height:var(--ds-gallery-h)!important;max-height:var(--ds-gallery-h)!important;
    object-fit:contain!important;object-position:center!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    display:block!important;width:100%!important;max-width:100%!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery > .flex-control-thumbs,
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery > .ds-fallback-thumbs {
    position:absolute!important;display:flex!important;flex-direction:column!important;
    flex-wrap:nowrap!important;inset:0 auto auto 0!important;
    width:54px!important;min-width:54px!important;max-width:54px!important;
    height:var(--ds-gallery-h)!important;max-height:var(--ds-gallery-h)!important;
    margin:0!important;padding:0 2px 0 0!important;
    overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior:contain!important;z-index:2!important;
    box-sizing:border-box!important;gap:7px!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery .flex-control-thumbs li {
    flex:0 0 52px!important;width:52px!important;height:52px!important;
    min-height:52px!important;max-height:52px!important;
    padding:0!important;margin:0!important;overflow:hidden!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery .flex-control-thumbs li img {
    display:block!important;width:52px!important;height:52px!important;
    min-height:52px!important;max-height:52px!important;object-fit:cover!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .summary,
  body.dawntide-plugin-shell .ds-commerce div.product > .summary.entry-summary {
    display:block!important;grid-column:1!important;grid-row:auto!important;
    float:none!important;clear:both!important;align-self:start!important;
    position:relative!important;z-index:1!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    padding:26px 0 0!important;margin:0 0 28px!important;
    overflow:visible!important;transform:none!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .summary .product_title,
  body.dawntide-plugin-shell .ds-commerce div.product > .summary h1.product_title {
    display:block!important;position:relative!important;clear:both!important;
    margin:0 0 12px!important;padding:0!important;
    font-size:clamp(24px,6.6vw,31px)!important;
    line-height:1.18!important;overflow-wrap:anywhere!important;
    max-width:100%!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-tabs {
    grid-column:1!important;clear:both!important;
    margin-top:8px!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    position:absolute!important;top:10px!important;right:10px!important;
  }
}
@media (max-width:370px) {
  body.dawntide-plugin-shell .ds-hero {height:455px!important;}
  body.dawntide-plugin-shell .ds-hero .ds-hero-actions .ds-button {min-height:40px!important;font-size:11px!important;}
  body.dawntide-plugin-shell .ds-commerce div.product > .woocommerce-product-gallery {--ds-gallery-h:280px;}
}
@media (prefers-reduced-motion:reduce) {
  body.dawntide-plugin-shell .ds-hero-slide picture img {transition:none!important;transform:scale(1.05)!important;}
}
