/* =========================================
   NONG NGHIEP XANH - MAIN STYLE
   Modern E-commerce Design
========================================= */


/* =========================================
   1. HERO SLIDER SECTION (SHOPEE STYLE - THẤP & DÀI)
========================================= */

.hero-slider {
    position: relative;
    width: 100%;
    height: 380px; /* Chiều cao chuẩn phong cách Shopee, gọn gàng và thấy ngay sản phẩm bên dưới */
    overflow: hidden;
    background: #111;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slide a,
.hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Arrows */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(35, 134, 54, 0.85);
}

.hero-prev {
    left: 15px;
}

.hero-next {
    right: 15px;
}

/* Slider Dots */
.hero-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease;
}

.hero-dot.active {
    background: #238636;
    border-color: #238636;
}

/* Progress bar */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.hero-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: #238636;
    transition: width linear;
}


/* =========================================
   2. PRODUCTS SECTION
========================================= */

#products {
    padding: 55px 6%;
    background: #f7f8fa;
}

/* SECTION HEADER */

#products .section-title {
    text-align: center;
    margin-bottom: 30px;
}

#products .section-title h2 {
    color: #25372b;

    font-size: 28px;
    font-weight: 750;
    letter-spacing: -0.5px;

    margin-bottom: 8px;
}

#products .section-title p {
    color: #87918a;
    font-size: 14px;
    line-height: 1.7;
}

/* PRODUCT GRID */

#products .product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}


/* =========================================
   3. PRODUCT CARD
========================================= */

.product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    height: 100%;

    background: #fff;

    border: 1px solid #edf0ed;
    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 2px 8px rgba(20, 40, 25, 0.035);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(20, 40, 25, 0.10);
}

/* PRODUCT IMAGE WRAPPER & IMAGE */

.product-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f7f5;
}

.product-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.035);
}

/* PRODUCT INFO WRAPPER */

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
}

/* PRODUCT TITLE */

.product-card h3 {
    margin: 0 0 2px 0;
    color: #1a241e;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;

    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;

    min-height: calc(1.35em);
}

.product-card h3 a {
    color: inherit;
    text-decoration: none;
}

.product-card h3 a:hover {
    color: #238636;
}

/* PRODUCT DESCRIPTION */

.product-description {
    margin: 0 0 10px 0;
    color: #555e58;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;

    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;

    min-height: calc(1.45em * 2);
}


/* =========================================
   4. PRODUCT PRICE
========================================= */

.product-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 2px;
}

.product-price.has-sale {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.regular-price,
.sale-price {
    color: #e84b35;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.old-price {
    color: #7a827d;
    font-size: 13px;
    font-weight: 500;
    text-decoration: line-through;
}

.discount-badge {
    background: #fff0ed;
    color: #e84b35;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.2;
}

.contact-price {
    color: #238636;
    font-size: 17px;
    font-weight: 700;
}

.product-card .price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding: 2px 0 0;
}

.product-card .price-current {
    color: #e84b35;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.product-card .price-old {
    color: #7a827d;
    font-size: 13px;
    font-weight: 500;
    text-decoration: line-through;
}


/* =========================================
   4.1. SKELETON & STATES LOADING
========================================= */

