/* =========================================================
   FARMERKART PRODUCT DETAILS PAGE
========================================================= */

.product-details-page {
    width: 100%;
    background: #f5f7f8;
    min-height: 100vh;
}


/* Main product section */

.product-main-section {
    width: 100%;
    padding: 25px 0 30px;
}


/* Main product layout */

.product-layout {
    width: 92%;
    max-width: 1400px;

    margin: 0 auto;

    display: grid;

    grid-template-columns: minmax(0, 55%) minmax(0, 45%);

    gap: 30px;

    align-items: start;

    box-sizing: border-box;
}


/* Left */

.product-left {
    width: 100%;
    min-width: 0;
}


/* Right */

.product-right {
    width: 100%;
    min-width: 0;
}


/* Extra sections */

.product-extra-section {
    width: 92%;
    max-width: 1400px;

    margin: 0 auto 30px;
}


/* =========================================================
   PRODUCT NOT FOUND
========================================================= */

.product-not-found {
    min-height: 500px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 50px 20px;

    background: #f5f7f8;
}


.not-found-box {
    width: 100%;
    max-width: 500px;

    padding: 50px 30px;

    background: #fff;

    border-radius: 16px;

    text-align: center;

    box-shadow: 0 5px 25px rgba(0,0,0,.08);
}


.not-found-icon {
    font-size: 55px;

    color: #2E7D32;

    margin-bottom: 20px;
}


.not-found-box h1 {
    margin: 0 0 10px;

    font-size: 30px;

    color: #222;
}


.not-found-box p {
    margin: 0 0 25px;

    color: #666;
}


.back-home-btn {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 12px 22px;

    background: #2E7D32;

    color: #fff;

    border-radius: 8px;

    text-decoration: none;

    font-weight: 600;
}


.back-home-btn:hover {
    background: #256428;
}


/* =========================================================
   PRODUCT PAGE RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-main-section {
        padding-top: 15px;
    }

}


@media (max-width: 768px) {

    .product-layout,
    .product-extra-section {
        width: 94%;
    }

    .product-main-section {
        padding-bottom: 20px;
    }

}


@media (max-width: 480px) {

    .product-layout,
    .product-extra-section {
        width: 94%;
    }

}
/* =========================================================
   FARMERKART - PAGES.CSS
   Search Page + Product Details Page
   Clean Version
========================================================= */


/* =========================================================
   PRODUCT DETAILS PAGE
========================================================= */

/*
   Your current product-details.php uses:

   <section class="container">
       <div class="product-layout">
           ...
       </div>
   </section>
*/

/* Remove the global section padding problem
   only when this container contains product details */

section.container:has(.product-layout) {
    padding-top: 25px;
    padding-bottom: 60px;
}


/* =========================================================
   MAIN PRODUCT LAYOUT
========================================================= */

.product-layout {
    width: 92%;
    max-width: 1400px;

    margin: 0 auto;

    display: grid;

    grid-template-columns: 55% 45%;

    gap: 30px;

    align-items: start;

    box-sizing: border-box;
}


/* =========================================================
   PRODUCT GALLERY
========================================================= */

.product-gallery {
    width: 100%;

    display: grid;

    grid-template-columns: 80px minmax(0, 1fr);

    gap: 15px;

    margin: 0;

    padding: 0;

    box-sizing: border-box;
}


/* =========================================================
   MAIN PRODUCT IMAGE
========================================================= */

.main-image {
    grid-column: 2;
    grid-row: 1;

    width: 100%;

    height: 540px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #fff;

    border: 1px solid #e5e5e5;

    border-radius: 12px;

    overflow: hidden;

    padding: 10px;

    box-sizing: border-box;
}


.main-image img {
    width: 100%;

    height: 100%;

    object-fit: contain;

    display: block;
}


/* =========================================================
   PRODUCT THUMBNAILS
========================================================= */

.thumbnail-gallery {
    grid-column: 1;
    grid-row: 1;

    width: 80px;

    display: flex;

    flex-direction: column;

    gap: 12px;

    margin: 0;

    padding: 0;
}


.thumbnail-gallery img {
    width: 70px;

    height: 70px;

    object-fit: cover;

    background: #fff;

    border: 2px solid #ddd;

    border-radius: 8px;

    cursor: pointer;

    transition: border-color .2s ease;
}


.thumbnail-gallery img:hover {
    border-color: #2E7D32;
}


.thumbnail-gallery img.active,
.thumbnail-gallery .thumb.active {
    border-color: #2E7D32;
}


