.page {
    background-color: white;
}

/* Home */
.page-home .block-text {
    margin: 0.75rem;
}

.page-home .block-text-text {
    margin: 15vh 0;
}

/* 
    Projects 
*/

.page-projects {
    position: relative;
    background-color: white;
}

.page-projects-list,
.page-projects-gallery {
    display: none;
}

.page-projects-list.active,
.page-projects-gallery.active {
    display: block;
}

.page-projects-toggle {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0.75rem;
    z-index: 100;
    color: white;
    mix-blend-mode: difference;
}

.page-projects-toggle span {
    display: none;
}

.page-projects-toggle span.active {
    display: block;
}

/* 
    Project 
*/

.page-project {
    max-height: 100svh;
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    position: relative;
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    scrollbar-width: none; /* Firefox */
    background-color: black;
}

.page-project::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.page-project-back {
    display: block;
    position: fixed;
    left: 0;
    bottom: 0;
    padding: 0.75rem;
    z-index: 10;
    mix-blend-mode: difference;
    color: white;
    transition: 300ms;
}

.page-project-back.hide {
    opacity: 0;
    pointer-events: none;
}

/* Project */
.project {
    position: relative;
    scroll-snap-align: center;
    height: 100vh;
    height: 100svh;
}

.project-cover {
    height: 100vh;
    height: 100svh;
    transition: 300ms;
}

.project-cover.active {
    /* opacity: 0.5; */
    filter: brightness(0.6);
}

.project-cover-slideshow-mobile {
    height: 100%;
    width: 100%;
}

.project-cover-slideshow-desktop {
    display: none;
}

/* Phased Image Loading */
.project-cover img {
    display: none;
}

.project.visible .project-cover .slideshow-slides img {
    display: block;
}


/* Content */
.project-content {
    position: absolute;
    top: calc(50% - 0.5rem);
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: 1fr auto 1fr;
    gap: 0.75rem;
    padding: 0 0.75rem;

    height: 2rem;
    max-height: 3rem;
    
    z-index: 10;
    color: white;
    mix-blend-mode: difference;
    transition: 300ms;
}

.project-content.active {
    mix-blend-mode: normal;
    color: white;
}

.project-content-title {
    grid-column: 1 / 4;
}

.project-content-info {
    display: none;
}

/* Content mobile */
.project-content-mobile {
    display: none;
    grid-column: 4/-2;
    translate: 0 -50%;
}

.project-content-mobile.active {
    display: block;
}

.project-content-mobile-label {
    font-size: 11px;
}


/* Button */
.project-details-button {
    grid-column: -2/-1;
    height: fit-content;
}

.project-details-button .hide {
    display: none;
}

.project-details-button .show {
    display: block;
}

.project-details-button.active .hide {
    display: block;
}

.project-details-button.active .show {
    display: none;
}

@media screen and (min-width: 48rem) {
    .project-cover-slideshow-mobile {
        display: none;  
    }

    .project-cover-slideshow-desktop {
        display: block;
        width: 100%;
        height: 100%;
    }

    .project-content {
        grid-template-columns: repeat(18, 1fr);
        grid-template-rows: 1fr;
    }

    .project-content-title {
        grid-column: 1/7;
        grid-row: 1;
    }

    .project-content.active .project-content-title {
        grid-row: 1;   
    }

    .project-content-mobile.active,
    .project-content-mobile {
        display: none;
    }

    .project-content-info {
        display: block;
        padding-right: 0.5rem;
        height: fit-content;   
        padding-right: 2rem;
        grid-column: span 6;
        grid-row: 1;
    }

    .project-content-info:nth-child(3) {
        grid-column: span 4;
    }

    .project-content-info-title {
        margin-bottom: 0.75rem;
    }

    .project-content-info-label {
        font-size: 11px;
        grid-column: 1;
    }

    .project-content-info-label:first-child {
        margin-bottom: 0;
    }

    .project-content-info-value {
        grid-column: 2;
        margin-bottom: 0;
        max-width: 250px;
        margin-bottom: 0.75rem;
    }

    /* Details */
    .project-details {
        display: none;
    }

    .project-details.active {
        display: block;
    }

    .project-details-button {
        grid-column: -3/-1;
        grid-row: 1;
        height: fit-content;
        text-align: right;
    }


}


