/*
Theme Name: Kinjao
Theme URI: https://kinjao.com
Description: Theme personnalisé Kinjao - Nutrition sportive à base d'insectes comestibles
Version: 2.0
Author: ENTOTECH SAS
Text Domain: kinjao
*/

/* ============================================
   RESET & BASE (from Nantes theme)
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, img, ul, li,
article, aside, footer, header, nav, section { margin: 0; padding: 0; border: 0; }
article, aside, footer, header, nav, section { display: block; }
ul { list-style: none; }

html { -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #2a2a2a;
    line-height: 140%;
    background: #fff;
}

a { text-decoration: none; color: #2a2a2a; }
a:hover { color: #b6a189; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: #2a2a2a;
    margin: 0;
    line-height: 120%;
}
h1 { font-size: 30px; font-weight: 700; text-transform: uppercase; }
h1 span, h1 u { display: block; text-decoration: none !important; font-size: 20px; font-weight: normal; line-height: 120%; }
h2 { font-weight: 500; font-size: 20px; text-transform: uppercase; }
h3 { font-size: 20px; font-weight: 500; text-transform: uppercase; }

img { max-width: 100%; height: auto; display: block; }
p { margin-bottom: 15px; }
.clearfix::after { content: ' '; visibility: hidden; display: block; height: 0; clear: both; }

.grid-container {
    padding: 0 10px;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
}
.grid-container::after { clear: both; content: ''; display: table; }

/* Title with decorative separator */
.title {
    position: relative;
    text-align: center;
    margin: 0 0 50px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #2a2a2a;
}
.title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #b6a189;
    position: absolute;
    bottom: -20px;
    left: 50%;
    margin-left: -30px;
}

/* Buttons (Nantes style) */
.primary-btn {
    display: inline-block;
    text-align: center;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    height: 40px;
    padding: 11px 30px 0 30px;
    color: #2a2a2a;
    border: 2px solid #2a2a2a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    background: none;
    border-radius: 0;
    cursor: pointer;
    transition: all .15s ease-out;
    line-height: 100%;
}
.primary-btn:hover {
    color: #fff;
    background: #2a2a2a;
}

/* ============================================
   TOP BAR (fixed, dark)
   ============================================ */
.top-bar {
    height: 40px;
    background: #313131;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    transition: 0.3s;
}
.top-bar .grid-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}
.top-bar ul { display: flex; }
.top-bar li { float: left; }
.top-bar a {
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 11px;
    display: block;
    height: 40px;
    padding: 10px 15px 0 15px;
    text-transform: uppercase;
    border-left: 1px solid rgba(255,255,255,0.25);
}
.top-bar a:hover { color: #fff; opacity: 0.8; }
.top-bar .social-link a { font-size: 14px; padding: 11px 12px 0 12px; }

@media only screen and (max-width: 960px) {
    .top-bar { display: none; }
}

/* ============================================
   HEADER (sticky below top bar)
   ============================================ */
#header {
    background: #fff;
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid #eee;
    transition: 0.3s;
}
@media only screen and (max-width: 960px) {
    #header { top: 0; position: relative; }
}
#header .grid-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Push page content below fixed header+topbar */
#wrap { padding-top: 120px; }
.home #wrap { padding-top: 120px; }
@media only screen and (max-width: 960px) {
    #wrap, .home #wrap { padding-top: 0; }
}

/* Logo */
.logo-header,
.logo-header .custom-logo-link { display: flex; align-items: center; }
.logo-header img,
.logo-header .custom-logo-link img,
.custom-logo-link img.custom-logo {
    max-height: 50px !important;
    width: auto !important;
    height: auto !important;
}

/* Navigation */
#main-nav { display: flex; align-items: center; }
#main-nav ul { display: flex; gap: 0; }
#main-nav li a {
    display: block;
    padding: 28px 18px;
    color: #2a2a2a;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color .3s;
}
#main-nav li a:hover,
#main-nav li.current-menu-item a { color: #b6a189; }

