/* ==========================================================================
   May — theme styles
   A quiet portfolio layout: a white left-hand sidebar (bold serif name,
   small sans menu) and artwork filling the space on the right. Every font,
   colour and size comes from a CSS variable set in Customize → May Theme
   (inc/appearance.php prints them on :root); values here are fallbacks.
   Templates share class names (edith-*) with the Edith theme.
   ========================================================================== */

:root {
    --may-bg: #fff;
    --may-text: #706c87;
    --may-heading: #332e54;
    --may-link: #332e54;
    --may-link-hover: #000;
    --may-accent: #332e54;
    --may-price: #706c87;
    --may-font: "Figtree", "Helvetica Neue", Arial, sans-serif;
    --may-heading-font: var(--may-font);
    --may-weight: 400;
    --may-content-pad: 56px;
    --may-content-max: 1180px;

    --may-side-bg: #fff;
    --may-side-w: 300px;
    --may-side-pad: 42px;
    --may-side-rule: #ececf1;
    --may-side-rule-w: 0px;
    --may-name-color: #332e54;
    --may-name-font: "Playfair Display", Georgia, serif;
    --may-name-size: 36px;
    --may-name-weight: 900;
    --may-name-case: uppercase;
    --may-name-tracking: 0px;
    --may-logo-h: 90px;
    --may-nav-color: #706c87;
    --may-nav-hover: #332e54;
    --may-nav-current: #332e54;
    --may-nav-font: var(--may-font);
    --may-nav-size: 14px;
    --may-nav-weight: 400;
    --may-nav-case: none;
    --may-nav-tracking: 0px;
    --may-nav-gap: 12px;
    --may-meta-size: 12px;
    --may-gallery-gap: 54px;

    --bs-body-font-family: var(--may-font);
    --bs-body-color: var(--may-text);
    --bs-body-bg: var(--may-bg);
}

/* ---------- Base ---------- */

html { scrollbar-gutter: stable; }
body.modal-open, body[style*="padding-right"] { padding-right: 0 !important; }

body {
    background: var(--may-bg);
    color: var(--may-text);
    font-family: var(--may-font);
    font-weight: var(--may-weight);
    font-size: 14px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--may-link); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus { color: var(--may-link-hover); }

.edith-content p a, .edith-content li a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--may-heading-font);
    color: var(--may-heading);
    font-weight: 600;
    line-height: 1.3;
    margin: 2em 0 .75em;
}

h1 { font-size: 26px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
h5, h6 { font-size: 14px; }

strong, b { font-weight: 600; color: var(--may-heading); }
p { margin: 0 0 1.15em; }
img { max-width: 100%; height: auto; }

hr, .wp-block-separator { width: 100%; margin: 2.5rem 0; border: 0; border-top: 1px solid currentColor; opacity: .2; }

blockquote, .wp-block-quote { margin: 2rem 0; padding-left: 1.25rem; border-left: 2px solid var(--may-accent); font-size: 1.1em; }

.may-skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 2000; padding: .5rem 1rem; background: #000; color: #fff; }
.fran-icon { width: 1em; height: 1em; vertical-align: -.125em; }

/* Buttons */
.btn.edith-btn, .btn-primary {
    --bs-btn-bg: var(--may-accent);
    --bs-btn-border-color: var(--may-accent);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--may-link-hover);
    --bs-btn-hover-border-color: var(--may-link-hover);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--may-link-hover);
    border-radius: 0;
    padding: .55rem 1.3rem;
    font-family: var(--may-font);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none !important;
}

.btn.edith-btn.btn-sm { padding: .35rem .9rem; font-size: 13px; }
.btn.edith-btn--outline { --bs-btn-bg: transparent; --bs-btn-color: var(--may-accent); --bs-btn-hover-bg: var(--may-accent); --bs-btn-hover-color: #fff; }
.btn.edith-btn--pill { border-radius: 99px; padding: .5rem 1.5rem; }
.edith-sold { display: inline-block; padding: .3rem .85rem; border: 1px solid currentColor; font-size: 13px; opacity: .7; }
.edith-more { font-size: 14px; }
.edith-kicker { margin: 0 0 .75rem; font-size: 13px; }

/* ---------- Layout: sidebar + content ---------- */

.may-layout { display: flex; min-height: 100vh; }

.may-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: var(--may-content-pad);
}

