/*
Theme Name: PartNexa Twenty Twenty-Four Child
Theme URI: https://example.com/
Description: Customization and performance foundation for the PartNexa site, based on Twenty Twenty-Four.
Author: PartNexa
Template: twentytwentyfour
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: partnexa-twentytwentyfour-child
*/

/*
 * Add site-specific overrides below. Keep changes here rather than editing
 * the parent theme so updates to Twenty Twenty-Four remain safe.
 */

.pn-child-honeypot {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.pn-child-cookie {
    position: fixed;
    z-index: 9999;
    right: 1rem;
    bottom: 1rem;
    max-width: 26rem;
    padding: 1.25rem;
    background: #fff;
    color: #111;
    box-shadow: 0 2px 18px #0003;
}

.pn-child-cookie button,
.pn-child-newsletter button {
    margin: 0.35rem 0.5rem 0.35rem 0;
}

.pn-child-newsletter {
    max-width: 42rem;
}

.pn-child-header-top {
    gap: 1rem 2rem;
}

.pn-child-header-brand {
    flex-shrink: 0;
}

.pn-child-header-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    min-width: 0;
}

.pn-child-live-search {
    position: relative;
    display: flex;
    min-width: min(20rem, 70vw);
}

.pn-child-live-search input[type="search"] {
    width: 100%;
    min-width: 0;
}

.pn-child-live-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    flex-shrink: 0;
}

.pn-child-search-results[hidden] {
    display: none !important;
}

.pn-child-search-results {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 0.35rem);
    inset-inline: 0;
    max-height: 24rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid #dcdcde;
    border-radius: 0.25rem;
    background: #fff;
    color: #1e1e1e;
    box-shadow: 0 4px 16px #0002;
}

.pn-child-search-results-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pn-child-search-result a {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.65rem 0.5rem;
    color: inherit;
    text-decoration: none;
}

.pn-child-search-result a:hover,
.pn-child-search-result a:focus-visible {
    background: #f0f0f1;
}

.pn-child-search-result-type {
    flex: 0 0 auto;
    color: #646970;
    font-size: 0.8em;
}

.pn-child-search-results.pn-child-search-message {
    padding: 0.75rem;
}

.pn-child-header-language {
    display: inline-flex;
    align-items: center;
}

.pn-child-header-account {
    white-space: nowrap;
}

.pn-child-header-navigation {
    margin-block-start: 0.75rem;
}

.pn-child-footer-menu-grid {
    display: grid;
    grid-template-columns: repeat(var(--pn-child-footer-columns, 3), minmax(0, 1fr));
    gap: 1.5rem;
}

.pn-child-footer-menu-group h2 {
    margin-block: 0 0.75rem;
}

.pn-child-footer-menu-group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pn-child-footer-menu-group li + li {
    margin-block-start: 0.5rem;
}

.pn-child-footer-newsletter {
    margin-block: 2rem;
}

.pn-child-footer-newsletter .pn-newsletter-form button {
    min-height: 2.75rem;
}

.pn-child-copyright {
    margin-block-start: 1.5rem;
}

.pn-child-ad {
    width: 100%;
    margin-block: 1.5rem;
    text-align: center;
}

.pn-child-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
}

.pn-child-related-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.pn-child-related-card > a {
    display: block;
    height: 100%;
    padding: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.pn-child-related-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.pn-child-product-picker {
    max-height: 20rem;
    overflow: auto;
    padding: 0.75rem;
    border: 1px solid #c3c4c7;
    background: #fff;
}

.pn-child-width-wide .wp-site-blocks > main,
.pn-child-product-wide .wp-site-blocks > main {
    max-width: min(90vw, 1440px);
    margin-inline: auto;
}

.pn-child-width-full .wp-site-blocks > main {
    max-width: none;
    width: 100%;
}

.pn-child-list-cards .wp-block-post-template,
.pn-child-list-featured .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
}

.pn-child-list-featured .wp-block-post-featured-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.pn-child-list-compact .wp-block-post-template {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pn-child-product-wide .wp-site-blocks > main {
    width: 100%;
}

.pn-child-product-sidebar .wp-site-blocks > main {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 2rem;
}

.pn-child-mobile-toolbar {
    display: none;
}
.pn-child-site-header{
    display: grid;
    gap: 1rem;
    justify-content: space-between;
    grid-auto-flow: column;
}

.pn-child-back-to-top{position:fixed;right:24px;bottom:24px;z-index:9998;display:none;width:44px;height:44px;border:0;border-radius:50%;background:#1d4ed8;color:#fff;font-size:24px;cursor:pointer;box-shadow:0 2px 8px #0003}
.pn-child-back-to-top.is-visible{display:block}
.pn-child-floating{position:fixed;right:24px;top:40%;z-index:9997;max-width:280px}
@media (max-width: 767px) {
    .pn-child-header-top {
        align-items: flex-start;
    }

    .pn-child-header-controls {
        justify-content: flex-start;
        width: 100%;
    }

    .pn-child-live-search {
        min-width: min(100%, 18rem);
        flex: 1 1 100%;
    }

    .pn-child-mobile-toolbar {
        position: fixed;
        z-index: 9996;
        inset-inline: 0;
        bottom: 0;
        display: flex;
        justify-content: center;
        padding: 0.5rem;
        background: #fff;
        box-shadow: 0 -2px 12px #0002;
    }

    body {
        padding-bottom: 4rem;
    }

    .pn-child-product-sidebar .wp-site-blocks > main {
        display: block;
    }

    .pn-child-floating {
        right: 0.5rem;
        max-width: 40vw;
    }
}
