/* General Styles */
body {
  background: linear-gradient(to right, #edf7ed, #e6f4e6);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  overflow-x: hidden;

}

html {
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  padding: 20px 15px;

}

* {
  box-sizing: border-box;
}

/* .py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;

} */


/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  background-color: transparent;
  color: #060606;
  border: 1px solid #055c19;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
  text-decoration: none;
}

.back-button:hover {
  background-color: rgb(7, 69, 1);
  transform: translateX(-3px);
  color: white;
}

.back-button i {
  margin-right: 9px;
  font-size: 1rem;
}

/* Page Title */
.page-title {
  color: #2e7d32;
  font-weight: 700;
  margin-bottom: 2rem;
}

.text-center {
  text-align: center !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

/* Product Grid */
.row {
  display: flex;
  flex-wrap: wrap;
  /* justify-content: ; */
}


.col,
.col-md-4,
.col-md-3,
.col-lg-3,
.col-sm-6,
.col-6,
[class*="col-"] {
  flex: 1 0 auto;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;

}


/* For Desktop: 4 cards per row */
@media (min-width: 1200px) {

  .col,
  .col-md-4,
  .col-lg-3 {
    max-width: 25%;
  }
}


@media (max-width: 767px) {
  .row {
    gap: 0;
    /* remove flex gap */
  }

  .col,
  [class*="col-"] {
    padding: 0;
    margin: 0;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .card {
    height: 100%;
    min-height: 320px;
    margin-bottom: 5px;
  }


}


@media (max-width: 767px) {
  .row {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
  }

  .col,
  [class*="col-"] {
    flex: 0 0 50% !important;
    /* Force 2 per row */
    max-width: 50% !important;
    padding: 4px;
    /* Some spacing between cards */
  }

  .card {
    width: 100%;
    /* Card fills column */
    height: 100%;
    margin-bottom: 5px;
    min-height: 320px;
  }

  .button-container {
    flex-direction: column;
    gap: 6px;
  }

  .card {
    min-height: 280px;
    /* Smaller overall height */
  }

  .btn-cart {
    width: 80%;
    flex: none;
    font-size: 0.85rem;
    padding: 8px 10px;
    align-items: center;
    margin-left: 15px;
  }

  .btn-view {
    width: 80%;
    flex: none;
    font-size: 0.85rem;
    padding: 8px 10px;
    align-items: center;
    margin-left: 15px;

  }
}



/* Product Card */
.card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border: none;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  width: 100%;
  position: relative;
  margin: 2px;
}

/* Uniform Image Size */
.card-img-top {
  width: 100%;
  height: 180px;
  /* fixed uniform height */
  object-fit: cover;
  /* crop and fill without distortion */
  border-radius: 0;
}

/* Card Body */
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  text-align: center;

  overflow: hidden;
}

/* Product Title */
.card-title {
  font-weight: 600;
  color: #1e211e;
  font-size: 0.95rem;
  line-height: 1.2;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Product Price */
.product-price {
  color: #05ad2c;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 10px;
}

.original-price {
  color: #999;
  text-decoration: line-through;
  font-size: 0.85rem;
  margin-right: 5px;
}

/* Button Container */
.button-container {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  margin-top: auto;
}

/* View Button */
.btn-view {
  background: transparent;
  color: #28a745;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #28a745;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
  height: 32px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-view:hover {
  background-color: #28a745;
  color: white;
}

/* Cart Button */
.btn-cart {
  background: #ff7214;
  color: white;
  padding: 6px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
  height: 32px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cart:hover {
  background-color: #e65c00;
}

.btn-view i,
.btn-cart i {
  margin-right: 4px;
}

/* View Button */
.btn-view {
  background: transparent;
  color: #28a745;
  padding: 6px 8px;
  border-radius: 4px;
  /* Subtle border radius on buttons */
  border: 1px solid #28a745;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
  height: 32px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-view:hover {
  background-color: #28a745;
  color: white;
}

/* Cart Button */
.btn-cart {
  background: #ff7214;
  color: white;
  padding: 6px 8px;
  border-radius: 4px;
  /* Subtle border radius on buttons */
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
  height: 32px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cart:hover {
  background-color: #e65c00;
  color: white;
}

.btn-view i,
.btn-cart i {
  margin-right: 4px;
}

/* Status Messages */
.text-muted {
  color: #6c757d !important;
}

.text-danger {
  color: #dc3545 !important;
}




/* Plant Age Selection Styling */
#plantAgeSelect {
  border-radius: 5px;
  border: 1px solid #ddd;
  padding: 8px 12px;
  font-size: 0.9rem;
  background-color: #f8f9fa;
  transition: all 0.3s;
  margin-bottom: 10px;
}

#plantAgeSelect:focus {
  border-color: #2f9e44;
  box-shadow: 0 0 0 0.2rem rgba(47, 158, 68, 0.25);
}

.form-label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

/* Price animation */
#viewProductPrice {
  transition: all 0.3s ease;
}

/* Add a flash effect for price changes */
@keyframes priceFlash {
  0% {
    color: white;
  }

  70% {
    color: #ffc107;
  }

  100% {
    color: white;
  }
}

.price-update {
  animation: priceFlash 0.8s ease;
}

/*  */
/* Plant Age Selection Styling */
/* Plant Age Selection Styling */
#plantAgeSelect {
  border-radius: 5px;
  border: 1px solid #ddd;
  padding: 8px 12px;
  font-size: 0.9rem;
  background-color: #f8f9fa;
  transition: all 0.3s;
  margin-bottom: 10px;
}

#plantAgeSelect:focus {
  border-color: #2f9e44;
  box-shadow: 0 0 0 0.2rem rgba(47, 158, 68, 0.25);
}

