/* Version 1.03.00 */

/* FacetWP filter */
.facetwp-facet {
    margin-bottom: 0 !important;
}

.facetwp-checkbox {
    font-family: verlag-book;
}

/* Facet filter selections */

button.facetwp-reset.facetwp-hide-empty {
    border: 0 !important;
    background: none;
    font-family: 'Verlag-Book';
    text-decoration: underline;
    margin-bottom: 20px;
    padding: 0;
    margin: 30px 0 0 20px;
    color: rgb(62 63 69 / 50%);
}

.facetwp-selections Ul {
    padding-left: 0px;
}

.facetwp-selections li {
    padding: 5px;
    margin: 10px 8px;
    border: rgb(62 63 69 / 20%) solid 1px;
}

.facetwp-selection-label {
    color: rgb(62 63 69 / 50%);
    font-family: 'Verlag-Bold';
    letter-spacing: .1em;
   text-transform:uppercase;
   font-size: .8em;
}

.facetwp-selection-value {
    color: rgb(62 63 69 / 50%);
    font-family: 'Verlag-Book';
    font-size: .8em;
}



/* facetwp Pager styles */

.facetwp-pager, .facetwp-facet-gallery_results {
    /* margin: auto auto; */
    text-align: center;
    font-size: 1.1em;
}

.facetwp-page.active {
    font-weight: bold;
    cursor: default;
    background: #eee;
    padding: 0px 10px;
}

.facetwp-page {
    border-right: 1px solid #ddd;
    padding: 0px 10px !important;
    margin-right: 0px !important;
}

a.facetwp-page.prev {
    font-family: 'Verlag-Bold';
    font-size: 1.5em;
    padding: 0 60px 0 0 !important;
    border: none;
    vertical-align: middle;
}

a.facetwp-page.next {
    border: none;
    font-family: 'Verlag-Bold';
    font-size: 1.5em;
    padding: 0 0 0 60px !important;
    border: none;
    vertical-align: middle;
}

.facetwp-page.dots {
    padding: 0px 10px;
}


/* Grid container */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 0 auto;
}

.listing-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    aspect-ratio: auto;
    border-radius: 0px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.listing-item a {
    width: 100%;
    aspect-ratio: 1 / 1.2;
    overflow: hidden;
}

.listing-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0px;
    transition: transform 0.3s ease;
}

.listing-item img:hover {
    transform: scale(1.05);
}

/* Styles for admin display of posts  */
.listing-item-title {
    margin: 10px 0 0 0;
    text-align: center;
    width: 100%;
    font-family: 'Verlag-Book', sans-serif;
    font-size: 1.0em;
    color: #333;
    background-color: #fff;
}

.admin-post-info {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    font-size: 12px;
    z-index: 100001;
    font-family: 'Verlag-Book', sans-serif;
}

.admin-edit-link {
    text-decoration: underline;
}


/* Styles for pending review posts */

/* Remove the after pseudo-element approach */
.listing-item.pending-review::after {
    display: none;
}

/* Style for the pending status text */
.pending-status {
    color: #d63638; /* WordPress red color */
    font-style: italic;
    font-weight: normal;
}

/* Create a styled container for the pending review status */
.listing-item.pending-review .listing-item-title {
    margin-top: 0;
    background-color: #ffcccc; /* Light pink background */
    padding: 8px 10px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure the title container is properly positioned */
.listing-item.pending-review div {
    width: 100%;
}

/* Alternative style - if you want to show [Pending Review] text separately */
.listing-item.pending-review .pending-status {
    display: block;
    text-align: center;
    margin-top: 3px;
    font-size: 0.9em;
}

body.modal-open {
    overflow: hidden !important;
    height: 100vh;
    position: relative !important;
}

/* Modal Structure */

#lightbox-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    overflow: visible;
    z-index: 9999999; /* Extremely high z-index */
    pointer-events: none; /* Allow clicks to pass through when modal is closed */
}

/* Make the modal itself capture pointer events when open */
#lightbox-container .lightbox-modal {
    pointer-events: auto;
}

.lightbox-modal {
    position: fixed !important; /* Override any other positioning */
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none;
    justify-content: center;
    align-items: stretch;
    z-index: 9999999 !important; /* Important to override any theme styles */
    overflow: hidden;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    z-index: 10000000 !important; /* Even higher z-index */
    background: #fff;
}

/* Body style when modal is open */
body.lightbox-open {
    overflow: hidden !important;
}

/* Fix for some Avada specific elements */
body.lightbox-open .fusion-tb-header,
body.lightbox-open .fusion-header,
body.lightbox-open .fusion-secondary-header {
    position: static !important; /* Keep original positioning */
}

/* Disable pointer events for header when modal is open */
body.lightbox-open .fusion-tb-header *,
body.lightbox-open .fusion-header *,
body.lightbox-open .fusion-secondary-header * {
    pointer-events: none !important;
}

