/* Midas storefront overrides */

.main:not(.home-main) {
    position: relative;
    z-index: 1;
}

@media (min-width: 992px) {
    .header .menu-depart .submenu {
        z-index: 100;
    }

    .page-wrapper:not(.home-page) .menu-depart .submenu {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* Nav: main links left, Become a Dealer pinned right (normal + sticky) */
.header-bottom .header-center-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.header-bottom .header-center-nav .main-nav {
    flex: 1 1 auto;
    min-width: 0;
}

.header-bottom .header-nav-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.header-bottom .header-nav-actions .link-seller {
    margin-left: 1.5rem;
    margin-right: 0;
    white-space: nowrap;
}

.header-bottom.fixed .header-center-nav {
    width: 100%;
    max-width: 100%;
}

.header-bottom.fixed .header-nav-actions {
    margin-left: auto;
}

/* Catalog toolbox — align Sort By label with dropdown (Porto markup) */
.toolbox-item.toolbox-sort {
    align-items: center;
}

.toolbox-item.toolbox-sort .toolbox-sort-form {
    display: contents;
}

.toolbox-item.toolbox-sort .select-custom {
    margin-top: 0;
    margin-bottom: 0;
}

.toolbox-item.toolbox-sort label {
    margin-bottom: 0;
    line-height: 34px;
}

.toolbox-item.toolbox-sort .select-custom .form-control {
    margin-top: 0;
    vertical-align: middle;
}

/* Inner page breadcrumbs — match Porto spacing (no extra gap) */
.breadcrumb-nav {
    margin-bottom: 0;
}

.page-header .breadcrumb-nav {
    margin-bottom: 1rem;
}

/* Header mini-cart — subtotal, GST, gross total */
.dropdown-cart-totals .dropdown-cart-total {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.dropdown-cart-totals .dropdown-cart-gross-total {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #efefef;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Cart AJAX updates */
.table-cart.cart-updating {
    opacity: 0.6;
    pointer-events: none;
}

/* CMS content from admin */
.cms-content p {
    margin-bottom: 1rem;
}

/* Porto pagination — horizontal layout, icon arrows (not Laravel Tailwind/BS5) */
.toolbox-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-bottom: 3.5rem;
}

@media (min-width: 992px) {
    /* Porto sets margin-bottom: 0 on lg+; restore gap above footer */
    .toolbox-pagination {
        margin-bottom: 3.5rem;
    }
}

.toolbox-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.toolbox-pagination .page-item {
    display: inline-block;
}

.toolbox-pagination .page-link-btn .icon-angle-left,
.toolbox-pagination .page-link-btn .icon-angle-right {
    font-size: 2rem;
    line-height: 1;
}

/* Quick View popup (styles from style.min.css — needed on home where style.min.css is omitted) */
.mfp-ajax-product.mfp-bg {
    opacity: 0.6;
    background-color: #1d2124;
}

.mfp-ajax-product .product-single-container {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.mfp-ajax-product.mfp-wrap .mfp-content {
    max-width: 931px;
}

.mfp-ajax-product {
    z-index: 1058;
}

.product-quick-view {
    padding: 3rem;
    background-color: #fff;
}

.product-quick-view .product-single-details .product-title {
    width: 100%;
    font-size: 2.4rem;
}

.product-quick-view .mfp-close {
    top: 1.5rem;
    right: 1.5rem;
}

@media (max-width: 767px) {
    .product-quick-view {
        padding: 2rem 1.5rem;
    }
}

/* Add-to-cart confirmation popup (home page does not load style.min.css) */
.minipopup-area {
    position: fixed;
    right: 20px;
    bottom: 20px;
    font-size: 1.1em;
    text-align: center;
    z-index: 20002;
}

.minipopup-box {
    position: absolute;
    right: -100px;
    text-align: left;
    margin: auto auto 20px;
    padding: 20px;
    line-height: 1.4;
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.08);
    word-break: break-word;
    transform: translateY(-100%);
    width: 300px;
    z-index: 1000;
    background: #fff;
    opacity: 0;
    transition: right 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.minipopup-box.active {
    right: 0;
    opacity: 1;
}

.minipopup-box .product {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.minipopup-box figure {
    max-width: 60px;
    margin-right: 10px;
    margin-bottom: 0;
}

.minipopup-box .product-detail .product-name {
    color: #222529;
    font-size: 12px;
    font-weight: 700;
}

.minipopup-box .product-detail p {
    font-size: 12px;
    margin-bottom: 0;
}

.minipopup-box .product-action .btn {
    min-width: 120px;
    font-size: 11.2px;
    padding: 11.2px 22.4px;
}

.minipopup-box .mfp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

/* Product card: cart icon must stay clickable (Porto hides it until hover) */
.product-default.inner-icon .btn-icon.js-midas-add-to-cart {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
