/* Reset and General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: white;
    color: #2c6e49;
    margin: 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #016110; /* Dark Green */
    padding: 30px;
    color: white;
    font-size: 18px;
    margin-bottom: 30px; /* Added space below navbar */
}



.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-bar {
    padding: 8px;
    font-size: 16px;
    width: 250px;
}

.filter-btn {
    background: white;
    color: #006400;
    padding: 6px 12px;
    border-radius: 5px;
    border: 1px solid #006400;
    cursor: pointer;
    font-size: 16px;
}

.nav-options {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 20px;
}

button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

/* Search Bar */
.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-bar {
    padding: 8px;
    font-size: 16px;
    width: 250px;
    border: none;
    outline: none;
}

/* Filter Button */
.filter-btn {
    background: white;
    color: #006400;
    padding: 8px 14px;
    border-radius: 5px;
    border: 1px solid #006400;
    cursor: pointer;
    font-size: 16px;
}

/* Right Section */
.nav-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s ease;
}

button:hover {
    transform: scale(1.1);
}


/* Main Container */
.container {
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 350px;
    background-color: #ffffff;
    padding: 20px;
    overflow-y: auto; /* Allow sidebar to scroll */
    box-shadow: 2px 0px 10px rgba(0, 0, 0, 0.1);
    height: 100vh; /* Full height */
}

.sidebar h3 {
    color: #016110;
    text-align: center;
    margin-bottom: 10px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.sidebar li a {
    text-decoration: none;
    color: yellowgreen;
    display: block;
}

.sidebar li a:hover {
    color: #2e7d32;
    font-weight: bold;
}

/* Content Area */
.content {
    flex-grow: 1; /* Takes the remaining space */
    overflow-y: auto; /* Allow content to scroll separately */
    padding: 20px;
    height: 100vh; /* Ensure it fills full height */
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Ensures 3 products per row */
    gap: 20px;
    padding: 20px;
}

/* Product Box */
.product-card {
    background: white;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.product-card p {
    margin-top: 10px;
    font-weight: bold;
    color: #065f46;
    font-size: 1.2rem;
    font-family: 'Times New Roman';
    text-decoration: none;
}
.price .original{
    font-size: 15px;
    padding-left: 1px;
    padding-right: 1px;
}
.price .discounted{
    font-size: 15px;
    padding-left: 1px;
    padding-right: 1px;
}
.price .discount{
    font-size: 15px;
    padding-left: 1px;
    padding-right: 1px;
}


.product-card img{
    cursor: pointer;
}
.original{
    text-decoration: line-through;
    color:black;
}
.discounted{
    color: red;
}
.discount{
    background-color: green;
    color: white;
    padding: 5px 10px;
    border-radius: 2px;
}
.related-products h2{
    text-align: center;
    color: #065f46;
}


.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    animation: slideIn 0.3s ease-in-out;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.save-btn, .cancel-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn {
    background: #4CAF50;
    color: white;
    border: none;
}

.save-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.cancel-btn {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

/* Popup Content */
.popup-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

/* Input Fields */
.popup-content input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Submit Button */
.popup-content button {
    background-color: #28a745;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    transition: background 0.3s ease;
}

.popup-content button:hover {
    background-color: #218838;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease-in-out, fadeOut 3s ease-in-out forwards;
}

/* Error Notification */
.notification.error {
    background-color: #dc3545;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 400px) {
    .popup-content {
        width: 90%;
    }
}
.popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.hidden {
    display: none;
}

.cart-counter{
    color: white;
    background-color: red;
    border-radius: 50%;
    padding: 4px 7px;
}


/*responsive*/
/* Mobile-specific changes */
/*responsive for mobile*/
@media (max-width: 768px) {
    /* Navbar becomes vertical stack */
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0px;
    }

    .logo-and-toggle {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .search-bar.mobile-search {
        width: 100%;
        margin-top: 10px;
    }

    .nav-options {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default for mobile */
        margin-top: 10px;
    }

    .nav-options button {
        width: 100%;
        margin-bottom: 10px;
        text-align: left;
        padding: 10px;
        background-color: #024e0e;
        border-radius: 5px;
    }

    /* Layout Stack */
    .container {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        padding: 15px;
        box-shadow: none;
        border-bottom: 1px solid #ccc;
    }

    .content {
        width: 100%;
        padding: 15px;
    }

    .welcome-section {
        height: auto;
    }

    .product-image img {
        height: auto;
        max-height: 300px;
    }

    .product-description {
        position: relative;
        opacity: 1;
        background: #065f46;
        color: #fff;
        border-radius: 0 0 10px 10px;
    }

    /* Product grid stacks 1 item per row */
    .product-grid {
        grid-template-columns: 2fr;
    }

    .product img {
        height: 250px;
    }

    
}
/* Toggle button - hidden on desktop */
.menu-toggle {
    display: none;
    font-size: 30px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}



/* Responsive Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show in mobile */
    }

    .nav-options {
        display: none; /* Hidden until toggle clicked */
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }

    .nav-options.active {
        display: flex; /* Show when toggle is clicked */
    }
    .navbar {
        flex-wrap: wrap;
    }
}


/*side mobile*/
/* Toggle button (only visible on mobile) */
.mobile-sidebar-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-sidebar-toggle {
        display: block;
        position: fixed;
        top: 100px;
        left: 10px;
        z-index: 1001;
        font-size: 22px;
        background-color: #4caf50;
        color: white;
        padding: 6px 10px;
        border-radius: 50%;
        cursor: pointer;
    }

    /* Mobile Sidebar Behavior */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100%;
        width: 70%;
        background-color: #ffffff;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0px 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        left: 0;
    }
}