/* =========================================================
   PRODUCT INFORMATION
========================================================= */

.product-layout > .product-info {
    width: 100%;

    display: flex;

    flex-direction: column;

    gap: 16px;

    margin: 0;

    padding: 5px 15px;

    box-sizing: border-box;
}


/* Category */

.product-category {
    color: #2E7D32;

    font-size: 14px;

    font-weight: 600;

    margin: 0;
}


/* Product name */

.product-title {
    margin: 0;

    font-family: 'Poppins', sans-serif;

    font-size: 30px;

    font-weight: 600;

    line-height: 1.35;

    color: #212121;
}


/* Rating */

.product-rating {
    display: flex;

    align-items: center;

    gap: 10px;

    margin: 0;
}


.stars {
    color: #ff9800;

    font-size: 18px;
}


.rating-text {
    color: #666;

    font-size: 15px;
}


/* =========================================================
   PRICE
========================================================= */

.product-price {
    display: flex;

    align-items: center;

    gap: 12px;

    flex-wrap: wrap;

    margin: 5px 0;
}


.sale-price {
    font-size: 38px;

    font-weight: 700;

    color: #2E7D32;
}


.original-price {
    font-size: 17px;

    color: #999;

    text-decoration: line-through;
}


.discount {
    padding: 5px 10px;

    background: #E8F5E9;

    color: #2E7D32;

    border-radius: 20px;

    font-size: 13px;

    font-weight: 600;
}


/* =========================================================
   STOCK
========================================================= */

.product-stock {
    color: #2E7D32;

    font-size: 16px;

    font-weight: 600;

    margin: 0;
}


/* =========================================================
   UNIT / WEIGHT
========================================================= */

.weight-section {
    margin: 0;
}


.weight-section h4 {
    margin: 0 0 8px;

    font-size: 16px;

    color: #222;
}


.weight-buttons {
    display: flex;

    gap: 10px;

    flex-wrap: wrap;
}


.weight {
    min-width: 65px;

    padding: 10px 18px;

    border: 1px solid #2E7D32;

    border-radius: 7px;

    background: #fff;

    color: #2E7D32;

    font-size: 14px;

    cursor: pointer;
}


.weight:hover,
.weight.active {
    border-color: #2E7D32;

    background: #F1F8E9;

    color: #2E7D32;
}


/* =========================================================
   QUANTITY
========================================================= */

.quantity-section {
    margin: 0;
}


.quantity-section h4 {
    margin: 0 0 8px;

    font-size: 16px;

    color: #222;
}


.quantity-box {
    width: 150px;

    height: 44px;

    display: flex;

    align-items: center;

    border: 1px solid #ccc;

    border-radius: 7px;

    overflow: hidden;

    background: #fff;
}


.quantity-box button {
    width: 45px;

    height: 44px;

    padding: 0;

    border: none;

    background: #f5f5f5;

    font-size: 20px;

    color: #333;

    cursor: pointer;
}


.quantity-box button:hover {
    background: #e8e8e8;
}


.quantity-box input {
    flex: 1;

    width: 60px;

    height: 44px;

    padding: 0;

    border: none;

    outline: none;

    text-align: center;

    font-size: 17px;

    color: #222;
}


.quantity-section small {
    display: block;

    margin-top: 6px;

    color: #666;

    font-size: 13px;
}


/* =========================================================
   ADD TO CART / BUY NOW
========================================================= */

.product-buttons {
    width: 100%;

    display: grid;

    grid-template-columns: 180px minmax(0, 1fr);

    gap: 12px;

    margin-top: 5px;
}


.product-buttons form {
    width: 100%;

    margin: 0;

    padding: 0;
}


.product-buttons .cart-btn,
.product-buttons .buy-btn {
    width: 100%;

    height: 52px;

    padding: 0 18px;

    border: none;

    border-radius: 7px;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    transition: .2s ease;
}


.product-buttons .cart-btn {
    background: #2E7D32;

    color: #fff;
}


.product-buttons .cart-btn:hover {
    background: #256428;
}


.product-buttons .buy-btn {
    background: #FF9800;

    color: #fff;
}


.product-buttons .buy-btn:hover {
    background: #F57C00;
}


/* =========================================================
   DELIVERY BOX
========================================================= */

.delivery-box {
    width: 100%;

    margin-top: 5px;

    padding: 15px;

    background: #F1F8E9;

    border: 1px solid #E0EED8;

    border-radius: 8px;

    color: #2E7D32;

    font-size: 14px;

    font-weight: 600;

    box-sizing: border-box;
}