/* 
    Rocks Page
*/
.page-rocks {
    background-color: #DBDBDB;
}

.page-rocks.grid {
    position: static;
    max-height: unset;
    display: grid;
    padding: 3rem 2rem 3rem;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    min-height: 100svh;
    align-items: center;
}

/* .page-rocks.grid:hover .rock-cover {
    opacity: 0.5;
} */

.page-rocks-view-button {
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 0.75rem;
    z-index: 100;
}

.page-rocks-view-button.bottom-right {
    right: 0;
    left: auto;
    
}

.page-rocks-view-button.hide {
    opacity: 0;
    pointer-events: none;
}

/* Button */
.page-rocks-view-button .single-view,
.page-rocks-view-button .grid-view {
    display: none;
}

.page-rocks-view-button .single-view.active,
.page-rocks-view-button .grid-view.active {
    display: block;
}

/* Tablet (>640px) */
@media screen and (min-width: 40rem) {
    .page-rocks.grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Tablet (>768px) */
@media screen and (min-width: 48rem) {
    .page-rocks.grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Tablet (>1024px) */
@media screen and (min-width: 64rem) {
    .page-rocks.grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

body.snap-contents,
body.snap-contents * {
    scroll-snap-type: y mandatory;
}

.snap-contents .rock {
    scroll-snap-type: none;
    scroll-snap-align: center;
}

/* 
    Page Default 
*/

@media screen and (min-width: 48rem) {
    .page-default {
        display: grid;
        grid-template-columns: repeat(18, 1fr);
        gap: 15vh 0.75rem;
        padding: 15vh 0.75rem;
    }

    .page-default .block-heading {
        grid-column: 1/7;
        margin: 0 !important;
    }

    .page-default .block-text {
        grid-column: 7/13;
        padding: 0;
        margin: 0;
    }
}

/* 
    Rock Component
*/

.rock {
    display: block;
    overflow: visible;
    position: relative;
    aspect-ratio: 1 / 1;
}

.rock-cover {
    position: relative;
    transition: 300ms;
    display: none;
    background-color: #DBDBDB;
}


.page-rocks.grid .rock-cover {
    display: block;
}

.page-rocks.grid .rock-cover.active {
    opacity: 1 !important;
}

.page-rocks.grid .rock-cover-picture,
.page-rocks.grid .rock-cover-picture-image {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: var(--focus, 50% 50%);
}

.rock-slideshow {
    width: calc(100vw - (100vw - 100%));
    height: 100vh;
    
}

.page-rocks.grid .rock-slideshow {
    display: none;
}

.rock-gray-shadow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 8px 4px #DBDBDB;
}

/* Content */
.rock-content {
    position: absolute;
    top: calc(50% - 0.5rem);
    left: 0.75rem;
    right: 0.75rem;
    opacity: 1;
    transition: 300ms;
    display: grid;
    grid-template-columns: 1fr auto;
    pointer-events: none;   
    color: white;
    mix-blend-mode: difference;
    z-index: 10;
}

.page-rocks.grid .rock-content {
    display: none;
}

.rock-content-info {
    display: none;
}

.rock-details-button {
    grid-column: 3;
    text-align: right;
}

.page-rocks.grid .rock-content.active {
    opacity: 1;
    z-index: 1;
    transition: 300ms;
}


/* Desktop (> 768px) */
@media screen and (min-width: 48rem) {
    .rock {
        position: relative;
    }

    .page-rocks.grid .rock {
        position: static;
    }

    .rock-content {
        position: absolute;
        opacity: 1;
        display: grid;
        pointer-events: none;
        grid-template-columns: repeat(18, 1fr);
        transition: 300ms;
        z-index: 10;
    }

    .page-rocks.grid .rock-content {
        position: fixed;
        opacity: 0;
    }

    .page-rocks.grid .rock-content.active {
        display: grid;
        opacity: 1;
        pointer-events: none;
    }

    .rock-content-title {
        grid-column: 1 / 7;
    }

    .rock-content-info {
        grid-column: span 6;
        display: none;
    }

    .page-rocks.grid .rock-content-info {
        display: block;
    }

    .rock-content-info:nth-child(3) {
        grid-column: span 4;
    }

    .rock-content-info-title {
        margin-bottom: 0.75rem;
    }

    .rock-content-info-label {
        grid-column: 1;
        font-size: 11px;
    }

    .rock-content-info-value {
        grid-column: 2;
        margin-bottom: 0.75rem;
    }

    .rock-content-link {
        grid-column: -3/-1;
        text-align: right;
    }

    .page-rocks.grid .rock-content-link {
        display: none;
    }
}


/* 
    Rock Page (.page-rock)
*/


.page-rock {
    position: relative;
    scroll-snap-align: center;
}

.page-rock-cover {
    height: 100vh;
    height: 100svh;
    transition: 300ms;
}

.page-rock-cover.active {
    opacity: 0.5;
    filter: brightness(1);
}

.page-rock-cover-slideshow-mobile {
    height: 100%;
    width: 100%;
}

.page-rock-cover-slideshow-desktop {
    display: none;
}


/* Phased Image Loading */
.page-rock-cover img {
    display: none;
}

.page-rock.visible .page-rock-cover .slideshow-slides img {
    display: block;
}


/* Rock Content */
.page-rock-content {
    position: absolute;
    top: calc(50% - 0.5rem);
    left: 0;
    right: 0;
    height: 2rem;
    max-height: 3rem;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    padding: 0 0.75rem;
    z-index: 10;
    color: white;
    mix-blend-mode: difference;
}

.page-rock-content.active {
    gap: 0;
    mix-blend-mode: normal;
    color: black;
}

.page-rock-content-title {
    grid-column: 1 / 4;
    height: fit-content;
    translate: 0 -1rem;
}

.page-rock-content.active .page-rock-content-title-mobile {
    display: block;
}


@media screen and (min-width: 48rem) {
    .page-rock-content-title {
        translate: 0 -1rem;
    }

    .page-rock-content-title-mobile {
        display: none !important;
    }
}

/* Content Info */
.page-rock-content-info.active,
.page-rock-content-info {
    display: none;
}

.page-rock-content-mobile {
    display: none;
    grid-column: 4/-2;
    translate: 0 -50%;
}

.page-rock-content-mobile-label {
    font-size: 11px;
}

.page-rock-content-mobile.active {
    display: block;
}

.page-rock-details-button {
    grid-column: -2/-1;
    text-align: right;
}


.page-rock-back {
    position: fixed;
    left: 0;
    bottom: 0;
    padding: 0.75rem;
    z-index: 10;
    transition: 300ms;
}

.page-rock-back.hide {
    opacity: 0;
    pointer-events: none;
}

.page-rock-details {
    display: none;
}

.page-rock-details.active {
    display: block;
}

/* Button */
.page-rock-details-button {
    height: fit-content;
    text-align: right;
    white-space: nowrap;
    display: flex;
    justify-content: flex-end;
}

.page-rock-details-button .hide {
    display: none;
}

.page-rock-details-button .show {
    display: block;
}

.page-rock-details-button.active .hide {
    display: block;
}

.page-rock-details-button.active .show {
    display: none;
}

/* Desktop (768px) */
@media screen and (min-width: 48rem) {
    .page-rock-cover-slideshow-mobile {
        display: none;  
    }

    .page-rock-cover-slideshow-desktop {
        display: block;
        width: 100%;
        height: 100%;
    }

    .page-rock-content-mobile.active,
    .page-rock-content-mobile {
        display: none;
    }

    .page-rock-content {
        position: absolute;
        top: calc(50% - 0.75rem);
        left: 0;
        right: 0;
        translate: 0;
        display: grid;
        grid-template-columns: repeat(18, 1fr);
        grid-template-rows: 1fr;
        gap: 0.75rem;
        padding: 0 0.75rem;
        z-index: 10;
        color: white;
        mix-blend-mode: difference;   
    }

    .page-rock-content.active {
        translate: 0;
        gap: 0.75rem;
    }

    .page-rock-content.active .page-rock-content-title,
    .page-rock-content-title {
        grid-column: 1/7;
        grid-row: 1;
        translate: 0;
    }

    .page-rock-content-info.active,
    .page-rock-content-info {
        height: fit-content;
        display: block;
    }

    .page-rock-content-info {
        grid-column: span 6;
    }

    .page-rock-content-info.active,
    .page-rock-content-info {
        grid-column: span 6;
    }

    .page-rock-content-info.active:nth-child(3),
    .page-rock-content-info:nth-child(3) {
        grid-column: span 4;
    }

    .page-rock-content-info-title {
        margin-bottom: 0.75rem;
    }

    .page-rock-content-info-label {
        grid-column: 1;
        font-size: 11px;
    }

    .page-rock-content-info-label:has(.page-rock-details) {
        margin-bottom: 0.5rem;
    }

    .page-rock-content-info-label:first-child {
        margin: 0;
    }

    .page-rock-content-info-value {
        grid-column: 2;
    }

    .page-rock-content-info-value:not(:last-child) {
        margin: 0 0 0.75rem 0;
    }

    .page-rock-details-button {
        grid-column: -3/-1;
        grid-row: 1;
    }
}


/* 
    Page Custom Rocks 
*/

.page-custom-rocks {
    position: relative;
}

.page-custom-rocks-step {
    position: relative;
    min-height: 100svh;
    display: none;
    /* One stacking context for the whole step so the choices text can
       blend (mix-blend-mode) against the preview image behind it. */
    isolation: isolate;
}

.page-custom-rocks-step.active {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Intro */
.page-custom-rocks-step-text {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    padding: 0.75rem 0.75rem;
}

.page-custom-rocks-step-text .bottom-left,
.page-custom-rocks-step-text .bottom-right {
    position: absolute;
    padding: 0.75rem;
    bottom: 0;
    left: 0;
}

.page-custom-rocks-step-text .bottom-right {
    left: auto;
    right: 0;
}



.page-custom-rocks-step-gallery {
    height: 45vh;
    display: flex;
    overflow-x: auto;
}

.page-custom-rocks-step-gallery picture,
.page-custom-rocks-step-gallery img {
    height: 100%;
    width: auto;
}

/* Cart */
.page-custom-rocks-step.cart {
    background-color: rgba(240, 240, 240, 1);
    justify-content: flex-start;
    padding: 4rem 0.75rem 0.75rem;
}

.cart-header {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cart-header-item {
    grid-column: span 6;
}

.cart-header-quantity {
    grid-column: span 2;
}

.cart-header-total {
    grid-column: span 1;
    text-align: right;
}

@media screen and (min-width: 768px) {
    .cart-header {
        grid-template-columns: repeat(18, 1fr);
    }

    .cart-header-item {
        grid-column: span 15;
    }

    .cart-header-quantity {
        grid-column: span 2;
    }

    .cart-header-total {
        grid-column: span 1;
        text-align: right;
    }
}

.cart-items {
}

/* Mobile: thumbnails stacked on the left (image first via `order`), with the
   quantity/total at top-right and Edit/Remove at bottom-right. */
.cart-items-item {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    column-gap: 0.75rem;
    margin-bottom: 0.5rem;
    border-top: 1px solid black;
    padding-top: 0.5rem;
}

.cart-items-item-size,
.cart-items-item-shape,
.cart-items-item-model {
    grid-column: 1;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    grid-column: 1/7;
}

.cart-items-item-size  { grid-row: 1; }
.cart-items-item-shape { grid-row: 2; }
.cart-items-item-model { grid-row: 3; }

.cart-items-item-size-info,
.cart-items-item-shape-info,
.cart-items-item-model-info {
    display: flex;
    flex-direction: column;
}

/* Per-selection rows (category + each attribute): a label + value laid out
   side by side and aligned in a label column, stacked under each other. */
.cart-items-item-attr {
    display: flex;
    gap: 0.5rem;
}

.cart-items-item-attr-label {
    flex: 0 0 4rem;
}

.cart-items-item-size-image,
.cart-items-item-shape-image,
.cart-items-item-model-image {
    order: -1; /* keeps the DOM (info, image) order but renders the image first */
    width: 25vw;
    aspect-ratio: 3/2;
    object-fit: cover;
    flex: none;
}

.cart-items-item-totals {
    grid-column: 7/-1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.25rem;
    text-align: right;
    white-space: nowrap;
    grid-row: 1/4
}

.cart-items-item-quantity button {
    padding: 0 0.25rem;
}

.cart-items-item-totals-details {
    width: 100%;
    gap: 1rem;
    display: flex;
    justify-content: space-between;
}

.cart-items-item-totals-actions {
    align-self: end;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    width: 100%;
}


@media screen and (min-width: 768px) {
    .cart-items-item {
        grid-template-columns: repeat(18, 1fr);
    }

    .cart-items-item-size,
    .cart-items-item-shape,
    .cart-items-item-model {
        display: block;
        grid-row: auto;
        margin-bottom: 0;
    }

    .cart-items-item-size,
    .cart-items-item-shape{
        grid-column: span 6;
    }

    .cart-items-item-model {
        grid-column: span 3;
    }

    .cart-items-item-size-info,
    .cart-items-item-shape-info,
    .cart-items-item-model-info {
        flex-direction: column;
    }

    .cart-items-item-totals {
        grid-column: span 3;
        grid-row: auto;
        display: flex;
        text-align: left;
        white-space: normal;
    }

    .cart-items-item-totals-actions {
        grid-column: 1 / -1;
        grid-row: auto;
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
        grid-row: 1;
    }

    .cart-items-item-size-image,
    .cart-items-item-model-image,
    .cart-items-item-shape-image {
        order: 0;
        width: 12.5vw;
        aspect-ratio: 3/2;
        height: auto;
        margin-top: 0.5rem;
    }
}

/* Mobile: Add Item on the left, subtotal right-aligned. */
.cart-totals {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.75rem;
    margin-bottom: 3rem;
    border-top: 1px solid black;
    padding-top: 0.5rem;
}

.cart-totals-add {
    justify-self: start;
    height: fit-content;
    grid-column: 1/5;
}

.cart-totals-subtotal {
    text-align: right;
    white-space: nowrap;
    grid-column: 5/-1;
}

.cart-totals-subtotal div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Total pieces summary: separated from the subtotal/shipping lines below it. */
.cart-totals-quantity {
    grid-column: 5/-2;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem
}

.cart-totals-quantity strong {
    grid-column: span 3;
}

.cart-totals-quantity span {
    text-align: right;
}

@media screen and (min-width: 768px) {
    .cart-totals {
        grid-template-columns: repeat(18, 1fr);
    }

    .cart-totals-quantity {
        grid-template-columns: repeat(6, 1fr);
        grid-column: 13/-1;
    }

    .cart-totals-quantity strong {
        grid-column: 4/-2;
    }

    .cart-totals-add {
        grid-column: 1/13;
    }

    .cart-totals-subtotal {
        grid-column: 13/-1;
        text-align: left;
        white-space: normal;
    }
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    text-transform: uppercase;
}

/* Proceed-to-checkout disabled while the cart is empty (toggled by cart.js) */
.cart-footer .is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Checkout */
.page-custom-rocks-checkout {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 100;
    
    display: flex;
    opacity: 0;
    pointer-events: none;
    flex-direction: column;
    justify-content: flex-end;
}

.page-custom-rocks-checkout.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    flex-direction: column;
}

.page-custom-rocks-checkout-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.page-custom-rocks-checkout-bg span {
    opacity: 0;
}

/* Checkout Result Modal */
.page-custom-rocks-modal {
    position: fixed;
    inset: 0;

    z-index: 200;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.page-custom-rocks-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.page-custom-rocks-modal-bg {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.page-custom-rocks-modal-content {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    width: calc(100% - 1.5rem);
    max-width: 420px;

    background-color: white;
    color: black;
    border: 1px solid black;
    padding: 1.5rem;
}

.page-custom-rocks-modal-alerts {
    list-style: none;
    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-custom-rocks-modal-content button {
    align-self: flex-start;

    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 1rem;

    background-color: white;
    color: black;
    border: 1px solid black;
    cursor: pointer;
}

.page-custom-rocks-modal-content button:hover {
    background-color: black;
    color: white;
}

.page-custom-rocks-modal-content button:focus-visible {
    outline: 2px solid black;
    outline-offset: 2px;
}

/* Checkout */
.checkout {
    background-color: white;
    padding: 0.75rem;
    color: black;
    z-index: 1;
}

/* Tighter line-height for the checkout form only (scoped). Font size is driven
   by the text-micro / text-small typography classes in the markup, so this
   rule must NOT set font-size or it would override them. */
.checkout input,
.checkout textarea,
.checkout label,
.checkout .checkout-section,
.checkout .checkout-submit-section {
    line-height: 1.3;
}

/* Phone field: narrow dialing-code input sitting inline before the number. */
.checkout-phone {
    display: flex;
    gap: 0.5rem;
}

.checkout-phone input[type="tel"].checkout-phone-code {
    flex: 0 0 4rem;
    width: 4rem;
    margin-bottom: 0;
}

.checkout-phone input[type="tel"].checkout-phone-number {
    flex: 1 1 auto;
    width: auto;
    margin-bottom: 0;
}

.checkout-header h2 {
    margin-bottom: 1rem;
}

.checkout-header-alerts {
    border-top: 1px solid rgba(255, 30, 30, 1);
    color: rgba(255, 30, 30, 1);
    padding-top: 0.5rem;
}

.checkout-header-success {
    border-top: 1px solid rgba(0, 160, 0, 1);
    color: rgba(0, 160, 0, 1);
    padding-top: 0.5rem;
}

.checkout-header-alerts-list {
    margin-bottom: 1rem;
}

.checkout-submit-section {
    margin-top: 1rem;
    border-top: 1px solid black;
    padding-top: 0.5rem;
}

.checkout-submit-section div {
    margin-bottom: 1rem;
}

.checkout input[type="text"],
.checkout input[type="email"],
.checkout input[type="tel"],
.checkout input[type="number"],
.checkout textarea {
    display: block;
    border: 0;
    border-top: 1px solid black;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    width: 100%;
}

.checkout input[type="text"]::placeholder,
.checkout input[type="email"]::placeholder,
.checkout input[type="tel"]::placeholder,
.checkout input[type="number"]::placeholder,
.checkout textarea::placeholder {
    opacity: 0.5;
}

.checkout label {
    display: none;
}

/* Terms checkbox: rendered as the [ ] / [×] selection bracket (mirrors the
   step-choice pattern below). The native checkbox stays in the DOM and is only
   moved offscreen — not display:none — so `required` validation still fires and
   it remains focusable/accessible. The label's for="terms" toggles it, and the
   bracket mark is driven purely by the input's :checked state. */
.checkout input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.checkout input[type="checkbox"] + label {
    display: inline;
    opacity: 0.7;
    cursor: pointer;
}

.checkout input[type="checkbox"]:checked + label .choice-bracket-mark::before {
    content: '\00D7'; /* × */
}

/* Keep the focus ring visible on the bracket when the hidden input is focused. */
.checkout input[type="checkbox"]:focus-visible + label .choice-bracket {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.checkout-submit-button {
    width: 100%;
    border-radius: 0.5rem;
    background-color: black;
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
    text-transform: uppercase;
}

.checkout-back-button {
    width: 100%;
    border-radius: 0.5rem;
    background-color: transparent;
    color: black;
    border: 1px solid black;
    padding: 0.5rem 1rem;
    text-align: center;
    margin-top: 0.5rem;
}

@media screen and (min-width: 768px) {
    .checkout {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .checkout input[type="text"],
    .checkout input[type="email"],
    .checkout input[type="tel"],
    .checkout input[type="number"],
    .checkout textarea {
        display: block;
        margin-bottom: 0.5rem;
        padding: 0.25rem 0;
    }
    
    .checkout-section,
    .checkout-submit-section {
        display: grid;
        gap: 0.5rem;
        grid-column: 2/-1;
        grid-template-columns: 1fr 1fr;
    }

    .checkout-submit-section div:not(:last-of-type) {
        margin-bottom: 0;
    }

    .checkout-section .full-width {
        grid-column: 1/-1;
    }

    .checkout textarea {
        grid-column: 1/-1;
    }
}

.honey {
    position: absolute;
    left: -9999px;
}

/* Nav */
.page-custom-rocks-nav {
    display: none;
    color: white;
    mix-blend-mode: difference;
}

/* Mobile: only the current step's label is shown, with a Next affordance. */
.page-custom-rocks-nav.active {
    position: absolute;
    top: 3rem;
    left: 0;
    right: 0;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    z-index: 3;
}

.page-custom-rocks-nav-step {
    display: flex;
    flex-direction: column;
}

.page-custom-rocks-nav-step span {
    margin-right: 0.5rem;
}

.page-custom-rocks-nav-step .empty {
    opacity: 0.4;
}

/* Selected nav values render uppercase; the "Unselected" placeholder (.empty) stays as-is */
.page-custom-rocks-nav-step span[id]:not(.empty) {
    text-transform: uppercase;
}

.page-custom-rocks-nav-next {
    display: block;
}

/* Hide the non-current step labels on mobile only. */
@media screen and (max-width: 39.99rem) {
    .page-custom-rocks[data-current-step="2"] .page-custom-rocks-nav-step:not(:nth-of-type(1)),
    .page-custom-rocks[data-current-step="3"] .page-custom-rocks-nav-step:not(:nth-of-type(2)),
    .page-custom-rocks[data-current-step="4"] .page-custom-rocks-nav-step:not(:nth-of-type(3)) {
        display: none;
    }
}

@media screen and (min-width: 640px) {
    /* 18-col grid: three 5-col step labels + a 3-col Next button at the end. */
    .page-custom-rocks-nav.active {
        display: grid;
        grid-template-columns: repeat(18, 1fr);
        align-items: start;
    }

    .page-custom-rocks-nav-step {
        display: block;
        grid-column: span 6;
    }

    .page-custom-rocks-nav-step:nth-child(3) {
        grid-column: span 4;
    }

    .page-custom-rocks-nav-next {
        display: block;
        grid-column: span 2;
        justify-self: end;
        text-align: right;
    }
}

/* Choices */
.page-custom-rocks-step-choices {
    /* No z-index here: it must NOT form its own stacking context, or the
       text inside can't blend with the image. Paint order is handled by
       the image's negative z-index below. */
    position: relative;
    padding: 0.75rem;
}

/* Column legends: shown once at the top of each selection table, aligned to the
   choice grid and readable over the preview image like the rows. */
.page-custom-rocks-step-choices-header {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(9, 1fr);
    padding: 0.5rem 0;
    color: white;
    mix-blend-mode: difference;
}

.page-custom-rocks-step-choices-header > * {
    grid-column: span 3;
}

.page-custom-rocks-step-choices-item {
    position: relative;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(9, 1fr);
    border-top: 1px solid white;
    padding: 0.5rem 0;
    opacity: 0.5;
    transition: 300ms;
    color: white;
    mix-blend-mode: difference;
    cursor: pointer;
}

.page-custom-rocks-step-choices-item:hover,
.page-custom-rocks-step-choices-item.active {
    opacity: 1;
}

.page-custom-rocks-step-choices-item h3,
.page-custom-rocks-step-choices-item div {
    grid-column: span 3;
}

/* The selected element's name (first column of each row) reads uppercase. */
.page-custom-rocks-step-choices-item .choice-name {
    text-transform: uppercase;
}

/* Scenario (by-request) measure input: sits in the row's measure column where a
   .text-small div normally goes, so it inherits the row's white/blended text and
   carries no native chrome — visually it reads like the other cells. */
.page-custom-rocks-step-choices-item .scenario-measure-input {
    grid-column: span 3;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.page-custom-rocks-step-choices-item .scenario-measure-input::placeholder {
    color: inherit;
    opacity: 0.6;
}

.page-custom-rocks-step-choices-item .scenario-measure-input:focus {
    outline: none;
}

.page-custom-rocks-step-choices-item button {
    position: absolute;
    top: 0.5rem;
    right: 0;
    display: flex;
}

/* Selection bracket: reads [ ] by default and [×] on the active choice.
   The literal brackets live in the markup; the mark span between them has a
   fixed width so the brackets never shift when the × appears. */
.choice-bracket-mark {
    display: inline-block;
    width: 1ch;
    text-align: center;
}

.page-custom-rocks-step-choices-item.active .choice-bracket-mark::before {
    content: '\00D7'; /* × */
}

.page-custom-rocks-step-images {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Negative z-index keeps the image inside the step's stacking context
       but painted behind the text, so mix-blend-mode has it as a backdrop. */
    z-index: -1;
    pointer-events: none;
}

.page-custom-rocks-step-images-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-custom-rocks-step-images-item.active {
    opacity: 1;
    background-color: rgba(219, 219, 219, 1);
}

/* Previews fill the available space (cover) on every step.
   Each ancestor in the chain needs a defined height for the
   percentage height to resolve: item -> wrapper -> figure -> picture -> img. */
.page-custom-rocks-step-images-item .cover-desktop,
.page-custom-rocks-step-images-item .cover-mobile,
.page-custom-rocks-step-images-item figure,
.page-custom-rocks-step-images-item picture,
.page-custom-rocks-step-images-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile cover swap (any step): mobile cover hidden by default (desktop) */
.page-custom-rocks-step-images-item .cover-mobile {
    display: none;
}

/* Mobile cover swap (any step): below 640px, swap to the mobile cover when one is provided */
@media screen and (max-width: 639px) {
    .page-custom-rocks-step-images-item.has-mobile-cover .cover-desktop {
        display: none;
    }

    .page-custom-rocks-step-images-item .cover-mobile {
        display: block;
    }
}

@media screen and (min-width: 640px) {
    .page-custom-rocks-step-choices-header {
        gap: 0.75rem;
        grid-template-columns: repeat(18, 1fr);
    }

    .page-custom-rocks-step-choices-header > * {
        grid-column: span 6;
    }

    .page-custom-rocks-step-choices-item {
        display: grid;
        gap: 0.75rem;
        grid-template-columns: repeat(18, 1fr);
    }

    .page-custom-rocks-step-choices-item h3,
    .page-custom-rocks-step-choices-item div {
        grid-column: span 6;
    }

    .page-custom-rocks-step-choices-item .scenario-measure-input {
        grid-column: span 6;
    }
}


/* Model step (step-4): mix-blend-mode produces unpredictable contrast over the
   model photos, so we opt this step out of blending and instead lay a soft dark
   gradient over the preview image to guarantee the light text stays legible. */
#custom-rocks-step-4 .page-custom-rocks-step-choices-header,
#custom-rocks-step-4 .page-custom-rocks-step-choices-item {
    mix-blend-mode: normal;
    color: white;
}

#custom-rocks-step-4 .page-custom-rocks-step-images-item.active::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* Custom model row: hidden until the by-request Scenario size is selected, when
   cart.js adds .is-visible. Matches the model step's white-on-image treatment. */
.page-custom-rocks-step-choices-item.is-custom-model {
    display: none;
}

.page-custom-rocks-step-choices-item.is-custom-model.is-visible {
    display: grid;
}

/* Upload control sits in the row's middle columns where the base/details cells
   normally go (span 3 mobile / span 6 desktop), inheriting the row's light text
   and reading like the other cells. */
.page-custom-rocks-step-choices-item .model-custom-upload-cell {
    grid-column: span 6;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: baseline;
    gap: 0.75rem;
    min-width: 0;
}

.page-custom-rocks-step-choices-item .model-custom-upload {
    color: inherit;
    font-family: inherit;
    max-width: 100%;
}

.page-custom-rocks-step-choices-item .model-custom-upload::file-selector-button {
    color: inherit;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 0;
    padding: 0.1rem 0.5rem;
    font-family: inherit;
    cursor: pointer;
}

.page-custom-rocks-step-choices-item .model-custom-upload-status {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.7;
}

.page-custom-rocks-step-choices-item.is-uploading {
    opacity: 0.5;
    pointer-events: none;
}

@media screen and (min-width: 640px) {
    .page-custom-rocks-step-choices-item .model-custom-upload-cell {
        grid-column: span 12;
    }
}

/*
    Page About
*/
.page-about {
    padding-top: 15vh;
    background-color: white;
}

.page-about-desktop {
    display: none;
    margin-bottom: 15vh;
}

@media screen and (min-width: 48rem) {
    .page-about-desktop {
        display: block;
    }

    .page-about-mobile {
        display: none;
    }
}


/* 
    Transitionsing  (Barba.js)
*/

.transitioning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

/* .transitioning * {
    overflow: hidden;
} */

.transitioning.current {
    z-index: 1;
}

.transitioning.prev,
.transitioning.next {
    z-index: 2;
}