@media (min-width: 992px) {
    .may-sidebar.offcanvas-lg {
        flex: 0 0 var(--may-side-w);
        width: var(--may-side-w);
        padding: var(--may-side-pad);
        border-right: var(--may-side-rule-w) solid var(--may-side-rule);
        background-color: var(--may-side-bg) !important;
    }

    /* Fixed: the sidebar stays put while the content scrolls. */
    .may-sidebar-fixed .may-sidebar.offcanvas-lg {
        position: sticky;
        top: 0;
        align-self: flex-start;
        height: 100vh;
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .admin-bar.may-sidebar-fixed .may-sidebar.offcanvas-lg { top: 32px; height: calc(100vh - 32px); }
}

/* Sidebar contents */
.may-brand {
    margin: 0 0 2.5rem;
    font-family: var(--may-name-font);
    font-size: var(--may-name-size);
    font-weight: var(--may-name-weight);
    text-transform: var(--may-name-case);
    letter-spacing: var(--may-name-tracking);
    line-height: 1;
}

.may-brand a { color: var(--may-name-color); }
.may-brand a:hover { color: var(--may-nav-hover); }
.may-brand--logo img, .may-brand--logo .custom-logo { display: block; width: auto; max-width: 100%; max-height: var(--may-logo-h); }

.may-nav {
    display: flex;
    flex-direction: column;
    gap: var(--may-nav-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.may-nav .nav-link,
.may-nav .dropdown-item {
    display: inline;
    padding: 0;
    font-family: var(--may-nav-font);
    font-size: var(--may-nav-size);
    font-weight: var(--may-nav-weight);
    text-transform: var(--may-nav-case);
    letter-spacing: var(--may-nav-tracking);
    line-height: 1.75;
    color: var(--may-nav-color);
    background: none;
    white-space: normal;
}

.may-nav .nav-link:hover, .may-nav .nav-link:focus,
.may-nav .dropdown-item:hover { color: var(--may-nav-hover); background: none; }

.may-nav .nav-link.active,
.may-nav .current-menu-item > .nav-link,
.may-nav .dropdown-item.active { color: var(--may-nav-current); }

/* Sub-menus open in place, indented. */
.may-nav .dropdown-toggle::after { display: none; }
.may-nav .dropdown-menu {
    position: static;
    display: flex;
    flex-direction: column;
    gap: calc(var(--may-nav-gap) / 2);
    float: none;
    margin: calc(var(--may-nav-gap) / 2) 0 0;
    padding: 0 0 0 .9rem;
    border: 0;
    background: none;
    box-shadow: none;
    min-width: 0;
}

.may-sidebar__meta {
    margin-top: 2.75rem;
    font-size: var(--may-meta-size);
    line-height: 1.5;
}

.may-sidebar__note p { margin-bottom: .75rem; }

.may-social { display: flex; gap: .7rem; margin: 0 0 .9rem; padding: 0; list-style: none; }
.may-social a { display: inline-flex; color: var(--may-nav-color); font-size: calc(var(--may-meta-size) + 1px); }
.may-social a:hover { color: var(--may-nav-hover); }

.may-sidebar__copyright { margin: 0; max-width: 16em; }
.may-sidebar__copyright a { color: var(--may-nav-color); }
.may-sidebar__copyright a:hover { color: var(--may-nav-hover); }

/* Small screens: slim top bar + slide-out sidebar */
.may-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px 20px;
    background: var(--may-side-bg);
    border-bottom: 1px solid var(--may-side-rule);
}

.may-topbar .may-brand { margin: 0; font-size: min(var(--may-name-size), 26px); }
.may-topbar__logo { display: block; width: auto; max-height: 44px; }

.may-toggler { border: 0; background: none; padding: .2rem; font-size: 1.7rem; color: var(--may-name-color); }

.may-sidebar__close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: 0;
    background: none;
    font-size: 1.3rem;
    color: var(--may-nav-color);
}

@media (max-width: 991.98px) {
    .may-layout { display: block; }
    .may-sidebar.offcanvas-lg {
        --bs-offcanvas-width: min(86vw, calc(var(--may-side-w) + 60px));
        padding: calc(var(--may-side-pad) + 10px) var(--may-side-pad) var(--may-side-pad);
        background: var(--may-side-bg);
        overflow-y: auto;
    }
    .may-main { padding: calc(var(--may-content-pad) / 2) 20px; }
    .may-nav .nav-link { font-size: calc(var(--may-nav-size) + 3px); }
}

/* ---------- Content ---------- */

.edith-content { max-width: var(--may-content-max); padding: 0; }
.edith-content > :first-child { margin-top: 0; }

.edith-content .alignwide { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
.edith-content .alignfull { width: calc(100vw - var(--fran-scrollbar, 0px)); max-width: none; margin-left: calc(50% - 50vw + var(--fran-scrollbar, 0px) / 2); margin-right: 0; }
@media (min-width: 992px) { .edith-content .alignfull { width: calc(100vw - var(--fran-scrollbar, 0px) - var(--may-side-w)); margin-left: calc(50% - (100vw - var(--fran-scrollbar, 0px) - var(--may-side-w)) / 2); } }
.edith-content .is-style-narrow { max-width: 640px; }
.edith-content .alignleft { float: left; margin: .3rem 1.75rem 1rem 0; }
.edith-content .alignright { float: right; margin: .3rem 0 1rem 1.75rem; }
.edith-content .aligncenter { margin-left: auto; margin-right: auto; }
.edith-content .wp-block-image figcaption, .edith-content .wp-element-caption { margin-top: .5rem; font-size: 13px; }
.edith-content .wp-block-columns { gap: 2rem; }

/* Text pages read in a comfortable column, as on the original site. */
.edith-page { max-width: 760px; }
.edith-page .fran-gallery, .edith-page .fran-series, .edith-page .fran-hero,
.edith-page .fran-feature, .edith-page .fran-banner, .edith-page .edith-shop-grid { max-width: var(--may-content-max); }

.edith-page__title { margin: 0 0 1.5rem; font-size: 22px; font-weight: 600; }
.edith-section-title { margin: 3.5rem 0 1.25rem; font-size: 17px; font-weight: 600; }

.edith-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.edith-split__media { margin: 0; }
.edith-split__img { display: block; width: 100%; height: auto; }
.edith-split__body > :first-child { margin-top: 0; }
@media (max-width: 1199.98px) { .edith-split { grid-template-columns: minmax(0, 1fr); } }

.edith-post__title { margin: 0 0 1.25rem; font-size: 24px; font-weight: 600; }
.edith-post__body { max-width: 720px; }

.edith-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; font-size: 13px; }

.edith-album__header { margin-bottom: 2.5rem; }

/* Galleries: generous, configurable spacing */
.fran-gallery--masonry { column-gap: var(--may-gallery-gap); }
.fran-gallery--masonry .fran-artwork { margin-bottom: var(--may-gallery-gap); }
.fran-gallery--grid { column-gap: var(--may-gallery-gap); row-gap: var(--may-gallery-gap); }
.fran-gallery--showcase { column-gap: var(--may-gallery-gap); row-gap: var(--may-gallery-gap); }
.fran-artwork__caption { padding-top: .6rem; color: var(--may-text); font-size: 12px; text-align: left; }
.fran-artwork__title { font-style: normal; color: var(--may-heading); }
.fran-gallery--showcase .fran-artwork__caption { text-align: center; }

/* Hero inside the content column */
.edith-content .fran-hero { margin-bottom: 2rem; background: transparent; }
.edith-content .fran-hero .carousel,
.edith-content .fran-hero .carousel-inner,
.edith-content .fran-hero .carousel-item { height: min(var(--fran-hero-h, 100vh), 72vh); min-height: 320px; }
.fran-hero__title { font-family: var(--may-font); font-weight: 400; letter-spacing: 0; }

.fran-series { column-gap: var(--may-gallery-gap); }
.fran-series__title { font-size: 13px; text-align: left; }
.fran-series__link { color: var(--may-heading); }
.fran-feature__heading { color: var(--may-heading); }

.fran-contact { max-width: 640px; }
.fran-contact .form-label { color: var(--may-text); font-size: 13px; }
.fran-contact .form-control { border-radius: 0; border-color: color-mix(in srgb, var(--may-text) 35%, transparent); background: transparent; color: var(--may-text); }
.fran-contact .form-control:focus { border-color: var(--may-heading); box-shadow: none; }

/* ---------- Home sections ---------- */

.edith-album-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(var(--may-gallery-gap) / 2);
}

