/* =============================================================================
   Republics Of Earth — front end
   Site header and footer everywhere; home and Declaration pages.
   Written phone-first: the base rules are the phone layout, and the media
   queries at the bottom of each block widen it.
   ========================================================================== */

:root {
    --roe-red: #d6201a;
    --roe-red-dark: #b3150e;
    --roe-ink: #111111;
    --roe-cream: #f2f0e9;
    --roe-paper: #ffffff;
    --roe-green: #4b6350;
    --roe-muted: #5a5a5a;
    --roe-display: Anton, Impact, 'Arial Narrow', sans-serif;
    --roe-body: Archivo, 'Helvetica Neue', Arial, sans-serif;
    --roe-gutter: max(16px, 5vw);
}

body { background: var(--roe-cream); color: var(--roe-ink); font-family: var(--roe-body); }

/* Header, main and footer sit flush: the theme's block gap would leave cream
   strips between the red hero and the header, and above the dark footer. */
.wp-site-blocks > * { margin-block-start: 0; }

.roe-wrap {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: var(--roe-gutter);
    box-sizing: border-box;
}

/* ---- Type --------------------------------------------------------------- */

.roe-display {
    font-family: var(--roe-display);
    font-weight: 400;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: 0.01em;
    margin: 0;
    overflow-wrap: anywhere;
}
.roe-display--xl { font-size: clamp(3rem, 11vw, 7.5rem); line-height: 0.9; }
.roe-display--l  { font-size: clamp(2.25rem, 6vw, 3.5rem); }
.roe-display--m  { font-size: clamp(1.75rem, 3.6vw, 2.25rem); }
.roe-display--s  { font-size: 1.75rem; }

.roe-kicker {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.roe-kicker--red { color: var(--roe-red-dark); }

.roe-lede { margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; max-width: 34em; }
.roe-small { margin: 0; font-size: 0.95rem; }

.roe-stack { display: flex; flex-direction: column; gap: 1.25rem; }

/* ---- Buttons ------------------------------------------------------------ */

.roe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.4rem;
    box-sizing: border-box;
    border: 2px solid transparent;
    border-radius: 0;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}
