/* Storefront — only what Bootstrap and theme.css do not provide. */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* One column down every page: 1200px of content, a 20px gutter on a phone and
   32px from lg. */
.container {
    --bs-gutter-x: 2.5rem;
    max-width: none;
}

@media (min-width: 992px) {
    .container {
        --bs-gutter-x: 4rem;
        max-width: 1264px;
    }
}

h1,
h2,
h3 {
    text-wrap: balance;
}

.store-display {
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -.025em;
    margin-bottom: 0;
}

.store-heading {
    font-size: 1.75rem;
    line-height: 1.143;
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .store-display {
        font-size: 3.5rem;
        line-height: 1.07;
    }

    .store-heading {
        font-size: 2.5rem;
        line-height: 1.15;
        letter-spacing: -.015em;
    }
}

/* On the storefront the label over a heading is the accent blue. */
.eyebrow-accent {
    color: var(--ccg-accent);
}

@media (min-width: 992px) {
    .eyebrow-accent {
        font-size: .9375rem;
    }
}

.lead-text {
    font-size: 1.0625rem;
    line-height: 1.53;
    color: var(--ccg-ink-muted);
}

.lead-text-sm {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ccg-ink-muted);
}

.prose {
    font-size: 1.0625rem;
    line-height: 1.53;
}

@media (min-width: 992px) {
    .lead-text {
        font-size: 1.1875rem;
        line-height: 1.47;
    }

    .lead-text-sm {
        font-size: 1.0625rem;
        line-height: 1.53;
    }
}

.measure-narrow {
    max-width: 30rem;
}

.measure-wide {
    max-width: 40rem;
}

/* A band of the landing page: the space below it, the container its sides. */
.store-band {
    padding-bottom: 3.5rem;
}

@media (min-width: 992px) {
    .store-band {
        padding-bottom: 6rem;
    }

    .store-band-last {
        padding-bottom: 7rem;
    }
}

/* Sections waiting below the screen rise in once seen (store/reveal.js, which
   alone adds these classes), each part --reveal-step after the one before. */
.reveal-wait [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

.reveal-in [data-reveal] {
    transition: opacity var(--t-page) var(--e-out), transform var(--t-page) var(--e-out);
    transition-delay: calc(var(--reveal-step, 0) * var(--t-fast) / 2);
}

.store-logo {
    border-radius: 50%;
    background: var(--ccg-surface);
    object-fit: contain;
}

/* ------------------------------------------------------------------
   The navbar and the footer
   ------------------------------------------------------------------ */

.store-nav {
    --bs-navbar-padding-y: .625rem;
    --bs-navbar-color: var(--ccg-ink);
    --bs-navbar-hover-color: var(--ccg-primary);
    --bs-navbar-active-color: #FFFFFF;
    --bs-navbar-nav-link-padding-x: 1.125rem;
}

.store-nav .navbar-brand {
    color: var(--ccg-heading);
}

.store-nav .store-logo {
    width: 36px;
    height: 36px;
}

.store-wordmark {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.store-nav .nav-link {
    font-size: .9375rem;
}

@media (min-width: 992px) {
    .store-nav {
        min-height: 88px;
    }

    .store-nav .store-logo {
        width: 40px;
        height: 40px;
    }

    .store-wordmark {
        font-size: 1.125rem;
    }
}

/* The phone menu: a sheet that settles down from just above, the links
   following one after another; it leaves faster than it came. Bootstrap marks
   it .showing while it arrives and .hiding while it goes. */
@media (max-width: 991.98px) {
    .store-menu {
        --bs-offcanvas-height: auto;
        --bs-offcanvas-border-width: 0;
        --bs-offcanvas-padding-x: calc(var(--bs-gutter-x) * .5);
        /* 44px button + 2 × 11px: the navbar's 66px row, so the header lines up. */
        --bs-offcanvas-padding-y: .6875rem;
        --bs-offcanvas-bg: var(--ccg-surface);
        bottom: auto;
        border-radius: 0 0 var(--radius-sheet) var(--radius-sheet);
        opacity: 0;
        /* Unrolled from under its header row, which stays where the navbar's is. */
        transform: none;
        clip-path: inset(0 0 calc(100% - 66px) 0 round 0 0 var(--radius-sheet) var(--radius-sheet));
        transition: opacity var(--t-base) var(--e-in), clip-path var(--t-base) var(--e-in);
    }

    .store-menu.showing,
    .store-menu.show:not(.hiding) {
        opacity: 1;
        clip-path: inset(0 0 0 0 round 0 0 var(--radius-sheet) var(--radius-sheet));
        transition: opacity var(--t-fast) var(--e-out), clip-path var(--t-slow) var(--e-out);
    }

    .store-menu .offcanvas-body {
        padding-top: 0;
        padding-bottom: 1.5rem;
    }

    .store-menu .nav-link {
        font-size: 1.125rem;
        padding-block: .875rem;
    }

    .store-menu .nav-item {
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity var(--t-base) var(--e-out), transform var(--t-base) var(--e-out);
    }

    .store-menu:is(.showing, .show) .nav-item {
        opacity: 1;
        transform: none;
    }

    .store-menu .nav-item:nth-child(2) {
        transition-delay: calc(var(--t-fast) / 3);
    }

    .store-menu .nav-item:nth-child(3) {
        transition-delay: calc(var(--t-fast) * 2 / 3);
    }

    /* The menu icon turns away as the cross turns in over it. */
    .store-nav [aria-controls="store-nav"] .icon,
    .store-menu-close .icon {
        transition: transform var(--t-slow) var(--e-out), opacity var(--t-base) var(--e-out);
    }

    .store-nav:has(.store-menu:is(.showing, .show:not(.hiding))) [aria-controls="store-nav"] .icon {
        opacity: 0;
        transform: rotate(90deg) scale(.6);
    }

    .store-menu-close .icon {
        opacity: 0;
        transform: rotate(-90deg) scale(.6);
    }

    .store-menu:is(.showing, .show:not(.hiding)) .store-menu-close .icon {
        opacity: 1;
        transform: none;
    }
}

.offcanvas-backdrop.fade {
    transition: opacity var(--t-slow) var(--e-out);
}

.store-footer {
    background: var(--ccg-surface);
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    padding-top: 2rem;
}

.store-footer-brand {
    color: var(--ccg-heading);
    font-size: 1.125rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.01em;
}

.store-footer-brand .store-logo {
    width: 44px;
    height: 44px;
}

.store-footer-head {
    display: flex;
    align-items: center;
    margin-bottom: .75rem;
}

/* Rows sit on the canvas here, the footer being the white card. */
.store-footer .list-row {
    min-height: 68px;
    padding: .75rem;
    background: var(--ccg-canvas);
}

.store-footer .list-row:hover {
    background: var(--ccg-surface-muted);
}

.store-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid var(--ccg-line);
    font-size: .875rem;
    line-height: 1.43;
    color: var(--ccg-ink-muted);
}

.store-footer-legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ccg-ink-muted);
}

.store-footer-legal a:hover {
    color: var(--ccg-heading);
}