/* Add a higher stacking context to the close button */
.close-lightbox {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000001 !important; /* Above everything else */
    background: none !important;
    font-size: 11px !important;
    cursor: pointer !important;
    color: #3E3F45 !important;
    border: #3E3F45 solid 1px !important;
    padding: 1px 2px !important;
}

/* Two-column layout */
.lightbox-two-columns {
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 0;
    height: 100vh;
    width: 100vw;
}

.lightbox-column {
    height: 100vh;
}

.gallery-column {
    position: relative;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding-top: 0px;
       overflow-y:hidden;
    
}

.details-column.gallery-column {
    padding-top: 0; /* Reset padding for gallery column */
    margin-top: 0;  /* Keep margin removed */
}

/* Only apply scrolling to the actual details column (right side) */
.lightbox-column:nth-child(2) {
    background: white;
    overflow-y: auto;
    padding-top: 60px; /* Use padding instead of margin */
    margin-top: 0;     /* Remove margin */
    
}

.details-column {
    background: white;
    padding-top: 60px; 
    margin-top: 0;     
}

/* Share button styles */

/*  remove display NONE  to unhide share button */
.share-button-container {
    display: block;
    position: static; /* Changed from fixed/absolute */
    margin: 20px 20px 20px auto; /* Right-align with 20px margins */
    text-align: right; /* Right-align the button */
    padding: 0 20px; /* Add some horizontal padding */
    z-index: 100001;
}

.share-button {
    background: transparent;
    border: 1px solid #000;
    border-radius: 0;
    width: auto; /* Allow natural width */
    height: 40px;
    display: inline-flex; /* Changed to inline-flex */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
    padding: 8px 16px; /* Add some padding */
    color: #000;
}

.share-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.share-icon {
    color: #333;
    margin-left: 8px; /* Space between text and icon */
}

.share-tooltip {
    position: absolute;
    right: 0;
    top: 45px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.share-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Gallery styles */
.gallery-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* When there's only one image */
.gallery-container.single-image {
    padding: 0;
    height: 100%;
}

.gallery-container.single-image .gallery-main-image {
    height: 100vh;
    padding: 60px 0 0 0;
    margin: 0;
}

.gallery-container.single-image .gallery-main-image img {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    padding: 0 0 30px 0;
    margin: 0;
}

.gallery-main-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 0 0 0;
    margin: 0;
    min-height: 0;
    width: 100%;
    /* Adjusted height to account for top padding and thumbnails */
    height: calc(100vh - 200px);
}

.gallery-main-image img {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: calc(100vh - 190px);
    object-fit: contain;
    margin-top: 0;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    padding: 20px 20px 20px 20px;
    background: transparent;
    position: absolute;
    bottom: 5px;
    left: 20px;
    right: 20px;
    max-width: 75%;
}

.gallery-thumbnail {
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    max-width: 200px;
    max-height: 200px;
}

.gallery-thumbnail:hover img {
    transform: scale(1.05);
}

.product-section{
   padding-right: 20px;
   }

/* don't display products set to 'no' */
.product-section[data-display='no'] {
    display: none;
}


.product-thumbnail {
  /*   margin-bottom: 10px; */
}