.edith-album-tile { position: relative; display: block; overflow: hidden; aspect-ratio: 1; background: #f4f3f7; }
.edith-album-tile__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.edith-album-tile__title {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1.5rem .8rem .6rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
    color: #fff; font-size: 13px; opacity: 0; transition: opacity .3s ease;
}
.edith-album-tile:hover .edith-album-tile__img { transform: scale(1.04); }
.edith-album-tile:hover .edith-album-tile__title, .edith-album-tile:focus-visible .edith-album-tile__title { opacity: 1; }
@media (hover: none) { .edith-album-tile__title { opacity: 1; } }
@media (max-width: 767.98px) { .edith-album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Shop ---------- */

.edith-shop__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; font-size: 13px; }
.edith-shop__count { margin: 0; }
.edith-shop__sort .form-select { min-width: 170px; border-radius: 0; border-color: color-mix(in srgb, var(--may-text) 30%, transparent); background-color: transparent; color: var(--may-text); font-size: 13px; }
.edith-shop-grid { gap: var(--may-gallery-gap) calc(var(--may-gallery-gap) * .75); }
.edith-card__title { font-size: 14px; font-weight: 600; }
.edith-card__title a { color: var(--may-heading); }
.edith-card__price { font-size: 13px; }
.edith-product__price { margin: 0 0 .75rem; color: var(--may-price); font-size: 18px; }
.edith-product__title { margin: 0 0 1rem; font-size: 24px; font-weight: 600; }
.edith-product__buy { margin: 1.5rem 0 .5rem; }
.edith-product__note { font-size: 12px; opacity: .75; }
.edith-product__meta { margin-top: 1.5rem; font-size: 13px; }
.edith-product__description { max-width: 720px; }
.edith-product .fran-gallery { margin-bottom: 0; }
.navigation.pagination { margin-top: 2.5rem; }
.navigation.pagination .nav-links { display: flex; gap: .75rem; }

/* ---------- News ---------- */

.edith-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--may-gallery-gap) calc(var(--may-gallery-gap) * .6); }
@media (max-width: 1199.98px) { .edith-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .edith-news-grid { grid-template-columns: minmax(0, 1fr); } }

