/* DAWNTIDE v2.8 — mobile commerce and storytelling. Loaded after all legacy styles.
   Corrects the independent thumbnail rail, overlong hero, and 4-card layout. */
:root { --ds-mobile-gallery-height: clamp(285px, 89vw, 410px); }
body.dawntide-plugin-shell { overflow-x:clip; }
.ds-commerce div.product .ds-spec-unknown { margin-top:14px; padding-top:9px; border-top:1px solid #e6ece8; }
.ds-commerce div.product .ds-spec-unknown p { color:#596a6b; }
.ds-commerce div.product .ds-spec-unknown .ds-spec-fact-note { font-size:12px!important; line-height:1.55!important; background:#f4f8f6; padding:10px 12px; border-radius:8px; margin-top:14px!important; }
/* Restore smooth focus transitions without forcing a different gallery on desktop. */
.ds-commerce .woocommerce-product-gallery .flex-control-thumbs img { transition: opacity .16s ease, border-color .16s ease; }
@media (max-width: 767px) {
  /* The portrait banners put most of the product low in the original file. Show the
     active subject and reduce the excessive grey/empty upper part of each slide. */
  body.dawntide-plugin-shell .ds-hero { height:min(680px,calc(100svh - 75px))!important; min-height:530px!important; max-height:700px!important; background:#dce3df!important; }
  body.dawntide-plugin-shell .ds-hero-slide picture { position:absolute; inset:0; width:100%;height:100%!important; overflow:hidden; }
  body.dawntide-plugin-shell .ds-hero-slide picture img { width:100%!important; height:100%!important; object-fit:cover!important; object-position:center 78%!important; transform:scale(calc(var(--ds-image-zoom,1) + .14))!important; transform-origin:50% 76%!important; }
  body.dawntide-plugin-shell .ds-hero-slide:nth-child(1) picture img {object-position:52% 80%!important;transform-origin:50% 78%!important;}
  body.dawntide-plugin-shell .ds-hero-slide:nth-child(2) picture img {object-position:50% 82%!important;transform-origin:50% 80%!important;}
  body.dawntide-plugin-shell .ds-hero-slide:nth-child(3) picture img {object-position:50% 100%!important;transform-origin:50% 88%!important;}
  body.dawntide-plugin-shell .ds-hero-slide:nth-child(4) picture img {object-position:50% 88%!important;transform-origin:50% 82%!important;}
  body.dawntide-plugin-shell .ds-hero .ds-shade {background:linear-gradient(0deg,rgba(0,26,30,.83) 0%,rgba(0,26,30,.49) 38%,rgba(0,26,30,.08) 78%)!important;}
  body.dawntide-plugin-shell .ds-hero .ds-hero-content {justify-content:flex-end!important;padding-top:20px!important;padding-bottom:103px!important; max-width:100%;}
  body.dawntide-plugin-shell .ds-hero .ds-hero-headline {max-width:335px;font-size:clamp(31px,8.2vw,43px)!important;line-height:1.11!important;letter-spacing:-.038em!important;}
  body.dawntide-plugin-shell .ds-hero .ds-hero-content>p {max-width:330px;font-size:13px!important;line-height:1.55!important;margin-bottom:17px!important;}
  body.dawntide-plugin-shell .ds-hero .ds-hero-actions {gap:9px;flex-wrap:wrap;}
  body.dawntide-plugin-shell .ds-hero .ds-slider-ui {bottom:16px!important;}

  /* Story: comfortable 2x2 product-tile grid after concise centred brand copy. */
  body.dawntide-plugin-shell .ds-story.ds-story-floating {margin:0!important;padding:36px 0 42px!important;min-height:0!important;}
  body.dawntide-plugin-shell .ds-story-floating-inner {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:stretch!important;}
  body.dawntide-plugin-shell .ds-story-centered {order:-1!important;grid-column:1/-1!important;margin:0 0 9px!important;}
  body.dawntide-plugin-shell .ds-story-centered .ds-eyebrow {margin-bottom:10px!important;font-size:10px!important;}
  body.dawntide-plugin-shell .ds-story-centered h2 {font-size:clamp(29px,8vw,38px)!important;line-height:1.12!important;letter-spacing:-.046em!important;margin:0 0 14px!important;}
  body.dawntide-plugin-shell .ds-story-centered p {font-size:13px!important;line-height:1.6!important;margin:0 auto 17px!important;max-width:350px!important;}
  body.dawntide-plugin-shell .ds-story-centered .ds-button {min-height:43px!important;padding:0 17px!important;}
  body.dawntide-plugin-shell .ds-story-cards {display:contents!important;}
  body.dawntide-plugin-shell .ds-floating-card {position:relative!important;inset:auto!important;order:0!important;width:100%!important;height:150px!important;min-height:0!important;max-width:unset!important;padding:9px 9px 11px!important;margin:0!important;border-radius:14px!important;box-shadow:0 8px 24px rgba(16,80,80,.11)!important;transform:none!important;animation:none!important;transition:transform .22s ease!important;}
  body.dawntide-plugin-shell .ds-floating-card:active {transform:translateY(-2px)!important;}
  body.dawntide-plugin-shell .ds-floating-card img {height:108px!important;max-height:108px!important;width:100%!important;object-fit:contain!important;border-radius:10px!important;}
  body.dawntide-plugin-shell .ds-floating-card span {font-size:10px!important;margin-top:7px!important;line-height:1.2!important;letter-spacing:.08em!important;}

  /* Product: gallery and thumbnail rail occupy one bounded two-column grid.
     The original absolutely positioned vertical rail kept running over the title. */
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery {
    display:grid!important;grid-template-columns:54px minmax(0,1fr)!important;
    grid-template-rows:var(--ds-mobile-gallery-height)!important;column-gap:9px!important;
    width:100%!important;max-width:100%!important;box-sizing:border-box!important;
    padding:0!important;margin:0 0 18px!important;float:none!important;
    min-height:0!important;height:var(--ds-mobile-gallery-height)!important;
    max-height:var(--ds-mobile-gallery-height)!important;
    clear:both!important;overflow:hidden!important;position:relative!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 {
    grid-column:2!important;grid-row:1!important;min-width:0!important;
    width:100%!important;height:var(--ds-mobile-gallery-height)!important;
    max-height:var(--ds-mobile-gallery-height)!important;
    margin:0!important;overflow:hidden!important;border-radius:13px!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {max-height:var(--ds-mobile-gallery-height)!important;overflow:hidden!important;border-radius:13px!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 img {
    width:100%!important;height:var(--ds-mobile-gallery-height)!important;
    max-height:var(--ds-mobile-gallery-height)!important;
    object-fit:contain!important;object-position:center!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 {
    grid-column:1!important;grid-row:1!important;position:relative!important;left:auto!important;top:auto!important;
    display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;
    width:54px!important;min-width:0!important;height:var(--ds-mobile-gallery-height)!important;
    max-height:var(--ds-mobile-gallery-height)!important;
    overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;
    gap:7px!important;padding:0 1px 0 0!important;margin:0!important;
    scrollbar-width:thin!important;list-style:none!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery .flex-control-thumbs li {display:block!important;flex:0 0 52px!important;min-width:0!important;width:52px!important;height:52px!important;min-height:52px!important;margin:0!important;float:none!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery .flex-control-thumbs li img,
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery .ds-fallback-thumbs img {
    display:block!important;width:52px!important;height:52px!important;object-fit:contain!important;
    max-height:52px!important;border-radius:9px!important;background:#f5f5f4!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {z-index:3!important;right:9px!important;top:9px!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery.ds-gallery-fallback .ds-fallback-thumbs {position:relative!important;left:auto!important;top:auto!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery.ds-gallery-fallback .woocommerce-product-gallery__wrapper {grid-column:2!important;grid-row:1!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-product-gallery .ds-fallback-thumbs button {flex:0 0 52px!important;width:52px!important;height:52px!important;border-radius:9px!important;padding:0!important;overflow:hidden!important;}
  body.dawntide-plugin-shell .ds-commerce div.product div.summary {
    float:none!important;clear:both!important;display:block!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0 0 28px!important;padding:9px 0 0!important;position:relative!important;z-index:1!important;
  }
  body.dawntide-plugin-shell .ds-commerce div.product .product_title {font-size:clamp(24px,6.6vw,31px)!important;line-height:1.16!important;white-space:normal!important;overflow-wrap:break-word!important;margin:0 0 12px!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .summary .price {font-size:22px!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-tabs {clear:both!important;float:none!important;position:relative!important;z-index:0;padding-top:8px!important;margin-top:8px!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-tabs .panel {min-height:0!important;padding:16px!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-tabs .panel .ds-spec-detail-grid {display:grid!important;grid-template-columns:1fr!important;gap:14px!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .woocommerce-tabs .panel .ds-spec-detail-grid .ds-spec-detail-image img {height:clamp(210px,55vw,270px)!important;max-height:270px!important;object-fit:contain!important;}
  body.dawntide-plugin-shell .ds-commerce div.product .ds-spec-unknown .ds-spec-fact-note {font-size:12px!important;}
}
@media (max-width:370px){
  body.dawntide-plugin-shell .ds-hero .ds-hero-headline{font-size:30px!important;}
  body.dawntide-plugin-shell .ds-hero .ds-hero-actions{gap:7px!important;}
  body.dawntide-plugin-shell .ds-story-centered h2{font-size:29px!important;}
  body.dawntide-plugin-shell .ds-floating-card{height:135px!important;}
  body.dawntide-plugin-shell .ds-floating-card img{height:94px!important;}
  :root{--ds-mobile-gallery-height:clamp(275px,93vw,385px)}
}
@media(prefers-reduced-motion:reduce){body.dawntide-plugin-shell .ds-hero-slide picture img{transform:none!important;}}
