﻿/* =========================================================
   1. FONT & MÀU CHUNG
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-green: #28a745;
    --earth-brown: #8B4513;
    --nshk-green-dark: #14532d;
    --nshk-green: #16a34a;
    --nshk-green-soft: #bbf7d0;
    --nshk-bg-soft: #ecfdf3;
    --nshk-orange: #f59e0b;
    --nshk-orange-deep: #ea580c;
    --nshk-text-muted: #4b5563;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8fcf8;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Quicksand', sans-serif;
    color: #28a745;
}

.text-success {
    color: var(--primary-green) !important;
}

.bg-success {
    background-color: var(--primary-green) !important;
}

/* =========================================================
   2. BUTTON
   ========================================================= */
.btn-success {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    transition: all 0.3s ease;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    position: relative;
}

    .btn-success:hover {
        background-color: #218838;
        border-color: #1e7e34;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .btn-success.cta-button:hover {
        animation: pulse 1s infinite;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.btn-outline-success {
    color: var(--primary-green);
    border-color: var(--primary-green);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-outline-success:hover {
        background-color: var(--primary-green);
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

/* Link trong navbar Bootstrap view khác (nếu có) */
.fixed-top {
    z-index: 1030;
}

.nav-link {
    font-weight: 500;
    color: #555 !important;
    transition: color 0.3s ease;
}

    .nav-link:hover,
    .nav-link.active {
        color: var(--primary-green) !important;
        border-bottom: 2px solid var(--primary-green);
        padding-bottom: calc(0.5rem - 2px);
    }

/* Nếu cần đẩy nội dung xuống dưới header */
.main-content {
    padding-top: 16px;
}

/* =========================================================
   3. HERO BANNER CHUNG (TRANG CHỦ)
   ========================================================= */
.hero-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 480px;
    padding: 80px 0;
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}

    .hero-banner::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(40, 167, 69, 0.15);
        z-index: 1;
    }

    .hero-banner .container {
        position: relative;
        z-index: 2;
        padding: 4rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(2px);
        border-radius: 10px;
        max-width: 960px;
    }

    .hero-banner h1 {
        font-size: 4rem;
        font-weight: 800;
        color: #fff;
    }

    .hero-banner p {
        font-size: 1.5rem;
        color: #e0ffe0;
    }

/* =========================================================
   4. PRODUCT CARD
   ========================================================= */
.product-card {
    border: 1px solid #e0ffe0;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    overflow: hidden;
}

    .product-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 40px rgba(40, 167, 69, 0.3);
        border-color: var(--primary-green);
    }

    .product-card .card-img-top,
    .product-card img {
        width: 100% !important;
        height: 250px !important;
        object-fit: cover !important;
        transition: transform 0.4s ease;
        border-radius: 15px 15px 0 0 !important;
    }

    .product-card:hover .card-img-top {
        transform: scale(1.05);
    }

    .product-card .product-price {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--earth-brown);
    }

/* =========================================================
   5. LỢI ÍCH / CAM KẾT / FEATURE CARD
   ========================================================= */
.rounded-3 {
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

    .rounded-3:hover {
        border: 1px solid var(--primary-green);
        background-color: #e6fae6 !important;
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
    }

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd;
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(40, 167, 69, 0.15) !important;
        border-color: var(--primary-green) !important;
    }

/* Khối promo */
.promo-block {
    color: #fff;
    padding: 3rem;
    border-radius: 15px;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-green) !important;
}

    .promo-block::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
    }

    .promo-block * {
        position: relative;
        z-index: 2;
    }

/* Section danh mục */
.section-category {
    padding-top: 2rem !important;
}

/* =========================================================
   6. CÂU CHUYỆN NÔNG TRẠI
   ========================================================= */
.farm-story-section {
    background-color: #e6fae6;
    padding: 5rem 0;
    border-radius: 0;
}

    .farm-story-section .farm-image {
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        transition: transform 0.4s ease;
    }

        .farm-story-section .farm-image:hover {
            transform: scale(1.02);
        }

    .farm-story-section .list-unstyled {
        font-size: 1.1rem;
        line-height: 1.8;
    }

/* =========================================================
   7. CAROUSEL / SLIDER CONTROL
   ========================================================= */
