/* Prevent horizontal scroll on entire site */
html {
    overflow-x: hidden;
}

/* ASE Navbar Search — Pro wide-bar layout */
.ase-nav-search {
    flex: 1 1 auto;
    max-width: 520px;
    margin-left: 16px;
}

.ase-search-form {
    display: flex;
    align-items: center;
    gap: 0;
}

.ase-search-input {
    flex: 1 1 auto;
    padding: 0 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px 0 0 8px;
    outline: none;
    height: 44px;
    box-sizing: border-box;
    background: #f7f8f9;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.ase-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.ase-search-input:focus {
    border-color: #1e73be;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.12);
}

.ase-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    height: 44px;
    border: 2px solid #1e73be;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #1e73be;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s;
    flex-shrink: 0;
}

.ase-search-submit:hover {
    background: #155d9e;
}

.ase-search-submit svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Tighter menu link spacing */
body .main-navigation .main-nav ul li a {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

body .main-navigation .menu-bar-item > a {
    padding-left: 10px;
    padding-right: 10px;
}

body .main-navigation .main-nav ul li.menu-item-has-children > a {
    padding-right: 0;
}

body .menu-item-has-children .dropdown-menu-toggle {
    padding-right: 10px;
    padding-left: 6px;
}

/* Nav vertical centering + gap */
body .main-navigation .inside-navigation {
    gap: 8px;
}

/* Mobile */
@media (max-width: 768px) {
    .ase-nav-search {
        flex: 1 1 100%;
        max-width: none;
        margin-left: 0;
        margin-top: 8px;
        padding: 0;
        order: 10;
    }

    .ase-search-form {
        width: 100%;
    }

    .ase-search-input {
        min-width: 0;
        width: 100%;
        max-width: none;
    }

    body.woocommerce div.product div.images,
    body.woocommerce div.product div.summary.entry-summary {
        float: none;
        width: 100%;
        margin-right: 0;
    }
}

/* Product page — side-by-side gallery + summary */
/* Body prefix beats GP Premium's equal-specificity rules that load after ours */
body.woocommerce div.product div.images {
    width: 48%;
    float: left;
    margin-right: 4%;
    overflow: hidden;
}

body.woocommerce div.product div.summary.entry-summary {
    width: 48%;
    float: right;
    overflow: hidden;
}

/* Clamp product page content to prevent horizontal overflow */
body.woocommerce div.product,
body.woocommerce div.product .entry-content,
body.woocommerce div.product .woocommerce-tabs {
    overflow-x: hidden;
}

body.woocommerce div.product .variations td.value {
    max-width: 100%;
    overflow: hidden;
}

body.woocommerce div.product table.variations {
    width: 100%;
    table-layout: fixed;
}

body.woocommerce div.product .variations select {
    max-width: 100%;
}

body.woocommerce div.product form.cart {
    max-width: 100%;
    overflow: hidden;
}

/* Product page sections */
.ase-section {
    clear: both;
    margin: 30px 0;
    padding: 0;
}

.ase-section h2 {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* Reviews section — hide tab bar, match section heading style */
.woocommerce div.product .woocommerce-tabs ul.tabs,
.woocommerce div.product .woocommerce-tabs ul.wc-tabs {
    display: none !important;
}

/* Hide default WooCommerce description tab — we render it in spec row */
.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel--description {
    display: none !important;
}

/* Short description — moved after title */
.woocommerce-product-details__short-description {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 10px;
}

.woocommerce-Reviews-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* Cross Reference Table */
.ase-crossref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ase-crossref-table th {
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    background: #f7f8f9;
    border-bottom: 2px solid #ddd;
}

.ase-crossref-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

/* Application Table */
.ase-application-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.ase-application-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 700px;
}

.ase-application-table th {
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    background: #f7f8f9;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.ase-application-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

/* Product listing — hide rating, price, add-to-cart on shop/category grids */
.woocommerce ul.products li.product .star-rating,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .button.product_type_variable {
    display: none !important;
}

/* Alternative Table */
.ase-alternative-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ase-alternative-table th {
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    background: #f7f8f9;
    border-bottom: 2px solid #ddd;
}

.ase-alternative-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

/* Scrollable tables — max-height for ~10 rows */
.ase-table-scroll {
    max-height: 440px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.ase-table-scroll thead th {
    position: sticky;
    top: 0;
    background: #f7f8f9;
    z-index: 1;
    box-shadow: 0 1px 0 #ddd;
}
