/* Make gallery images clickable */
.tpwpg-popup-trigger {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

/*image.png.tpwpg-popup-trigger:hover {
    opacity: 0.8;
}*/

@media (max-width: 767px) {
    .tpwpg-popup-overlay {
        width: 100vw;
        height: 100vh;
    }
}

body.tpwpg-popup-open {
    overflow: hidden;
}

/* Popup Gallery Styles */
.tpwpg-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 24, 31, 0.97);
    z-index: 9999;
    overflow-y: hidden;
    padding: 0;
}

.tpwpg-popup-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/*.tpwpg-popup-header {
    display: none;
}*/

.tpwpg-popup-close {
    position: fixed;
    top: 0px;
    right: -50px;
    background: rgba(255, 0, 68, 1);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background 0.2s;
    background-image: url('../images/ic_cart_delete_new.png') !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.tpwpg-popup-close:hover {
    background: rgba(255, 0, 68, 1);
}

.tpwpg-popup-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tpwpg-popup-content .slider-for {
    width: 100%;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

.tpwpg-popup-content .slider-for .tpwpg-big {
    display: none;
    width: 100%;
    height: 80vh;
    align-items: center;
    justify-content: center;
}

.tpwpg-popup-content .slider-for .tpwpg-big.active {
    display: flex !important;
}

.tpwpg-popup-content .slider-for img {
    max-width: 100%;
    max-height: 84vh;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    background: #fff;
    object-fit: cover;
    margin-top: -70px;
}

/* Navigation arrows */
.tpwpg-nav-arrow {
    position: absolute;
    top: calc(50% - 84px);
    transform: translateY(-50%);
    overflow: hidden;
    color: #fff;
    padding: 0;
    width: 48px;
    height: 48px;
    font-size: 32px;
    border-radius: 0px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    background-color: rgba(13, 17, 33, 0.2);
}

.tpwpg-nav-arrow:hover {
    background: #00000075;
    border-radius: 0px;
}

.tpwpg-prev {
    left: -60px;
}

.tpwpg-next {
    right: -60px;
}

/* Thumbnails bar: show max 5 thumbnails, with navigation arrows */
.tpwpg-popup-content .slider-nav {
    width: auto;
    margin: 24px auto 0 auto;
    padding: 10px 16px;
    background: #000;
    border-radius: 16px;
    display: flex;
    gap: 10px;
    overflow: hidden;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    position: relative;
}

.tpwpg-popup-content .slider-nav-inner {
    display: flex;
    gap: 10px;
    transition: transform 0.3s;
}

.tpwpg-popup-content .slider-nav .tpwpg-thumbnail {
    flex: 0 0 auto;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.tpwpg-popup-content .slider-nav .tpwpg-thumbnail.active {
    border-color: rgba(255, 0, 68, 1);
}

.tpwpg-popup-content .slider-nav .tpwpg-thumbnail.tpwpg-thumbnail-hidden{
    display:none !important;
}

.tpwpg-popup-content .slider-nav img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    display: block;
}

.tpwpg-thumb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 34, 44, 0.7);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 0px !important;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 22px;
    transition: background 0.2s;
   
}

.tpwpg-thumb-arrow:hover {
    background: #007cba;
}

.tpwpg-thumb-prev {
    left: 0;
}

.tpwpg-thumb-next {
    right: 0;
}

.tpwpg-popup-content .slider-nav {
    padding-left: 10px;
    padding-right: 10px;
}

.tpwpg-nav-arrow g {
    fill: #fff;
}

