/* NunuFresh AI Article Generator - Frontend Styles */

/* ===================================
   Blog Nav Menu Item
   =================================== */

.main-navigation li.nfaag-blog-menu-item > a {
    color: #000;
}

.main-navigation li.nfaag-blog-menu-item > a:hover {
    color: var(--fm-color-primary);
}

/* ===================================
   Blog Image Fix — Show full images
   =================================== */

/* Archive/listing pages: let images display at natural aspect ratio */
.blog-wrapper .entry-format a.entry-image img,
.blog-wrapper .entry-format img,
.blog-item .entry-format a.entry-image img,
.blog-item .entry-format img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* Single post featured image — full width, no crop */
.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 560px;
    border-radius: 8px;
}

/* Grid view: constrain to consistent card height but show full image */
.farmart-blog-page--grid .blog-wrapper .entry-format a.entry-image {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.farmart-blog-page--grid .blog-wrapper .entry-format a.entry-image img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* Default view first post (full-width) */
.farmart-blog-page--default .blog-wrapper.col-flex-md-12 .entry-format a.entry-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Default view smaller cards */
.farmart-blog-page--default .blog-wrapper.col-flex-md-6 .entry-format a.entry-image img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* List view */
.farmart-blog-page--list .blog-wrapper .entry-format a.entry-image img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* Small-thumb view */
.farmart-blog-page--small-thumb .blog-wrapper .entry-format a.entry-image img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Related posts carousel */
.farmart-post__related .entry-format a.entry-image img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
}

/* ===================================
   Related Products Section
   =================================== */

.nfaag-related-products {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f0faf0 0%, #e8f5e9 100%);
    border: 1px solid #c8e6c9;
    border-radius: 12px;
}

.nfaag-related-products h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 700;
    color: #2e7d32;
}

.nfaag-rp-subtitle {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
}

.nfaag-rp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.nfaag-rp-card {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nfaag-rp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.nfaag-rp-image {
    overflow: hidden;
    background: #fafafa;
}

.nfaag-rp-image img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    padding: 8px;
}

.nfaag-rp-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nfaag-rp-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nfaag-rp-card:hover .nfaag-rp-name {
    color: #2e7d32;
}

.nfaag-rp-price {
    font-size: 15px;
    font-weight: 700;
    color: #2e7d32;
}

.nfaag-rp-price del {
    color: #999;
    font-weight: 400;
    font-size: 13px;
}

.nfaag-rp-price ins {
    text-decoration: none;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .nfaag-rp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .nfaag-related-products {
        padding: 20px 16px;
        margin-top: 24px;
    }

    .nfaag-rp-image img {
        height: 120px;
    }
}