.form-label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

/* Price animation */
#viewProductPrice {
  transition: all 0.3s ease;
}

/* Add a flash effect for price changes */
@keyframes priceFlash {
  0% {
    color: white;
  }

  70% {
    color: #ffc107;
  }

  100% {
    color: white;
  }
}

.price-update {
  animation: priceFlash 0.8s ease;
}

/* Styles for discount badges */
.discount-badge {
  font-size: 0.85rem;
  font-weight: bold;
  z-index: 2;
}

.product-card .discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 20px;
  padding: 5px 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.product-price .text-decoration-line-through {
  opacity: 0.7;
  font-size: 0.9em;
}















/* Ultra-Compact Product Modal CSS with Distinctive Product Name Heading */

/* Modal Base */
/* Center Modal Vertically and Horizontally */
#viewProductModal .modal-dialog {
  max-width: 950px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 1rem);
  /* Vertical centering */
}


#viewProductModal .modal-content {
  border: none;
  border-radius: 6px;
  margin: auto;

  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Updated Compact Header with Green Background */
#viewProductModal .modal-header {
  padding: 10px 15px;
  background-color: #1e7628;
  border-bottom: none;
  display: flex;
  color: white;
  align-items: center;
  justify-content: space-between;
}



/* Effective Modal Title */
#viewProductModal .modal-title {
  font-weight: 700;
  color: white;
  margin: 0;
  font-size: 1.2rem;
  flex: 1;
  text-align: center;
}



/* #viewProductModal .btn-close {
  padding: 0.5rem;
  margin: -0.5rem -0.5rem -0.5rem auto;
  filter: invert(1);

} */

/* Modal Body */
#viewProductModal .modal-body {
  padding: 0;
}

/* Content Layout */
#viewProductModal .product-details-content {
  display: flex;
}

/* Left Side - Images (Compact) */
#viewProductModal .col-md-5 {
  width: 50%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Main Product Image */
#viewProductMainImage {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 4px;
  overflow: hidden;
  background-color: #f9f9f9;
}

#viewProductMainImage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Gallery Thumbnails - Very Compact */
#viewProductGallery {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

#viewProductGallery img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid #eaeaea;
  cursor: pointer;
}

#viewProductGallery img:hover,
#viewProductGallery img.active {
  border-color: #00a870;
}

/* Right Side - Ultra Compact Product Details */
#viewProductModal .col-md-7 {
  width: 50%;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

/* Product Name - DISTINCTIVE STYLING */
#viewProductName {
  font-size: 1.6rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 10px 0;
  line-height: 1.2;
  position: relative;
  padding-bottom: 8px;
  display: inline-block;
}

/* Distinctive underline for product name */
#viewProductName::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: #00a870;
  border-radius: 1.5px;
}

/* Plant Age Select - Minimal Spacing */
#viewProductModal .form-label {
  font-weight: 600;
  color: #444;
  margin-bottom: 3px;
  font-size: 0.9rem;
}