/* Header icons */
.header-icons { display: flex; align-items: center; gap: 15px; }
.header-icons a { color: #2a2a2a; font-size: 18px; transition: color .3s; }
.header-icons a:hover { color: #b6a189; }
.cart-count {
    background: #b6a189;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: -8px; left: -5px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2a2a2a;
    padding: 10px;
}

/* ============================================
   COVER / HERO (Nantes style - full width image, centered text)
   ============================================ */
.cover {
    max-height: 760px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.cover::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 0 60px 100vw;
    border-color: transparent transparent #fff transparent;
    z-index: 2;
}
.cover > .img {
    display: block;
    line-height: 0;
    position: relative;
}
.cover > .img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
}
.cover > .img img {
    margin: 0 auto;
    width: 100%;
    display: block;
}
.cover .cover-text {
    position: absolute;
    left: 50%;
    top: 30%;
    width: 500px;
    margin-left: -250px;
    z-index: 9;
}
.cover .cover-text h1 {
    font-family: 'Lato', sans-serif;
    font-size: 22px;
    font-weight: 300;
    color: #fff;
    line-height: 1.6;
    margin: 0 0 20px 0;
    text-transform: none;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.cover .cover-text h1 span {
    text-decoration: underline !important;
    font-size: 22px;
}
.cover .cover-text .primary-btn {
    border-color: #fff;
    color: #fff;
}
.cover .cover-text .primary-btn:hover {
    background: #fff;
    color: #2a2a2a;
}

@media only screen and (max-width: 767px) {
    .cover .cover-text {
        top: 10%;
        width: 90%;
        left: 5%;
        margin-left: 0;
        padding: 20px;
        background: rgba(255,255,255,0.4);
    }
    .cover .cover-text h1 { font-size: 18px; color: #2a2a2a; text-shadow: none; }
    .cover .cover-text .primary-btn { border-color: #2a2a2a; color: #2a2a2a; }
}

/* ============================================
   FEATURED SECTION (Products + Blog mixed grid)
   ============================================ */
.featured-content {
    padding: 50px 0 30px;
    text-align: center;
}

.featured-list {
    text-align: left;
}
.featured-list::after { clear: both; content: ''; display: table; }

.featured-list > li,
.featured-list > div {
    float: left;
    display: block;
    margin-right: 2.56%;
    width: 48.72%;
    margin-bottom: 1.8em;
}
.featured-list > li:nth-child(2n),
.featured-list > div:nth-child(2n) {
    margin-right: 0;
}
.featured-list > li:last-child,
.featured-list > div:last-child {
    margin-top: -12%;
}

@media only screen and (max-width: 767px) {
    .featured-list > li,
    .featured-list > div {
        width: auto;
        margin: 0 0 20px 0 !important;
        float: none;
    }
    .featured-list > li:last-child,
    .featured-list > div:last-child { margin-top: 0 !important; }
}

/* Product cards in featured grid */
.featured-list .item-product a.product {
    display: block;
    height: 360px;
    border: 2px solid #23ab97;
    overflow: hidden;
    color: #2a2a2a;
}
.featured-list .item-product a.product:hover { text-decoration: none; }

@media only screen and (max-width: 767px) {
    .featured-list .item-product a.product { height: auto; text-align: center; }
}

.featured-list .item-product .product-img {
    float: left;
    width: 55%;
    max-width: 300px;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.featured-list .item-product .product-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media only screen and (max-width: 960px) {
    .featured-list .item-product .product-img { width: 45%; }
}
@media only screen and (max-width: 767px) {
    .featured-list .item-product .product-img { float: none; width: auto; max-width: none; height: auto; padding: 20px; }
}

.featured-list .item-product .product-info {
    display: block;
    width: 45%;
    float: left;
    text-align: center;
    padding: 80px 35px 0 35px;
}
@media only screen and (max-width: 767px) {
    .featured-list .item-product .product-info { float: none; width: auto; padding: 20px; }
}

.featured-list .item-product .product-info .new {
    text-transform: uppercase;
    color: #23ab97;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}
.featured-list .item-product .product-info h3 {
    text-transform: uppercase;
    margin-bottom: 20px;
    font-size: 18px;
}
.featured-list .item-product .product-info .primary-btn {
    border-color: #23ab97;
    color: #23ab97;
}
.featured-list .item-product .product-info .primary-btn:hover {
    background: #23ab97;
    color: #fff;
}

/* Advice/Blog cards in featured grid */
.featured-list .item-advice a.advice {
    display: block;
    position: relative;
    height: 225px;
    background: #ed504b;
    overflow: hidden;
    text-decoration: none !important;
}
.featured-list .item-advice a.advice:hover { text-decoration: none !important; }

.featured-list .item-advice .info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12% 40px 20px 40px;
    z-index: 9;
    text-align: center;
}
.featured-list .item-advice .info .category {
    display: block;
    text-align: center;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.featured-list .item-advice .info h3 {
    color: #fff;
    text-align: center;
    font-size: 18px;
}
.featured-list .item-advice .img {
    opacity: 0.2;
    transition: all .15s ease-out;
    display: block;
    height: 100%;
}
.featured-list .item-advice .img img {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}
.featured-list .item-advice a.advice:hover .img {
    opacity: 0;
}

/* ============================================
   ADVICE / BLOG SECTION
   ============================================ */
.advice-content {
    margin: 80px 0 20px 0;
    padding: 50px 0 0 0;
    background: #f5f3ef;
    min-height: 500px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.advice-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 60px 100vw 0 0;
    border-color: #fff transparent transparent transparent;
}
.advice-content::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 0 60px 100vw;
    border-color: transparent transparent #fff transparent;
}
.advice-content .title { margin-top: 30px; }

.advice-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: center;
}

.advice-card {
    min-width: 280px;
    max-width: 565px;
    flex: 0 0 auto;
    width: 280px;
}
.advice-card a.advice {
    display: block;
    position: relative;
    height: 225px;
    background: #ed504b;
    overflow: hidden;
    text-decoration: none !important;
}
.advice-card a.advice:hover { text-decoration: none !important; }

.advice-card .info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12% 25px 20px 25px;
    z-index: 9;
    text-align: center;
}
.advice-card .category {
    display: block;
    text-align: center;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.advice-card h3 {
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    text-align: center;
}
.advice-card .img {
    opacity: 0.2;
    transition: all .15s ease-out;
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.advice-card .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}
.advice-card a.advice:hover .img { opacity: 0; }

.advice-content > .grid-container > .primary-btn {
    margin-bottom: 40px;
}

/* ============================================
   SERVICES ROW
   ============================================ */
.services-row {
    padding: 50px 0;
    background: #fff;
    border-top: 1px solid #eee;
}
.services-row .grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.service-item { padding: 15px; }
.service-item .service-icon {
    font-size: 32px;
    color: #b6a189;
    margin-bottom: 12px;
    display: block;
}
.service-item h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.5;
}
.service-item h3 a { color: #2a2a2a; }
.service-item h3 a:hover { color: #b6a189; }

/* ============================================
   FOOTER (dark, Nantes style)
   ============================================ */
#footer {
    background: #222;
    color: #999;
    padding: 0;
    border: none;
}
.logo-footer {
    margin: 40px auto;
    display: block;
    width: 100px;
    text-align: center;
}
.logo-footer img {
    max-height: 50px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    margin: 0 auto;
}
.footer-content {
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
}
.footer-content::after { clear: both; content: ''; display: table; }

.footer-content .block {
    float: left;
    display: block;
    margin-right: 2.56%;
    width: 31.62%;
    position: relative;
    padding: 20px 0;
}
.footer-content .block:last-child { margin-right: 0; }

.footer-content .block::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20px;
    width: 1px;
    height: 100px;
    background: #2a2a2a;
}
.footer-content .block:last-child::after { display: none; }

@media only screen and (max-width: 767px) {
    .footer-content .block { width: auto; padding: 0; float: none; margin: 0 0 20px 0; }
    .footer-content .block::after { display: none; }
}

.footer-content .block h5 {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}
.footer-content .block p {
    font-size: 14px;
    line-height: 2;
}
.footer-content .block a { color: #999; }
.footer-content .block a:hover { color: #b6a189; }

/* Newsletter */
.newsletter-content {
    border-bottom: 1px solid #2a2a2a;
    padding: 30px 20px 15px 20px;
    text-align: center;
}
.newsletter-content h5 {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}
.newsletter-content p {
    color: #999;
    margin-bottom: 20px;
    font-size: 14px;
}
.newsletter-form {
    display: flex;
    justify-content: center;
    max-width: 450px;
    margin: 0 auto;
}
.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0 10px;
    border: 2px solid #2a2a2a;
    background: #333;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    height: 40px;
    outline: none;
}
.newsletter-form input[type="submit"] {
    background: #2a2a2a;
    color: #fff;
    border: none;
    height: 40px;
    padding: 0 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}
.newsletter-form input[type="submit"]:hover { background: #b6a189; }

.footer-text {
    border-bottom: 1px solid #2a2a2a;
    padding: 30px 0;
    font-size: 13px;
    line-height: 1.8;
    color: #777;
}
.footer-text a { color: #b6a189; }

.legal {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #666;
}
.legal a { color: #999; }

/* ============================================
   PAGES
   ============================================ */
.page-header-bar {
    background: #f5f5f5;
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.page-header-bar h1 {
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 3px;
}
.page-content { padding: 60px 0; }
.page-content .entry-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
}
.page-content .entry-content p { margin-bottom: 20px; }
.page-content .entry-content h2 { margin: 30px 0 15px; font-size: 24px; }
.page-content .entry-content h3 { margin: 25px 0 12px; font-size: 20px; }
.page-content .entry-content ul,
.page-content .entry-content ol { margin: 0 0 20px 25px; }
.page-content .entry-content li { margin-bottom: 5px; }

/* ============================================
   BLOG
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 60px 0;
}
.blog-card {
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    transition: box-shadow .3s;
}
.blog-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.blog-card .thumb { height: 200px; overflow: hidden; }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .blog-info { padding: 25px; }
.blog-card .blog-meta {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.blog-card h3 { font-size: 18px; margin-bottom: 10px; }
.blog-card h3 a { color: #2a2a2a; }
.blog-card h3 a:hover { color: #b6a189; }
.blog-card .excerpt { font-size: 14px; color: #777; line-height: 1.7; }

/* Single post */
.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}
.single-post-content .post-meta {
    font-size: 12px; color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.single-post-content h1 { font-size: 32px; margin-bottom: 20px; }
.single-post-content .post-body { font-size: 16px; line-height: 1.9; }
.single-post-content .post-body p { margin-bottom: 20px; }

/* ============================================
   WOOCOMMERCE
   ============================================ */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0;
}
.woocommerce ul.products li.product {
    text-align: center;
    float: none;
    width: auto;
    margin: 0;
}
.woocommerce ul.products li.product .price {
    color: #b6a189;
    font-size: 18px;
    font-weight: 700;
}
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: #2a2a2a;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 25px;
    border: none;
    border-radius: 0;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: #23ab97;
    color: #fff;
}
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info { border-top-color: #b6a189; }
.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before { color: #b6a189; }

/* ============================================
   SEARCH FORM
   ============================================ */
.search-form { display: flex; max-width: 500px; margin: 20px auto; }
.search-form .search-field {
    flex: 1; padding: 0 10px;
    border: 2px solid #2a2a2a;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    height: 40px;
}
.search-form .search-submit {
    background: #2a2a2a; color: #fff;
    border: none; padding: 0 20px; height: 40px; cursor: pointer;
}
.search-form .search-submit:hover { background: #23ab97; }

/* Pagination */
.nav-links { display: flex; justify-content: center; gap: 5px; padding: 30px 0; }
.nav-links a, .nav-links span {
    display: inline-block; padding: 8px 14px;
    border: 1px solid #ddd; color: #2a2a2a; font-size: 14px;
}
.nav-links .current { background: #b6a189; color: #fff; border-color: #b6a189; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .services-row .grid-container { grid-template-columns: repeat(2, 1fr); }
    #main-nav li a { padding: 28px 12px; font-size: 10px; }
}

@media (max-width: 767px) {
    .menu-toggle { display: block; }
    #main-nav {
        display: none;
        position: absolute;
        top: 80px; left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 99;
    }
    #main-nav.active { display: block; }
    #main-nav ul { flex-direction: column; }
    #main-nav li a { padding: 15px 20px; border-bottom: 1px solid #f5f5f5; }
    .services-row .grid-container { grid-template-columns: 1fr; }
    .top-bar .secondary-link { display: none; }
    h1 { font-size: 20px; }
    h1 span { font-size: 16px; }
}

/* Admin bar adjustment */
body.admin-bar .top-bar { top: 32px; }
body.admin-bar #header { top: 72px; }
@media only screen and (max-width: 960px) {
    body.admin-bar .top-bar { top: 0; }
    body.admin-bar #header { top: 0; }
}
