
/* Home and Community */
.pv-r4-opening {
    --pv-r4-art: 480px;
    width: min(100%, 1200px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, var(--pv-r4-art));
    justify-content: center;
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
}
@media (min-width: 1500px) {
    .pv-r4-opening { --pv-r4-art: 520px; }
}
html body.home .pv-v6-home .pv-v6-home-hero:has(.pv-r4-home-opening) {
    padding: 35px 24px 0 !important;
    margin-bottom: 0;
}
html body.home .pv-v6-home .pv-r4-home-opening > .pv-copy {
    max-width: none;
    width: auto;
    padding: 0;
    margin: 0;
    text-align: left;
}
html body.home .pv-v6-home .pv-r4-home-opening h1 {
    max-width: 7ch;
    font-size: clamp(3.5rem, 6vw, 5rem) !important;
    line-height: 1.03 !important;
    margin: 0 0 12px !important;
}
html body.home .pv-v6-home .pv-r4-home-opening .pv-kicker {
    font-size: .8125rem !important;
    line-height: 1.25 !important;
    margin-bottom: 10px !important;
}
html body.home .pv-v6-home .pv-r4-home-opening .pv-subhead {
    font-size: 1.5rem !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}
.pv-r4-home-action { margin: 24px 0 0 !important; }
.pv-r4-home-action > a.pv-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    white-space: normal !important;
}
.pv-r4-opening-art, .pv-r4-destination-art {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    margin: 0;
}
html body.page-id-72 #primary .pv-v6:has(> .pv-r4-community-opening) {
    padding-top: 0 !important;
}
.pv-r4-community-opening { margin-top: 0; }
@media (min-width: 769px) and (max-width: 1499px) {
    .pv-r4-community-opening { margin-top: 3px; }
}
.pv-r4-community-copy .pv-v6-head { margin-bottom: 12px; }
.pv-r4-community-copy > p { margin-bottom: 0; }
.pv-r4-destinations {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 12px 0 32px;
}
.pv-r4-destinations > a {
    display: grid;
    align-items: end;
    isolation: isolate;
    text-decoration: none;
    min-height: 44px;
    color: #fff !important;
}
.pv-r4-destination-art, .pv-r4-destinations > a > span { grid-area: 1 / 1; }
.pv-r4-destination-art { aspect-ratio: 16 / 9; }
.pv-r4-destinations > a > span {
    align-self: start;
    justify-self: start;
    margin: 12px;
    padding: 8px 16px;
    background: #1b1b18;
    font-weight: 800;
}
.pv-r4-destinations ~ section[id] { scroll-margin-top: 104px; }

/* Keep the original Home copy and its three separate signup tiles. */
html body.home .pv-v6-home .pv-v6-hand {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1128px;
    margin-inline: auto;
}
html body.home .pv-v6-home .pv-v6-hand > li {
    display: grid;
    place-items: center;
    text-align: center;
    box-sizing: border-box;
    aspect-ratio: 5 / 3;
    padding: 24px;
    font: 300 1.375rem/1.3 "Kalam", cursive !important;
    overflow-wrap: anywhere;
    border-radius: 2px;
    box-shadow: 0 2px 0 #2c2c2c, 0 8px 16px -4px rgb(0 0 0 / 60%);
}

/* Round 39's positioning, card stack, hover, focus and reduced-motion behavior are retained. */
html body.pv-r39-deck.page-id-73 .pv-wd-shared :is(.pv-wd-hand > li, .pv-wd-gallery__item, .pv-r39-stack > .pv-r39-c) {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    padding: 24px !important;
    aspect-ratio: 5 / 3;
    font-size: 1.3125rem !important;
    overflow-wrap: anywhere;
}
/* Round 39 sets originals to display:none inline when its rotating deck is active. */
html body.pv-r39-deck.page-id-73 .pv-wd-shared :is(.pv-wd-hand > li, .pv-wd-gallery__item):not(.pv-r39-c) {
    display: flex;
}
html body.pv-r39-deck.page-id-73 .pv-wd-shared .pv-wd-gallery__answer {
    margin: 0 !important;
    font-size: 1.3125rem !important;
}
html body.pv-r39-deck.page-id-73 .pv-wd-shared .pv-wd-gallery__attribution {
    margin: 12px 0 0 !important;
    font-size: 1rem !important;
}
html body.pv-r39-deck.page-id-73 .pv-wd-shared .pv-r39-stack {
    min-height: var(--pv-r4-card-min-height, 0px);
}

