/* ==========================================================
   NORTH SCOTT GEMSTONES
   STONE PAGE
========================================================== */


/* ==========================================================
   MAIN STONE LAYOUT
========================================================== */

.stone-layout{

    display:grid;

    grid-template-columns:minmax(0,1.12fr) minmax(360px,.88fr);

    gap:var(--grid-gap-large);

    align-items:start;

}


/* ==========================================================
   PHOTOGRAPHY GALLERY
========================================================== */

.stone-gallery{

    position:sticky;

    top:calc(var(--header-height) + 30px);

    display:flex;

    flex-direction:column;

    gap:18px;

}


.stone-gallery-main{

    position:relative;

    width:100%;

    aspect-ratio:1 / 1;

    overflow:hidden;

    border-radius:var(--radius-large);

    background:rgba(252,251,248,.72);

    box-shadow:var(--shadow-medium);

}


/* ==========================================================
   MAIN GALLERY IMAGE
========================================================== */

.stone-gallery-main img{

    display:block;

    position:absolute;

    inset:0;

    width:100%;

    height:100%;

    object-fit:cover;

    transition:
        opacity var(--transition-fast),
        transform var(--transition-slow);

}


.stone-gallery-main img[hidden]{

    display:none !important;

}


.stone-gallery-main.is-changing img{

    opacity:.45;

    transform:scale(.995);

}


/* ==========================================================
   GALLERY ARROWS
========================================================== */

.stone-gallery-arrow{

    position:absolute;

    z-index:5;

    top:50%;

    display:grid;

    place-items:center;

    width:44px;

    height:44px;

    padding:0;

    border:
        1px solid
        rgba(255,255,255,.55);

    border-radius:50%;

    background:
        rgba(252,251,248,.82);

    color:var(--text-main);

    box-shadow:
        0 6px 20px
        rgba(47,49,51,.12);

    backdrop-filter:blur(8px);

    transform:translateY(-50%);

    cursor:pointer;

    transition:
        transform var(--transition),
        background var(--transition),
        box-shadow var(--transition);

}


.stone-gallery-arrow:hover{

    background:
        rgba(252,251,248,.96);

    box-shadow:
        0 9px 25px
        rgba(47,49,51,.16);

}


.stone-gallery-arrow:active{

    transform:
        translateY(-50%)
        scale(.96);

}


.stone-gallery-arrow:focus-visible{

    outline:
        2px solid
        var(--lavender);

    outline-offset:3px;

}


.stone-gallery-arrow-prev{

    left:16px;

}


.stone-gallery-arrow-next{

    right:16px;

}


.stone-gallery-arrow span{

    font-size:1.25rem;

    line-height:1;

}


/* ==========================================================
   VIDEO IN MAIN GALLERY
========================================================== */

.stone-gallery-main video{

    display:block;

    position:absolute;

    inset:0;

    width:100%;

    height:100%;

    object-fit:cover;

}


.stone-gallery-main video[hidden]{

    display:none !important;

}


.stone-gallery-main video[hidden]{

    display:none;

}

/* ==========================================================
   THUMBNAILS
========================================================== */

.stone-thumbnails{

    display:grid;

    grid-template-columns:
        repeat(5,minmax(0,1fr));

    gap:12px;

}


.stone-thumbnail{

    position:relative;

    display:block;

    width:100%;

    aspect-ratio:1 / 1;

    overflow:hidden;

    padding:0;

    border:
        1px solid
        transparent;

    border-radius:var(--radius-small);

    background:var(--background-cream);

    box-shadow:
        0 5px 18px
        rgba(47,49,51,.045);

    cursor:pointer;

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);

}


.stone-thumbnail img{

    display:block;

    width:100%;

    height:100%;

    object-fit:cover;

    transition:
        transform var(--transition-slow);

}


.stone-thumbnail:hover{

    transform:translateY(-2px);

    border-color:
        rgba(141,137,196,.42);

    box-shadow:
        0 10px 24px
        rgba(47,49,51,.075);

}


.stone-thumbnail:hover img{

    transform:scale(1.04);

}


.stone-thumbnail.active,
.stone-thumbnail[aria-current="true"]{

    border-color:var(--lavender);

    box-shadow:
        0 0 0 2px
        rgba(141,137,196,.12),

        0 8px 22px
        rgba(47,49,51,.065);

}