.carousel-control-prev,
.carousel-control-next {
    width: 3rem;
    height: 3rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        opacity: 1;
    }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-green);
    border-radius: 50%;
    padding: 0.5rem;
    height: 100%;
    width: 100%;
}

.carousel-indicators button {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50%;
    background-color: #aaa !important;
    opacity: 0.5;
    transition: opacity 0.3s, background-color 0.3s;
    margin: 0 5px;
}

    .carousel-indicators button.active {
        background-color: var(--primary-green) !important;
        opacity: 1;
    }

/* =========================================================
   8. BRAND TEXT BÊN CẠNH LOGO
   ========================================================= */
.brand__text {
    line-height: 1.25;
}

.brand__name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #166534;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.brand__tagline-main {
    font-size: 15px;
    font-weight: 700;
    color: #16a34a;
}

    .brand__tagline-main span {
        color: #22c55e;
        font-style: italic;
    }

.brand__tagline-sub {
    margin-top: 1px;
    font-size: 11px;
    color: #4b5563;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 575px) {
    .brand__tagline-sub {
        display: none;
    }
}

/* =========================================================
   9. HEADER NÔNG SẢN HOÀ KHƯƠNG – LAYOUT NGOÀI SITE
   ========================================================= */

/* Banner rau củ full nền */
.ns-header {
    position: relative;
    width: 100%;
    min-height: 150px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: visible;
    z-index: 50;
}

.ns-header-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(.3px);
    z-index: 0;
}

/* Hàng chính: logo+slogan bên trái, menu bên phải */
.ns-header-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 56px;
    box-sizing: border-box;
}

/* Cột trái: logo + slogan + pill */
.ns-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

.ns-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ns-logo {
    max-height: 180px;
    width: auto;
    display: block;
}

.ns-slogan {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ns-slogan-main {
    font-size: 22px;
    font-weight: 800;
    color: #166534;
    line-height: 1.2;
}

    .ns-slogan-main span {
        color: #15803d;
    }

.ns-slogan-sub {
    font-size: 14px;
    color: #14532d;
    opacity: .95;
}

/* Pill liên hệ mua hàng */
.ns-contact-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    white-space: nowrap;
}

/* Cột phải: menu + nút */
.ns-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    min-width: 0;
}

/* Menu ngang */
.ns-nav {
    display: flex;
    flex-wrap: nowrap; /* PC: luôn 1 hàng */
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.ns-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    background: rgba(255,255,255,0.96);
    color: #166534;
    border: 2px solid #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transition: .18s ease;
}

    .ns-nav-link:hover {
        background: #fff;
        color: #047857;
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(0,0,0,0.30);
    }

    .ns-nav-link.active {
        background: #22c55e;
        color: #fff;
    }

/* Nút Đăng nhập / Giỏ hàng */
.ns-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Nút base */
.ns-btn-login,
.ns-btn-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    outline: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