/* Home Icon - Base Desktop Style */
.navbar .logo img {
    width: 60px;   /* Increased size */
    height: 60px;  /* Keep proportions */
    border-radius: 30px; /* Optional: smooth corners */
}
.logo {
    display: flex;
    align-items: center;
}

.company-name {
    line-height: 1.2;
    font-size: 20px;
    font-weight: bold;
    color: white;
}
@media (max-width: 768px) {
    .navbar .logo img {
        width: 60px;
        right:0;
    }
}
.related-products{
    margin-bottom: 10rem;
}

/* -------------------------- POPUP STYLES -------------------------- */

/* Overlay - The background that appears when popup is active */
/* === PRODUCT POPUP STYLES === */

/* Overlay */
.product-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
  }
  
  /* Popup Content */
  .product-popup-content {
    background-color: #fff;
    width: 85%;
    height: 85vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.4s ease-in-out;
    overflow: hidden;
  }
  
  /* Close Button */
  .product-popup-content .close-popup {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
  }
  
  /* Content Split */
  .product-detail-content {
    display: flex;
    height: 100%;
  }
  
  /* Left Section (Image + Buttons) */
  .left-section {
    flex: 1.2;
    background-color: #f8f8f8;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    justify-content: space-between;
    align-items: center;
    border-right: 1px solid #ddd;
  }
  
  .left-section img {
    width: 100%;
    height: 90%;
    object-fit: contain;
    border-radius: 12px;
  }
  
  /* Buttons */
  .button-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .button-row button {
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
  }
  
  .button-row .popup-cart {
    background-color: #ff9800;
    color: white;
  }
  
  .button-row .popup-cart:hover {
    background-color: #e08900;
  }
  
  .button-row .popup-buy {
    background-color: #28a745;
    color: white;
  }
  
  .button-row .popup-buy:hover {
    background-color: #218838;
  }
  
  /* Right Section (Scrollable Details) */
  .right-section {
    flex: 2;
    padding: 1.5rem;
    overflow-y: auto;
    text-align: left;
  }
  
  .right-section h2 {
    margin-top: 0;
    font-size: 1.8rem;
    color: #006400;
  }
  
  .right-section .price {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .right-section .original {
    text-decoration: line-through;
    color: #888;
    margin-right: 10px;
  }
  
  .right-section .discounted {
    color: #d32f2f;
    font-weight: bold;
  }
  
  .right-section .discount {
    color: white;
    font-weight: bold;
    margin-left: 10px;
  }
  
  /* Table Styles */
  .right-section table {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
  }
  
  .right-section table td {
    border: 1px solid #ccc;
    padding: 10px;
    vertical-align: top;
    color: black;
  }
  
  .right-section table td:first-child {
    font-weight: bold;
    background-color: #f9f9f9;
    width: 35%;
  }
  
  /* Scrollbar */
  .right-section::-webkit-scrollbar {
    width: 8px;
  }
  
  .right-section::-webkit-scrollbar-track {
    background: #eee;
  }
  
  .right-section::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
  }
  
  /* Animation */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  #popupDescription{
    color: black;
  }
  #popupReviews{
    color: black;
  }
  
  
  @media (max-width: 768px) {
    .product-popup-content {
      width: 95%;
      height: 90vh;
      flex-direction: column;
    }
  
    .product-detail-content {
      flex-direction: column;
    }
  
    .left-section, .right-section {
      flex: unset;
      width: 100%;
      height: auto;
      border-right: none;
      border-bottom: 1px solid #ddd;
      padding: 1rem;
    }
  
    .left-section {
      align-items: center;
    }
  
    .left-section img {
      width: 100%;
      height: auto;
      max-height: 250px;
      object-fit: contain;
    }
  
    .button-row {
      flex-direction: column;
      align-items: stretch;
      width: 100%;
      gap: 0.75rem;
      margin-top: 1rem;
    }
  
    .button-row button {
      width: 90%;
      padding: 12px;
      font-size: 1rem;
    }
  
    .right-section {
      padding: 1rem;
      overflow-y: auto;
      max-height: 50vh;
    }
  
    .right-section h2 {
      font-size: 1.5rem;
    }
  
    .right-section .price {
      font-size: 1rem;
    }
  
    .right-section table td {
      font-size: 0.95rem;
      padding: 8px;
    }
  
    .product-popup-content .close-popup {
      font-size: 24px;
      top: 10px;
      right: 12px;
    }
  }
  
  /*rating*/
  .star {
    color: #ccc;
    font-size: 20px;
    display: inline-block;
  }
  .star.filled {
    color: #f39c12;
  }
  .star.half {
    position: relative;
    color: #ccc;
  }
  .star.half::before {
    content: '★';
    color: #f39c12;
    position: absolute;
    width: 50%;
    overflow: hidden;
  }
  
  
  .review-count {
    color: #555;
    margin-left: 4px;
    font-size: 0.95rem;
  }
.whatsapp-btn {
    background-color: #25D366; /* WhatsApp green */
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.whatsapp-btn:hover {
    background-color: #20b954;
}