.stone-thumbnail:focus-visible{

    outline:
        2px solid
        var(--lavender);

    outline-offset:4px;

}


/* ==========================================================
   VIDEO THUMBNAIL
========================================================== */

.stone-thumbnail-video{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    gap:7px;

    background:
        linear-gradient(
            145deg,
            rgba(210,228,206,.72),
            rgba(141,137,196,.18)
        );

    color:var(--text-main);

}


.stone-thumbnail-video-icon{

    display:grid;

    place-items:center;

    width:34px;

    height:34px;

    border-radius:50%;

    background:
        rgba(252,251,248,.82);

    color:var(--lavender-deep);

    font-size:.8rem;

    line-height:1;

    box-shadow:
        0 4px 12px
        rgba(47,49,51,.08);

}


.stone-thumbnail-video-label{

    font-size:.72rem;

    font-weight:var(--weight-medium);

    letter-spacing:.05em;

    text-transform:uppercase;

}


/* ==========================================================
   VIDEO
========================================================== */

/*
   The video is now part of the main gallery.

   This section is retained for compatibility with the
   existing stone-page structure and can be hidden when
   the main gallery is being used for video playback.
*/

.stone-video{

    overflow:hidden;

    border-radius:var(--radius-medium);

    background:var(--background-cream);

    box-shadow:var(--shadow-soft);

}


.stone-video video{

    display:block;

    width:100%;

    aspect-ratio:16 / 10;

    object-fit:cover;

}


/* ==========================================================
   STONE INFORMATION
========================================================== */

.stone-information{

    min-width:0;

    padding:12px 0 0;

}


.stone-information .script{

    margin-bottom:.65rem;

}


.stone-information .stone-name{

    max-width:15ch;

    margin-bottom:.65rem;

}


.stone-information .price{

    margin:0 0 28px;

    font-size:1.55rem;

}


.stone-information > p:not(.script):not(.price){

    font-size:1.05rem;

}


/* ==========================================================
   STONE SUMMARY
========================================================== */

.stone-summary{

    display:grid;

    grid-template-columns:repeat(2,minmax(0,1fr));

    gap:14px 28px;

    margin:34px 0 38px;

    padding:28px;

    border:1px solid rgba(229,231,233,.78);

    border-radius:var(--radius-medium);

    background:rgba(252,251,248,.58);

    box-shadow:
        0 8px 28px rgba(47,49,51,.035);

    backdrop-filter:blur(10px);

}


.stone-summary p{

    margin:0;

    font-size:.96rem;

}


.stone-summary strong{

    display:block;

    margin-bottom:2px;

    font-size:.84rem;

    font-weight:var(--weight-medium);

    color:var(--text-muted);

}



/* ==========================================================
   STONE ACTIONS
========================================================== */


/* ==========================================================
   STONE ACTIONS
========================================================== */

.stone-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 15px;
    margin-bottom: 40px;
    width: 100%;
}

.stone-actions .paypal-button-container {
    min-width: 0;
    width: 100%;
}

.stone-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
    flex: initial;
}




/* ==========================================================
   SPECIFICATION PANEL
========================================================== */

.stone-information .specifications{

    margin-top:10px;

    background:rgba(252,251,248,.66);

    border:1px solid rgba(229,231,233,.76);

    box-shadow:
        0 10px 34px rgba(47,49,51,.04);

    backdrop-filter:blur(10px);

}


.spec-list{

    margin:0;

}


.spec-item{

    min-width:0;

}


.spec-label,
.spec-value{

    margin:0;

}


.spec-value{

    line-height:1.45;

}


/* ==========================================================
   RELATED GEMSTONES
========================================================== */

.related-stones{

    margin-top:0;

}


.related-stones .gallery-header{

    margin-bottom:50px;

}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:1100px){

    .stone-layout{

        grid-template-columns:minmax(0,1fr) minmax(330px,.85fr);

        gap:40px;

    }


    .stone-thumbnails{

        grid-template-columns:repeat(4,minmax(0,1fr));

    }

}


@media(max-width:950px){

    .stone-layout{

        grid-template-columns:1fr;

    }


    .stone-gallery{

        position:relative;

        top:auto;

        max-width:760px;

        margin-inline:auto;

    }


    .stone-information{

        max-width:760px;

        margin-inline:auto;

        padding-top:20px;

    }


    .stone-information .stone-name{

        max-width:none;

    }

}