/* The legal block and the copyright line read as one strip under one rule. */
.store-footer-legal + .store-footer-legal {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legal-page h2 {
    margin: 2.25rem 0 .75rem;
}

.store-footer-links {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
}

/* A phone: the legal links one under another rather than a ragged wrap. */
@media (max-width: 575.98px) {
    .store-footer-links {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 992px) {
    .store-footer {
        padding-top: 3.5rem;
    }

    /* The brand stands where the other columns have their heading, at the same
       height, so the first row of tiles lines up across all three. */
    .store-footer-head {
        min-height: 44px;
        margin-bottom: .5rem;
    }

    .store-footer-legal {
        margin-top: 1rem;
        padding: 1.25rem 0 2rem;
    }
}

/* ------------------------------------------------------------------
   Photographs and the cards around them
   ------------------------------------------------------------------ */


/* A white card whose photograph sits inset, with its name underneath. */
.photo-card {
    display: flex;
    flex-direction: column;
    padding: .5rem .5rem .875rem;
    background: var(--ccg-surface);
    border-radius: var(--radius-card);
    color: var(--ccg-ink);
}

.photo-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-control);
    aspect-ratio: 4 / 5;
    /* What shows while a photograph loads, or where there is none. */
    background: var(--ccg-calm);
}

.photo-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--e-out);
}

.photo-card:is(:hover, :focus-visible) .photo-card-media img {
    transform: scale(1.04);
}

.photo-card-name {
    display: block;
    margin: .625rem .25rem 0;
    font-size: 1rem;
    line-height: 1.375;
    font-weight: 700;
    color: var(--ccg-heading);
}

.photo-card:is(:hover, :focus-visible) .photo-card-name {
    color: var(--ccg-accent);
}

.photo-card-sub {
    display: block;
    margin: 0 .25rem;
    font-size: .8125rem;
    line-height: 1.385;
    color: var(--ccg-ink-muted);
}

@media (min-width: 992px) {
    .photo-card {
        padding: .625rem .625rem 1rem;
    }

    .photo-card-name {
        margin: .875rem .375rem 0;
        font-size: 1.125rem;
        line-height: 1.33;
    }

    .photo-card-sub {
        margin: .125rem .375rem 0;
        font-size: .875rem;
        line-height: 1.43;
    }
}

/* ------------------------------------------------------------------
   The landing page
   ------------------------------------------------------------------ */

/* Phone: the words, the stack of pieces, then the two ways in. From lg the
   stack takes the right half beside both. The hero clips its own filigree, so
   no ornament reaches the navbar or the band below. --px and --py (-1 to 1)
   follow the pointer on a desktop; the stack and the ornaments drift apart. */
.hero {
    position: relative;
    overflow: clip;
    padding: 1rem 0 2.5rem;
}

.hero-grid {
    position: relative;
    display: grid;
    gap: 1.5rem;
}

.hero-text .eyebrow {
    margin-bottom: .75rem;
}

.hero-text .lead-text {
    margin-top: 1rem;
}

/* The pointer drift eases rather than jumping with each frame. */
.hero-filigree,
.showcase-ornament,
.showcase-deck {
    transition: transform var(--t-page) var(--e-out);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

@media (min-width: 992px) {
    .hero {
        padding: 3.5rem 0 4rem;
    }

    .hero-grid {
        grid-template-columns: 1fr 1.1fr;
        grid-template-areas: "text showcase" "actions showcase";
        grid-template-rows: auto 1fr;
        column-gap: 3rem;
        row-gap: 2rem;
        align-items: center;
    }

    .hero-text {
        grid-area: text;
        align-self: end;
    }

    .hero-text .eyebrow {
        margin-bottom: 1rem;
    }

    .hero-text .lead-text {
        margin-top: 1.25rem;
    }

    .showcase {
        grid-area: showcase;
    }

    .hero-actions {
        grid-area: actions;
        align-self: start;
        flex-direction: row;
        gap: .75rem;
    }
}

/* The gold filigree: drawn in once, then still. Each <use> passes its dash to
   the paths of the symbol, which measure themselves as 1 (pathLength). */
.hero-filigree {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform: translate(calc(var(--px, 0) * -8px), calc(var(--py, 0) * -8px));
}

.filigree-draw {
    stroke-dasharray: 1;
    animation: filigree-draw 1.8s cubic-bezier(.6, 0, .2, 1) .4s both;
}

.filigree-beads {
    animation: filigree-fade .6s ease 1.8s both;
}

@keyframes filigree-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes filigree-fade {
    from { opacity: 0; }
}

.hero-heart {
    position: absolute;
    overflow: visible;
}

.hero-heart-1 {
    right: -44px;
    top: 34%;
    width: 120px;
    height: 120px;
    opacity: .3;
    rotate: 16deg;
}

.hero-heart-2 {
    display: none;
}

.hero-heart-3 {
    left: -30px;
    top: 58%;
    width: 84px;
    height: 84px;
    opacity: .35;
    rotate: -16deg;
}

.hero-glint {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C9A227;
    opacity: .6;
    animation: hero-twinkle 3.6s ease-in-out 2s infinite;
}

.hero-glint-1 { right: 7%; top: 33%; }
.hero-glint-2 { left: 6%; top: 40%; width: 5px; height: 5px; animation-duration: 4.2s; }
.hero-glint-3 { right: 4%; top: 64%; width: 7px; height: 7px; animation-delay: 3s; }
.hero-glint-4 { left: 52%; bottom: 6%; width: 5px; height: 5px; animation-duration: 4.6s; }

@keyframes hero-twinkle {
    0%, 100% { opacity: .25; scale: .7; }
    50% { opacity: 1; scale: 1; }
}

@media (min-width: 992px) {
    .hero-heart-1 {
        right: -48px;
        top: 50%;
        width: 240px;
        height: 240px;
        opacity: .28;
        rotate: 14deg;
    }

    .hero-heart-2 {
        display: block;
        left: calc(50% - 64px);
        top: 1.5rem;
        width: 84px;
        height: 84px;
        opacity: .45;
        rotate: -10deg;
    }

    .hero-heart-3 {
        left: max(16px, calc(50% - 660px));
        top: auto;
        bottom: 1.5rem;
        width: 110px;
        height: 110px;
        opacity: .3;
        rotate: -18deg;
    }

    .hero-glint-1 { right: 9%; top: 12%; }
    .hero-glint-2 { left: 47%; top: 58%; }
    .hero-glint-3 { right: 3%; top: 42%; }
}

/* The stack: the front card and up to four fanned behind it. data-slot is a
   card's place, 0 at the front; the script moves the slots. */
.showcase-stage {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
}

.showcase-stage > * {
    grid-area: 1 / 1;
}

.showcase-ornament {
    width: 100%;
    height: auto;
    overflow: visible;
    transform: translate(calc(var(--px, 0) * -6px), calc(var(--py, 0) * -6px));
}

.showcase-ring {
    fill: none;
    stroke: #C9A227;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 0 11;
    transform-box: fill-box;
    transform-origin: center;
    animation: filigree-fade 1s ease .4s both, showcase-turn 180s linear infinite;
}

@keyframes showcase-turn {
    to { rotate: 360deg; }
}

.showcase-deck {
    position: relative;
    width: 54%;
    aspect-ratio: 4 / 5;
    transform: translate(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 10px));
    animation: showcase-bob 4.5s ease-in-out 1.4s infinite alternate;
    touch-action: pan-y;
}