#viewProductModal .form-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  max-width: 180px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
}

/* Price and Category - Side by Side */
#viewProductPrice {
  font-size: 1.6rem;
  font-weight: 700;
  color: #00a870;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

#viewProductCategory {
  display: inline-block;
  padding: 3px 8px;
  background-color: rgb(117, 169, 119);
  color: #000000;
  font-weight: 500;
  font-size: 0.8rem;
  border-radius: 3px;
  /* vertical-align: middle; */
}

/* Description - Minimal Margins */
#viewProductModal p.mb-1 {
  font-weight: 600;
  color: #444;
  margin: 8px 0 3px 0;
  font-size: 0.9rem;
  position: relative;
  display: inline-block;
}

/* Distinctive style for description label */
#viewProductModal p.mb-1::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: #00a870;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

#viewProductDescription {
  color: #666;
  line-height: 1.4;
  font-size: 0.9rem;
  overflow-y: auto;
  max-height: 130px;
  margin: 0 0 8px 0;
  padding: 0 5px 0 0;
}

#viewProductDescription::-webkit-scrollbar {
  width: 3px;
}

#viewProductDescription::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}

/* Compact Footer */
#viewProductModal .modal-footer {
  padding: 10px 15px;
  border-top: 1px solid #eaeaea;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#viewProductModal .btn-secondary {
  padding: 6px 12px;
  background-color: #f0f0f0;
  border: none;
  color: #555;
  font-weight: 500;
  border-radius: 4px;
}

#viewProductAddToCartBtn {
  padding: 6px 15px;
  background-color: #0f6d15;
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

#viewProductAddToCartBtn i {
  margin-right: 5px;
}

/* Remove Bootstrap Margins */
#viewProductModal .mb-3 {
  margin-bottom: 8px !important;
}



.btn-close {
  background-color: transparent;
  /* Remove default background */
  color: #333;
  /* Change icon color if using custom SVG or font */
  border-radius: 50%;
  /* Make it circular */
  width: 12px;
  height: 12px;
  padding: 5px;
  opacity: 1;
  /* Full visibility */
  transition: background-color 0.3s ease;
}

.btn-close:hover {
  background-color: #f0f0f0;
  /* Light hover effect */
}


/* Responsive Adjustments */
@media (max-width: 767.98px) {

  /* Force desktop-like layout in mobile */
  #viewProductModal .modal-dialog {
    max-width: 700px;

    margin-left: 15px;
    display: flex;

    align-items: center;
    justify-content: center;
    height: 100vh;
  }

  #viewProductModal .product-details-content {
    flex-direction: row !important;
    flex-wrap: nowrap;
  }

  #viewProductModal .col-md-5,
  #viewProductModal .col-md-7 {
    width: 50% !important;
    padding: 10px !important;
  }

  #viewProductMainImage {
    height: 200px;
    /* You can tweak this value, e.g., 180px or 220px */
    object-fit: contain;
    /* Ensures image scales nicely */
  }

  /* Product Name */
  #viewProductName {
    font-size: 1.4rem;
    margin: 0 0 4px 0;
    padding-bottom: 4px;
  }

  /* Price */
  #viewProductPrice {
    font-size: 1.4rem;
    margin-top: 0;
  }

  /* Category */
  #viewProductCategory {
    font-size: 0.75rem;
    padding: 2px 6px;
  }

  /* Plant Age Label */
  #viewProductModal .form-label {
    font-size: 0.85rem;
    margin-bottom: 2px;
  }

  /* Plant Age Dropdown */
  #viewProductModal .form-select {
    font-size: 0.85rem;
    padding: 5px 8px;
    max-width: 150px;
    margin-bottom: 6px;
  }

  /* Description Label */
  #viewProductModal p.mb-1 {
    font-size: 0.85rem;
    margin: 6px 0 2px 0;
  }

  /* Description Text */
  #viewProductDescription {
    font-size: 0.85rem;
    max-height: 110px;
    line-height: 1.3;
    padding-right: 4px;
  }

  /* Footer Buttons */
  #viewProductModal .modal-footer {
    padding: 8px 10px;
  }

  #viewProductModal .btn-secondary,
  #viewProductAddToCartBtn {
    font-size: 0.85rem;
    padding: 5px 10px;
  }

  #viewProductAddToCartBtn i {
    margin-right: 4px;
  }
}

