/* ========================================
   RESPONSIVE POPUPS & MODALS
   ======================================== */

/* ===== CART POPUP RESPONSIVE ===== */
.cart_popup_div {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999999;
    transition: bottom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    max-height: 80vh;
    overflow: hidden;
}

@media (min-width: 769px) {
    .cart_popup_div {
        max-width: 500px;
        right: 20px;
        left: auto;
        border-radius: 12px;
        bottom: -100%;
    }

    .cart_popup_div.active {
        bottom: 90px;
    }
}

@media (min-width: 1025px) {
    .cart_popup_div {
        max-width: 550px;
    }
}

/* ===== VARIANT POPUP RESPONSIVE ===== */
.variant_popup_div {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999999;
    transition: bottom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    max-height: 85vh;
}

@media (min-width: 769px) {
    .variant_popup_div {
        max-width: 700px;
        left: 50%;
        transform: translateX(-50%);
        bottom: -100%;
        border-radius: 12px;
    }

    .variant_popup_div.active {
        bottom: 50px;
        transform: translateX(-50%);
    }
}

@media (min-width: 1025px) {
    .variant_popup_div {
        max-width: 900px;
    }

    .variant_grid_div {
        padding: 30px;
    }
}

/* ===== PRODUCT PREVIEW RESPONSIVE ===== */
/* Styles moved to product_preview.css - do not override here */

/* ===== BLUR BACKGROUND RESPONSIVE ===== */
@media (min-width: 769px) {
    .blur_body_div {
        backdrop-filter: blur(8px);
        background: rgba(0, 0, 0, 0.4);
    }
}

/* ===== INSTAGRAM POPUP RESPONSIVE ===== */
.igvp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}

.igvp-popup {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
}

@media (min-width: 769px) {
    .igvp-popup {
        max-width: 650px;
    }
}

@media (min-width: 1025px) {
    .igvp-popup {
        max-width: 800px;
    }
}

/* ===== SEARCH/RECENT/FAVOURITE PAGES RESPONSIVE ===== */
@media (min-width: 769px) {

    .search_page_div,
    .recent_page_div,
    .favourite_page_div {
        width: 90%;
        max-width: 1200px;
        left: 50%;
        transform: translateX(-50%);
        height: 90vh;
        top: 5vh;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    .search_page_div .top_nav,
    .recent_page_div .top_nav,
    .favourite_page_div .top_nav {
        border-radius: 12px 12px 0 0;
    }
}

/* ===== TOOLBAR/MORE MENU RESPONSIVE ===== */
@media (min-width: 769px) {
    .tollbar_div {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 12px 12px 0 0;
    }

    .tollbar_div.active {
        bottom: 0;
        transform: translateX(-50%);
    }
}

@media (min-width: 1025px) {
    .tollbar_div {
        max-width: 700px;
    }
}

/* ===== COLOR DROPDOWN RESPONSIVE ===== */
@media (min-width: 769px) {
    .color_dropdown_menu.active {
        width: 60vw;
        max-width: 500px;
        padding: 40px;
    }

    .color_dropdown_menu .color_box {
        height: 60px;
        width: 60px;
    }
}

/* ===== MOBILE POPUP ADJUSTMENTS ===== */
@media (max-width: 768px) {

    .cart_popup_div,
    .variant_popup_div,
    .tollbar_div {
        border-radius: 24px 24px 0 0;
    }
}

/* ===== DESKTOP CLOSE BUTTONS ===== */
@media (min-width: 769px) {

    .cart_hide_btn,
    .variant_hide_btn {
        display: none;
    }

    /* Remove old close button - now using cart_close_btn in header */
    .cart_popup_div::before,
    .variant_popup_div::before {
        display: none !important;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s;
    }

    .cart_popup_div::before:hover,
    .variant_popup_div::before:hover {
        background: rgba(0, 0, 0, 0.05);
        color: #000;
    }
}

/* ===== ANIMATION IMPROVEMENTS ===== */
@media (min-width: 769px) {

    .cart_popup_div,
    .variant_popup_div,
    .tollbar_div {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .image_preview {
        transition: opacity 0.3s ease;
    }
}

/* ===== SCROLLBAR STYLING FOR POPUPS ===== */
@media (min-width: 769px) {

    .cart_popup_body::-webkit-scrollbar,
    .variant_grid_div::-webkit-scrollbar,
    .preview_content::-webkit-scrollbar {
        width: 8px;
    }

    .cart_popup_body::-webkit-scrollbar-track,
    .variant_grid_div::-webkit-scrollbar-track,
    .preview_content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .cart_popup_body::-webkit-scrollbar-thumb,
    .variant_grid_div::-webkit-scrollbar-thumb,
    .preview_content::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    .cart_popup_body::-webkit-scrollbar-thumb:hover,
    .variant_grid_div::-webkit-scrollbar-thumb:hover,
    .preview_content::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}