@keyframes showcase-bob {
    to { translate: 0 -6px; }
}

.showcase-card {
    position: absolute;
    inset: 0;
    display: block;
    padding: 8px;
    border-radius: 18px;
    background: var(--ccg-surface);
    transition: transform .9s cubic-bezier(.65, 0, .35, 1);
}

.showcase-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    pointer-events: none;
}

.showcase-card[data-slot="0"] { z-index: 5; }
.showcase-card[data-slot="1"] { z-index: 4; transform: translate(14%, -3%) rotate(7deg) scale(.94); }
.showcase-card[data-slot="2"] { z-index: 3; transform: translate(-15%, -5%) rotate(-8deg) scale(.88); }
.showcase-card[data-slot="3"] { z-index: 2; transform: translate(24%, -8%) rotate(13deg) scale(.82); }
.showcase-card[data-slot="4"] { z-index: 1; transform: translate(-24%, -10%) rotate(-14deg) scale(.77); }

/* The front card swings out to the left and settles at the back. */
.showcase-card.is-leaving {
    animation: showcase-leave .9s cubic-bezier(.65, 0, .35, 1);
}

@keyframes showcase-leave {
    0% { transform: none; z-index: 6; }
    50% { transform: translate(-72%, 6%) rotate(-18deg); z-index: 6; }
    51% { z-index: 0; }
}

.showcase-caption {
    display: flex;
    justify-content: center;
    margin-top: .25rem;
}

/* The front piece's name and colourway, in a white pill. */
.showcase-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    max-width: 100%;
    padding: 0 .875rem 0 .5rem;
    border-radius: 999px;
    background: var(--ccg-surface);
    color: var(--ccg-ink);
    font-size: .8125rem;
    font-weight: 500;
}

.showcase-pill:hover {
    color: var(--ccg-heading);
}

/* Without the script the dots would do nothing: their room is kept, so
   nothing below moves when they appear. */
.showcase-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .125rem;
    margin-top: .25rem;
}

.showcase:not(.is-live) .showcase-controls {
    visibility: hidden;
}

.showcase-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
}

.showcase-dot span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ccg-line-control);
    transition: width var(--t-slow) var(--e-move), background-color var(--t-slow) var(--e-move);
}

.showcase-dot[aria-current="true"] span {
    width: 28px;
    background: var(--ccg-primary);
}

/* A pause button shows what pressing it does next. */
.showcase-pause .when-paused,
.piece-row-pause .when-paused,
.showcase-pause[aria-pressed="true"] .when-playing,
.piece-row-pause[aria-pressed="true"] .when-playing {
    display: none;
}

.showcase-pause[aria-pressed="true"] .when-paused,
.piece-row-pause[aria-pressed="true"] .when-paused {
    display: block;
}

.showcase-pause {
    margin-left: .5rem;
}

.showcase-pause,
.piece-row-pause {
    border-radius: 50%;
    background: var(--ccg-surface);
    color: var(--ccg-heading);
}

.showcase-pause:hover,
.piece-row-pause:hover {
    background: var(--ccg-calm);
    color: var(--ccg-heading);
}

@media (min-width: 992px) {
    .showcase-stage {
        aspect-ratio: 1 / .92;
    }

    .showcase-ornament {
        width: 92%;
    }

    .showcase-deck {
        width: 50%;
        animation-name: showcase-bob-lg;
    }

    .showcase-card {
        padding: 10px;
        border-radius: 22px;
    }

    .showcase-card img {
        border-radius: 14px;
    }

    .showcase-pill {
        padding-right: 1rem;
        font-size: .875rem;
    }

    .showcase-pill .swatch {
        width: 16px;
        height: 16px;
    }
}

@keyframes showcase-bob-lg {
    to { translate: 0 -8px; }
}

/* The pieces under the hero: a row that drifts on its own and scrolls by
   hand. It is inset by its edge fade, so no card is cut at rest; on a desktop
   the first card lines up with the page's column. */
.piece-row {
    --row-inset: 20px;
    --row-fade: 16px;
    overflow-x: auto;
    padding: 4px var(--row-inset);
    scroll-padding-inline: var(--row-inset);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--row-fade), #000 calc(100% - var(--row-fade)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--row-fade), #000 calc(100% - var(--row-fade)), transparent);
}

.piece-row::-webkit-scrollbar {
    display: none;
}

/* A row that drifts never snaps: snapping would pull it back after every step,
   and onto a card edge whenever it paused. */
.piece-row.is-live {
    scroll-snap-type: none;
    cursor: grab;
}

.piece-row.is-dragging,
.piece-row.is-dragging .piece-card {
    cursor: grabbing;
}

.piece-row:focus-visible {
    outline-offset: -3px;
}

.piece-row-list {
    display: flex;
    gap: 10px;
    width: max-content;
    margin: 0;
}

.piece-row-item {
    display: flex;
    flex: none;
    scroll-snap-align: start;
}

.piece-card {
    display: flex;
    flex-direction: column;
    width: 200px;
    padding: 8px 8px 0;
    border-radius: var(--radius-card);
    background: var(--ccg-surface);
    color: var(--ccg-ink);
    text-decoration: none;
}

/* The frame the photograph grows inside on hover, and the NOVO badge sits on. */
.piece-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-control);
    background: var(--ccg-calm);
}

.piece-card-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform var(--t-slow) var(--e-out);
}

.piece-card:is(:hover, :focus-visible) .piece-card-photo {
    transform: scale(1.04);
}

.piece-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 12px 6px 14px;
}

.piece-card-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Centred on the name's first line. */
.piece-card-disc {
    margin-top: -6px;
}

.piece-card-disc .icon {
    width: 18px;
    height: 18px;
}

.piece-card-titles {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.piece-card-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .9375rem;
    line-height: 20px;
    font-weight: 600;
    color: var(--ccg-heading);
}

.piece-card:is(:hover, :focus-visible) .piece-card-name {
    color: var(--ccg-accent);
}

.piece-card-type {
    font-size: .8125rem;
    line-height: 16px;
    color: var(--ccg-ink-muted);
}

.piece-card-colors {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 12px;
}

.piece-card-swatch {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: var(--ccg-canvas);
}

.piece-card-swatch .swatch {
    width: 12px;
    height: 12px;
}

.piece-card-swatch .swatch + .swatch {
    margin-left: -4px;
}

.piece-card-count {
    margin-left: 2px;
    font-size: .8125rem;
    line-height: 16px;
    font-weight: 500;
    color: var(--ccg-ink-muted);
    white-space: nowrap;
}