.product-thumbnail img {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.product-name {
    margin: 15px 0 0 0 !important;
    font-family: 'Verlag-Bold', sans-serif !important;
    font-size: 18px !important;
    color: #4F2D1D;
    text-transform: none;
    letter-spacing: .025em;
    border: 0 !important;
}

.product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-name a:hover {
    color: #666;
}

.credits {
    margin: 30px 0;
    font-family: 'Verlag-Light', sans-serif;
    font-size: 12px;
    letter-spacing: .05em;
    padding: 0 20px 30px 0;
}

.products-container h3 {
    font-family: 'Verlag-Bold', sans-serif !important;
    Font-size: 24px !important;
    letter-spacing: .075em !important;
    padding-bottom: 4px;
    border-bottom: 1px solid #3E3F45;
    margin:0 60px 26px 0;
}

h3.product-collection {
    border: 0px;
    text-transform: uppercase !important;
    font-size: 18px !important;
    letter-spacing: .1em !important;
    font-family: 'Verlag-Book' !important;
    padding: 0;
    margin: 23px 0 0 0;
}

.product-material-title {
    font-family: 'Verlag-Book', sans-serif !important;
    margin: 13px 0 0 0 !important;
    text-transform: uppercase;
    letter-spacing:.2em;
    color: #3E3F45;
    }

.product-finish-title {
    font-family: 'Verlag-Book', sans-serif !important;
    text-transform: uppercase;
    letter-spacing:.2em;
    color: #3E3F45;
    }
    
.product-material,
.product-finish {
    font-family: 'Verlag-Book', sans-serif !important;
    margin-bottom: 0 !important;
    text-transform: Capitalize;
    letter-spacing:.2em;
    color:#4F2D1D;
    }




/* Mobile responsive adjustments - Updated for stacked layout */
@media (max-width: 768px) {
    
    /* Grid container */
    .listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Change from grid to vertical stack on mobile */
    .lightbox-two-columns {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow-y: auto;
    }   

    /* Remove the separate column height restrictions */
    .lightbox-column {
        height: auto;
        flex: none;
    }

    /* Gallery column - maximize the image size */
    .gallery-column {
        height: auto;
        min-height: auto; /* Let it size naturally */
        overflow-y: visible;
        position: relative;
        padding-bottom: 0; /* Remove bottom padding */
    }
    
    /* Main image container - maximize size */
    .gallery-main-image {
        height: calc(100vh - 100px);
        padding: 60px 20px 20px 20px;
        margin-bottom: 0; /* Remove margin */
    }

    /* Make the main image larger on mobile */
    .gallery-main-image img {
        max-width: 95% !important;
        max-height: calc(100vh - 120px) !important;
        object-fit: contain;
    }

    /* Single image handling for mobile */
    .gallery-container.single-image .gallery-main-image {
        height: calc(100vh - 80px);
        padding: 60px 20px 20px 20px;
        margin-bottom: 0;
    }

    .gallery-container.single-image .gallery-main-image img {
        max-width: 95% !important;
        max-height: calc(100vh - 100px) !important;
    }
        
    /* Thumbnails positioning - natural flow instead of absolute */
    .gallery-thumbnails {
        position: static; /* Changed from absolute */
        margin: 20px auto; /* Center with top margin */
        max-width: calc(100% - 40px);
        padding: 20px;
    }

    /* Share button container in natural flow */
    .share-button-container {
        position: static; /* Ensure it's in natural flow */
        margin: 20px 20px 20px auto; /* Right-align with 20px spacing above and below */
        text-align: right; /* Right-align on mobile too */
        padding: 0 20px;
    }

    /* Details column - flows naturally after gallery */
    .details-column {
        height: auto;
        overflow-y: visible;
        padding-top: 20px; /* 20px spacing from share button */
        padding-bottom: 60px;
        min-height: auto;
        margin-top: 0; /* Ensure no extra margin */
    }

    /* Remove the separate column padding override */
    .lightbox-column:nth-child(2) {
        padding-top: 20px; /* Match details-column padding */
        padding-bottom: 60px; 
        overflow-y: visible;
    }
    
    .products-container {
        margin-left: 30px;
    }
    
    .credits {
        margin: 20px 0 50px 30px;
        padding-bottom: 60px;
    }
    
    /* Navigation buttons */
    a.facetwp-page.prev {
        padding: 0 30px 0 0 !important;
    }

    a.facetwp-page.next {
        padding: 0 0 0 30px !important;
    }

    /* Ensure modal takes full space */
    .lightbox-modal, 
    .lightbox-content {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
    }

    /* Ensure the main lightbox content scrolls properly */
    .lightbox-content {
        overflow-y: auto;
    }
}

/* For very wide screens */
@media (min-width: 1600px) {
    .gallery-main-image img {
        max-width: 70%;
        max-height: 67%;
    }
}   
/* Share Overlay Styles - Add this to styles.css */

.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000002;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.share-overlay.show {
    opacity: 1;
    visibility: visible;
}

.share-overlay-content {
    background: white;
    border-radius: 0px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.share-overlay.show .share-overlay-content {
    transform: translateY(0);
}

.share-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.share-overlay-header h3 {
    margin: 0;
    font-family: 'Verlag-Bold', sans-serif;
    font-size: 18px;
    color: #333;
    letter-spacing: 0.05em;
}

.share-overlay-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.share-overlay-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.share-options {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border: 1px solid #000;
    border-radius: 0px;
    text-decoration: none;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Verlag-Book', sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.share-option:hover {
    border-color: #3E3F45;
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-option img {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
}

.share-option span {
    color: #333;
    font-weight: normal;
    text-align: center;
    line-height: 1.2;
}

/* Special styling for copy button since it's a button element */
.share-option#share-copy {
    border: 1px solid #000;
}

.share-option#share-copy:hover {
    border-color: #3E3F45;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .share-overlay-content {
        width: 95%;
        margin: 20px;
    }
    
    .share-options {
        padding: 20px;
        gap: 12px;
    }
    
    .share-option {
        padding: 16px 12px;
        font-size: 11px;
    }
    
    .share-option img {
        width: 28px;
        height: 28px;
        margin-bottom: 6px;
    }
    
    .share-overlay-header {
        padding: 16px 20px;
    }
    
    .share-overlay-header h3 {
        font-size: 16px;
    }
}