/* ==========================================================
   GEMSTONE PAGES — MOBILE REFINEMENTS
========================================================== */

@media(max-width:700px){

    /* MAIN PAGE POSITION */

    .stone-page{
        padding-top:0 !important;
    }

    .stone-page > .container{
        padding-top:35px;
    }

    .stone-layout{
        grid-template-columns:minmax(0,1fr);
        gap:24px;
    }

    /* MAIN PHOTOGRAPH */

    .stone-gallery{
        position:relative;
        top:auto;
        width:100%;
        max-width:100%;
        gap:13px;
    }

    .stone-gallery-main{
        width:100%;
        aspect-ratio:1 / 1;
        border-radius:var(--radius-medium);
    }

    .stone-gallery-main img,
    .stone-gallery-main video{
        object-fit:cover;
    }

    /* IMAGE THUMBNAILS */

    .stone-thumbnails{
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:9px;
    }

    .stone-thumbnail{
        border-radius:var(--radius-small);
    }

    /* PRODUCT INFORMATION */

    .stone-information{
        width:100%;
        max-width:100%;
        min-width:0;
        padding-top:8px;
    }

    .stone-information .script{
        margin-bottom:8px;
    }

    .stone-information .stone-name{
        max-width:none;
        line-height:1.15;
        margin-bottom:12px;
    }

    .stone-information .price{
        font-size:1.45rem;
        margin-bottom:20px;
    }

    .stone-information > p:not(.script):not(.price){
        font-size:.98rem;
        line-height:1.75;
    }

    /* STONE SUMMARY */

    .stone-summary{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:16px 18px;
        margin:25px 0;
        padding:20px 17px;
    }

    .stone-summary p{
        font-size:.9rem;
        line-height:1.55;
        min-width:0;
    }

    .stone-summary strong{
        font-size:.8rem;
        margin-bottom:4px;
    }

    /* PURCHASE AND ENQUIRY BUTTONS */

    .stone-actions{
        grid-template-columns:minmax(0,1fr);
        gap:12px;
        margin-bottom:28px;
    }

    .stone-actions .paypal-button-container,
    .stone-actions .button{
        width:100%;
        max-width:100%;
        min-width:0;
    }

    .stone-actions .button{
        min-height:49px;
    }

    /* SPECIFICATIONS */

    .stone-information .specifications{
        margin-top:8px;
    }

    /* RELATED GEMSTONES */

    .related-stones .gallery-header{
        margin-bottom:25px;
    }

}

/* VERY SMALL PHONES */

@media(max-width:380px){

    .stone-page > .container{
        padding-top:28px;
    }

    .stone-thumbnails{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .stone-summary{
        gap:14px 12px;
        padding:18px 15px;
    }

}



@media(max-width:450px){

    .stone-thumbnails{

        grid-template-columns:repeat(3,minmax(0,1fr));

    }

}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media(prefers-reduced-motion:reduce){

    .stone-gallery-main img,
    .stone-thumbnail,
    .stone-thumbnail img{

        transition:none;

    }


    .stone-thumbnail:hover{

        transform:none;

    }


    .stone-thumbnail:hover img{

        transform:none;

    }

}

/* ==========================================================
   STONE PAGE — CONTENT POSITION
========================================================== */

/*
   The normal section spacing is removed from the top of the
   gemstone section so the page sits neatly beneath the header.

   The container then receives a controlled amount of space.
   This keeps the gallery from touching the header while
   avoiding the excessive gap we had before.
*/

.stone-page{

    padding-top:0 !important;

}


.stone-page > .container{

    padding-top:70px;

}
/* Purchase controls: status above two equal-width, inline buttons. */
.stone-information .stone-actions {
    display: block;
    margin-bottom: 40px;
}
.stone-information .stone-purchase-status {
    margin: 0 0 15px;
}
.stone-information .stone-purchase-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    align-items: stretch;
}
.stone-information .stone-purchase-buttons > form,
.stone-information .stone-purchase-buttons > a {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}
.stone-information .stone-purchase-buttons .button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 62px;
    margin: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    border-radius: 999px;
    text-align: center;
}
.stone-information .stone-purchase-buttons > a:only-child {
    grid-column: 1 / -1;
}
@media (max-width: 480px) {
    .stone-information .stone-purchase-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .stone-information .stone-purchase-buttons .button {
        min-height: 49px;
    }
}