@media (min-width: 992px) {
    .piece-row {
        /* The .container's content edge: 32px gutter, 1200px of content. */
        --row-inset: max(32px, calc((100% - 1200px) / 2));
        /* No wider than the inset, or it would fade the first card at rest. */
        --row-fade: min(48px, var(--row-inset));
    }

    .piece-row-list {
        gap: 14px;
    }

    .piece-card {
        width: 232px;
    }

    .piece-card-body {
        padding: 14px 8px 16px;
    }

    .piece-card-head {
        gap: 10px;
    }

    .piece-card-name {
        font-size: 1rem;
    }

    .piece-card-colors {
        gap: 5px;
    }

    .piece-card-swatch .swatch {
        width: 14px;
        height: 14px;
    }

    .piece-card-swatch .swatch + .swatch {
        margin-left: -5px;
    }

    .piece-card-count {
        margin-left: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero *,
    .piece-row * {
        animation: none !important;
        transition: none !important;
    }
}

/* The owners at their stall, in a white card beside the story. */
.origin-card {
    padding: .5rem .5rem 1.5rem;
    background: var(--ccg-surface);
    border-radius: 24px;
}

.origin-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    /* Faces sit high in the frame. */
    object-position: center 18%;
    border-radius: 18px;
}

.origin-text {
    padding: 1.25rem .75rem 0;
}

@media (min-width: 992px) {
    .origin-card {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        gap: 3.5rem;
        align-items: center;
        padding: 1rem;
        border-radius: var(--radius-sheet);
    }

    .origin-photo {
        border-radius: 20px;
    }

    .origin-text {
        padding: 0 2.5rem 0 0;
    }
}

/* A step of the craft: icon disc, then the words; side by side on a phone. */
.craft-step {
    flex-direction: row;
    gap: .875rem;
    padding: 1rem;
}

.craft-step-disc {
    width: 44px;
    height: 44px;
}

.craft-step h3 {
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .craft-step {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .craft-step-disc {
        width: 52px;
        height: 52px;
    }
}

/* The events: one record. The tradition with the most editions leads in
   its own card with every year since it began; the rest follow as cards. */
.events-header {
    margin-bottom: 1.25rem;
}

.events-featured {
    position: relative;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border-radius: 24px;
}

.events-featured-head {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    margin-bottom: 1.25rem;
}

/* Clear of the filigree heart in the top corner. */
.events-featured-title {
    padding-right: 3rem;
}

.events-recurs {
    display: flex;
    align-items: center;
    gap: .375rem;
    margin-bottom: .5rem;
    font-size: .8125rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--ccg-accent);
}

.events-featured-name {
    margin-bottom: .375rem;
    font-size: 1.25rem;
    line-height: 1.3;
}

.events-count {
    margin: 0;
    font-size: .875rem;
    line-height: 1.43;
    font-weight: 500;
    color: var(--ccg-ink-muted);
}

.events-count-number {
    display: block;
    font-size: 2.5rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ccg-heading);
}


.events-heart {
    position: absolute;
    top: .875rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    overflow: visible;
    opacity: .4;
    rotate: 14deg;
    pointer-events: none;
}

.events-featured-name a {
    color: var(--ccg-heading);
    text-decoration-color: #B9C6DE;
    text-underline-offset: 4px;
}

.events-featured-name a:hover {
    text-decoration-color: currentColor;
}

.events-more {
    margin-top: 1rem;
}

.events-more summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    list-style: none;
}

.events-more summary::-webkit-details-marker {
    display: none;
}

.events-more[open] summary .icon {
    rotate: 180deg;
}

@media (min-width: 768px) {
    .events-more summary {
        width: fit-content;
        margin-inline: auto;
    }
}

@media (min-width: 992px) {
    .events-header {
        margin-bottom: 2rem;
    }

    .events-featured {
        margin-bottom: 1.25rem;
        padding: 2rem 2.25rem;
    }

    .events-featured-head {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 2rem;
    }

    .events-featured-title {
        padding-right: 0;
    }

    .events-featured-name {
        font-size: 1.625rem;
        line-height: 1.23;
        letter-spacing: -.01em;
    }

    .events-count {
        flex: none;
        text-align: right;
    }

    .events-count-number {
        font-size: 3.5rem;
    }

    .events-heart {
        top: auto;
        bottom: 1.5rem;
        right: 2.5rem;
        width: 80px;
        height: 80px;
    }
}

/* ------------------------------------------------------------------
   The catalogue: always the pieces. From lg the filters are a sticky
   sidebar beside them; below lg a bottom sheet behind the Filtros button.
   The pieces show as a grid of cards or a list of rows.
   ------------------------------------------------------------------ */

.catalogue {
    padding: .5rem 0 3.5rem;
}

.catalogue-head {
    margin-bottom: 1.25rem;
}

/* A grid column's min-width is auto, so a wide child would grow it and
   scroll the whole catalogue sideways. */
.catalogue-main {
    min-width: 0;
}

/* An empty .row still pulls up by its gutter, onto the chips above the empty notice. */
#product-results:empty {
    display: none;
}

.catalogue-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    margin-bottom: .75rem;
}

#filters-open {
    margin-right: auto;
}

.result-count {
    order: 3;
    flex-basis: 100%;
    margin: 0;
    font-size: .875rem;
    line-height: 1.43;
    font-weight: 500;
    color: var(--ccg-ink-muted);
}

/* Focus waits here after a page change; the number, not a ring, is the news. */
.result-count:focus {
    outline: 0;
}

.view-toggle .btn {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    min-height: 44px;
    padding: 0 .75rem;
    border: 1px solid var(--ccg-line);
    background: var(--ccg-surface);
    color: var(--ccg-ink-muted);
    font-size: .875rem;
    font-weight: 500;
}

.view-toggle .btn:hover {
    color: var(--ccg-primary);
}

.view-toggle .btn-check:checked + .btn {
    border-color: var(--ccg-calm);
    background: var(--ccg-calm);
    color: var(--ccg-primary);
}

.view-toggle .btn-check:focus-visible + .btn {
    outline: 3px solid var(--ccg-accent);
    outline-offset: 3px;
    box-shadow: none;
    z-index: 2;
}

/* The icons say it on a phone; the words stay for the screen reader. */
@media (max-width: 991.98px) {
    .view-toggle .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
}

/* The types as pills under the toolbar, below lg: one row that slides
   sideways, out to the screen's edges. */
.type-pills {
    display: flex;
    order: 2;
    flex-basis: calc(100% + var(--bs-gutter-x));
    gap: .5rem;
    margin: .25rem calc(var(--bs-gutter-x) * -.5) 0;
    padding: .25rem calc(var(--bs-gutter-x) * .5);
    overflow-x: auto;
    scrollbar-width: none;
}

.type-pill {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--ccg-line);
    border-radius: 999px;
    background: var(--ccg-surface);
    color: var(--ccg-ink);
    font-size: .9375rem;
    font-weight: 500;
    white-space: nowrap;
}

.type-pill[aria-pressed="true"] {
    border-color: var(--ccg-primary);
    background: var(--ccg-primary);
    color: #fff;
    font-weight: 700;
}

.type-pill-count {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ccg-ink-muted);
}

.type-pill[aria-pressed="true"] .type-pill-count {
    color: inherit;
}

.type-pill-skeleton {
    background-color: var(--ccg-surface-muted);
    border-color: transparent;
}

/* From lg the arrows carry their words and grow into pills. */
.page-word {
    display: none;
}

