/* ============================
   FORCE HEADER TO NOT OVERLAP
============================ */

#header {
    position: relative !important;
    z-index: 999 !important;
}

#main,
#content,
.page-wrapper {
    padding-top: 30px !important;
}

/* ============================
   REMOVE EXTRA HEADER HEIGHT
============================ */

.header-wrapper,
.header-main,
.header-bg-container {
    height: auto !important;
    min-height: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* ============================
   FIX SEARCH & MENU STACKING
============================ */

.header-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

.header-search,
.searchform {
    max-width: 380px !important;
    width: 100% !important;
}

/* ============================
   PRODUCT IMAGE VISIBILITY
============================ */

.single-product .product-gallery {
    margin-top: 0 !important;
    z-index: 1 !important;
}

/* ============================
   FIX PRODUCT INFO + BUTTONS
============================ */

.single-product .product-info {
    padding-top: 0 !important;
}

.single-product .price-wrapper {
    margin-bottom: 8px !important;
}

.single-product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.single-product .quantity {
    margin: 0 !important;
}

/* ============================
   FIX HIDDEN TABS
============================ */

.single-product .woocommerce-tabs {
    clear: both !important;
    margin-top: 40px !important;
    display: block !important;
    visibility: visible !important;
}

.single-product .woocommerce-tabs ul.tabs {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* ============================
   SIDEBAR BEHAVIOR
============================ */

@media (max-width: 1024px) {
    .shop-sidebar {
        display: none !important;
    }
}

/* ============================
   MOBILE SAFETY FIXES
============================ */

@media (max-width: 768px) {

    .header-inner {
        flex-direction: column !important;
    }

    .single-product .product-main {
        padding-top: 20px !important;
    }

    .single-product form.cart {
        justify-content: space-between !important;
    }
}
