@import url('https://fonts.googleapis.com/css2?family=Poiret+One&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


:root {
    /* Replace #005a9c with your hex code once you find it! */
    --brand-blue: #005a9c; 
}


/* 1. Remove the height constraints */
html {
    scroll-behavior: smooth !important;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* Delete height: 100% and overflow-x: hidden from here */
}

/* 2. Update the container to be the only thing controlling the width */
#main-container {
    width: 100%;
    overflow-x: hidden; 
    position: relative;
    display: block; /* Ensures it acts like a normal page flow */
}


body {
    font-family: "Poiret One", sans-serif;
    background-color: #0e0e0e;
    color: #5b4636;
    overflow-x: hidden; /* Stops the side-wobble */
}

/* --- HERO & HEADER --- */
.hero-bg {
    background: linear-gradient(to bottom, rgba(14,14,14,0) 0%, rgba(14,14,14,1) 100%), 
                url('images/goatskull2.jpg');
    background-position: center center;
    background-size: 99% auto; /* Fixes the "Too Large" issue */
    background-repeat: no-repeat;
    min-height: 51vh;
    background-color: #0e0e0e;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    width:100%;
}

.top-logo {
    width: 130px;
    height: auto;
}

#top-nav {
    display: flex;
    list-style: none;
    gap: 20px;
}

#top-nav a {
    color: #E6E2D3;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.6rem;
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

#top-nav a:hover{
    transform: scale(1.1);
    color: #caa21a;
}


/* --- ABOUT SECTION --- */
h1 {
    text-align: center;
    font-size: 4rem;
    margin: 1em 0;
}

h1 span {
    text-transform: uppercase;
    display: block;
    font-size: 1.3rem;
}

.bio-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 2px solid #5b4636;
    max-width: 1000px;
    margin: 4em auto;
    padding: 40px;
    gap: 40px;
}

#bio-pic {
    border: 2px solid #5b4636;
    width: 100%;
    max-width: 300px;
    padding: 10px;
    justify-self: center;
}

#about p {
    border: 2px solid #5b4636;
    padding: 2em;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --- GALLERY --- */
.gTitle {
    border:2px solid #5b4636;
    text-align: center;
    font-size: 2.5rem;
    width: fit-content;
    margin: 2em auto;
    padding: 1px 40px;
}

/* 1. The Container */
.mosaic-grid {
    column-count:3;
    column-gap:20px;
    width:100%;
    max-width: 1400px;
    margin: 40px auto;
    padding:0 20px;
}

/* 2. The Item */
.gallery-item {
    display:inline-block;
    width:100%;
    margin-bottom: 20px;
    position:relative;
    break-inside: avoid;
    border: 2px solid #5b4636;
    overflow: hidden;
    cursor: pointer;
}

/* 3. The Image - THE IMPORTANT PART */
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* 4. The Overlay Fix */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(91, 70, 54, 0.85); /* Raw Umber */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Prevents overlay from blocking clicks */
}

.overlay-text{
    color:#fdfaf7;
    text-align: center;
    width:100%;
    z-index: 10;
}

.overlay-text h3{
    font-family: 'Poiret One', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.overlay-text p{
    font-size: 1rem;
    font-weight: bold;
    margin: 5px 0;
}

.overlay-text span{
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.gallery-item:hover .overlay {
    opacity: 1;
}


/* --- CONTACT --- */
#contact {
    text-align: center;
    margin: 4em auto;
}

#cs-btns {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 40px;
    margin:2em 0;
    padding: 0;
}

#cs-btns i{
    color:#5b4636;
    font-size: 2.5rem;
    transition: transform 0.2s ease;
}

#cs-btns i:hover{
    transform: scale(1.1);
    color: #caa21a;
}


input[type="button"] {
    background: transparent;
    border: 1px solid #5b4636;
    color: #5b4636;
    padding: 10px 20px;
    font-family: inherit;
    cursor: pointer;
}


.upwards{
    background: transparent;
    border:1px solid #5b4636;
    color: #5b4636;
    padding: 10px 20px;
    margin: 2em auto;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
}

.upwards:hover{
    transform: scale(1.1);
    color: #caa21a;
}

footer p {
    font-size: 0.8rem;
    font-weight: bold;
    color: #444; /* Or your specific brand color */
    text-align: center;
    padding: 20px 0;
    letter-spacing: 1px;
    text-transform: uppercase; /* Optional: gives it a gallery-label feel */
}


/* --- THE LIGHTBOX ENGINE STYLES --- */

#lightbox {
    display: none; /* Hidden until JS triggers 'flex' */
    position: fixed;
    z-index: 2500; /* Sits above the gallery */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 18, 15, 0.98); /* Your dark earthy tone */
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    display: flex;
    flex-direction: row;
    background: #fdfaf7; 
    width: 90%;          /* Expanded the overall container width */
    max-width: 1200px;   /* Prevents it from getting absurdly wide on huge monitors */
    max-height: 90vh;    /* Gives the image more vertical breathing room */
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

#lightbox-img {
    max-height: 90vh;
    width: 75%;          /* Increased from 60% to 75% */
    object-fit: contain;
    background: #000;    /* Keeps the focus tight on the canvas */
}

.lightbox-details {
    padding: 30px;
    width: 25%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertical Center */
    align-items: center;     /* Horizontal Center */
    text-align: center;      /* Centers the text lines */
    color: #5b4636;
    font-weight: bold;
    border-left: 1px solid rgba(91, 70, 54, 0.1);
}

#lightbox-title {
    font-size: 1.4rem;
    margin-bottom: 5px;
    line-height: 1.2;
}