.edith-news-card__media { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: #f4f3f7; }
.edith-news-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.edith-news-card__media:hover .edith-news-card__img { transform: scale(1.03); }
.edith-news-card__date { margin: .8rem 0 .15rem; font-size: 12px; opacity: .8; }
.edith-news-card__title { margin: 0 0 .4rem; font-size: 16px; font-weight: 600; }
.edith-news-card__title a { color: var(--may-heading); }
.edith-news-card__excerpt { font-size: 13px; line-height: 1.7; }
.edith-news-card.is-new { animation: may-fade .5s ease both; }
@keyframes may-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.edith-news__more { margin: 3rem 0 0; text-align: center; }

/* ---------- Lightbox (white) ---------- */

.fran-lightbox .modal-content { display: flex; flex-direction: column; background: rgba(255, 255, 255, .98); color: var(--may-text); border: 0; border-radius: 0; }
.fran-lightbox__top { display: flex; justify-content: space-between; align-items: center; flex: 0 0 auto; padding: 1rem 1.5rem; }
.fran-lightbox__counter { font-size: 12px; }
.fran-lightbox__close { padding: .25rem; border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--may-heading); }
.fran-lightbox__stage { position: relative; flex: 1 1 auto; min-height: 0; }
.fran-lightbox__stage .carousel-inner, .fran-lightbox__stage .carousel-item { height: 100%; }
.fran-lightbox__stage .carousel-item { padding: 0 4.5rem; text-align: center; }
.fran-lightbox__img { width: auto; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.fran-lightbox__control { width: 4.5rem; font-size: 1.6rem; color: var(--may-heading); opacity: .5; }
.fran-lightbox__control:hover { color: var(--may-heading); opacity: 1; }
.fran-lightbox__caption { flex: 0 0 auto; min-height: 3.25rem; padding: .75rem 1.5rem .25rem; text-align: center; font-size: 13px; }
.fran-lightbox__title { display: block; color: var(--may-heading); font-weight: 600; }
.fran-lightbox__meta { display: block; }
.fran-lightbox__thumbs { display: flex; flex: 0 0 auto; gap: 6px; padding: .5rem 1.5rem 1rem; overflow-x: auto; justify-content: safe center; }
.fran-lightbox__thumbs button { flex: 0 0 auto; width: 52px; height: 52px; padding: 0; border: 1px solid transparent; background: #f4f3f7; opacity: .5; }
.fran-lightbox__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.fran-lightbox__thumbs button.active { opacity: 1; border-color: var(--may-heading); }
.fran-lightbox--single .fran-lightbox__control, .fran-lightbox--single .fran-lightbox__thumbs { display: none; }
@media (max-width: 767.98px) {
    .fran-lightbox__stage .carousel-item { padding: 0 .5rem; }
    .fran-lightbox__control { width: 2.5rem; }
}