.page-status {
    margin: .625rem 0 0;
    font-size: .875rem;
    color: var(--ccg-ink-muted);
}

@media (min-width: 992px) {
    .page-word {
        display: inline;
    }

    /* As specific as Bootstrap's first/last-child corners, which it must beat. */
    .pagination .page-item .page-link-word {
        gap: .375rem;
        width: auto;
        padding: 0 1rem 0 .75rem;
        border-radius: 999px;
    }

    .pagination .page-item:last-child .page-link-word {
        padding: 0 .75rem 0 1rem;
        color: var(--ccg-primary);
        font-weight: 700;
    }
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1rem;
}

.filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    min-height: 36px;
    padding: .375rem .625rem .375rem .875rem;
    overflow-wrap: anywhere;
    text-align: left;
    border: 0;
    border-radius: 999px;
    background: var(--ccg-calm);
    color: var(--ccg-primary);
    font-size: .875rem;
    font-weight: 500;
}

/* Hit area 44px, the chip itself 36. */
.filter-chip::after {
    content: "";
    position: absolute;
    inset: -4px 0;
}

.filter-chip:hover {
    background: var(--ccg-calm-hover);
}

.filter-chip-group {
    flex: none;
    font-weight: 400;
    color: var(--ccg-ink-muted);
}

/* The sheet takes focus when it opens; the ring around all of it says nothing. */
.offcanvas:focus-visible {
    outline: 0;
}

.filters .placeholder {
    background-color: var(--ccg-surface-muted);
}

.filters-head {
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    margin-bottom: .75rem;
}

.filters-title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.filters-clear {
    padding: 0 .25rem;
    font-size: .875rem;
    font-weight: 500;
}

.filters-search {
    margin-bottom: .75rem;
}

.filter-group {
    border-top: 1px solid var(--ccg-line);
}

.filter-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ccg-heading);
    font-size: .9375rem;
    font-weight: 700;
}

.filter-group-toggle .icon {
    color: var(--ccg-ink-muted);
    transition: transform var(--t-base) var(--e-move);
}

.filter-group-toggle[aria-expanded="false"] .icon {
    transform: rotate(-90deg);
}

.filter-group-toggle:focus-visible {
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .filter-group-toggle .icon {
        transition: none;
    }
}

.filter-options {
    padding-bottom: .75rem;
}

.filter-entry,
.filter-entry-skeleton {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 44px;
    margin: 0 -.5rem;
    padding: 0 .5rem;
    border-radius: var(--radius-control);
}

.filter-entry-skeleton {
    justify-content: space-between;
}

.filter-entry {
    color: var(--ccg-ink);
    font-size: .9375rem;
    cursor: pointer;
}

.filter-entry:hover {
    background: var(--ccg-canvas);
}

.filter-entry .form-check-input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
}

.filter-entry:has(:checked) {
    color: var(--ccg-heading);
    font-weight: 500;
}

/* The box is small; the ring goes round the whole row. */
.filter-entry:has(:focus-visible) {
    outline: 3px solid var(--ccg-accent);
    outline-offset: -3px;
}

.filter-entry .form-check-input:focus-visible {
    outline: 0;
    box-shadow: none;
}

.filter-name {
    flex: 1;
    min-width: 0;
}

.filter-count {
    font-size: .8125rem;
    color: var(--ccg-ink-muted);
}

.filter-unavailable {
    margin: 0;
    font-size: .875rem;
    color: var(--ccg-ink-muted);
}

.filters-foot {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem 1.75rem;
    border-top: 1px solid var(--ccg-line);
}

/* A row per piece: thumbnail, name, what it is, its colourways. */
.product-row {
    gap: .875rem;
}

.product-row .list-row-thumb {
    width: 64px;
    height: 64px;
    overflow: hidden;
}

.product-row .product-placeholder {
    height: 100%;
}

.product-row .list-row-title {
    font-weight: 700;
    color: var(--ccg-heading);
}

.product-row:hover .list-row-title {
    color: var(--ccg-accent);
}

.product-row > .icon:last-child {
    flex: none;
}

.product-row-sets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
    margin-top: .5rem;
}

/* A phone names one colourway, whole, and counts the rest. */
@media (max-width: 991.98px) {
    .product-row-sets .color-set-badge:not(:first-child) {
        display: none;
    }
}

/* Skeletons wear the real classes; only the blocks differ. */
.product-skeleton .placeholder {
    background-color: var(--ccg-surface-muted);
}

.product-skeleton .photo-card-media.placeholder,
.product-skeleton .list-row-thumb.placeholder {
    display: block;
    min-height: 0;
}

.skeleton-pill {
    width: 8.5rem;
    height: 28px;
    border-radius: 999px;
}

@media (min-width: 992px) {
    .catalogue {
        padding: 1.5rem 0 7rem;
    }

    .catalogue-head {
        margin-bottom: 2rem;
    }

    .catalogue-body {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        column-gap: 2rem;
        align-items: start;
    }

    /* Always beside the pieces: pinned 1.5rem below the top, and a sidebar
       taller than the screen scrolls its options inside itself. */
    .filters {
        position: sticky;
        top: 1.5rem;
    }

    .offcanvas-lg.offcanvas-bottom {
        border-radius: 0;
        padding-top: 0;
        max-height: none;
    }

    .offcanvas-lg.offcanvas-bottom::before {
        display: none;
    }

    /* Bootstrap clears an inline offcanvas's background with !important. */
    .filters .offcanvas-body {
        flex-direction: column;
        max-height: calc(100dvh - 3rem);
        padding: 1.25rem 1.25rem .5rem;
        background-color: var(--ccg-surface) !important;
        border-radius: var(--radius-card);
    }

    /* The title and the search stay put; the groups scroll. The padding
       keeps the entries' hover wash and focus ring inside the scroller. */
    #filter-groups {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        margin: 0 -.5rem;
        padding: 0 .5rem;
    }

    .catalogue-toolbar {
        margin-bottom: 1rem;
    }

    .result-count {
        order: 0;
        flex-basis: auto;
        margin-right: auto;
        font-size: .9375rem;
    }

    .product-row {
        gap: 1.25rem;
        padding: .75rem 1.25rem .75rem .75rem;
    }

    .product-row .list-row-thumb {
        width: 96px;
        height: 96px;
    }

    .product-row .list-row-title {
        font-size: 1.0625rem;
    }

    .product-row .list-row-sub {
        font-size: .875rem;
    }
}

/* A name with no break in it would push the card, and the page, sideways. */
.product-card-line {
    overflow-wrap: anywhere;
}

/* A piece: a square photograph, name, type, one colourway and how many more. */
.product-card .photo-card-media {
    aspect-ratio: 1;
}

.product-card .product-placeholder {
    height: 100%;
}

.product-placeholder--house {
    flex-direction: column;
    gap: .75rem;
    text-align: center;
}

.product-placeholder-note {
    padding: 0 .5rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ccg-accent);
}

/* A 64px thumbnail has room for the icon only. */
.list-row-thumb .product-placeholder-note {
    display: none;
}

/* A phone card has room for the name and the type; the colourway joins from lg. */
.product-card-sets {
    display: none;
    align-items: center;
    gap: .375rem;
    min-width: 0;
    margin: .75rem .5rem 0;
}