/* The main shop keeps all current copy and the native search, sort and archive URLs. */
html body.woocommerce-shop.pv-r32-market #primary { padding-top: 12px !important; }
html body.woocommerce-shop.pv-r32-market .pv-r32-market-head { margin: 0 0 10px; }
html body.woocommerce-shop.pv-r32-market .pv-r32-market-title {
    font-size: clamp(2.125rem, 4vw, 3.25rem) !important;
    line-height: 1.07 !important;
}
html body.woocommerce-shop.pv-r32-market .pv-mp-toolbar {
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: 0 !important;
    gap: 8px;
}
html body.woocommerce-shop.pv-r32-market .pv-mp-toolbar :is(input[type=search], select, button) {
    height: auto;
    min-height: 44px;
}
html body.woocommerce-shop.pv-r32-market .pv-mp-toolbar .pv-mp-search { gap: 8px; }
html body.woocommerce-shop.pv-r32-market .pv-mp-count { margin: 0 0 4px; }
html body.woocommerce-shop.pv-r32-market .pv-mp-count p { margin: 0; }
html body.woocommerce-shop.pv-r32-market .pv-r32-chips {
    padding: 0;
    margin: 0 0 12px;
    border: 0;
}
html body.woocommerce-shop.pv-r32-market .pv-r32-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
html body.woocommerce-shop.pv-r32-market #primary ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 0 !important;
}
html body.woocommerce-shop.pv-r32-market #primary ul.products::before,
html body.woocommerce-shop.pv-r32-market #primary ul.products::after { content: none; }
html body.woocommerce-shop.pv-r32-market #primary ul.products > li.product {
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
}
html body.woocommerce-shop.pv-r32-market #primary .woocommerce-loop-product__link > img {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    object-fit: contain;
}
html body.woocommerce-shop.pv-r32-market .pv-v6-shop-intro { margin: 64px 0 0; }
html body.woocommerce-shop.pv-r32-market .pv-v6-shop-intro > .pv-v6 { max-width: 680px; }
html body.woocommerce-shop.pv-r32-market .pv-v6-shop-more { max-width: 680px; margin: 0 auto; }

/* Product photos and purchase form have independent controls. */
.pv-r4-finishes[hidden], .pv-r4-preview-gallery[hidden],
html body.single-product div.product.pv-r4-preview-active > .woocommerce-product-gallery,
html body.single-product div.product .summary .variations_form.pv-r4-preview-only { display: none !important; }
.pv-r4-finishes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 12px;
}
html body.single-product .pv-r4-finishes > button,
html body.single-product .pv-r4-preview-thumbs > button {
    background: none !important;
    color: inherit !important;
    border: 0;
    box-shadow: none;
    padding: 4px;
    margin: 0;
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 44px;
    min-height: 44px;
    font-size: .875rem;
    line-height: 1.2;
}
.pv-r4-chip-sample {
    display: block;
    width: 36px;
    height: 36px;
    border: 1px solid #a59c88;
    border-radius: 2px;
    background-color: var(--pv-r4-sample);
}
.pv-r4-finishes > [aria-pressed="true"] .pv-r4-chip-sample,
.pv-r4-preview-thumbs > [aria-pressed="true"] > img {
    outline: 2px solid #b68524;
    outline-offset: 2px;
}
.pv-r4-finishes > button:focus-visible,
.pv-r4-preview-thumbs > button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.pv-r4-preview-gallery {
    float: left;
    width: 58%;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    align-items: start;
    gap: 12px;
}
.pv-r4-preview-main { display: block; }
.pv-r4-preview-main > img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}
.pv-r4-preview-thumbs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    max-height: var(--pv-r4-image-height, 520px);
    overflow: auto;
}
.pv-r4-preview-thumbs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 900px) {
    .pv-r4-preview-gallery { float: none; width: 100%; grid-template-columns: minmax(0, 1fr); }
    .pv-r4-preview-thumbs { grid-template-columns: none; grid-auto-columns: 64px; grid-auto-flow: column; }
}
@media (max-width: 768px) {
    .pv-r4-opening { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
    .pv-r4-opening-art { order: -1; aspect-ratio: auto; height: auto; min-height: 0; max-height: 240px; }
    html body.home .pv-v6-home .pv-v6-home-hero:has(.pv-r4-home-opening) { padding: 16px 16px 0 !important; }
    html body.home .pv-v6-home .pv-r4-home-opening h1 {
        max-width: none;
        font-size: 3rem !important;
        margin-bottom: 6px !important;
    }
    html body.home .pv-v6-home .pv-r4-home-opening .pv-kicker { margin-bottom: 4px !important; }
    html body.home .pv-v6-home .pv-r4-home-opening .pv-subhead { font-size: 1.125rem !important; }
    .pv-r4-home-action { margin-top: 12px !important; }
    .pv-r4-destinations { grid-template-columns: 1fr; gap: 16px; }
    .pv-r4-community-copy .pv-v6-head { margin-bottom: 4px; }
    html body.home .pv-v6-home .pv-v6-hand { grid-template-columns: minmax(0, 358px); justify-content: center; gap: 16px; }
    html body.woocommerce-shop.pv-r32-market #primary ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}
@media (max-width: 520px) {
    html body.pv-r39-deck.page-id-73 .pv-wd-shared .pv-wd-hand { grid-template-columns: minmax(0, 1fr) !important; }
    html body.pv-r39-deck.page-id-73 .pv-wd-shared .pv-r39-stack { width: 100%; }
    html body.pv-r39-deck.page-id-73 .pv-wd-shared .pv-r39-stack > [data-pos="1"] { transform: translateY(8px) rotate(1deg); }
    html body.pv-r39-deck.page-id-73 .pv-wd-shared .pv-r39-stack > [data-pos="2"] { transform: translateY(16px) rotate(-1deg); }
    html body.woocommerce-shop.pv-r32-market .pv-mp-toolbar .pv-mp-search { flex-basis: 100%; }
    html body.woocommerce-shop.pv-r32-market .pv-r32-chips { row-gap: 2px; }
}