/* =========================================================
   FARMER CARD
========================================================= */

.farmer-card {
    width: 92%;

    max-width: 1400px;

    margin: 40px auto 0;

    padding: 30px;

    background: #fff;

    border: 1px solid #e5e5e5;

    border-radius: 12px;

    box-shadow: 0 3px 12px rgba(0,0,0,.06);

    box-sizing: border-box;
}


.farmer-header {
    display: flex;

    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}


.farmer-header img {
    width: 80px;

    height: 80px;

    border-radius: 50%;

    object-fit: cover;
}


.verified {
    color: #2E7D32;

    font-weight: 600;
}


.farmer-details {
    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-bottom: 20px;

    color: #555;
}


.view-farmer-btn {
    display: inline-block;

    padding: 11px 22px;

    background: #2E7D32;

    color: #fff;

    border-radius: 7px;

    text-decoration: none;

    font-weight: 600;
}


.view-farmer-btn:hover {
    background: #256428;
}


/* =========================================================
   PRODUCT DESCRIPTION
========================================================= */

.product-description {
    width: 92%;

    max-width: 1400px;

    margin: 40px auto 0;

    padding: 30px;

    background: #fff;

    border: 1px solid #e5e5e5;

    border-radius: 12px;

    box-shadow: 0 3px 12px rgba(0,0,0,.06);

    box-sizing: border-box;
}


.product-description h2 {
    margin: 0 0 12px;

    font-family: 'Poppins', sans-serif;

    font-size: 28px;

    font-weight: 600;

    color: #212121;
}


.product-description > p {
    margin: 0 0 25px;

    font-size: 16px;

    line-height: 1.6;

    color: #555;
}


/* Description information grid */

.description-grid {
    width: 100%;

    margin-top: 20px;

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;
}


/* Individual description box */

.desc-item {
    min-height: 90px;

    padding: 20px;

    background: #F8F9FA;

    border: 1px solid #eeeeee;

    border-radius: 8px;

    box-sizing: border-box;
}


.desc-item h4 {
    margin: 0 0 10px;

    font-size: 16px;

    font-weight: 600;

    color: #2E7D32;
}


.desc-item p {
    margin: 0;

    font-size: 15px;

    line-height: 1.5;

    color: #555;
}


/* =========================================================
   RELATED PRODUCTS
========================================================= */

.related-products {
    width: 92%;

    max-width: 1400px;

    margin: 45px auto 0;

    box-sizing: border-box;
}


.related-products h2 {
    margin: 0 0 6px;

    font-family: 'Poppins', sans-serif;

    font-size: 30px;

    font-weight: 600;

    color: #212121;
}


.related-products p {
    margin: 0 0 25px;

    font-size: 15px;

    color: #666;
}


/* =========================================================
   SEARCH PAGE
========================================================= */

.search-page {
    width: 95%;

    max-width: 1400px;

    margin: 0 auto;

    padding: 45px 0 70px;

    box-sizing: border-box;
}


/* Search heading */

.search-header {
    margin-bottom: 30px;
}


.search-header h1 {
    margin: 0 0 7px;

    font-family: 'Poppins', sans-serif;

    font-size: 36px;

    font-weight: 700;

    line-height: 1.2;

    color: #222;
}


.search-header p {
    margin: 0;

    font-size: 16px;

    color: #777;
}


.search-header strong {
    color: #2E7D32;
}


/* =========================================================
   SEARCH PRODUCT GRID
========================================================= */

.search-product-grid {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 25px;

    align-items: stretch;
}


/* =========================================================
   SEARCH PRODUCT CARD
========================================================= */

.search-product-grid .product-card {
    width: 100%;

    min-width: 0;

    margin: 0;

    padding: 0;

    display: flex;

    flex-direction: column;

    background: #fff;

    border-radius: 14px;

    overflow: hidden;

    box-shadow: 0 5px 18px rgba(0,0,0,.08);

    transition: transform .25s ease,
                box-shadow .25s ease;
}


.search-product-grid .product-card:hover {
    transform: translateY(-5px);

    box-shadow: 0 10px 28px rgba(0,0,0,.12);
}


/* Search product image */

.search-product-grid .product-image {
    width: 100%;

    height: 240px;

    overflow: hidden;

    background: #f5f5f5;
}


.search-product-grid .product-image img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;
}


/* Search product information */

.search-product-grid .product-info {
    width: 100%;

    min-width: 0;

    padding: 18px;

    display: flex;

    flex-direction: column;

    flex: 1;

    box-sizing: border-box;
}