.color-set-count {
    flex: none;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ccg-ink-muted);
}

@media (min-width: 992px) {
    .product-card {
        padding: .5rem .5rem 1rem;
    }

    .product-card .photo-card-name {
        margin: .875rem .5rem 0;
        font-size: 1.0625rem;
        line-height: 1.41;
    }

    .product-card .photo-card-sub {
        margin: 0 .5rem;
    }

    .product-card-sets {
        display: flex;
    }
}

.product-placeholder--stage {
    height: 100%;
    aspect-ratio: auto;
}

.product-placeholder--stage .product-placeholder-circle {
    width: 26%;
    max-width: 160px;
}

/* ------------------------------------------------------------------
   The piece. From lg: the gallery (7) beside one white card of facts (5).
   Below lg the photograph leads full width, the choices and the details are
   two cards, and the request button stays pinned to the foot of the screen.
   ------------------------------------------------------------------ */

.back-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    min-height: 36px;
    padding: 0 .875rem 0 .5rem;
    border-radius: 999px;
    background: var(--ccg-surface);
    font-size: .875rem;
    font-weight: 500;
}

/* Hit area 44px, the pill itself 36. */
.back-pill::after {
    content: "";
    position: absolute;
    inset: -4px 0;
}

.product-page {
    padding: .25rem 0 0;
}

.product-crumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--ccg-ink-muted);
}

/* A round icon on a phone, a labelled pill from lg, like the stage's Ampliar. */
.copy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--ccg-surface);
    color: var(--ccg-accent);
    font: inherit;
}

.copy-link[hidden] {
    display: none;
}

.copy-link:hover {
    background: var(--ccg-calm);
}

/* Copied: a green tick for two seconds (product.js). */
.copy-link.is-copied {
    background: var(--ccg-success-soft);
    color: var(--ccg-success);
    transition: background-color var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}

.copy-link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.product-layout {
    display: flex;
    flex-direction: column;
}

.product-info {
    display: contents;
}

#product-name {
    margin-top: 1.25rem;
}

.product-summary {
    margin: .5rem 0 0;
    font-size: .875rem;
    line-height: 1.43;
    color: var(--ccg-ink-muted);
}

.product-choices,
.product-details {
    padding: 1rem;
    background: var(--ccg-surface);
    border-radius: var(--radius-card);
}

.product-choices {
    margin-top: 1.25rem;
}

.product-choices:not(:has(fieldset:not([hidden]))) {
    display: none;
}

.product-choices fieldset + fieldset {
    margin-top: 1.25rem;
}

.product-choices fieldset[hidden] + fieldset {
    margin-top: 0;
}

.product-details {
    margin-top: .75rem;
}

/* Sobre a peça: a soft blue inset, a white tile per fact, the values as pills. */
.piece-facts {
    padding: .875rem 1rem .25rem;
    border-radius: var(--radius-card);
    background: linear-gradient(180deg, #EEF3FA, #F5F8FC);
}

#product-description + .piece-facts {
    margin-top: 1.25rem;
}

.piece-facts-title {
    margin: 0 0 .25rem;
    font-size: .9375rem;
    line-height: 1.33;
    font-weight: 700;
    color: var(--ccg-heading);
}

/* The type and the materials share a row; anything else takes the whole width. */
.piece-facts ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
}

.piece-fact {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .625rem 0;
}

.piece-fact--half:has(+ .piece-fact--half),
.piece-fact--half + .piece-fact--half {
    grid-column: auto;
}

.piece-fact + .piece-fact {
    border-top: 1px solid #DCE4F1;
}

.piece-fact--half + .piece-fact--half {
    border-top: 0;
}

/* Under 360 two columns leave a pill no room. */
@media (max-width: 359.98px) {
    .piece-facts ul {
        grid-template-columns: 1fr;
    }

    .piece-fact--half + .piece-fact--half {
        border-top: 1px solid #DCE4F1;
    }
}

.piece-fact-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-control);
    background: var(--ccg-surface);
    box-shadow: 0 1px 0 var(--ccg-calm-hover);
    color: var(--ccg-accent);
}

.piece-fact-body {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.piece-fact-label {
    font-size: .75rem;
    line-height: 1rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ccg-ink-muted);
}

.piece-fact-values {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
}

.piece-fact-value {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 .75rem;
    border-radius: 999px;
    background: var(--ccg-surface);
    box-shadow: inset 0 0 0 1px var(--ccg-calm-hover);
    color: var(--ccg-heading);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
}

/* Hit area 44px, the pill itself 32. */
a.piece-fact-value::after {
    content: "";
    position: absolute;
    inset: -6px 0;
}

a.piece-fact-value:hover {
    background: var(--ccg-calm);
    color: var(--ccg-heading);
}

.product-handmade {
    margin: 1rem .25rem 0;
    font-size: .875rem;
    line-height: 1.43;
    color: var(--ccg-ink-muted);
}

/* The home page's row of piece cards: edge to edge on a phone, four abreast from md. */
.alongside {
    margin-top: 2.5rem;
}

.alongside .piece-row {
    --row-inset: calc(var(--bs-gutter-x) * .5);
    margin-inline: calc(var(--bs-gutter-x) * -.5);
}

@media (min-width: 768px) {
    .alongside {
        margin-top: 4rem;
    }

    .alongside .piece-row {
        overflow: visible;
        margin-inline: 0;
        padding: 0;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .alongside .piece-row-list {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
        width: auto;
    }

    /* min-width, or a long name holds the card at its own width past the column. */
    .alongside .piece-card {
        width: 100%;
        min-width: 0;
    }
}

/* Pinned to the foot of the screen for as long as the piece is on it. */
.product-enquiry {
    order: 10;
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 1.25rem calc(var(--bs-gutter-x) * -.5) 0;
    padding: .75rem calc(var(--bs-gutter-x) * .5) 1.25rem;
    background: var(--ccg-canvas);
    border-top: 1px solid var(--ccg-line);
}

.product-enquiry-note {
    margin: .5rem 0 0;
    font-size: .75rem;
    line-height: 1.33;
    color: var(--ccg-ink-muted);
    text-align: center;
    /* One line in the pinned bar, or a long name takes the screen with it. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.enquiry-choice .swatch-set {
    margin-right: .375rem;
    vertical-align: -2px;
}

.enquiry-choice .swatch {
    width: 12px;
    height: 12px;
}

.enquiry-choice .swatch + .swatch {
    margin-left: -4px;
}

/* A colour set to choose: Hugo's named pill, 44px, a radio underneath. */
.variant-option {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: 0 .75rem 0 .5rem;
    border-radius: 999px;
    background: var(--cs-bg, var(--ccg-surface-muted));
    color: var(--cs-fg, var(--ccg-ink));
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
}

.variant-option .swatch {
    width: 20px;
    height: 20px;
}

.variant-option .swatch + .swatch {
    margin-left: -7px;
}

.variant-option:hover {
    box-shadow: inset 0 0 0 1.5px var(--ccg-accent);
}

.variant-option:has(:checked) {
    box-shadow: inset 0 0 0 2px var(--ccg-primary);
}

.variant-check {
    display: none;
    width: 16px;
    height: 16px;
    stroke-width: 2.25;
    color: var(--ccg-primary);
}

.variant-option:has(:checked) .variant-check {
    display: block;
}

.variant-option:has(:focus-visible),
.segment:has(:focus-visible) {
    outline: 3px solid var(--ccg-accent);
    outline-offset: 3px;
}

/* Sizes as a segmented control: one track, the chosen size a white pill. */
.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: 24px;
    background: var(--ccg-surface-muted);
}

.segment {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 5rem;
    min-height: 44px;
    padding: 0 .75rem;
    border-radius: 999px;
    font-size: .9375rem;
    font-weight: 500;
    cursor: pointer;
}

.segment:hover {
    color: var(--ccg-primary);
}

.segment:has(:checked) {
    background: var(--ccg-surface);
    color: var(--ccg-heading);
    font-weight: 700;
}

/* The gallery: a square stage, the thumbnails under it. */
.gallery-stage {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--ccg-surface);
    border-radius: 20px;
}

