/*
Theme Name: Nutstore Cenote Child
Theme URI: https://blog.jianguoyun.com/en/
Description: Nutstore's branded child theme built on the Cenote WordPress theme.
Author: Nutstore
Version: 1.1.2
Requires at least: 5.8
Requires PHP: 7.4
Template: cenote
Text Domain: nutstore-cenote-child
*/

/* ==========================================================
   NUTSTORE BLOG - CUSTOM STYLES
   Parent framework: Cenote
   Target environment: WordPress 5.8 / PHP 7.4
   ========================================================== */

/* 1. SINGLE POST - ARTICLE LAYOUT */
/* Size the outer containers once; nested widths would double the mobile gutters. */
.single-post #breadcrumb .tg-container,
.single-post #content > .tg-container {
    width: calc(100% - 40px);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.single-post #main > .hentry > .entry-thumbnail {
    display: block;
    float: none;
    clear: both;
    position: relative;
    left: auto;
    right: auto;
    width: 100%;
    max-width: none;
    margin: 0 0 30px;
}

.single-post #main > .hentry > .entry-thumbnail img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
}

.single-post .entry-content {
    font-size: 17px;
    line-height: 1.8;
    color: #363b40;
}

.single-post .entry-content p,
.single-post .entry-content li {
    font-size: inherit;
    line-height: inherit;
}

.single-post #main > .hentry .entry-title {
    font-size: 36px;
    line-height: 1.3;
}

.single-post .entry-content h2 {
    font-size: 28px;
    line-height: 1.4;
}

.single-post .entry-content h3 {
    font-size: 22px;
    line-height: 1.4;
}

/* 2. SITE BRANDING */
.site-title a {
    font-size: 38px !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

.site-description {
    font-size: 16px !important;
    line-height: 1.5;
}

/* 3. SITE LOGO */
.site-branding .custom-logo,
.custom-logo-link img {
    max-width: 150px !important;
    max-height: 110px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 4. POST META - DATE SEPARATOR */
.entry-meta .posted-on {
    padding-left: 0 !important;
    white-space: nowrap;
}

.entry-meta .posted-on::before {
    content: "\2014" !important;
    position: static !important;
    display: inline !important;
    width: auto !important;
    height: auto !important;
    margin: 0 10px !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    top: auto !important;
    left: auto !important;
    vertical-align: baseline !important;
    color: #107FFC !important;
}

/* 5. HEADER CLEANUP */
.tg-header-top {
    display: none !important;
}

/* 6. INLINE HEADER SEARCH */
.tg-site-header .header-bottom-bottom .tg-container {
    gap: 22px;
}

.tg-site-header:not(.tg-site-header--left) .header-bottom-bottom .main-navigation {
    flex: 1 1 auto;
    min-width: 0;
}

.tg-site-header--left .header-bottom-bottom .main-navigation {
    flex: 1 1 auto;
    min-width: 0;
}

.nutstore-header-action {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 260px !important;
    width: 260px;
    min-width: 0;
}

.nutstore-header-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 220px;
}

.nutstore-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
}

.nutstore-search-form label {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.nutstore-search-form label::before {
    display: none !important;
    content: none !important;
}

.nutstore-search-form .search-field {
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 48px 0 12px;
    border: 1px solid #d8e0e8;
    border-radius: 6px;
    background: #ffffff;
    color: #363b40;
    font-size: 14px;
    font-style: normal;
    line-height: 1.4;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.nutstore-search-form .search-field:focus {
    border-color: #107FFC;
    outline: 2px solid rgba(16, 127, 252, 0.16);
    outline-offset: 1px;
}

.nutstore-search-form .search-field::placeholder {
    color: #737d87;
    opacity: 1;
}

.nutstore-search-form .search-submit {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #107FFC;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nutstore-search-form .search-submit:hover,
.nutstore-search-form .search-submit:focus {
    background: #0066CC;
    color: #ffffff;
}

.nutstore-search-form .search-submit i {
    font-size: 15px;
    line-height: 1;
}

.nutstore-header-action .tg-header-action-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 20px;
    width: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nutstore-header-action .tg-header-action-menu li.tg-mobile-menu-toggle {
    margin: 0;
    padding: 0;
}

.nutstore-header-action .tg-mobile-menu-toggle:focus {
    outline: 2px solid #107FFC;
    outline-offset: 5px;
}

/* Keep Cenote's overlay markup inert; the inline form is the only search UI. */
.cenote-search-form,
.tg-header-action-menu .tg-search-toggle {
    display: none !important;
}

/* Do not repeat the search field in Cenote's sticky header. */
.cenote-header-sticky .nutstore-header-search {
    display: none !important;
}

/* 7. FOOTER COPYRIGHT ALIGNMENT */
.tg-footer-bottom-container {
    justify-content: center !important;
}

.tg-footer-bottom-left {
    flex: 1 1 100%;
    width: 100%;
    text-align: center !important;
}

.tg-footer-bottom-left .site-info {
    text-align: center !important;
}

.tg-footer-bottom-right {
    display: none !important;
}

/* 8. MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .single-post #breadcrumb .tg-container,
    .single-post #content > .tg-container {
        width: calc(100% - 32px);
    }

    .single-post #main > .hentry > .entry-thumbnail {
        margin-bottom: 24px;
    }

    .single-post #main > .hentry .entry-title {
        font-size: 28px;
    }

    .single-post .entry-content {
        font-size: 16px;
    }

    .site-title a {
        font-size: 28px !important;
    }

    .site-description {
        font-size: 14px !important;
    }

    .site-branding .custom-logo,
    .custom-logo-link img {
        max-width: 110px !important;
        max-height: 90px !important;
    }

    .tg-site-header .header-bottom-bottom .tg-container {
        gap: 0;
    }

    .tg-site-header .header-bottom-bottom .tg-social-menu-navigation {
        display: none !important;
    }

    .tg-site-header .header-bottom-bottom .nutstore-header-action {
        display: flex !important;
        flex: 1 1 100% !important;
        width: 100%;
        max-width: none;
        justify-content: space-between;
        gap: 12px;
    }

    .nutstore-header-search {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }

    .nutstore-header-action .tg-header-action-menu {
        flex: 0 0 20px;
        width: 20px;
    }
}

@media (max-width: 480px) {
    .nutstore-search-form .search-field {
        height: 38px;
        font-size: 14px;
    }

    .nutstore-search-form .search-submit {
        width: 34px;
        height: 34px;
    }
}