.roe-btn--big   { font-size: 1.1rem; padding: 1.05rem 1.75rem; }
.roe-btn--ink   { background: var(--roe-ink); color: #fff; }
.roe-btn--ink:hover { background: #000; color: #fff; }
.roe-btn--red   { background: var(--roe-red); border-color: var(--roe-red); color: #fff; }
.roe-btn--red:hover { background: var(--roe-red-dark); border-color: var(--roe-red-dark); color: #fff; }
.roe-btn--ghost { background: transparent; border-color: var(--roe-ink); color: var(--roe-ink); }
.roe-btn--ghost:hover { background: rgba(0, 0, 0, 0.06); color: var(--roe-ink); }
.roe-btn:disabled { opacity: 0.55; cursor: default; }

/* ---- Header ------------------------------------------------------------- */

.roe-header__inner {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "brand tools" "nav nav";
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding-block: 0.6rem 0.25rem;
}
.roe-brand { grid-area: brand; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--roe-ink); text-decoration: none; }
.roe-brand:hover { color: var(--roe-ink); }
.roe-brand .roe-stamp { width: 44px; height: 44px; flex: none; }
.roe-brand__name { font-family: var(--roe-display); font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; }

.roe-nav, .roe-header__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1.1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.roe-nav { grid-area: nav; justify-self: end; }   /* right-aligned under the cart on phones */
.roe-header__tools { grid-area: tools; gap: 0 0.75rem; justify-self: end; flex-wrap: nowrap; white-space: nowrap; }
.roe-nav a, .roe-header__cart { color: var(--roe-ink); text-decoration: none; padding-block: 0.65rem; }
.roe-nav a:hover, .roe-header__cart:hover { color: var(--roe-red); }

.roe-currency { display: flex; align-items: center; margin: 0; }
.roe-currency select {
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-height: 36px;
    padding: 0.25rem 1.3rem 0.25rem 0.45rem;
    border: 1px solid currentColor;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

@media (min-width: 760px) {
    .roe-header__inner {
        grid-template-columns: 1fr auto auto;
        grid-template-areas: "brand nav tools";
        gap: 0 2rem;
        padding-block: 1rem;
    }
    .roe-brand { gap: 0.9rem; }
    .roe-brand .roe-stamp { width: 84px; height: 84px; }
    .roe-brand__name { font-size: 1.5rem; }
    .roe-nav { gap: 0 1.75rem; }
    .roe-header__tools { gap: 0 1.25rem; }
}

/* ---- Footer ------------------------------------------------------------- */

.roe-footer { background: var(--roe-ink); color: var(--roe-cream); margin-top: 0; border-top: 1px solid rgba(242, 240, 233, 0.2); }
.roe-footer a { color: var(--roe-cream); }
.roe-footer a:hover { color: #fff; }
.roe-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding-block: 2.5rem 1.5rem;
}
.roe-brand--footer, .roe-brand--footer:hover { color: var(--roe-cream); }
.roe-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.roe-footer__nav a { text-decoration: none; padding-block: 0.6rem; }
.roe-footer__base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-block: 1.25rem 2rem;
    border-top: 1px solid rgba(242, 240, 233, 0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---- Hero layout (home and Declaration) -------------------------------- */

.roe-split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem 3rem;
    padding-block: 2.5rem 3rem;
}
.roe-split__main { flex: 999 1 520px; min-width: 0; }
.roe-split__side { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; }

@media (min-width: 900px) {
    .roe-split { padding-block: 3.5rem 4.5rem; }
}

/* ---- Forms -------------------------------------------------------------- */

.roe-form { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 620px; }
.roe-form__label { flex: 1 1 100%; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.roe-form__input {
    flex: 1 1 240px;
    min-width: 0;
    min-height: 52px;
    padding: 0.8rem 1rem;
    box-sizing: border-box;
    font: inherit;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 3px solid var(--roe-ink);
    border-radius: 0;
    background: #fff;
    color: var(--roe-ink);
}
.roe-form__input::placeholder { text-transform: none; font-weight: 400; color: #6b6b6b; }
.roe-form__btn {
    flex: 0 0 auto;
    min-height: 52px;
    padding: 0.8rem 1.4rem;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 3px solid var(--roe-red);
    border-radius: 0;
    background: var(--roe-red);
    color: #fff;
    cursor: pointer;
}
.roe-form__btn:hover { background: var(--roe-red-dark); border-color: var(--roe-red-dark); }

.roe-form--hero .roe-form__input,
.roe-form--hero .roe-form__btn { font-size: 1.2rem; min-height: 60px; }

/* On the red band: outlined input, white button. */
.roe-form--on-red .roe-form__input { background: transparent; color: #fff; border-color: #fff; }
.roe-form--on-red .roe-form__input::placeholder { color: rgba(255, 255, 255, 0.8); }
.roe-form--on-red .roe-form__btn { background: #fff; border-color: #fff; color: var(--roe-ink); }
.roe-form--on-red .roe-form__btn:hover { background: var(--roe-cream); border-color: var(--roe-cream); }
.roe-form--compact { max-width: 520px; padding-top: 0.5rem; }
.roe-form--compact .roe-form__input,
.roe-form--compact .roe-form__btn { min-height: 48px; font-size: 1rem; border-width: 2px; }

@media (max-width: 480px) {
    .roe-form__btn { flex: 1 1 100%; }
}

/* ---- Home: globe ------------------------------------------------------- */

.roe-home-hero .roe-split__main { flex: 1 1 520px; }
.roe-home-hero .roe-split__side { flex: 1 1 440px; }
.roe-globe-wrap { margin: 0; width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.roe-globe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    cursor: grab;
    touch-action: pan-y;      /* vertical swipes still scroll the page on phones */
}
.roe-globe:active { cursor: grabbing; }
.roe-globe__caption {
    margin: 0;
    font-family: var(--roe-display);
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- Sections ----------------------------------------------------------- */

.roe-section { padding-block: 3rem; }
.roe-section__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
}
.roe-section__head p { margin: 0; }

@media (min-width: 900px) {
    .roe-section { padding-block: 4.5rem; }
}

/* ---- Home: citizens in the wild ---------------------------------------- */

.roe-home-hero + .roe-section { padding-top: 1rem; }

.roe-wild { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.roe-wild__item { position: relative; margin: 0; }
.roe-wild__item img { display: block; width: 100%; height: 240px; object-fit: cover; }
.roe-wild__item--wide { grid-column: 1 / -1; }
.roe-wild__item figcaption {
    position: absolute;
    left: 0; bottom: 0;
    padding: 0.4rem 0.7rem;
    background: var(--roe-ink);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.roe-wild__cta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    padding: 1.25rem;
    box-sizing: border-box;
    background: var(--roe-red);
    color: #fff;
    text-decoration: none;
}
.roe-wild__cta:hover { background: var(--roe-red-dark); color: #fff; }
.roe-wild__cta span { font-family: var(--roe-display); font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1; text-transform: uppercase; }

@media (min-width: 900px) {
    .roe-wild { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .roe-wild__item--wide { grid-column: span 2; }
    .roe-wild__item img, .roe-wild__cta { height: 340px; }
    .roe-wild__item figcaption { font-size: 0.75rem; }
}

/* ---- Home: steps -------------------------------------------------------- */

.roe-dark { background: var(--roe-ink); color: var(--roe-cream); }
.roe-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem 2.5rem;
    padding-block: 3rem;
}
.roe-step { display: flex; flex-direction: column; gap: 0.6rem; }
.roe-step p { margin: 0; line-height: 1.5; color: #d5d1c6; }
.roe-step .roe-step__n { font-family: var(--roe-display); font-size: 3.5rem; line-height: 1; color: var(--roe-red); }

/* ---- Declaration: hero -------------------------------------------------- */

.roe-declare { background: var(--roe-red); color: #fff; }
.roe-declare a { color: #fff; }
.roe-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.roe-suggest { margin: 0; font-size: 1.1rem; font-weight: 700; }
.roe-suggest a { text-decoration: underline; text-underline-offset: 3px; }

.roe-places__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}
.roe-places__label::-webkit-details-marker { display: none; }
.roe-places__label::after { content: "+"; font-size: 1.1rem; line-height: 1; }
.roe-places[open] .roe-places__label::after { content: "−"; }
.roe-places__list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.25rem 0 0; padding: 0; list-style: none; }
.roe-places__list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0.9rem;
    box-sizing: border-box;
    border: 2px solid #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}
.roe-places__list a:hover { background: #fff; color: var(--roe-ink); }

.roe-declare .roe-split__main { flex: 1 1 420px; }
.roe-declare .roe-split__side { flex: 1.25 1 480px; }
.roe-hero-shirt {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 1;
    margin-bottom: 1.5rem;
}
/* A cast shadow on the "ground", so the shirt floats off the red rather than
   being pasted on it. Sits behind the shirt, just under its hem. */
.roe-hero-shirt::before {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: -3%;
    height: 9%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(60, 0, 0, 0.55), rgba(60, 0, 0, 0));
    filter: blur(6px);
}
.roe-hero-shirt__base {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.22));
}
.roe-hero-shirt__print {
    position: absolute;
    left: 33.79%;             /* 692 / 2048: text centred under the star */
    top: 30.52%;              /* 625 / 2048 */
    width: 34.18%;            /* 700 / 2048 */
    height: auto;
}

/* The rubber stamp: logo left, two lines of type right, knocked askew. */
.roe-ratified {
    position: absolute;
    right: 0;
    bottom: 2%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.9rem 0.45rem 0.5rem;
    background: var(--roe-cream);
    color: var(--roe-ink);
    border: 3px solid var(--roe-ink);
    outline: 1.5px solid var(--roe-ink);
    outline-offset: -8px;
    transform: rotate(-6deg);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.roe-ratified .roe-stamp { width: 52px; height: 52px; flex: none; }
.roe-ratified__text {
    display: flex;
    flex-direction: column;
    font-family: var(--roe-display);
    font-size: 1rem;
    line-height: 1.05;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.roe-ratified__today { font-size: 1.6rem; color: var(--roe-red); letter-spacing: 0.08em; }

@media (min-width: 900px) {
    .roe-declare .roe-split { gap: 1rem; align-items: flex-start; }
    /* Line the shirt's collar up with the top of the headline, not the middle. */
    .roe-declare .roe-split__side { padding-top: 1.9rem; }
    .roe-ratified { padding: 0.55rem 1.1rem 0.55rem 0.6rem; gap: 0.75rem; }
    .roe-ratified .roe-stamp { width: 64px; height: 64px; }
    .roe-ratified__text { font-size: 1.15rem; }
    .roe-ratified__today { font-size: 1.9rem; }
}

/* ---- Declaration: the document ----------------------------------------- */

.roe-declaration { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2rem 3rem; }
.roe-declaration__doc { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.roe-declaration__share { flex: 2 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.roe-declaration__share .roe-share { margin: 0; padding: 0; border: 0; }
.roe-declaration__share .roe-share__actions { display: flex; flex-direction: column; gap: 0.6rem; }
.roe-declaration__share .roe-btn { width: 100%; }
.roe-declaration__share .roe-share__status { margin: 0.4rem 0 0; min-height: 1.2em; font-size: 0.9rem; overflow-wrap: anywhere; }

@media (min-width: 900px) {
    /* Sharing stays in view beside a long declaration. */
    .roe-declaration__share { position: sticky; top: 1.5rem; padding-top: 2rem; }
}
.roe-document {
    width: 100%;
    max-width: 820px;
    box-sizing: border-box;
    padding: 2rem 1.5rem 1.75rem;
    background: #fbf8ef;
    color: var(--roe-ink);
    border: 3px solid var(--roe-ink);
    outline: 1px solid var(--roe-ink);
    outline-offset: -10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
    text-align: center;
}
.roe-document__kicker {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--roe-red-dark);
}
.roe-document__title {
    margin: 0 0 1.25rem;
    font-family: var(--roe-display);
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.roe-document__text {
    margin: 0 auto 1rem;
    max-width: 36em;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.05rem, 1.7vw, 1.2rem);
    line-height: 1.65;
    text-align: left;
}
.roe-document__title + .roe-document__text::first-letter {
    float: left;
    margin: 0.08em 0.12em 0 0;
    font-family: var(--roe-display);
    font-size: 3.4em;
    line-height: 0.8;
    color: var(--roe-red);
}
.roe-document__sign {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(17, 17, 17, 0.25);
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    text-align: left;
}
.roe-document__sign p { margin: 0; }
.roe-document__sign .roe-stamp { flex: none; }
.roe-document__redraft { margin: 0; font-size: 0.95rem; font-weight: 700; }
.roe-document__redraft a { color: var(--roe-ink); text-underline-offset: 3px; }
.roe-document__redraft a:hover { color: var(--roe-red); }

@media (min-width: 700px) {
    .roe-document { padding: 2.75rem 3rem 2.25rem; }
}

/* ---- Declaration: uniforms --------------------------------------------- */

.roe-uniforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.roe-uniform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 1.5rem 1.25rem 1.75rem;
    text-align: center;
}
.roe-uniform__kicker { margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase; }
.roe-uniform__img { display: block; width: 100%; }
.roe-uniform__img img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border: 4px solid currentColor;
    box-sizing: border-box;
    background: #fff;
}
.roe-uniform__btn { align-self: stretch; }
button.roe-uniform__btn { font-size: 1rem; }

.roe-size {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
}
.roe-size__pill { position: relative; }
.roe-size__pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.roe-size__pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 52px;
    padding: 0 0.9rem;
    box-sizing: border-box;
    border: 2px solid var(--roe-ink);
    background: #fff;
    color: var(--roe-ink);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.roe-size__pill:hover span { background: var(--roe-cream); }
.roe-size__pill input:checked + span { background: var(--roe-ink); color: #fff; }
.roe-size__pill input:focus-visible + span { outline: 3px solid var(--roe-red); outline-offset: 2px; }
.roe-size__prompt { display: none; flex: 1 1 100%; margin: 0.25rem 0 0; color: var(--roe-red-dark); font-weight: 800; }

/* No size yet: the pills turn red and nudge, and say so. */
.roe-size.is-needed .roe-size__pill span { border-color: var(--roe-red); box-shadow: 0 0 0 2px var(--roe-red) inset; }
.roe-size.is-needed .roe-size__prompt { display: block; }
.roe-size.is-needed { animation: roe-nudge 0.4s ease-in-out; }
@keyframes roe-nudge {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
    .roe-size.is-needed { animation: none; }
}

/* The shirt is a button: no button chrome, just the picture. */
button.roe-uniform__img { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
button.roe-uniform__img:hover img { transform: scale(1.02); }
button.roe-uniform__img img { transition: transform 0.15s; }
button.roe-uniform__img:focus-visible { outline: 3px solid var(--roe-red); outline-offset: 4px; }
.roe-uniform__sizes { margin: -0.4rem 0 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

.roe-uniform--black { background: var(--roe-ink); color: var(--roe-cream); }
.roe-uniform--black .roe-uniform__btn { background: var(--roe-cream); color: var(--roe-ink); }
.roe-uniform--black .roe-uniform__btn:hover { background: #fff; color: var(--roe-ink); }

.roe-uniform--green { background: var(--roe-green); color: #fff; }
.roe-uniform--green .roe-uniform__btn { background: var(--roe-ink); color: #fff; }
.roe-uniform--green .roe-uniform__btn:hover { background: #000; color: #fff; }

.roe-uniform--white { background: #fff; color: var(--roe-ink); }
.roe-uniform--white .roe-uniform__btn { background: var(--roe-red); color: #fff; }
.roe-uniform--white .roe-uniform__btn:hover { background: var(--roe-red-dark); color: #fff; }

@media (min-width: 900px) {
    .roe-uniforms { gap: 24px; }
    .roe-uniform { padding: 1.75rem 1.5rem 2rem; }
}

/* ---- Declaration: founding facts --------------------------------------- */

.roe-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 2px solid var(--roe-ink);
    border-bottom: 2px solid var(--roe-ink);
}
.roe-facts__item { display: flex; flex-direction: column-reverse; gap: 0.35rem; padding: 1.25rem 1rem 1.25rem 0; }
.roe-facts__item dd { margin: 0; }
.roe-facts__item dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

@media (min-width: 900px) {
    .roe-facts { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .roe-facts__item { padding: 1.5rem 1rem 1.5rem 0; }
}


.roe-share__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (max-width: 480px) {
    .roe-share__actions .roe-btn { flex: 1 1 100%; }
}

/* =============================================================================
   Product pages (templates/single-product.html)
   ========================================================================== */

.roe-product > .wc-block-store-notices { max-width: 1400px; margin-inline: auto; padding-inline: var(--roe-gutter); box-sizing: border-box; }

.roe-product__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    padding-block: 1rem 3rem;
}
.roe-product__media, .roe-product__summary { min-width: 0; margin: 0; }

@media (min-width: 900px) {
    .roe-product__top {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 3.5rem;
        align-items: start;
        padding-block: 3rem 4.5rem;
    }
    .roe-product__media { position: sticky; top: 1.5rem; }
}

/* ---- Gallery ------------------------------------------------------------ */

/* WooCommerce prints the gallery at opacity 0 and fades it in from
   single-product.js. On a phone that waited up to ~9s for the colour swatches,
   which imgix renders on demand. The mockup is server-rendered, so show it
   straight away; until flexslider wraps the slides in .flex-viewport, show only
   the first one so nothing jumps when it does. */
.roe-product .woocommerce-product-gallery { opacity: 1 !important; margin: 0; width: 100%; float: none; }
.roe-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(n+2) { display: none; }

/* The white frame is an inset outline, not a border: flexslider sizes slides
   from the gallery's width, and a border on the viewport left a sliver of the
   next slide showing. */
.roe-product .woocommerce-product-gallery .flex-viewport,
.roe-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    outline: 6px solid #fff;
    outline-offset: -6px;
    background: #fff;
}
.roe-product .woocommerce-product-gallery__wrapper { margin: 0; }
.roe-product .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    background: #fff;
}
.roe-product .woocommerce-product-gallery__trigger { display: none; }

.roe-product .flex-control-thumbs { display: none; }

@media (min-width: 900px) {
    .roe-product .flex-control-thumbs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin: 8px 0 0;
        padding: 0;
        list-style: none;
    }
    .roe-product .flex-control-thumbs li { width: auto; float: none; margin: 0; }
    .roe-product .flex-control-thumbs img { display: block; width: 100%; height: auto; border: 3px solid #fff; background: #fff; box-sizing: border-box; opacity: 0.6; cursor: pointer; }
    .roe-product .flex-control-thumbs img.flex-active,
    .roe-product .flex-control-thumbs img:hover { opacity: 1; border-color: var(--roe-ink); }
}

/* ---- Intro: title, facts, price, name field ----------------------------- */

.roe-product__intro { display: flex; flex-direction: column; gap: 1rem; }
.roe-product__title { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }

.roe-dossier { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.6; color: var(--roe-muted); }
.roe-dossier__sep + .roe-dossier__sep::before { content: " · "; }

.roe-product__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.85rem; margin: 0; }
.roe-product__price strong { font-family: var(--roe-display); font-weight: 400; font-size: 2rem; line-height: 1; }
.roe-product__price span { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.roe-product__name { max-width: none; padding-top: 0.25rem; }
.roe-product__name .roe-form__btn { background: var(--roe-ink); border-color: var(--roe-ink); }
.roe-product__name .roe-form__btn:hover { background: #000; border-color: #000; }
.roe-republic-hint { flex: 1 1 100%; margin: 0; font-size: 0.85rem; color: var(--roe-muted); }

/* ---- Colour switcher, as uniform panels --------------------------------- */

.roe-colour-switcher { margin: 0.5rem 0 0; }
.roe-colour-switcher__label { margin: 0 0 0.6rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.roe-colour-switcher__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.roe-colour-switcher__item a {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    height: 100%;
    padding: 0.5rem 0.5rem 0.6rem;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}
.roe-colour-switcher__item--black a { background: var(--roe-ink); color: var(--roe-cream); }
.roe-colour-switcher__item--green a { background: var(--roe-green); color: #fff; }
.roe-colour-switcher__item--white a { background: #fff; color: var(--roe-ink); }
.roe-colour-switcher__item a:hover,
.roe-colour-switcher__item a:focus-visible { outline: 3px solid var(--roe-ink); outline-offset: 2px; }
.roe-colour-switcher__item.is-current a { outline: 3px solid var(--roe-red); outline-offset: 2px; }
.roe-colour-switcher__img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 3px solid currentColor; box-sizing: border-box; background: #fff; }
.roe-colour-switcher__name { font-family: var(--roe-display); font-size: 0.95rem; line-height: 1.05; letter-spacing: 0.03em; text-transform: uppercase; }

@media (min-width: 900px) {
    .roe-colour-switcher__list { gap: 12px; }
    .roe-colour-switcher__item a { padding: 0.75rem 0.75rem 0.85rem; }
    .roe-colour-switcher__name { font-size: 1.15rem; }
}

/* ---- Add to cart -------------------------------------------------------- */

.roe-product .wp-block-add-to-cart-form { margin-top: 1.5rem; }
.roe-product form.cart { margin: 0; display: block; }

/* The WAPF republic / customURL fields are filled by mockup-preview.js and
   submitted, never shown. The totals box and the second variation row were
   hidden by the old template too. */
.roe-product .wapf-field-group[data-group="230"],
.roe-product .wapf-product-totals,
.roe-product table.variations tbody tr:nth-child(2) { display: none; }
#roe-mockup-preview { display: none; }

.roe-product table.variations,
.roe-product table.variations tbody { display: block; width: 100%; margin: 0; border: 0; }
.roe-product table.variations { margin-bottom: 0.75rem; }
.roe-product table.variations tr { display: flex; flex-direction: column; gap: 0.5rem; }
.roe-product table.variations th,
.roe-product table.variations td { display: block; padding: 0; border: 0; line-height: 1.2; text-align: left; }
.roe-product table.variations label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.roe-product table.variations td.value { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.roe-product table.variations select {
    flex: 1 1 0;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 0.7rem 2.75rem 0.7rem 1rem;
    box-sizing: border-box;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    border: 2px solid var(--roe-ink);
    border-radius: 0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23111' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat right 1rem center;
    color: var(--roe-ink);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.roe-product .reset_variations { flex: none; margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--roe-ink); }

.roe-product .single_variation_wrap { display: flex; flex-direction: column; gap: 0.5rem; }
.roe-product .woocommerce-variation-price .price { font-family: var(--roe-display); font-size: 1.5rem; }
.roe-product .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: stretch; }
.roe-product .woocommerce-variation-add-to-cart > .wapf { flex: 1 1 100%; }

/* Each shirt is one person's republic; quantity stays on desktop only. */
.roe-product form.cart .quantity { display: none; }

.roe-product .single_add_to_cart_button {
    flex: 1 1 auto;
    width: 100%;
    min-height: 60px;
    margin: 0;
    padding: 1rem 1.5rem;
    border: 2px solid var(--roe-red);
    border-radius: 0;
    background: var(--roe-red);
    color: #fff;
    font-family: var(--roe-body);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}
.roe-product .single_add_to_cart_button:hover { background: var(--roe-red-dark); border-color: var(--roe-red-dark); color: #fff; }
.roe-product .single_add_to_cart_button.disabled { opacity: 0.6; }

@media (min-width: 900px) {
    .roe-product form.cart .quantity { display: block; margin: 0; }
    .roe-product form.cart .quantity .qty {
        width: 4.5rem;
        height: 100%;
        min-height: 60px;
        box-sizing: border-box;
        font: inherit;
        font-size: 1.1rem;
        font-weight: 800;
        text-align: center;
        border: 2px solid var(--roe-ink);
        border-radius: 0;
        background: #fff;
    }
    .roe-product .single_add_to_cart_button { width: auto; }
}

/* ---- Share -------------------------------------------------------------- */

.roe-product .roe-share { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 2px solid var(--roe-ink); }
.roe-product .roe-share__label { margin: 0 0 0.75rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---- Details: garment, sizes, care -------------------------------------- */

.roe-product-details { background: #fff; border-top: 2px solid var(--roe-ink); }
.roe-product-details__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem 3rem; }
.roe-product-details__part--wide { grid-column: 1 / -1; }
.roe-product-details__part > :first-child { margin-top: 0; }
.roe-product-details__part p,
.roe-product-details__part li { line-height: 1.55; }
.roe-product-details__part > p:first-child { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.roe-product-details__part h3 { margin: 0 0 0.75rem; font-family: var(--roe-display); font-weight: 400; font-size: 1.75rem; line-height: 1; text-transform: uppercase; }
.roe-product-details__part ul { margin: 0; padding-left: 1.1rem; }

.roe-product-details .roe-size-table th,
.roe-product-details .roe-size-table td { border: 1px solid var(--roe-ink); }
.roe-product-details .roe-size-table thead th { background: var(--roe-ink); color: #fff; }

@media (max-width: 480px) {
    .roe-product .roe-share__actions .roe-btn { flex: 1 1 100%; }
}

/* ---- Gallery: the original republics ------------------------------------ */

.roe-gallery-classics { margin-top: 3rem; }
.roe-gallery-classics h2 { margin: 0 0 0.5rem; }
.roe-gallery-classics > p { margin: 0 0 1.5rem; }

/* ---- Uniform care -------------------------------------------------------- */

.roe-care { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 2rem; }
.roe-care__block { display: flex; flex-direction: column; gap: 0.75rem; }
.roe-care__block ul { margin: 0; padding-left: 1.2rem; line-height: 1.7; }
.roe-care__block p { margin: 0; }
.roe-care__back { margin: 0; }

/* ---- Policies: shipping, returns, privacy, terms ------------------------ */

.roe-policy { max-width: 42rem; padding-bottom: 2rem; line-height: 1.65; }
.roe-policy h2 { margin: 2rem 0 0.5rem; font-size: 1.25rem; }
.roe-policy p, .roe-policy ul { margin: 0 0 0.85rem; }
.roe-policy ul { padding-left: 1.2rem; }
.roe-policy table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.95rem; }
.roe-policy th, .roe-policy td { border: 1px solid var(--roe-ink); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.roe-policy thead th { background: var(--roe-ink); color: #fff; }
.roe-policy .roe-small { font-size: 0.85rem; opacity: 0.75; }
.roe-footer__legal { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.roe-footer__legal a { text-decoration: none; }

/* ---- Cookie banner (UK/EU only, inc/consent.php) -------------------------- */

.roe-consent {
    position: fixed;
    z-index: 1000;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: 40rem;
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--roe-cream);
    color: var(--roe-ink);
    border: 2px solid var(--roe-ink);
    box-shadow: 6px 6px 0 var(--roe-ink);
}
.roe-consent[hidden] { display: none; }
.roe-consent__text { flex: 1 1 18rem; margin: 0; font-size: 0.95rem; line-height: 1.5; }
.roe-consent__text a { color: var(--roe-ink); font-weight: 700; }
.roe-consent__actions { display: flex; gap: 0.5rem; flex: 1 1 14rem; }
.roe-consent__actions .roe-btn { flex: 1 1 0; min-height: 44px; padding: 0.6rem 1rem; }

/* ---- Cart: the mockup thumbnail, on phones too ---------------------------- */

.roe-cart-thumb { display: inline-flex; flex-direction: column; align-items: center; gap: 0.35rem; text-decoration: none; color: var(--roe-ink); }
.roe-cart-thumb__hint { display: none; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 768px) {
    /* WooCommerce hides the thumbnail column on small screens; show it, so
       people can check the shirt they're buying. */
    .woocommerce table.cart td.product-thumbnail,
    .woocommerce-page table.cart td.product-thumbnail { display: block !important; text-align: center; padding-top: 1rem; }
    .woocommerce table.cart td.product-thumbnail::before { display: none !important; }
    .woocommerce table.cart td.product-thumbnail img { width: 160px; max-width: 60vw; height: auto; }
    .roe-cart-thumb__hint { display: block; }
}