.search-product-grid .product-info h3 {
    margin: 0 0 8px;

    font-family: 'Poppins', sans-serif;

    font-size: 18px;

    line-height: 1.35;

    color: #222;
}


.search-product-grid .product-unit {
    margin-bottom: 8px;

    font-size: 14px;

    color: #777;
}


.search-product-grid .product-price {
    margin-bottom: 8px;

    font-size: 22px;

    font-weight: 700;

    color: #2E7D32;
}


.search-product-grid .verified-farmer {
    margin-bottom: 18px;

    font-size: 14px;

    color: #2E7D32;
}


.search-product-grid .add-cart-btn {
    width: 100%;

    margin-top: auto;

    padding: 12px 15px;

    border: none;

    border-radius: 8px;

    background: #2E7D32;

    color: #fff;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition: .2s ease;
}


.search-product-grid .add-cart-btn:hover {
    background: #1B5E20;
}


/* =========================================================
   SEARCH EMPTY
========================================================= */

.search-empty {
    width: 100%;

    padding: 70px 30px;

    background: #fff;

    border-radius: 14px;

    text-align: center;

    box-shadow: 0 5px 18px rgba(0,0,0,.06);

    box-sizing: border-box;
}


.search-icon {
    margin-bottom: 15px;

    font-size: 55px;
}


.search-empty h2 {
    margin: 0 0 10px;

    font-family: 'Poppins', sans-serif;

    font-size: 26px;

    color: #222;
}


.search-empty p {
    margin: 0 0 25px;

    color: #777;
}


/* =========================================================
   PRODUCT DETAILS - TABLET
========================================================= */

@media (max-width: 1100px) {

    .product-layout {
        grid-template-columns: 52% 48%;

        gap: 20px;
    }

    .main-image {
        height: 480px;
    }

    .product-title {
        font-size: 27px;
    }

    .sale-price {
        font-size: 34px;
    }

    .search-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   PRODUCT DETAILS - MOBILE / TABLET
========================================================= */

@media (max-width: 900px) {

    .product-layout {
        width: 94%;

        grid-template-columns: 1fr;

        gap: 25px;
    }

    .product-gallery {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .thumbnail-gallery {
        width: 70px;
    }

    .thumbnail-gallery img {
        width: 60px;

        height: 60px;
    }

    .main-image {
        height: 450px;
    }

    .product-layout > .product-info {
        padding: 5px 0;
    }

    .farmer-card,
    .product-description,
    .related-products {
        width: 94%;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    section.container:has(.product-layout) {
        padding-top: 15px;
        padding-bottom: 45px;
    }

    .product-layout {
        width: 94%;

        grid-template-columns: 1fr;

        gap: 20px;
    }

    .product-gallery {
        grid-template-columns: 60px minmax(0, 1fr);

        gap: 10px;
    }

    .thumbnail-gallery {
        width: 60px;

        gap: 8px;
    }

    .thumbnail-gallery img {
        width: 55px;

        height: 55px;
    }

    .main-image {
        height: 380px;

        border-radius: 10px;
    }

    .product-title {
        font-size: 25px;
    }

    .sale-price {
        font-size: 32px;
    }

    .product-buttons {
        grid-template-columns: 1fr;
    }

    .farmer-card,
    .product-description,
    .related-products {
        width: 94%;
    }

    .farmer-card {
        padding: 22px;
    }

    .product-description {
        padding: 22px;
    }

    .product-description h2 {
        font-size: 25px;
    }

    .description-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .desc-item {
        padding: 17px;
    }

    .related-products h2 {
        font-size: 26px;
    }


    /* Search */

    .search-page {
        width: 94%;

        padding-top: 35px;
    }

    .search-header h1 {
        font-size: 30px;
    }

    .search-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 15px;
    }

    .search-product-grid .product-image {
        height: 190px;
    }

    .search-product-grid .product-info {
        padding: 15px;
    }

    .search-product-grid .product-info h3 {
        font-size: 16px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .main-image {
        height: 320px;
    }

    .product-title {
        font-size: 22px;
    }

    .sale-price {
        font-size: 29px;
    }

    .quantity-box {
        width: 135px;
    }

    .product-description {
        padding: 18px;
    }

    .product-description h2 {
        font-size: 23px;
    }

    .desc-item {
        padding: 15px;
    }

    .related-products h2 {
        font-size: 23px;
    }


    /* Search */

    .search-product-grid {
        grid-template-columns: 1fr;
    }

    .search-product-grid .product-image {
        height: 230px;
    }

}