@media (max-width: 767.98px) {
  #viewProductGallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  #viewProductGallery img {
    width: calc(50% - 6px);
    /* 2 per row */
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #eaeaea;
    cursor: pointer;
  }
}
























/* Modern Toast Notification System */
.toast-container {
  z-index: 1060;
  /* Ensure it's above modals */
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 350px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 5px;
  /* Space for scrollbar */
}

.toast {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
  width: 100%;
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    fadeOut 0.5s ease-out 2.5s forwards;
  transform-origin: bottom right;
  backdrop-filter: blur(4px);
  border-left: 5px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
  position: relative;
}

/* Toast types */
.toast.bg-success,
.toast.success {
  background: linear-gradient(135deg, #0f6a25, #085c1d);
  border-left-color: #5cd08d;
}

.toast.bg-info,
.toast.info {
  background: linear-gradient(135deg, #095514, #095514);
  border-left-color: #6ea8fe;
}

.toast.bg-danger,
.toast.danger {
  background: linear-gradient(135deg, #dc3545, #bb2d3b);
  border-left-color: #f1aeb5;
}

.toast.bg-warning,
.toast.warning {
  background: linear-gradient(135deg, #ffc107, #e5ab00);
  border-left-color: #ffe69c;
  color: #343a40;
}

/* Icon styling */
.toast .toast-body i,
.toast .toast-icon {
  margin-right: 12px;
  font-size: 1.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.25);
}

/* Toast content */
.toast .toast-body {
  flex-grow: 1;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Progress bar for auto-dismiss */
.toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.3);
}

.toast::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  animation: progressBar 3s linear forwards;
  z-index: 1;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes progressBar {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

/* Responsiveness */
@media (max-width: 576px) {
  .toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    width: 100%;
  }
}

/* Hover pause animation */
.toast:hover::before {
  animation-play-state: paused;
}

.toast:hover {
  animation-play-state: paused;
}












/* Pagination Styles */
/* Pagination Styles */
.mt-4 {
  margin-top: 1.5rem !important;
}

#productPagination {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-outline-success {
  color: #166629;
  border-color: #2ed655;
  background-color: transparent;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  font-size: 14px;
  min-width: 100px;
  text-align: center;
}

.btn-outline-success:hover {
  color: #fff;
  background-color: #28a745;
  border-color: #28a745;
}

.btn-outline-success:disabled {
  color: #6c757d;
  border-color: #000000;
  cursor: not-allowed;
  opacity: 0.65;
}

.mx-2 {
  margin-left: 0.5rem !important;
  margin-right: 0.5rem !important;
}

/* Additional styles for the prev/next pagination */
.pagination-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.pagination-info {
  color: #6c757d;
  font-size: 14px;
  text-align: center;
}

/* Arrow icon enhancements */
.btn-prev:before {
  content: "←";
  margin-right: 6px;
}

.btn-next:after {
  content: "→";
  margin-left: 6px;
}



/* ------------------------------- */
/* Enhanced search wrapper */
.search-wrapper {
  position: relative;
  width: 75%;
  max-width: 450px;
  margin: 0 auto;
  transition: all 0.25s ease;
}

.search-wrapper:focus-within {
  transform: translateY(-2px);
  width: 85%;
}

.search-input {
  width: 100%;
  padding: 16px 16px 16px 50px;
  border-radius: 30px;
  border: 1px solid #d1d5db;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-size: 16px;
  outline: none;
  transition: all 0.3s;
  height: 45px;
  /* Reduce as needed */
  font-size: 14px;
  margin-bottom: 40px;
}

/* .search-input:focus {
    border-color: #15892e;
    box-shadow: 0 4px 20px rgba(3, 112, 36, 0.15);
} */

.search-input::placeholder {
  color: #000000;
  transition: opacity 0.2s;
}

.search-input:focus::placeholder {
  opacity: 0.7;
}

/* Search icon with animation */
.search-icon {
  position: absolute;
  left: 18px;
  top: 24px;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 17px;
  pointer-events: none;
  transition: all 0.3s;
}

.search-input:focus~.search-icon {
  color: #2563eb;
  transform: translateY(-50%) scale(1.1);
}

/* Optional: Pulse animation on load */
@keyframes pulse {
  0% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }

  50% {
    transform: translateY(-50%) scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

.search-icon {
  animation: pulse 1.5s ease-in-out 1;
}

/* --------------------------------- */