.gallery-stage img,
.gallery-stage .product-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The whole piece, however the photo was framed: a tall bottle opener cropped
   to the square showed only its middle. */
.gallery-stage img {
    object-fit: contain;
}

.stage-track {
    position: absolute;
    inset: 0;
    cursor: zoom-in;
}

.stage-track .carousel-item {
    height: 100%;
}

/* The photograph leaving on a change of colour (gallery.js crossfade()). */
.gallery-stage .stage-leaving {
    pointer-events: none;
    transition: opacity var(--t-slow) var(--e-move);
}

.gallery-stage .stage-leaving.is-gone {
    opacity: 0;
}

.stage-arrow {
    position: absolute;
    top: 50%;
    margin-top: -22px;
    --bs-btn-bg: var(--ccg-surface);
    --bs-btn-border-color: var(--ccg-surface);
}

.stage-arrow[disabled] {
    display: none !important;
}

.stage-arrow-left {
    left: .75rem;
}

.stage-arrow-right {
    right: .75rem;
}

.stage-counter,
.stage-zoom {
    position: absolute;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--ccg-surface);
}

.stage-counter {
    right: .75rem;
    bottom: .75rem;
    height: 28px;
    padding: 0 .625rem;
    font-size: .8125rem;
    font-weight: 500;
}

.stage-counter[hidden],
.stage-zoom[hidden] {
    display: none;
}

/* Furniture on the photograph, not a control: the whole stage opens the
   lightbox. A round icon on a phone, a labelled pill from lg. */
.stage-zoom {
    top: .75rem;
    right: .75rem;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--ccg-primary);
    pointer-events: none;
}

.stage-zoom-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* The carousel's indicators, under the stage rather than on it: dots on a
   phone, the photographs themselves from md. */
.gallery .thumb-strip {
    position: static;
    gap: 6px;
    margin: .625rem 0 0;
}

.gallery .strip-thumb {
    box-sizing: border-box;
    width: 6px;
    height: 6px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    text-indent: 0;
    background: #C3CEDD;
    opacity: 1;
}

.gallery .strip-thumb.active {
    width: 18px;
    background: var(--ccg-accent);
}

.strip-thumb img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
    .gallery .strip-thumb {
        transition: width .2s;
    }
}

/* The viewer (lightbox.js): the shop's navy at night, so the photograph is
   the only bright thing on screen. `body` outranks photoswipe.css, which the
   pages link after this file. */
body .pswp {
    --pswp-bg: #0E1A2C;
    --pswp-placeholder-bg: #1A2940;
    --pswp-icon-color: #FFFFFF;
    --pswp-icon-color-secondary: #0E1A2C;
    font-family: var(--bs-body-font-family);
}

/* Which photograph of how many, where the eye lands first. */
body .pswp__counter {
    position: absolute;
    top: 12px;
    left: 50%;
    translate: -50% 0;
    height: auto;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #FFFFFF;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    opacity: 1;
}

body .pswp__button--arrow--prev {
    left: 12px;
}

body .pswp__button--arrow--next {
    right: 12px;
}

.pswp__caption {
    position: absolute;
    right: 16px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    color: #EAF0FA;
    font-weight: 600;
    text-align: center;
    text-wrap: balance;
    pointer-events: none;
}

.pswp__thumbs {
    display: none;
}

body .pswp__error-msg {
    color: #EAF0FA;
    font-size: 15px;
}

.pswp:not(.pswp--ui-visible) :is(.pswp__caption, .pswp__thumbs) {
    opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .pswp :is(.pswp__caption, .pswp__thumbs) {
        transition: opacity .25s;
    }
}

/* Side by side from md: on a tablet the photograph alone used to fill the screen. */
@media (min-width: 768px) {
    .product-page {
        padding: 1rem 0 7rem;
    }

    .product-crumb {
        margin-bottom: 1.25rem;
    }

    .copy-link {
        position: relative;
        width: auto;
        height: 36px;
        padding: 0 .875rem 0 .75rem;
    }

    .copy-link::after {
        content: "";
        position: absolute;
        inset: -4px 0;
    }

    .copy-link-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }

    .product-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: start;
    }

    /* product.js pins the photograph beside the facts only while it fits the
       screen; a taller gallery scrolls, so its strip is never out of reach. */
    .gallery.is-pinned {
        position: sticky;
        top: 1.5rem;
    }

    .product-info {
        display: block;
        padding: 1.75rem;
        background: var(--ccg-surface);
        border-radius: var(--radius-card);
    }

    #product-name {
        margin-top: 0;
    }

    .product-summary {
        margin-top: .625rem;
        font-size: .9375rem;
        line-height: 1.47;
    }

    .product-choices,
    .product-details {
        padding: 0;
        border-radius: 0;
    }

    .product-choices {
        margin-top: 1.75rem;
    }

    .product-choices fieldset + fieldset {
        margin-top: 1.5rem;
    }

    .product-enquiry {
        position: static;
        margin: 1.75rem 0 0;
        padding: 0;
        border: 0;
        background: none;
    }

    .product-enquiry-note {
        margin-top: .625rem;
        font-size: .8125rem;
        line-height: 1.38;
        white-space: normal;
    }

    .product-details {
        margin-top: 1.75rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--ccg-line);
    }

    .product-details #product-description {
        font-size: 1.0625rem;
    }

    .piece-facts {
        padding: 1rem 1.25rem .375rem;
    }

    .product-handmade {
        display: flex;
        gap: .75rem;
        margin: 1rem 0 0;
        padding: .875rem 1rem;
        border-radius: var(--radius-control);
        background: var(--ccg-canvas);
    }

    .product-handmade .icon {
        color: var(--ccg-ink-muted);
    }

    .stage-arrow {
        display: inline-flex;
    }

    .stage-counter {
        right: 1rem;
        bottom: 1rem;
        height: 32px;
        padding: 0 .75rem;
    }

    .stage-zoom {
        top: auto;
        right: auto;
        left: 1rem;
        bottom: 1rem;
        gap: .5rem;
        width: auto;
        padding: 0 1rem 0 .75rem;
        font-size: .875rem;
        font-weight: 700;
    }

    .stage-zoom-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }

    /* Centred under the stage however few there are, six to a row at most. */
    .gallery .thumb-strip {
        flex-wrap: wrap;
        gap: .625rem;
        margin-top: .75rem;
        padding: 2px 4px 4px;
    }

    .gallery .strip-thumb,
    .gallery .strip-thumb.active {
        flex: 0 0 calc((100% - 5 * .625rem) / 6);
        width: auto;
        height: auto;
        aspect-ratio: 1;
        border-radius: var(--radius-control);
        background: none;
    }

    .gallery .strip-thumb.active {
        box-shadow: 0 0 0 2px var(--ccg-canvas), 0 0 0 4px var(--ccg-primary);
    }

    .strip-thumb img {
        display: block;
    }

    .pswp__thumbs {
        position: absolute;
        right: 0;
        bottom: 14px;
        left: 0;
        display: flex;
        gap: 6px;
        justify-content: safe center;
        padding: 3px 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .pswp__thumbs button {
        flex: none;
        width: 52px;
        height: 52px;
        padding: 0;
        overflow: hidden;
        border: 0;
        border-radius: 10px;
        background: #1A2940;
        opacity: .45;
        cursor: pointer;
    }

    .pswp__thumbs button[aria-current="true"] {
        box-shadow: 0 0 0 2px #0E1A2C, 0 0 0 4px #8FB0EC;
        opacity: 1;
    }

    .pswp__thumbs img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .pswp__caption:has(~ .pswp__thumbs) {
        bottom: 86px;
    }
}

