/* Shopify merch and cart; loaded after the site's existing stylesheet. */
#shop-products { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 400px)); justify-content: center; }
#shop-products[data-view="catalog"] {grid-template-columns: repeat(auto-fit, minmax(0, 350px)); justify-content: center; gap: 0.5rem;}
#merch-status { color: var(--color-pink-muted); margin-bottom: 1rem; }
.shop-product { display: flex; flex-direction: column; gap: 1rem; min-width: 0; padding: 1.6rem; border: 1px solid var(--color-border); color: var(--color-pink); }
.shop-product-image { width: 100%; height: 300px; object-fit: contain; }
.shop-product h3 { font: 1.15rem Georgia, serif; letter-spacing: .04em; }
.shop-price { font-size: 1rem; }
.shop-options { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: auto; }
.shop-options label { flex: 1; display: grid; gap: .5rem; font-size: .85rem; }
.shop-options select { width: 100%; min-width: 75px; padding: .7rem; background: var(--theme-panel); border: 1px solid var(--color-border); border-radius: 5px; color: var(--color-pink); font: inherit; }
.shop-button { min-height: 44px; padding: .7rem 1rem; border: 1px solid var(--color-pink); border-radius: 6px; background: transparent; color: var(--color-pink); font: inherit; cursor: pointer; }
.shop-button:hover:not(:disabled) { background: var(--color-pink-soft); }
.shop-button:disabled { opacity: .5; cursor: default; }
.shop-product > .shop-button { width: 100%; }
.shop-button:focus-visible, .shop-options select:focus-visible, .shop-cart button:focus-visible { outline: 2px solid var(--color-pink); outline-offset: 3px; }
.shop-cart-count { position: absolute; top: -5px; right: -6px; min-width: 19px; padding: 2px 4px; border-radius: 20px; background: var(--color-pink); color: var(--theme-background); font: 11px/1.3 sans-serif; }
.shop-cart-count[hidden], .shop-button[hidden], .shop-product-image[hidden] { display: none; }
.shop-cart { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; padding: 2rem; border: 0; border-left: 1px solid var(--color-border); background: var(--theme-background); color: var(--color-pink); overflow-y: auto; }
.shop-cart::backdrop { background: rgba(0, 0, 0, .45); }
.shop-cart h2 { margin: .5rem 3rem 2rem 0; font: 1.7rem Georgia, serif; }
.shop-cart-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 2rem; cursor: pointer; }
.shop-cart-line { display: flex; align-items: flex-start; gap: 1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--color-border); }
.shop-cart-line > img { width: 75px; height: 95px; object-fit: contain; }
.shop-cart-line-info { min-width: 0; flex: 1; }
.shop-cart-line h3 { font: 1rem Georgia, serif; overflow-wrap: anywhere; }
.shop-cart-line p { margin: .5rem 0; font-size: .9rem; }
.shop-quantity { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.shop-quantity .shop-button { min-width: 40px; padding: .4rem; }
.shop-remove { background: transparent; border: 0; color: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; padding: .2rem; }
.shop-cart-total { margin-top: 1.5rem; font-size: 1.2rem; }
.shop-cart-note { margin: .8rem 0; font-size: .8rem; }
.shop-cart-status { margin: 1rem 0; font-size: .9rem; }
.shop-cart > .shop-button { margin: .3rem .5rem .3rem 0; }
@media (max-width: 1100px) {
    .header-center { gap: 1.5rem; }
    .site-logo { font-size: 1.6rem; }
}
@media (max-width: 800px) {
    .site-header { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: .75rem; }
    .header-center { min-width: 0; gap: .8rem; }
    .header-center-link { font-size: .8rem; }
    .cart-button { position: relative; top: auto; right: auto; transform: none; justify-self: end; color: var(--color-pink); }
    .cart-button:hover { transform: translateY(-1px); }
}
@media (max-width: 600px) {
    .header-center-link { display: none; }
    .site-logo { font-size: clamp(.85rem, 3.5vw, 1.3rem); letter-spacing: .14em; }
    .shop-product { padding: 1rem; }
    .shop-product-image { height: 250px; }
    .shop-cart { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .shop-product *, .shop-cart * { transition: none; } }
/* Three homepage previews, full catalogue, and the expanded product page. */
.shop-preview-row { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.shop-preview-row .shop-see-more {background-color: #ffffff; color: #000000;}
#shop-products.shop-preview-grid { width: 100%; min-width: 0; grid-template-columns: repeat(3, minmax(0, 320px)); gap: .5rem; justify-content: center;}
.shop-product-preview { text-decoration: none; transition: border-color var(--transition-fast), background var(--transition-fast); }
.shop-product-preview:hover { border-color: var(--color-pink); background: var(--color-pink-soft); }
.shop-product-preview:focus-visible, .shop-see-more:focus-visible { outline: 2px solid var(--color-pink); outline-offset: 5px; }
.shop-preview-meta { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--color-pink-muted); }
.shop-product-placeholder { justify-content: center; align-items: center; min-height: 350px; background: var(--color-pink-soft); font: 1rem Georgia, serif; color: var(--color-pink-muted); }
.shop-product-placeholder span + span { font-size: .8rem; letter-spacing: .12em; }
.shop-see-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;

    color: var(--color-pink);
    background: transparent;
    border: 1px solid var(--color-pink);
    border-radius: 6px;

    font: 0.9rem Georgia, serif;
    text-decoration: none;
}

.shop-see-more:hover {
    background: var(--color-pink-soft);
}
.shop-motion { display: block; margin-top: 1rem; border: 0; padding: .5rem 0; color: var(--color-pink-muted); background: transparent; text-decoration: underline; font-size: .75rem; cursor: pointer; }
.shop-motion[hidden] { display: none; }
.shop-page { width: min(1400px, 100%); margin: 0 auto; padding: 5rem var(--site-padding) 8rem; min-height: 65vh; }
.shop-page .section-title { margin-top: 2.5rem; }
.shop-page.shop-catalog-page{padding-top: 2rem;}
.shop-back-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.shop-back { display: inline-block; color: var(--color-pink-muted); font-size: .9rem; margin-bottom: 2rem; }
.shop-description { white-space: pre-line; line-height: 1.7; }
.shop-description:empty { display: none; }
.shop-product-note { font-size: .8rem; line-height: 1.6; color: var(--color-pink-muted); }
@media (max-width: 800px) {
    .shop-page { padding: 3rem 1.5rem 6rem; }
    #shop-products.shop-preview-grid { grid-template-columns: repeat(3, minmax(187px, .85fr)); overflow-x: auto; padding: .4rem .2rem 1rem; scroll-snap-type: x proximity; }
    .shop-preview-grid > * { scroll-snap-align: start; }
}

/* Compact merch previews */
.shop-product.shop-product-preview {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;

    width: 100%;
    max-width: 100%;
    justify-self: center;

    padding: 0;
    border: 0;
    background: transparent;
}

.shop-product.shop-product-preview:hover {
    background: transparent;
}

.shop-preview-media {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: transparent;
}

.shop-product-preview .shop-product-image {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
}

/* Name and type on the left; price on the right */
.shop-preview-caption {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.shop-preview-identity {
    min-width: 0;
}

.shop-product-preview h3 {
    margin: 0;
    font: 1rem Georgia, serif;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}

.shop-preview-type {
    margin-top: 0.35rem;
    color: var(--color-pink-muted);
    font-size: 0.8rem;

    display: block;
    margin-top: 0.35rem;
    text-transform: none;
    font-weight: 400;
    opacity: 0.65;
}

.shop-preview-type:empty {
    display: none;
}

.shop-preview-caption .shop-price {
    flex-shrink: 0;
    margin: 0;
    font-size: 0.9rem;
    white-space: nowrap;
}

.shop-product-preview h3,
.shop-preview-caption .shop-price {
    font-weight: 700;
}

/* Color and size oval */
.shop-preview-oval {
    position: absolute;
    bottom: 0.8rem;
    left: 50%;

    display: flex;
    align-items: center;

    width: max-content;
    max-width: calc(100% - 1rem);
    overflow-x: auto;
    padding: 0.3rem 0.9rem;

    color: #000000;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 700;
    gap: 0.5rem;
    white-space: nowrap;

    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.shop-preview-oval > span {
    flex-shrink: 0;
}

.shop-preview-oval > span + span::before {
    content: none;
}

.shop-preview-oval > .shop-preview-color + .shop-preview-size::before {
    content: "|";
    display: inline-block;
    margin: 0 0.5rem 0 0;
    color: #000000
}

.shop-preview-size.is-unavailable {
    color: #888;
}

.shop-product-preview:hover .shop-preview-oval,
.shop-product-preview:focus-visible .shop-preview-oval {
    opacity: 1;
    transform: translate(-50%, 0);
}

.shop-preview-caption {
    width: 100%;
}

/* Touchscreens show the details without needing hover */
@media (hover: none) {
    .shop-preview-oval {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop-preview-oval {
        transition: none;
    }
}
/* Product detail: thumbnails and main image left, details right. */
.shop-page.shop-detail-page { padding-top: 1rem; padding-left: 0rem;}
.shop-detail-page #merch-status:empty { display: none; }
.shop-product.shop-product-detail {
    display: grid;
    grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
    align-items: stretch;
    gap: 1.5rem;
    padding: 0;
    border: 0;
}
.shop-detail-gallery { display: grid; grid-template-columns: minmax(0, 1fr); align-self: start; min-width: 0; width: 100%; max-width: 620px; justify-self: start;}
.shop-detail-gallery.has-thumbnails {
    grid-template-columns: minmax(0, 1fr) minmax(0, 4fr);
    gap: 0.5rem;
}
.shop-main-media { position: relative; aspect-ratio: 4 / 5; min-width: 0; }
.shop-main-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.shop-thumbnail-rail {
    position: relative;
    min-width: 0;
}
.shop-thumbnail-rail[hidden], .shop-gallery-next[hidden], .shop-main-image[hidden] { display: none; }
.shop-thumbnails {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}
.shop-thumbnail-rail.has-more .shop-thumbnails { bottom: 32px; }
.shop-thumbnail {
    display: block;
    justify-self: end;
    width: auto;
    height: 100%;
    max-width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
}
.shop-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.shop-thumbnail:hover { border-color: var(--color-pink); }
.shop-gallery-next { position: absolute; bottom: 0; left: 0; display: block; margin: 0; width: 100%; height: 26px; padding: 0; border: 0; color: var(--color-pink); background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.shop-product-info { display: flex; flex-direction: column; min-width: 0; gap: 1rem; }
.shop-detail-title { margin: 0; font: bold clamp(1.5rem, 2.5vw, 2.2rem)/1.2 Georgia, serif; overflow-wrap: anywhere; }
.shop-detail-category { margin: -.4rem 0 .5rem; color: var(--color-pink-muted); opacity: .7; font-size: .9rem; font-weight: 400; text-transform: none; }
.shop-detail-category:empty { display: none; }
.shop-detail-page .shop-description { white-space: normal; line-height: 1.7; font-size: .95rem; overflow-wrap: anywhere; }
.shop-description > * + * { margin-top: .8rem; }
.shop-description ul, .shop-description ol { padding-left: 1.4rem; }
.shop-description a { color: inherit; text-decoration: underline; }
.shop-detail-purchase { display: grid; gap: 1rem; margin-top: 0; padding-top: .5rem; }
.shop-detail-purchase .shop-price { font-size: 1.2rem; font-weight: 700; }
.shop-detail-options { display: grid; gap: 1rem; }
.shop-option-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.shop-option-group legend { margin-bottom: .6rem; padding: 0; font-size: .8rem; }
.shop-option-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 0 solid var(--color-border); background: transparent;}
.shop-option-button { width: 100%; aspect-ratio: 10 /2; padding: .15rem; border: 1px solid var(--color-border); border-radius: 0; background: var(--theme-background); color: var(--color-pink); font: inherit; font-size: .75rem; line-height: 1.1; overflow-wrap: anywhere; cursor: pointer; }
.shop-option-button[aria-pressed="true"] {background: var(--color-pink-soft); box-shadow: inset 0 0 0 1px var(--color-pink);}
.shop-option-button.is-sold-out { color: var(--color-pink-muted); text-decoration: line-through; }
.shop-option-button:hover { border-color: var(--color-pink); }
.shop-option-button:focus-visible, .shop-thumbnail:focus-visible, .shop-gallery-next:focus-visible { outline: 2px solid var(--color-pink); outline-offset: 3px; }
.shop-option-grid:not(.shop-color-grid) > :first-child {border-top-left-radius: 6px;}
.shop-option-grid:not(.shop-color-grid) > :nth-child(4),
.shop-option-grid:not(.shop-color-grid) > :last-child:nth-child(-n+4) {border-top-right-radius: 6px;}
.shop-option-grid:not(.shop-color-grid) > :nth-child(4n+1):nth-last-child(-n+4) {border-bottom-left-radius: 6px;}
.shop-option-grid:not(.shop-color-grid) > :last-child {border-bottom-right-radius: 6px;}
.shop-option-grid:not(.shop-color-grid) > .shop-option-button {background: #ffffff; color: #000000;} 
.shop-color-grid > .shop-option-button {
    border-radius: 0;
}

/* Left button in each row */
.shop-color-grid > .shop-option-button:nth-child(odd) {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

/* Right button in each row */
.shop-color-grid > .shop-option-button:nth-child(even) {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Final row containing only one color */
.shop-color-grid > .shop-option-button:last-child:nth-child(odd) {
    border-radius: 6px;
}
.shop-color-grid .shop-option-button.has-swatch {
    background: var(--swatch-color);
    color: var(--swatch-text);
}
.shop-color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: .2rem;
    column-gap: 0.3rem;
    border: 0;
    background: transparent;
}
.shop-detail-purchase .shop-product-note:empty { display: none; }
@media (max-width: 800px) {
    .shop-product.shop-product-detail { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .shop-detail-gallery { width: min(100%, 600px); justify-self: center; }
    .shop-detail-purchase { padding-top: .5rem; }
}

.shop-color-grid .shop-option-button {
    aspect-ratio: 10 / 1;
    border: 1px solid var(--color-border);
}

.shop-description-list {
    margin: 0;
    padding-left: 1.2rem;
    list-style: disc;
}

.shop-description-list > li + li {
    margin-top: 0.5rem;
}

.shop-description-list > li > p {
    margin: 0;
}

.shop-detail-purchase > [data-shop-add] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--color-pink);
    color: var(--theme-background);
    width: 100%;
    min-height: 64px;
    padding: 1rem 1.25rem;

    font-size: 1rem;
    font-weight: 700;
}

.shop-detail-purchase > [data-shop-add]:hover:not(:disabled) {
    background: var(--color-pink);
    opacity: 0.85;
}

.shop-detail-purchase > [data-shop-add] .shop-price {
    margin: 0;
    white-space: nowrap;
}

.shop-product-preview .shop-preview-primary {
    transition: opacity 220ms ease;
}

.shop-product-preview .shop-preview-secondary {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.shop-preview-oval {
    z-index: 2;
}

@media (hover: hover) {
    .shop-preview-media.has-secondary-image:hover .shop-preview-primary {
        opacity: 0;
    }

    .shop-preview-media.has-secondary-image:hover .shop-preview-secondary {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop-product-preview .shop-preview-primary,
    .shop-product-preview .shop-preview-secondary {
        transition: none;
    }
}