/* Shared by the public website and the WordPress editing canvas.
   Explicit image dimensions and user-selected block margins take precedence. */
.is-style-news-thumbnail, [data-type="core/image"]:has(> .is-style-news-thumbnail) { --news-photo-width: 160px; }
.is-style-news-small, [data-type="core/image"]:has(> .is-style-news-small) { --news-photo-width: 320px; }
.is-style-news-third, [data-type="core/image"]:has(> .is-style-news-third) { --news-photo-width: 33.333333%; }
.is-style-news-half, [data-type="core/image"]:has(> .is-style-news-half) { --news-photo-width: 50%; }
.is-style-news-medium, [data-type="core/image"]:has(> .is-style-news-medium) { --news-photo-width: 560px; }
.is-style-news-two-thirds, [data-type="core/image"]:has(> .is-style-news-two-thirds) { --news-photo-width: 66.666667%; }
.is-style-news-large, [data-type="core/image"]:has(> .is-style-news-large) { --news-photo-width: 75%; }
.is-style-news-full, [data-type="core/image"]:has(> .is-style-news-full) { --news-photo-width: 100%; }
.news-article { --synergy-photo-default-width: 560px; }
figure.wp-block-image, figure.entry-photo[class*="is-style-news-"] {
    display: block; float: none; clear: both;
    width: min(100%, var(--news-photo-width, var(--synergy-photo-default-width, 100%)));
    max-width: 100%; margin: 1.5rem 0;
}
figure.wp-block-image img, figure.entry-photo img { display: block; max-width: 100%; height: auto; }
figure.wp-block-image:not(.is-resized) img, figure.entry-photo[class*="is-style-news-"] img { width: 100%; }
figure.wp-block-image.is-resized { width: fit-content; max-width: 100%; }
figure.wp-block-image.alignleft, figure.entry-photo.alignleft {
    float: left; clear: left; width: min(100%, var(--news-photo-width, 420px));
    max-width: max(0px, calc(100% - 16rem)); margin: .35rem 2rem 1.25rem 0;
}
figure.wp-block-image.alignright, figure.entry-photo.alignright {
    float: right; clear: right; width: min(100%, var(--news-photo-width, 420px));
    max-width: max(0px, calc(100% - 16rem)); margin: .35rem 0 1.25rem 2rem;
}
figure.wp-block-image.is-resized:is(.alignleft, .alignright) { width: fit-content; }
figure.wp-block-image.aligncenter, figure.entry-photo.aligncenter { float: none; clear: both; margin-inline: auto; }
figure.wp-block-image:is(.alignwide, .alignfull),
figure.wp-block-image.is-style-news-full:not(.alignleft):not(.alignright):not(.is-resized), figure.entry-photo.is-style-news-full {
    float: none; clear: both; width: 100%; max-width: 100%; margin: 1.75rem 0;
}
figure.wp-block-image.is-style-news-full:is(.alignleft, .alignright):not(.is-resized) { width: min(420px, 50%); }
figure.wp-block-image figcaption { margin-top: .65rem; font-size: 14px; line-height: 1.5; color: #4b586b; font-style: italic; }
.synergy-wrap-section { display: flow-root; }
.synergy-content-section { display: flow-root; clear: both; width: 100%; max-width: 100%; margin-block: 24px; }
.synergy-section-break { display: block; float: none; clear: both; width: 100%; max-width: 100%; grid-column: 1 / -1; margin: 0; padding: 0; border: 0; }
.synergy-section-break.has-divider-line { border-top: 1px solid #a9b7c8; }
.synergy-wrap-section > p { width: auto; max-width: none; clear: none; }
.synergy-wrap-section > :is(h2, h3, h4) { clear: none; }
.synergy-wrap-section > .wp-block-image { margin-top: .35rem; }
/* Older Gutenberg versions use an outer alignment wrapper. */
[data-type="core/image"][data-align="left"] { float: left; clear: left; width: min(100%, var(--news-photo-width, 420px)); max-width: calc(100% - 16rem); margin: .35rem 2rem 1.25rem 0; }
[data-type="core/image"][data-align="right"] { float: right; clear: right; width: min(100%, var(--news-photo-width, 420px)); max-width: calc(100% - 16rem); margin: .35rem 0 1.25rem 2rem; }
[data-type="core/image"][data-align] > figure.wp-block-image { float: none; margin: 0; max-width: 100%; width: 100%; }
[data-type="core/image"][data-align]:has(> figure.is-resized) { width: fit-content; }

.entry, .is-root-container, .synergy-wrap-section, .boat-description, .printing-intro, .printing-split > div { container-type: inline-size; }
.section.entry:not(.shop) { padding-inline: min(5vw, 63px); }
.entry h1 { font-size: 36px; }
.entry h2 { font-size: 20px; }
.boat-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 31%); align-items: start; gap: clamp(20px, 3cqi, 36px); }
.boat-description, .boat-specs { min-width: 0; }
.boat-specs { padding: 14px; background: #fff; border-top: 2px solid var(--red, #c62230); font-size: .9rem; }
.boat-specs table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; line-height: 1.45; }
.boat-specs .wp-block-table { margin: 0; }
.boat-specs caption { padding-bottom: 7px; text-align: left; font-weight: 800; }
.boat-specs th, .boat-specs td { padding: 6px 4px 6px 0; vertical-align: top; border-bottom: 1px solid #dbe0e6; }
.boat-specs th { width: 42%; }
.boat-specs td { overflow-wrap: anywhere; }
.printing-split, .printing-benefits { display: grid; gap: clamp(16px, 3cqi, 36px); align-items: start; }
.printing-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.printing-intro { align-self: center; }
.printing-section { margin-top: clamp(22px, 3cqi, 44px); }
.printing-split figure { margin: 0; }
.printing-split img { display: block; width: 100%; height: auto; }
.printing-benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 14px; margin-top: 14px; }
.printing-benefits > div { background: var(--paper, #f4f5f6); border-top: 3px solid var(--red, #c62230); padding: 14px 16px; }
.printing-benefits h3 { margin-top: 0; }
.printing-case, .printing-quote { padding: clamp(16px, 3cqi, 28px); }
.printing-case { background: var(--navy, #101c30); color: #fff; }
.printing-case .eyebrow { color: #d7e3f3; }
.printing-quote { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; background: var(--paper, #f4f5f6); }
.printing-quote > div { flex: 1 1 34rem; }
.printing-quote h2 { margin-top: 0; }
.printing-quote .printing-note { font-size: .9em; }
.photo-gallery { margin-block: 26px; }
.photo-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.photo-gallery-grid figure { min-width: 0; margin: 0; width: 100%; }
.photo-gallery-grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; display: block; background: #808080; }
.photo-gallery-grid figcaption { margin-top: 6px; }
.merlin-photo-header { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 12px; margin: 18px 0 30px; height: clamp(300px, 38cqi, 560px); }
.merlin-photo-header .boat-figure { margin: 0; min-height: 0; overflow: hidden; width: 100%; }
.merlin-photo-header .boat-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.merlin-photo-thumbnails { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px; min-height: 0; }
.photo-gallery-grid.merlin-carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.merlin-carousel figure { flex: 0 0 calc((100% - 32px) / 3); margin: 0; scroll-snap-align: start; }
.merlin-carousel-controls { display: flex; justify-content: flex-end; gap: 8px; margin: 0 0 12px; }
.merlin-carousel-controls button { background: #c9242c; color: white; border: 0; border-radius: 3px; width: 40px; height: 36px; font-size: 28px; line-height: 1; cursor: pointer; }
.merlin-carousel-controls button:disabled { opacity: .35; cursor: default; }
.hull-design-gallery .photo-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hull-design-gallery .photo-gallery-grid img { aspect-ratio: 15 / 8; object-fit: cover; height: auto; }
.used-boat-list { display: grid; gap: 20px; margin-top: 16px; }
.used-boat { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); background: #fff; border: 1px solid #dbe0e6; }
.used-boat figure { margin: 0; }
.used-boat figure img { display: block; width: 100%; height: auto; }
.used-boat-detail { padding: 18px; }
.used-boat-detail h2 { margin-top: 0; }
.used-boat-price { color: var(--red, #c62230); font-weight: 800; }
@media (max-width: 720px) { .printing-split, .printing-benefits { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) {
    .entry h1 { font-size: 24px; }
    .boat-detail-grid { grid-template-columns: minmax(0, 1fr); }
    .used-boat { grid-template-columns: minmax(0, 1fr); }
    figure.wp-block-image:is(.alignleft, .alignright), figure.entry-photo:is(.alignleft, .alignright),
    [data-type="core/image"]:is([data-align="left"], [data-align="right"]) { float: none; clear: both; max-width: 100%; margin: 1.25rem auto; }
}
@media (max-width: 540px) { .hull-design-gallery .photo-gallery-grid { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 680px) {
    figure.wp-block-image:is(.alignleft, .alignright), figure.entry-photo:is(.alignleft, .alignright),
    [data-type="core/image"]:is([data-align="left"], [data-align="right"]) { float: none; clear: both; max-width: 100%; margin: 1.25rem auto; }
}
@media (max-width: 640px) {
    .merlin-photo-header { height: auto; grid-template-columns: 1fr; }
    .merlin-photo-main { aspect-ratio: 4 / 3; }
    .merlin-photo-thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; gap: 8px; }
    .merlin-photo-thumbnails figure { aspect-ratio: 4 / 3; }
    .merlin-carousel figure { flex-basis: 85%; }
}
