* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sidebar styles */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: #2a7f62;
    overflow-x: hidden;
    transition: 0.4s;
    padding-top: 60px;


}

.sidebar a {
    padding: 12px 24px;
    text-decoration: none;
    font-size: 18px;
    color: #fff;
    display: block;
    transition: background 0.3s;
    
}

.sidebar a:hover {
    background-color: #225e4d;
}

.sidebar .closebtn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    margin-left: 50px;
    cursor: pointer;
}

.sidebar.active {
    width: 250px;
}

/* Top menu button */
.openbtn-container {
    padding: 10px;
    background-color: #2a7f62;
}

.openbtn {
    font-size: 20px;
    cursor: pointer;
    background-color: #2a7f62;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
}

.openbtn:hover {
    background-color: #225e4d;
}



/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fdfdfd;
    color: #333;
    line-height: 1.6;
}

/* Header Top Bar */
.top_class {
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sell_on_farm_div a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.sell_on_farm_div a:hover {
    opacity: 0.8;
}

/* Logo & Header Actions */
.first_class {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.first_class1 {
    display: flex;
    align-items: center;
    gap: 15px;
}

.first_class1 img {
    width: 60px;
    height: auto;
}

#logo_ref {
    font-size: 28px;
    font-weight: 700;
    color: #388e3c;
    text-decoration: none;
}

#logo_ref span {
    color: #e53935;
}

/* Cart, Login, Welcome */
.first_class2 {
    display: flex;
    align-items: center;
    gap: 20px;
}


button {
    padding: 6px 14px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #388e3c;
}

.welcome {
    font-weight: bold;
    color: #2e7d32;
}

/* Search Bar */
.search_holder {
    background-color: #f1f1f1;
    padding: 10px;
    text-align: center;
}

.header-input {
    width: 250px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.search {
    padding: 8px 10px;
    margin-left: 5px;
    background-color: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Layout Section 1 */
.section_1 {
    display: flex;
    padding: 20px;
    background: #ffffff;
    gap: 20px;
}

/* Sidebar Categories */
.section_1_left {
    width: 20%;
    display: flex;
    flex-direction: column;
    gap: 4px;
   
    
}

.sub-section_1_left {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f9f9f9;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.sub-section_1_left:hover {
    background: #e8f5e9;
}

.image_div_sub_sectio_1 img {
    width: 30px;
}

.anchor_div_sub_section_1 a {
    text-decoration: none;
    color: #2e7d32;
    font-weight: 500;
}

/* Carousel Section */
.section_1_middle {
    width: 60%;
    position: relative;
}

.carousel {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-image {
    display: none;
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.carousel-image.active {
    display: block;
}

.left_carousel_button,
.right_carousel_button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    z-index: 1;
    border-radius: 50%;
}

.left_carousel_button {
    left: 10px;
}

.right_carousel_button {
    right: 10px;
}

/* Advertisement */
.section_1_right {
    width: 20%;
}

/* Product Section */
.section_2 {
    background: #f4f4f4;
    padding: 40px 20px;
}

.section_2_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.product_card {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.product_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.product_description {
    font-weight: 600;
    margin-bottom: 10px;
}

.product_image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.product_actions {
    margin-top: 10px;
    text-align: center;
}

/* Footer Styling */
footer {
    background: #2e7d32;
    color: #fff;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer_top_div,
.footer_middle_div,
.footer_bottom_div {
    text-align: center;
    margin-bottom: 20px;
}

.footer_top_div img {
    width: 50px;
}

.footer_middle_sub {
    margin: 10px 0;
}

.footer_middle_sub a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer_middle_sub a:hover {
    color: #c8e6c9;
}

.contact-us p {
    font-weight: bold;
}

.footer-input,
.js-textarea {
    width: 90%;
    padding: 8px;
    margin: 5px 0;
    border-radius: 6px;
    border: none;
}

/* Responsive */
@media screen and (max-width: 768px) {

    .first_class,
    .section_1 {
        flex-direction: column;
    }

    .section_1_left,
    .section_1_middle,
    .section_1_right {
        width: 100%;
    }

    .first_class2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .carousel-image {
        height: 200px;
    }
}



/* new code */
.cart-container {
  position: relative;
  display: inline-block;
}

.cart-link {
  text-decoration: none;
  position: relative;
  height: 30px;
  margin-right: 10px;
}

.cart-count {
  position: absolute;
  top: 118px;   /* moves above cart */
  right: 418px; /* moves to right corner */
  color: white;
  font-size: 18px;
  font-weight: bolder;
  width: 20px;
  height: 20px;
  text-align: center;
  border-radius: 10px;
  background-color: red;
}