/* Public CSS contract 1. Defaults have zero specificity; themes can override --wedfm-*. */
:where(:root) {
    --wedfm-accent: #30363d;
    --wedfm-on-accent: #ffffff;
    --wedfm-text: #202428;
    --wedfm-background: #ffffff;
    --wedfm-surface: #f3f4f5;
    --wedfm-border: #c6cbd0;
    --wedfm-radius: .6rem;
}
.wedfm { box-sizing: border-box; color: var(--wedfm-text); font-family: inherit; line-height: 1.6; overflow-wrap: anywhere; }
.wedfm *, .wedfm *::before, .wedfm *::after { box-sizing: inherit; }
.wedfm [hidden] { display: none !important; }
.wedfm h1, .wedfm h2, .wedfm h3 { color: inherit; font-family: inherit; line-height: 1.2; margin: 0 0 .8rem; }
.wedfm h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.wedfm h2 { font-size: 1.45rem; }
.wedfm h3 { font-size: 1.1rem; }
.wedfm p { margin: 0 0 1rem; }
.wedfm a { color: inherit; }
.wedfm a:focus-visible, .wedfm button:focus-visible { outline: 3px solid var(--wedfm-text); outline-offset: 4px; }
.wedfm-archive, .wedfm-detail { width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem); background: var(--wedfm-background); }
.wedfm-section-heading { margin-bottom: 1.5rem; }
.wedfm .wedfm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.wedfm-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--wedfm-background); border: 1px solid var(--wedfm-border); border-radius: var(--wedfm-radius); overflow: hidden; }
.wedfm-card:focus-within { outline: 3px solid var(--wedfm-text); outline-offset: 3px; }
.wedfm-card-media { position: relative; background: var(--wedfm-surface); aspect-ratio: 4 / 3; }
/* Some classic themes add inline percentage heights; card frames own their crop. */
.wedfm .wedfm-card-media > img { position: absolute; inset: 0; width: 100%; height: 100% !important; max-width: none; margin: 0; display: block; object-fit: cover; }
.wedfm-card-body { display: flex; flex: 1; flex-direction: column; padding: 1.2rem; }
.wedfm .wedfm-card-title { font-size: 1.25rem; }
.wedfm-card-title a { text-decoration: none; }
.wedfm-card-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.wedfm-card-title a:hover { text-decoration: underline; }
.wedfm .wedfm-subtitle { font-size: .95rem; }
.wedfm .wedfm-price { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; margin-bottom: .3rem; }
.wedfm .wedfm-tax { font-size: .85rem; margin-bottom: 1.2rem; }
.wedfm-card-more { font-weight: 600; margin-top: auto; padding-top: 1.2rem; }
.wedfm-badge { display: inline-block; padding: .3rem .7rem; border-radius: var(--wedfm-radius); background: var(--wedfm-accent); color: var(--wedfm-on-accent); font-size: .9rem; }
.wedfm-card-media .wedfm-badge { position: absolute; top: .7rem; left: .7rem; }
.wedfm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.5rem; margin: 0; }
.wedfm-facts > div { border-bottom: 1px solid var(--wedfm-border); padding: .8rem 0; }
.wedfm-facts dt { font-size: .85rem; font-weight: 400; }
.wedfm-facts dd { margin: 0; font-weight: 600; }
.wedfm .wedfm-card-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: .9rem; gap: 0 .8rem; }
.wedfm-card-facts dt { font-size: .75rem; }
.wedfm-card-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.wedfm-section { border-top: 1px solid var(--wedfm-border); padding-top: 2rem; margin-top: 2rem; }
.wedfm-detail-heading { margin-top: 2rem; }
.wedfm-feature-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.wedfm-feature-groups ul { margin: 0; padding-left: 1.2rem; }
.wedfm-description img, .wedfm-description video { max-width: 100%; height: auto; }
.wedfm-description iframe { max-width: 100%; }
.wedfm-description table { display: block; max-width: 100%; overflow-x: auto; }
.wedfm-dealer address { font-style: normal; margin-bottom: 1rem; }
.wedfm .wedfm-dealer-logo { max-width: 200px; max-height: 100px; width: auto; height: auto; margin-bottom: 1rem; object-fit: contain; }
.wedfm-image-placeholder, .wedfm-empty { display: grid; place-content: center; padding: 2rem; background: var(--wedfm-surface); text-align: center; border-radius: var(--wedfm-radius); }
.wedfm-image-placeholder { min-height: 180px; height: 100%; }
.wedfm-notice { border-left: 4px solid var(--wedfm-text); padding: 1rem; background: var(--wedfm-surface); }
.wedfm-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.wedfm .wedfm-button, .wedfm-gallery button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .65rem 1rem; border: 1px solid transparent; border-radius: var(--wedfm-radius); background: var(--wedfm-accent); color: var(--wedfm-on-accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.wedfm .wedfm-button:hover, .wedfm-gallery button:hover { background: var(--wedfm-accent); color: var(--wedfm-on-accent); text-decoration: underline; }
.wedfm-gallery { min-width: 0; }
.wedfm-gallery-images { border-radius: var(--wedfm-radius); overflow: hidden; background: var(--wedfm-surface); }
.wedfm-gallery figure { margin: 0; }
.wedfm-gallery figure > img { display: block; width: 100%; height: auto; max-height: 680px; object-fit: contain; }
.wedfm-gallery figcaption { text-align: center; font-size: .9rem; padding: .5rem; }
.wedfm-gallery.is-enhanced figcaption { display: none; }
.wedfm-gallery-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; padding: .75rem 0; }
.wedfm-thumbnails { display: flex; gap: .65rem; overflow-x: auto; padding: .6rem .3rem; }
.wedfm-thumbnails a { display: block; flex: 0 0 80px; min-height: 60px; border: 2px solid var(--wedfm-border); border-radius: var(--wedfm-radius); }
.wedfm-thumbnails a[aria-current="true"] { border: 3px solid var(--wedfm-text); }
.wedfm-thumbnails img { display: block; width: 100%; height: 60px; object-fit: cover; border-radius: inherit; }
.wedfm-image-dialog { padding: 1rem; width: min(1100px, 96vw); max-width: 96vw; max-height: 96dvh; margin: auto; border: 1px solid var(--wedfm-border); border-radius: var(--wedfm-radius); background: var(--wedfm-background); color: var(--wedfm-text); overflow: auto; }
.wedfm-image-dialog::backdrop { background: rgba(0, 0, 0, .8); }
.wedfm-image-dialog [data-wedfm-close] { display: flex; margin: 0 0 .7rem auto; }
.wedfm-image-dialog img { width: 100%; max-height: 72dvh; object-fit: contain; display: block; }
.wedfm-image-dialog figcaption { display: none; }
.wedfm-pagination { margin: 2rem 0 0; }
.wedfm-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.wedfm-pagination a, .wedfm-pagination span { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: .4rem .7rem; border: 1px solid var(--wedfm-border); border-radius: var(--wedfm-radius); text-decoration: none; }
.wedfm-pagination .current { background: var(--wedfm-accent); color: var(--wedfm-on-accent); }
.wedfm .wedfm-sticky-actions { display: none; }
@media (max-width: 960px) {
    .wedfm .wedfm-grid, .wedfm-facts, .wedfm-feature-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    body.wedfm-native-detail { padding-bottom: calc(var(--wedfm-action-space, 8rem) + env(safe-area-inset-bottom, 0px)); }
    .wedfm .wedfm-sticky-actions { display: flex; flex-wrap: nowrap; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: .65rem .65rem calc(.65rem + env(safe-area-inset-bottom, 0px)); background: var(--wedfm-background); border-top: 1px solid var(--wedfm-border); gap: .5rem; }
    .wedfm-sticky-actions .wedfm-button { flex: 1 1 0; min-width: 0; padding: .65rem .3rem; }
    body.wedfm-dialog-open .wedfm-sticky-actions { visibility: hidden; }
}
@media (max-width: 600px) {
    .wedfm .wedfm-grid, .wedfm-feature-groups { grid-template-columns: minmax(0, 1fr); }
    .wedfm-archive, .wedfm-detail { padding: 1rem; }
    .wedfm .wedfm-card-title { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) { .wedfm *, .wedfm *::before, .wedfm *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
