/*
Theme Name: CustomPanda
Theme URI: https://www.custompanda.com
Author: CustomPanda
Author URI: https://www.custompanda.com
Description: Custom WordPress theme for custompanda.com — 1:1 replica of the Xunrui CMS design (lapel pins, embroidered patches, woven labels manufacturer).
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: custompanda
*/

/* =========================================================
   Desktop navigation dropdowns
   Independent from the generated Tailwind utilities so the
   menu keeps working even when arbitrary-value classes are absent.
   ========================================================= */
#main-menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible !important;
}
#main-menu > ul,
#main-menu > ul > li {
    overflow: visible !important;
}
@media (min-width: 1024px) {
    #main-menu .cp-nav-item {
        position: relative;
    }
    #main-menu .cp-nav-trigger {
        cursor: pointer;
    }
    #main-menu .cp-nav-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 10000;
        width: max-content;
        min-width: 500px;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        margin: 0;
        padding: 20px;
        background: #ffffff;
        border-top: 3px solid #17ccac;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    }
    #main-menu .cp-nav-item:hover > .cp-nav-dropdown,
    #main-menu .cp-nav-item:focus-within > .cp-nav-dropdown {
        display: block;
    }
    #main-menu .cp-nav-dropdown > ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 24px;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    #main-menu .cp-nav-dropdown article {
        min-width: 0;
    }
    #main-menu .cp-nav-dropdown a {
        text-decoration: none;
    }
}
@media (min-width: 1280px) {
    #main-menu .cp-nav-dropdown > ul {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   Blog pagination — clean button/pill design
   ========================================================= */
body .cp-pagination {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 48px 0 68px;
    padding: 0 20px;
    clear: both;
}
body .cp-pagination .cp-pager {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 9px;
    list-style: none;
    background: #f7f9fb;
    border: 1px solid #e8edf2;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(27, 42, 78, 0.08);
}
body .cp-pagination .cp-pager li {
    display: block;
    float: none;
    margin: 0;
    padding: 0;
    list-style: none;
    background: transparent;
    border: 0;
}
body .cp-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #43506a;
    font: 600 14px/1 Montserrat, Arial, sans-serif;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
body .cp-pagination a.page-numbers {
    background: #ffffff;
    border-color: #e6ebf0;
}
body .cp-pagination a.page-numbers:hover,
body .cp-pagination a.page-numbers:focus {
    border-color: #17ccac;
    background: #effbf8;
    color: #079a83;
    text-decoration: none;
    box-shadow: 0 5px 14px rgba(23, 204, 172, 0.16);
    transform: translateY(-2px);
}
body .cp-pagination .page-numbers.current {
    border-color: #17ccac;
    background: linear-gradient(135deg, #17ccac 0%, #0cae98 100%);
    color: #ffffff;
    cursor: default;
    box-shadow: 0 7px 18px rgba(23, 204, 172, 0.28);
}
body .cp-pagination .page-numbers.prev,
body .cp-pagination .page-numbers.next {
    padding: 0 16px;
    color: #1b2a4e;
    font-weight: 700;
}
body .cp-pagination .page-numbers.prev > span[aria-hidden="true"],
body .cp-pagination .page-numbers.next > span[aria-hidden="true"] {
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 0;
    position: relative;
    top: -1px;
}
body .cp-pagination .page-numbers.dots {
    min-width: 26px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    box-shadow: none;
    letter-spacing: 1px;
}
body .cp-pagination .cp-page-word {
    font-size: 13px;
    letter-spacing: .01em;
}
@media (max-width: 600px) {
    body .cp-pagination {
        margin: 34px 0 48px;
        padding: 0 10px;
    }
    body .cp-pagination .cp-pager {
        gap: 4px;
        padding: 6px;
        border-radius: 14px;
    }
    body .cp-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 9px;
        border-radius: 10px;
        font-size: 13px;
    }
    body .cp-pagination .page-numbers.prev,
    body .cp-pagination .page-numbers.next {
        padding: 0 10px;
    }
    body .cp-pagination .cp-page-word {
        display: none;
    }
}