.product-skeleton {
    pointer-events: none;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-price {
    height: 20px;
    width: 40%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-top: 10px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.product-empty,
.product-error {
    grid-column: 1 / -1;
    padding: 45px 20px;
    text-align: center;
    color: #555e58;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed #edf0ed;
}

.product-error button {
    margin-top: 12px;
    padding: 8px 16px;
    background: #238636;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* VIEW ALL */

.products-more {
    text-align: center;
    margin-top: 35px;
}

.products-more .hero-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 13px 30px;
    background: #238636;
    color: #fff;
    border: 1px solid #238636;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.products-more .hero-btn:hover {
    background: #17652a;
    border-color: #17652a;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}


/* =========================================
   5. CONSULTATION SECTION
========================================= */

.consultation {
    padding: 60px 6%;
}

.consultation-container {
    max-width: 1200px;
    margin: auto;

    display: grid;
    grid-template-columns: 1.25fr 0.9fr;
    align-items: center;
    gap: 60px;
}

.consultation-label {
    display: inline-block;

    color: #238636;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;

    margin-bottom: 15px;
}

.consultation-content h2 {
    max-width: 550px;

    color: #17652a;

    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;

    margin-bottom: 16px;
}

.consultation-content > p {
    max-width: 520px;

    color: #555e58;

    font-size: 15px;
    line-height: 1.9;

    margin-bottom: 25px;
}

.consultation-benefits {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.consultation-benefits div {
    display: flex;
    align-items: center;
    gap: 11px;

    color: #25372b;

    font-size: 14px;
    font-weight: 600;
}

.benefit-icon {
    width: 23px;
    height: 23px;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    color: #fff;
    background: #238636;

    border-radius: 50%;

    font-size: 12px;
}

.consultation-form {
    padding: 32px;

    background: #fff;

    border: 1px solid #edf0ed;
    border-radius: 14px;

    box-shadow: 0 8px 30px rgba(25, 75, 35, 0.07);
}

.consultation-form h3 {
    color: #25372b;

    font-size: 22px;
    font-weight: 700;

    margin-bottom: 7px;
}

.consultation-form > p {
    color: #555e58;

    font-size: 13px;

    margin-bottom: 23px;
}

.consultation-form label {
    display: block;

    color: #25372b;

    font-size: 13px;
    font-weight: 600;

    margin-bottom: 9px;
}

.phone-input {
    display: flex;
    align-items: center;

    height: 50px;

    border: 1px solid #d2ded2;
    border-radius: 7px;

    overflow: hidden;

    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-input:focus-within {
    border-color: #238636;
    box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.09);
}

.phone-input > span {
    padding: 0 13px;

    color: #39443d;

    font-size: 13px;
    white-space: nowrap;

    border-right: 1px solid #edf0ed;
}

.phone-input input {
    flex: 1;
    min-width: 0;
    height: 100%;

    padding: 0 13px;

    color: #1a241e;
    background: transparent;

    border: none;
    outline: none;

    font-size: 14px;
}

.phone-input input::placeholder {
    color: #87918a;
}

.consultation-form button {
    width: 100%;
    height: 49px;

    margin-top: 16px;

    color: #fff;
    background: #238636;

    border: none;
    border-radius: 7px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;

    transition: all 0.25s ease;
}

.consultation-form button:hover {
    background: #17652a;
    box-shadow: 0 5px 15px rgba(35, 134, 54, 0.2);
}

.consultation-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.consultation-form small {
    display: block;

    margin-top: 16px;

    color: #657168;

    text-align: center;
    font-size: 12px;
}

.consultation-message {
    display: none;
    margin-top: 12px;
    padding: 11px;

    border-radius: 6px;
    font-size: 13px;
}

.consultation-message.success {
    display: block;
    color: #17652a;
    background: #e8f5e9;
}

.consultation-message.error {
    display: block;
    color: #d73211;
    background: #fff0ed;
}


/* =========================================
   6. TABLET RESPONSIVE
========================================= */

@media (max-width: 1100px) {
    .hero-slider {
        height: 320px;
    }

    #products {
        padding: 50px 4%;
    }

    #products .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .consultation-container {
        gap: 35px;
    }

}


/* =========================================
   7. MOBILE RESPONSIVE
========================================= */

@media (max-width: 768px) {
    .hero-slider {
        height: 240px;
    }

    #products {
        padding: 40px 3%;
    }

    #products .section-title h2 {
        font-size: 23px;
    }

    #products .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card {
        border-radius: 9px;
    }

    .product-info {
        padding: 12px 12px 14px;
    }

    .product-card h3 {
        font-size: 14px;
    }

    .product-card .product-description {
        font-size: 12px;
    }

    .product-price {
        gap: 6px;
    }

    .regular-price,
    .sale-price {
        font-size: 18px;
    }

    .consultation {
        padding: 45px 5%;
    }

    .consultation-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .consultation-content h2 {
        font-size: 28px;
    }

    .consultation-form {
        padding: 25px;
    }

}


/* =========================================
   8. SMALL MOBILE
========================================= */

@media (max-width: 480px) {
    .hero-slider {
        height: 180px;
    }

    #products {
        padding: 32px 10px;
    }

    #products .section-title {
        margin-bottom: 20px;
    }

    #products .section-title h2 {
        font-size: 20px;
    }

    #products .section-title p {
        font-size: 12px;
    }

    #products .product-grid {
        gap: 9px;
    }

    .product-info {
        padding: 10px 10px 12px;
    }

    .product-card h3 {
        font-size: 13px;
    }

    .product-card .product-description {
        font-size: 11px;
        margin-top: 2px;
    }

    .product-price {
        gap: 5px;
    }

    .regular-price,
    .sale-price {
        font-size: 17px;
    }

    .old-price {
        font-size: 12px;
    }

    .consultation {
        padding: 35px 15px;
    }

    .consultation-content h2 {
        font-size: 24px;
    }

    .consultation-content > p {
        font-size: 13px;
    }

    .consultation-form {
        padding: 22px 17px;
    }

    .consultation-form h3 {
        font-size: 19px;
    }

}


/* =========================================
   9. ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

}