/*
  GAYLE PRINTZ THEME - GALLERY PAGE STYLES
  ============================================================================
  This file contains gallery page styles
  Last Updated: [Current Date]
  ============================================================================
*/

/* ============================================================================
   GALLERY IMAGE OPTIMIZATION
   ============================================================================ */

/* Responsive gallery images with retina optimization */
.icvm_gallery .art-img-wrap img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    /* Optimize for retina displays with your WebP images */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Smooth loading transition */
    transition: opacity 0.3s ease;
}

/* Progressive image loading */
.icvm_gallery .art-img-wrap img.gallery-image-lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icvm_gallery .art-img-wrap img.gallery-image-lazy.loaded {
    opacity: 1;
}

/* Loading placeholder */
.icvm_gallery .art-img-wrap {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* WebP support with fallback */
.icvm_gallery .art-img-wrap {
    background-color: #f5f5f5;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

/* Responsive image sizing hints */
.icvm_gallery .art-img-wrap img {
    /* Ensure proper aspect ratio maintenance */
    aspect-ratio: attr(width) / attr(height);
}

/* Performance optimizations */
.icvm_gallery .art-img-wrap {
    /* Enable hardware acceleration */
    transform: translateZ(0);
    will-change: transform;
}

/* Retina display optimization for WebP images */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .icvm_gallery .art-img-wrap img {
        /* Perfect for your optimized WebP images on retina */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        /* Ensure maximum sharpness */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* ============================================================================
   THE GALLERY PAGE CSS
   ============================================================================ */

.icvm_masonry_parent {
    min-height: 200px;
    position: relative;
    margin-left: -20px;
    margin-right: -20px;
}

.icvm_masonry_parent .items {
    display: flex;
    gap: 10px;
}

.icvm_masonry_parent .masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.icvm_masonry_parent .item {
    width: 100%;
    display: block;
    padding-left: 20px;
    padding-right: 20px;
}

/* Mobile: Single column with original order */
@media (max-width: 770px) {
    .icvm_masonry_parent .items {
        flex-direction: column;
    }
    
    /* Interleave items from both columns to restore original order */
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(1) { order: 0; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(1) { order: 1; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(2) { order: 2; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(2) { order: 3; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(3) { order: 4; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(3) { order: 5; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(4) { order: 6; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(4) { order: 7; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(5) { order: 8; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(5) { order: 9; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(6) { order: 10; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(6) { order: 11; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(7) { order: 12; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(7) { order: 13; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(8) { order: 14; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(8) { order: 15; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(9) { order: 16; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(9) { order: 17; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(10) { order: 18; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(10) { order: 19; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(11) { order: 20; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(11) { order: 21; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(12) { order: 22; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(12) { order: 23; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(13) { order: 24; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(13) { order: 25; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(14) { order: 26; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(14) { order: 27; }
    .icvm_masonry_parent .masonry-column-1 .item:nth-child(15) { order: 28; }
    .icvm_masonry_parent .masonry-column-2 .item:nth-child(15) { order: 29; }
}

.icvm_gallery .item.loading {
    visibility: hidden;
}

.icvm_gallery .item .title {
    text-align: center;
    color: #000;
    margin-top: 14px;
}

.icvm_gallery .item .title .main {
    font-weight: 700;
    font-style: italic;
    font-size: 18px;
    line-height: 1.27em;
}

.icvm_gallery .item .sub {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.13px;
    line-height: 1.6em;
    margin-bottom: 45px;
}

.icvm_gallery .items a:last-child.item .sub {
    margin: 0 !important;
}

.icvm_gallery .filters-flex-row {
    width: 100%;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    align-content: center;
}

.icvm_gallery .filters-flex-row-left {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    gap: 16px;
}

.icvm_gallery .filters-pagination {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
}

.icvm_gallery .filters-pagination-label {
    display: block;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
    color: black;
}

.icvm_gallery .filters-pagination-select {
    display: block;
    position: relative;
}

.icvm_gallery .filters-pagination-select:after {
    top: 0;
    right: 6px;
    bottom: 0;
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    justify-content: flex-end;
    content: '\33';
    position: absolute;
    font-family: 'ETmodules';
    font-size: 18px;
    pointer-events: none;
}

.icvm_gallery .filters-pagination-select select {
    display: block;
    border: 1px solid black;
    background: transparent;
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    text-transform: uppercase;
    color: black;
    padding: 9px 22px 9px 10px;
    margin: 0;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.15);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.icvm_gallery .filters-pagination-select select:focus {
    outline: none;
}

.icvm_gallery .btn-main {
    display: block;
    margin: 0;
    vertical-align: top;
    padding: 6px 16px;
    color: black;
    border: 1px solid black;
    border-radius: 0;
    letter-spacing: 0.7px;
    font-size: 14px;
    line-height: 1.643em;
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 400;
    text-transform: uppercase;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.15);
    -webkit-appearance: none;
}

.icvm_gallery .btn-main:hover {
    color: white;
    background-color: black;
}

/* New filters_items container styling */

.icvm_gallery .gallery-filter-form {
    margin-bottom: 40px;
}

.icvm_gallery .sort_main {
    width: auto;
    flex: 0 1 220px;
    display: block;
    margin-right: 0;
    position: relative;
}

.icvm_gallery .sort_main .title {
    line-height: 1;
    padding: 10px 16px;
}

.icvm_gallery .sort_main .title:after {
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    align-content: center;
    padding-right: 0;
    right: 8px;
    transform-origin: center;
    line-height: 1;
    font-size: 18px;
}

.icvm_gallery .sort_main .content {
    top: 100%;
    left: 0;
    right: 0;
    position: absolute;
    background-color: white;
}

.icvm_gallery .filters-buttons {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 0;
    margin: 0;
}

/* Sort Main Dropdown */
.sort_main {
    display: inline-block;
    vertical-align: top;
    width: 220px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background: #fff;
    margin-right: 32px;
    box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.15);
}

.sort_main.opened {
    box-shadow: 0px 1px 10px 0px RGBA(255, 255, 255, 0);
}

.sort_main .title {
    text-transform: uppercase;
    position: relative;
    padding: 6px 16px;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.643em;
    border: 1px solid #000;
    transition: background 0.2s ease-in-out;
}

.sort_main .title:after {
    content: '\33';
    position: absolute;
    right: 3px;
    font-family: 'ETmodules';
    padding-right: 6px;
    font-size: 18px;
}

.sort_main:not(.opened) .content {
    height: 0;
}

.sort_main.opened {
    border-color: transparent;
    overflow: visible;
}

.sort_main.opened .title {
    color: #fff;
    background: #000;
}

.sort_main.opened .title:after {
    content: '\32';
    color: #fff;
}

.sort_main .content {
    border: 1px solid #F0F0F0;
}

/* Sort Items */
.icvm_gallery .arts-sortby .sort_items {
    padding: 8px 16px;
}

.icvm_gallery .arts-sortby .sort_items .s_item {
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    font-size: .8em;
    position: relative;
    background: #fff;
}

.icvm_gallery .arts-sortby .sort_items .s_item:not(:last-child) {
    border-bottom: 1px solid #000;
}

.arts-sortby .s_item input {
    width: 16px !important;
    height: 16px !important;
    margin: 0;
}

/* Filter Items */
.s_item.range {
    display: flex;
    flex-direction: column;
}

.s_item.range > * {
    padding-left: 8px;
    padding-right: 8px;
}

.s_item.range p {
    margin: 5px 0;
    text-transform: none;
}

.s_item.range input[type="range"] {
    padding: 10px 0 15px;
    width: 100%;
    margin: 0 auto;
    cursor: pointer;
    z-index: 999;
    background: transparent;
}

.s_item label {
    display: block;
    position: relative;
    top: 1px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.917em;
    text-transform: uppercase;
}

.s_item:last-of-type {
    margin-bottom: 0;
    border-bottom: none;
}

.s_item input {
    accent-color: black;
}

/* Filter Section */
.sort_items.filters {
    text-transform: uppercase;
}

.arts-filter .sort_items {
    padding-top: 12px;
    padding-bottom: 20px;
}

.arts-filter .sort_items .s_item {
    display: flex;
    justify-content: space-between;
}

.arts-filter .s_item.range.icvm_dimensions {
    display: none;
}


.arts-filter .select_one {
    text-align: center;
    text-transform: capitalize;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.917em;
    margin-bottom: 8px !important;
}

.arts-filter .landscape {
    padding-bottom: 10px;
    border-bottom: 1px solid #000;
}

.arts-filter .portrait {
    padding: 10px 0;
}

.arts-filter .landscape,
.arts-filter .portrait {
    margin: 0 16px;
}

.arts-filter #landscape_image,
.arts-filter #portrait_image,
.arts-filter input[name="dim"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

/* Range Controls */
.range_radios {
    display: flex;
    align-items: center;
    text-transform: none;
    padding: 0px 16px 0px 16px;
    justify-content: flex-start;
    column-gap: 5px;
}

label.size-box[for="dim_width"] {
    margin-left: 25px;
}

.range_radios .size-box {
    font-weight: 700;
    text-transform: capitalize;
    font-size: 11px;
}

.range_radios input {
    margin-left: 3px;
    margin-right: 8px;
}

.range_radio_item {
    display: inline-block;
    margin-right: 16px;
}

.range_radio_item input[type="radio"] {
    margin-right: 8px;
}

.range_radio_item label {
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

/* Range Wrap */
.range-wrap {
    display: grid;
    grid-template-columns: 50% 50%;
    position: relative;
    padding: 0 !important;
    margin: 0 16px;
}

.range-wrap:after {
    content: '';
    width: 100%;
    height: 1px;
    background: #000;
    position: absolute;
    left: 0;
    top: 23px;
}

.range-wrap input {
    padding: 16px 0 !important;
    position: relative;
}

.range-wrap .from-wrap input:after,
.range-wrap .to-wrap input:after {
    content: '';
    width: 1px;
    height: 12px;
    background: #000;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.range-wrap .from-wrap input:after {
    left: 0;
}

.range-wrap .to-wrap input:after {
    right: 0;
}

.range-wrap label {
    position: absolute;
    z-index: 1;
    width: 100%;
    text-align: center;
    top: 30px;
    pointer-events: none !important;
}
.s_item .dimansion-range-wrap label{
    text-transform: none;
}

.from-wrap,
.to-wrap {
    position: relative;
}

/* Range Labels */
.f_title {
    background: #D9D9D9;
}

.range label.f_title {
    padding: 4px 16px;
}

.arts-filter .filter_by_label {
    padding: 16px 16px 8px 16px;
    font-size: 11px;
    line-height: 2.1em;
    text-transform: capitalize;
    font-weight: 400;
}

.suffix {
    text-transform: none;
}

input#dim_none,
label.size-box[for="dim_none"] {
    display: none;
}

.height-to-wrap label:after,
.width-from-wrap label:after,
.dim-to-wrap label:after,
.dim-from-wrap label:after,
.price-to-wrap label:after,
.price-from-wrap label:after {
    position: absolute;
    top: -35px;
}

.width-from-wrap label:after,
.dim-from-wrap label:after,
.price-from-wrap label:after {
    content: 'Min';
    left: 0;
}

.height-to-wrap label:after,
.dim-to-wrap label:after,
.price-to-wrap label:after {
    content: 'Max';
    right: 0;
}

.price-range-wrap.range-wrap {
    margin-top: 12px;
    margin-bottom: 12px;
}

.dimansion-range-wrap.range-wrap {
    margin-top: 20px;
}

/* Buttons */

.clear_filters {
    padding: 6px 16px;
    color: #000000 !important;
    border-width: 1px !important;
    border-color: #000000 !important;
    border-radius: 0px;
    letter-spacing: 0.7px;
    font-size: 14px;
    line-height: 1.643em;
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    background-color: #fff;
    margin-bottom: 0 !important;
    box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.clear_filters:hover {
    color: #FFFFFF !important;
    background-color: #000000;
    box-shadow: 0px 1px 10px 0px RGBA(255, 255, 255, 0);
}

.filter-btn {
    padding: 6px 16px;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    border-radius: 0px;
    letter-spacing: 0.7px;
    font-size: 14px;
    line-height: 1.643em;
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    background-color: #fff;
    margin-bottom: 0 !important;
    box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.filter-btn:hover {
    color: #FFFFFF !important;
    background-color: #000000;
    box-shadow: 0px 1px 10px 0px RGBA(255, 255, 255, 0);
}

.filter-buttons {
    display: inline-block;
    vertical-align: top;
    margin-left: 16px;
}

.filter-buttons button {
    margin-right: 8px;
}

/* Load More */
.icvm_load_more {
    text-align: center;
}

.icvm_load_more button {
    width: 50px;
    height: 50px;
    text-align: center;
    background: url('/wp-content/uploads/2025/06/spinner.gif');
    background-repeat: no-repeat;
    background-size: 300%;
    background-position: center;
    border: none;
}

/* Art Items */
.art-img-wrap {
    position: relative;
    display: flex;
    flex-wrap: wrap;
}

.art-img-wrap img {
    width: 100%;
    display: block;
}

.art-overlay-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    background: rgba(255, 255, 255, .7);
    opacity: 0;
    transition: all .15s ease-in-out;
}

.art-overlay-wrap:hover {
    opacity: 1;
}

.art-overlay-wrap div {
    width: 100%;
    text-align: center;
    color: #000;
}
.art-overlay-wrap div span {
    font-size: 20px;
}

.overlay-bold-text {
    font-weight: 700;
    font-size: clamp(26px, 1.77vw, 34px);
    line-height: 1.5em;
}

.overlay-detail-text {
    font-size: 26px;
    font-size: clamp(20px, 1.27vw, 26px);
    line-height: 1.27em;
    letter-spacing: .52px;
}

.overlay-icon:after {
    content: '';
    width: clamp(55px, 4.15vw, 80px);
    height: clamp(49px, 4.15vw, 80px);
    display: block;
    background-image: url(/wp-content/uploads/2025/05/overlayicon.png);
    background-size: 100%;
    background-repeat: no-repeat;
}

.overlay-icon {
    display: flex;
    justify-content: center;
    margin: 32px 0 16px;
    margin-top: clamp(15px, 1.8vw, 32px);
    margin-bottom: clamp(6px, .65vw, 16px);
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

.gallery-pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination-info {
    margin-bottom: 15px;
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px;
    line-height: 1.643em;
    letter-spacing: 0.7px;
    text-transform: uppercase !important;
    color: #000000;
}

.pagination-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-links a,
.pagination-links span {
    display: inline-block;
    padding: 6px 16px;
    margin: 0 2px;
    color: #000000 !important;
    border-width: 1px !important;
    border-color: #000000 !important;
    border-radius: 0px;
    letter-spacing: 0.7px;
    font-size: 14px;
    line-height: 1.643em;
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, .2) !important;
}

.pagination-links a:hover {
    background-color: #f8f8f8;
}

.pagination-links .current-page {
    background-color: #000000;
    color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 1) !important;
}

.pagination-links .prev-page,
.pagination-links .next-page {
    font-weight: 400 !important;
}

.pagination-links .dots {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #999;
    cursor: default;
    text-transform: none !important;
}

/* Loading state */
.icvm_gallery.loading {
    opacity: 0.7;
    pointer-events: none;
}

.icvm_gallery.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