@media (min-width: 992px) {
    .product-layout {
        grid-template-columns: 7fr 5fr;
        gap: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .photo-card-media img {
        transition: none;
    }
}

/* ------------------------------------------------------------------
   The error pages: one white card in the middle of the canvas.
   ------------------------------------------------------------------ */

.error-page {
    padding: 1.5rem 0 4rem;
}

.error-card {
    align-items: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-sheet);
    text-align: center;
}

.error-card .lead-text-sm {
    max-width: 26rem;
}

.error-mark {
    width: 96px;
    height: 96px;
    margin-bottom: 1.5rem;
    background: var(--ccg-calm);
}

.error-mark img {
    border-radius: 50%;
    background: var(--ccg-surface);
    object-fit: contain;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    width: 100%;
}

.error-actions .btn {
    flex: 1 1 200px;
    max-width: 240px;
}

@media (min-width: 992px) {
    .error-page {
        padding: 3rem 0 7.5rem;
    }

    .error-card {
        padding: 2.5rem 2rem;
    }
}

/* ------------------------------------------------------------------
   NOVO: a piece taken in during the last 30 days (Product::NEW_DAYS).
   White on a photograph, calm blue on a white card; it goes by itself.
   ------------------------------------------------------------------ */

.badge-new {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--ccg-calm);
    color: var(--ccg-heading);
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.photo-card-media .badge-new,
.piece-card-media .badge-new {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--ccg-surface);
}

.list-row-title .badge-new {
    margin-left: .5rem;
    vertical-align: .125rem;
}

.product-info > .badge-new {
    align-self: flex-start;
}

@media (prefers-reduced-motion: reduce) {
    .photo-card:is(:hover, :focus-visible) .photo-card-media img,
    .piece-card:is(:hover, :focus-visible) .piece-card-photo {
        transform: none;
    }
}

/* ------------------------------------------------------------------
   Comprar com confiança: how an order goes, as a timeline. Down the
   left on a phone, across from md, with a line through the discs.
   ------------------------------------------------------------------ */

.how-we-work {
    padding: 1.5rem 1.25rem;
}

.how-steps {
    position: relative;
    display: grid;
    gap: 1.25rem;
    margin: 0;
}

/* Down the left: from each disc to the next, so the line stops at the last. */
.how-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 44px;
    bottom: -1.25rem;
    left: 21px;
    width: 2px;
    background: var(--ccg-calm);
}

.how-step {
    position: relative;
    display: flex;
    gap: .875rem;
}

.how-step-disc {
    width: 44px;
    height: 44px;
    background: var(--ccg-calm);
    color: var(--ccg-heading);
}

.how-step-disc.is-first {
    background: var(--ccg-primary);
    color: #FFFFFF;
}

.how-step-text {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    padding-top: .5rem;
}

.how-step-title {
    font-weight: 700;
    color: var(--ccg-heading);
}

.how-step-sub {
    font-size: .9375rem;
    line-height: 1.45;
    color: var(--ccg-ink-muted);
}

.how-we-work-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ccg-line);
    font-size: .9375rem;
    color: var(--ccg-ink-muted);
}

.how-we-work-foot > * {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
}

.how-we-work-foot > :not(.how-we-work-terms) .icon {
    color: var(--ccg-success);
}

.how-we-work-foot a:not(.how-we-work-terms) {
    color: inherit;
}

.how-we-work-terms {
    font-weight: 700;
}

@media (min-width: 768px) {
    .how-we-work {
        padding: 2.5rem;
    }

    .how-steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Across: one line through the discs, ending at the last. */
    .how-step:not(:last-child)::after {
        display: none;
    }

    .how-steps::before {
        content: "";
        position: absolute;
        top: 21px;
        left: 22px;
        right: calc(20% - 22px);
        height: 2px;
        background: var(--ccg-calm);
    }

    .how-step {
        flex-direction: column;
        gap: 1rem;
    }

    .how-step-text {
        padding-top: 0;
    }

    .how-we-work-terms {
        margin-left: auto;
    }
}

/* ------------------------------------------------------------------
   Antes de encomendar: the questions, as native <details>.
   ------------------------------------------------------------------ */

.faq-layout {
    display: grid;
    gap: 1.5rem;
}

.faq-ask {
    align-items: flex-start;
    padding: 1.25rem;
}

.faq-ask .disc {
    margin-bottom: .75rem;
}

.faq-ask-title {
    font-size: 1.125rem;
    color: var(--ccg-heading);
    margin-bottom: .25rem;
}

.faq-ask p {
    color: var(--ccg-ink-muted);
}

.faq-list {
    display: grid;
    gap: .5rem;
}

.faq-item {
    border-radius: var(--radius-card);
    background: var(--ccg-surface);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 56px;
    padding: .75rem 1.125rem;
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ccg-heading);
    border-radius: var(--radius-card);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover,
.faq-item[open] summary {
    color: var(--ccg-accent);
}

.faq-chevron {
    flex: none;
    transition: transform var(--t-base) var(--e-out);
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    margin: 0;
    padding: 0 1.125rem 1.125rem;
    line-height: 1.55;
    animation: ccg-arrive var(--t-slow) var(--e-out);
}

@media (min-width: 992px) {
    .faq-layout {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 3rem;
        align-items: start;
    }

    .faq-ask {
        padding: 1.5rem;
    }

    .faq-item summary {
        min-height: 64px;
        padding: .875rem 1.375rem;
        font-size: 1.0625rem;
    }

    .faq-answer {
        padding: 0 1.375rem 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-answer {
        animation: none;
    }
}