#lightbox-size {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

/* THE NAVIGATION BUTTONS */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3000 !important;
    background: none;
    border: none;
    color: rgba(253, 250, 247, 0.5); /* Semi-transparent white */
    font-size: 1.8rem; /* Shrunk down from 4rem or 50px */
    font-weight: 100; /* Makes them thinner if the font supports it */
    cursor: pointer;
    padding: 20px;
    transition: all 0.3s ease;
    user-select: none; /* Prevents highlighting the text when clicking fast */
}

.nav-btn:hover {
    color: #caa21a; /* Brightens up when you hover */
    transform: translateY(-50%) scale(1.2);
}

#prev-btn { left: 30px; }
#next-btn { right: 30px; }


.buy-now-btn {
    margin-top: 20px;
    padding: 6px 14px; /* Even tighter padding */
    background-color: transparent;
    color: var(--brand-blue);
    border: 1px solid var(--brand-blue);
    font-family: inherit;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 0.7rem; /* Tiny, elegant gallery-label size */
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content; /* Only as wide as the text inside */
    align-self: center; /* Keeps it left-aligned in the sidebar */
}

.buy-now-btn:hover {
    background-color: var(--brand-blue);
    color: #fdfaf7;
}


/* THE CLOSE BUTTON */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fdfaf7;
    font-size: 50px;
    cursor: pointer;
    z-index: 3000;
}


/* --- MOBILE EMERGENCY FIX (309px - 768px) --- */
@media screen and (max-width: 768px) {
    
    /* ADDED THIS FOR THE GALLERY */
    .mosaic-grid {
        column-count: 2; /* Drops to 2 columns for tablets/phones */
    }

    .gallery-item {
        margin-bottom: 15px; /* Tighter spacing for smaller screens */
    }

    /* THE REST OF YOUR EXISTING CODE */
    .navbar {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 45vh;
        height: auto;
        position: relative;
    }

    .top-logo{
        position: absolute;
        top:-10px;
        width:100px;
        margin: 0;
    }

    #top-nav {
        margin-top: 0;
        gap: 15px;
        z-index: 10;
    }

    #top-nav a {
        font-size: 1.1rem;
    }

    .bio-container {
        grid-template-columns: 1fr; 
        margin: 1em; 
    }

    .gTitle {
        margin: 1em;
        font-size: 1.8rem;
    }

    #about p {
        margin: 0;
        padding: 1.5em;
    }

    #contact {
        margin: 2em 1em;
    }

    #cs-btns {
        gap: 30px;
    }

    #cs-btns i{
        font-size: 2rem;
    }

    h1 {
        font-size: 2.5rem;
        margin-top: 20px;
    }

    .lightbox-content{
        flex-direction: column;
        overflow-y: auto;
    }
}



/* --- LAPTOP TIER (1280px and down) --- */
@media screen and (max-width: 1290px) {
    .gallery-item .overlay h3 {
        font-size: 1.2rem; /* Shrunk from desktop size */
        letter-spacing: 0.1rem;
    }

    .gallery-item .overlay p {
        font-size: 0.85rem;
        opacity: 0.85;
    }
}

/* --- TABLET/MOBILE TIER (Your existing 650px rule, refined) --- */
@media screen and (max-width: 650px) {
    .gallery-item .overlay h3 {
        font-size: 1rem; 
        margin-bottom: 4px;
        letter-spacing: 0.05rem;
    }

    .gallery-item .overlay p {
        font-size: 0.75rem;
    }
}



/* --- Phone View (1 Column) --- */
@media screen and (max-width: 480px) {
    .mosaic-grid {
        column-count: 1 !important; /* Forces a single column layout */
    }
    
    .gallery-item {
        margin-bottom: 20px; /* Gives the art a bit more breathing room */
    }
}


@media screen and (max-width: 768px) {
    .lightbox-content {
        flex-direction: column;
        display: inline-flex; /* Changed from flex to inline-flex */
        width: auto;          /* Removes the 95% forced width */
        max-width: 90%;       /* Keeps it from hitting the screen edges */
        height: auto;
        max-height: 95vh;
        margin: auto;         /* Keeps it centered */
        overflow: hidden;     /* Keeps the corners clean */
    }

    #lightbox-img {
        display: block;
        width: auto;          /* Let the image set the width */
        max-width: 100%;      /* But don't let it exceed the container */
        max-height: 65vh; 
        object-fit: contain;
    }

    .lightbox-details {
        width: 100%;          /* Matches the width of the image above it */
        box-sizing: border-box; /* Includes padding in the width */
        padding: 20px;
        background: #fdfaf7;
        /* ... keep your other details styles ... */
    }

    /* Shrink those arrows for mobile */
    .nav-btn {
        font-size: 1.8rem !important;
        padding: 10px;
    }
    
    #prev-btn { left: 5px; }
    #next-btn { right: 5px; }

    /* Shrink the text sizes for mobile */
    #lightbox-title { font-size: 1.1rem; }
    #lightbox-size { font-size: 0.8rem; }
 
    /* Shrinks the Title on the hover overlay */
    .gallery-item .overlay h3 {
        font-size: 1rem; /* Dropping it down from the desktop size */
        margin-bottom: 4px;
        letter-spacing: 0.05rem;
    }

    /* Shrinks the Size/Price text on the hover overlay */
    .gallery-item .overlay p {
        font-size: 0.75rem; /* Small, clean, and out of the way */
        opacity: 0.9;
    }

    /* Tightens the padding so the text doesn't hit the edges of the box */
    .gallery-item .overlay {
        padding: 15px;
    }


}