.tpwpg-nav-arrow {
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.tpwpg-nav-arrow svg {
    width: 12.5px;
    height: auto !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .tpwpg-popup-container {
        width: 98vw;
        max-width: 98vw;
    }
    .tpwpg-popup-content .slider-nav {
        margin: 36px auto 0 auto;
    }
    .tpwpg-popup-content .slider-for {
        max-height: 45vh;
    }

    .tpwpg-popup-content .slider-for img {
        max-height: 45vh;
    }
    .tpwpg-popup-content .slider-for .tpwpg-big {
        height: 33vh;
    }
    .tpwpg-prev {
        left: 0px;
        top: 40%;
    }
    .tpwpg-next {
        right: 0px;
        top: 40%;
    }
    .tpwpg-popup-close {
        right: 15px;
        top: -62px;
    }
}

@media (max-width: 900px) {
    .tpwpg-popup-container {
        width: 98vw;
        max-width: 98vw;
    }

    .tpwpg-popup-content .slider-for {
        max-height: 45vh;
    }

    .tpwpg-popup-content .slider-for img {
        max-height: 45vh;
    }
    .tpwpg-popup-content .slider-for .tpwpg-big {
        height: 33vh;
    }
    .tpwpg-prev {
        left: 0px;
        top: 40%;
    }
    .tpwpg-next {
        right: 0px;
        top: 40%;
    }
    .tpwpg-popup-close {
        right: 15px;
        top: -62px;
    }
}

@media (max-width: 600px) {
    .tpwpg-popup-close {
        top: -27vh;
        right: 10px;
        width: 32px !important;
        height: 32px !important;
        font-size: 22px;
    }

    .tpwpg-popup-content .slider-nav img {
        width: 56px;
        height: 40px;
    }

    .tpwpg-popup-content .slider-nav {
        padding: 6px 4px 6px 4px;
    }
    .tpwpg-popup-content .slider-for {
        max-height: 15vh;
    }
    .tpwpg-popup-content .slider-nav-inner {
        overflow: hidden;
    }

    .tpwpg-nav-arrow {
        width: 30px;
        height: 30px;
        border-radius: 4px;
    }

    .tpwpg-nav-arrow svg {
        width: 9.185774803161621px;
        height: auto !important;
    }
    
    .tpwpg-prev {
        left: 10px;
        top: 25%;
    }
    
    .tpwpg-next {
        right: 10px;
        top: 25%;
    }
}

/* Custom background styles */
body.custom-background {
    background-color: #f7f7fa;
}

/* Quantity Input Button (QIB) Styles */
.qib-container input[type='number']:not(#qib_id):not(#qib_id) {
    -moz-appearance: textfield;
}

.qib-container input[type='number']:not(#qib_id):not(#qib_id)::-webkit-outer-spin-button,
.qib-container input[type='number']:not(#qib_id):not(#qib_id)::-webkit-inner-spin-button {
    -webkit-appearance: none;
    display: none;
    margin: 0;
}

form.cart button[type='submit']:not(#qib_id):not(#qib_id),
form.cart .qib-container + div:not(#qib_id):not(#qib_id) {
    display: inline-block;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    float: none;
    vertical-align: top;
    text-align: center;
}

form.cart button[type='submit']:not(#qib_id):not(#qib_id):not(_) {
    line-height: 1;
}

form.cart button[type='submit']:not(#qib_id):not(#qib_id):not(_):not(_) {
    height: 35px;
    text-align: center;
}

form.cart .qib-container + button[type='submit']:not(#qib_id):not(#qib_id),
form.cart .qib-container + div:not(#qib_id):not(#qib_id):not(_) {
    margin-left: 1em;
}

form.cart button[type='submit']:focus:not(#qib_id):not(#qib_id) {
    outline-width: 2px;
    outline-offset: -2px;
    outline-style: solid;
}

.qib-container div.quantity:not(#qib_id):not(#qib_id) {
    float: left;
    line-height: 1;
    display: inline-block;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    width: auto;
    min-height: initial;
    min-width: initial;
    max-height: initial;
    max-width: initial;
}

.qib-button:not(#qib_id):not(#qib_id) {
    line-height: 1;
    display: inline-block;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 35px;
    width: 30px;
    color: white;
    background: #d62c2c;
    border-color: #b50e0e;
    float: left;
    min-height: initial;
    min-width: initial;
    max-height: initial;
    max-width: initial;
    vertical-align: middle;
    font-size: 16px;
    letter-spacing: 0;
    border-style: solid;
    border-width: 1px;
    transition: none;
    border-radius: 0;
}

.qib-button:focus:not(#qib_id):not(#qib_id) {
    outline-offset: -3px;
    outline-width: 1px;
    outline-color: #ebe9eb;
    outline-style: dotted;
}

.qib-button:hover:not(#qib_id):not(#qib_id) {
    background: #c51818;
}

.qib-container .quantity input.qty:not(#qib_id):not(#qib_id) {
    line-height: 1;
    background: none;
    text-align: center;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 35px;
    width: 45px;
    min-height: initial;
    min-width: initial;
    max-height: initial;
    max-width: initial;
    box-shadow: none;
    font-size: 15px;
    border-style: solid;
    border-color: #b50e0e;
    border-width: 1px 0;
    border-radius: 0;
}

.qib-container .quantity input.qty:focus:not(#qib_id):not(#qib_id) {
    border-color: #b50e0e;
    outline: none;
    border-width: 2px 1px;
    border-style: solid;
}

.woocommerce table.cart td.product-quantity:not(#qib_id):not(#qib_id) {
    white-space: nowrap;
}

@media (min-width: 768px) {
    .woocommerce table.cart td.product-quantity:not(#qib_id):not(#qib_id) {
        text-align: center;
    }
}

@media (min-width: 768px) {
    .woocommerce table.cart td.product-quantity .qib-container:not(#qib_id):not(#qib_id) {
        display: flex;
        justify-content: center;
    }
}

.qib-container:not(#qib_id):not(#qib_id) {
    display: inline-block;
}

.woocommerce-grouped-product-list-item__quantity:not(#qib_id):not(#qib_id) {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    text-align: left;
}

.woocommerce-grouped-product-list-item__quantity .qib-container:not(#qib_id):not(#qib_id) {
    display: flex;
}

.quantity .minus:not(#qib_id):not(#qib_id),
.quantity .plus:not(#qib_id):not(#qib_id),
.quantity > a:not(#qib_id):not(#qib_id) {
    display: none;
}

.products.oceanwp-row .qib-container:not(#qib_id):not(#qib_id) {
    margin-bottom: 8px;
}