/* Đăng nhập */
.ns-btn-login {
    background: linear-gradient(135deg,#ecfdf5,#bbf7d0);
    color: #166534;
    box-shadow: 0 4px 12px rgba(22,163,74,0.20);
    border: 1px solid #22c55e;
}

    .ns-btn-login:hover {
        background: linear-gradient(135deg,#bbf7d0,#4ade80);
        color: #064e3b;
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(22,163,74,0.35);
    }

/* Giỏ hàng */
.ns-btn-cart {
    background: linear-gradient(135deg,#4ade80,#16a34a,#15803d);
    color: #fff;
    box-shadow: 0 8px 22px rgba(22,163,74,0.55);
}

    .ns-btn-cart::before {
        content: "";
        position: absolute;
        inset: 2px 4px auto 4px;
        height: 50%;
        border-radius: 999px;
        background: linear-gradient(to bottom,rgba(255,255,255,0.65),transparent);
        opacity: .85;
        pointer-events: none;
    }

    .ns-btn-cart > *,
    .ns-btn-login > * {
        position: relative;
        z-index: 1;
    }

    .ns-btn-cart:hover {
        background: linear-gradient(135deg,#86efac,#22c55e,#16a34a);
        transform: translateY(-2px);
        box-shadow: 0 10px 26px rgba(22,163,74,0.65);
    }

    .ns-btn-cart .badge {
        border: 1px solid #16a34a;
    }

/* =========================================================
   10. RESPONSIVE HERO & HEADER
   ========================================================= */

/* Desktop lớn ≥ 1200px: hero gọn, menu 1 hàng bên phải */
@media (min-width: 1200px) {
    .ns-header-inner {
        max-width: 1400px;
        padding: 24px 40px 22px;
    }

    .ns-logo {
        max-height: 170px;
    }

    .hero-banner {
        min-height: 440px;
        padding: 70px 0;
    }

        .hero-banner .container {
            padding: 3rem 3rem;
        }
}

/* Tablet & laptop nhỏ */
@media (max-width: 991.98px) {
    .hero-banner {
        min-height: 380px;
        padding: 60px 0;
        background-attachment: scroll;
    }

        .hero-banner .container {
            padding: 2.5rem 2rem;
        }

        .hero-banner h1 {
            font-size: 2.6rem;
        }

        .hero-banner p {
            font-size: 1.1rem;
        }

    .ns-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 16px 18px;
    }

    .ns-header-left,
    .ns-header-right {
        width: 100%;
    }

    .ns-logo {
        max-height: 130px;
    }

    .ns-nav {
        flex-wrap: wrap; /* cho phép menu xuống dòng */
        justify-content: flex-start;
    }
}

/* Mobile ngang / điện thoại lớn */
@media (max-width: 767.98px) {
    .hero-banner {
        min-height: 360px;
        padding: 50px 0;
    }

        .hero-banner .container {
            padding: 2rem 1.5rem;
            border-radius: 12px;
        }

        .hero-banner h1 {
            font-size: clamp(2.1rem, 6vw, 2.5rem);
            text-align: center;
        }

        .hero-banner p {
            font-size: 1rem;
            text-align: center;
        }

        .hero-banner .cta-button {
            display: inline-flex;
            margin-top: 1rem;
        }
}

/* Mobile dọc */
@media (max-width: 575.98px) {
    .hero-banner {
        min-height: 320px;
        padding: 44px 0;
    }

        .hero-banner .container {
            padding: 1.8rem 1.2rem;
            border-radius: 10px;
            border-width: 0;
        }

        .hero-banner h1 {
            font-size: clamp(1.9rem, 8vw, 2.2rem);
        }

        .hero-banner p {
            font-size: 0.95rem;
        }

    .ns-header-inner {
        align-items: flex-start;
        gap: 10px;
        padding: 12px 12px 14px;
    }

    .ns-nav {
        justify-content: center;
        gap: 8px;
    }

    .ns-nav-link {
        min-width: 120px;
        padding: 8px 16px;
        font-size: 13px;
    }

    .ns-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .ns-contact-pill {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding-inline: 14px;
        white-space: normal;
    }
}
/* =========================================================
   OVERRIDE HEADER DESKTOP CHO GIỐNG BẢN CŨ
   ========================================================= */
@media (min-width: 1200px) {

    /* Trải full ngang, bỏ max-width, canh từ trái qua phải như header cũ */
    .ns-header-inner {
        max-width: none;
        width: 100%;
        margin: 0;
        padding-top: 28px;
        padding-bottom: 22px;
        padding-left: 24px;
        padding-right: 24px;
        justify-content: flex-start; /* giống bản cũ */
        gap: 72px; /* khoảng cách logo ↔ menu như cũ */
    }

    /* Cột phải (menu + nút) canh trái, không bị dồn về giữa/phải */
    .ns-header-right {
        justify-content: flex-start; /* giống bản cũ */
    }

    /* Logo to bằng bản cũ */
    .ns-logo {
        max-height: 200px;
    }
}
/* =========================================================
   TINH CHỈNH: ĐỂ LỘ RÕ NÚT "GIỎ HÀNG" TRÊN PC (≥1200px)
   ========================================================= */
@media (min-width: 1200px) {

    /* Giảm khoảng cách giữa các phần trong cột phải */
    .ns-header-right {
        gap: 10px;
    }

    /* Menu chính: nút gọn lại 1 chút để tiết kiệm chiều ngang */
    .ns-nav {
        gap: 8px;
    }

    .ns-nav-link {
        min-width: 110px; /* trước ~130px */
        padding: 8px 16px; /* trước 9–10px 18–20px */
        font-size: 13px;
    }

    /* Nút Đăng nhập & Giỏ hàng cũng gọn hơn chút */
    .ns-btn-login,
    .ns-btn-cart {
        padding: 8px 18px;
        font-size: 13px;
    }
}