:root {
  --primary-color: #1a4a28;
  --available-color: #1a4a28;
  --unavailable-color: #ad2e2a;
  --text-black: #111827;
  --text-white: #ffffff;
  --text-gray1: #6b7280;
  --text-gray2: #404040;
  --text-green: #256035;
  --text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);

  --h2-font-size: 24px;
  --font-size0: 16px;
  --font-size1: 18px;
  --font-size2: 14px;

  --container-bg: #ffffff;
  --body-color: #f8f8f8bf;
  --border-color: #e5e7eb;

  --filter-btn-margin: 2px 0px;
  --btn-radius: 12px;

  --border-shadow: 0 4px 6px rgba(79, 79, 79, 0.1);
  --transition: all 0.3s ease;

  /* mobile Sizes */
  --mobile: 768px;
  --mobile2: 480px;

  --h2-font-size: 24px;
  --font-size0: 16px;
  --font-size1: 14px;
  --font-size2: 12px;
  --font-size3: 10px;
}

/* Animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInPop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
}

.fade-in-pop {
  opacity: 0;
  animation: fadeInPop 0.8s ease forwards;
}

.prdct-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #444;
  text-shadow: 1px 1px 2px #6c6c6c;
  margin-bottom: 10px;
  text-align: center;
}

/* Header Section */
.header-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 20px 0;
  max-width: 1200px;
  margin: 0 auto 20px auto;
  width: 100%;
  box-sizing: border-box;
}

.prdct-subtitle {
  font-size: 1.3em;
  font-weight: 500;
  color: var(--primary-color);
  opacity: 0.8;
  margin: 0;
  text-align: center;
  width: 100%;
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* Scroll Container */
.scroll-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

/* Slider Section */
.slider-section {
  margin: 20px 0;
  text-align: center;
  padding: 15px;
}

/* Slider Controls - Navigation arrows only */
.slider-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hide scroll indicators */
.scroll-indicator {
  display: none !important;
}

/* Products Grid - Fully Responsive Auto-Fit Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Remove scroll mode - use standard grid */
.products-grid.scroll-mode {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
  overflow-x: visible;
  overflow-y: visible;
}

.products-grid.normal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

/* Grid Container */
.scroll-container {
  position: relative;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  overflow: visible;
}

/* Product Cards - Clean modern design */
.product-card {
  background-color: var(--container-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--border-shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f0f0;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Special styling for Featured products - Exact copy */
.featured-product {
  position: relative;
}

.featured-product::before {
  content: "☆ Featured";
  width: auto;
  position: absolute;
  text-transform: uppercase;
  font-size: 12px;
  top: 10px;
  right: 10px;
  background-color: #e483ad;
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  z-index: 10;
}

.product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
}

/* Wrapper */
.wrapper {
  display: flex;
}

h3 {
  font-size: 1.5rem !important;
  font-weight: 600;
  text-align: left;
  margin: 8px 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.productname {
  text-align: center !important;
}

.price {
  font-size: 1.25rem !important;
  font-weight: 500;
  color: #2c3e50;
  margin: 10px 0;
  text-align: center;
}

/* Info Row 1: AvailToday Badge + Stock */
.info-row-1 {
  display: none;
  /* align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  padding: 0 5px; */
}

/* Info Row 2: Status Badge + Available Dates */
.info-row-2 {
  display: none;
  /* align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  padding: 0 5px;
  flex-wrap: wrap; */
}

/* Badge Styling */
.availtoday-badge {
  display: inline-block;
  padding: 4px 10px;
  color: rgb(104, 123, 83);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

/* Old prdct-availability - Deprecated */
.prdct-availability {
  display: none;
}

.status-badge {
  display: inline-block;
  border-radius: 4px;
  font-size: 16px;
  padding: 4px 10px;
  white-space: nowrap;
  font-weight: 500;
}

.status-badge.status-available-today {
  color: rgb(104, 123, 83);
}

.status-badge.status-available {
  color: var(--available-color);
}

.status-badge.status-unavailable {
  color: var(--unavailable-color);
}

.stock {
  color: #666;
  font-size: 14px;
  margin: 0;
  white-space: nowrap;
}

/* Available Days */
.available-days,
.available-dates {
  font-size: 14px;
  color: #666;
  margin: 0;
  white-space: nowrap;
}

/* Quantity Controls - Exact copy */
.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  gap: 5px;
  width: 100%;
}

.quantity-controls button {
  width: 50px;
  padding: 0.5rem;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
}

.quantity-controls input {
  width: 100px;
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  appearance: textfield;
}

/* Add to Cart Button - Exact copy */
.add-to-cart {
  display: block;
  width: 95%;
  margin: 0 auto;
  text-align: center;
  padding: 0.5rem 1rem;
  background-color: var(--text-green);
  color: white;
  text-align: center;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
}

.add-to-cart:hover {
  background-color: var(--primary-color);
}

.add-to-cart.unavailable {
  position: relative;
  margin-top: 54px;
  background: #ccc;
  cursor: not-allowed;
}

/* Ensure add-to-cart buttons are clickable */
.add-to-cart {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.add-to-cart:not(.unavailable) {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* No Products Message - Exact copy */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background-color: var(--container-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #666;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
  padding: 0;
}

/* Modal centering wrapper - always centers content */
.modal.show {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  margin: auto;
}

.close {
  border-radius: 50%;
  padding: 10px;
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.close:hover {
  color: #333;
  background-color: rgba(0, 0, 0, 0.05);
}

.modal-body {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.product-images {
  flex: 1;
}

.main-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.thumbnail-container img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.thumbnail-container img:hover {
  border-color: var(--text-gray2);
}

.thumbnail-container img.active {
  border-color: var(--text-gray2);
}

.product-details {
  flex: 1;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-top: 15px;
  white-space: normal;
  word-wrap: break-word;
  max-width: 35ch;
}

.modal-price {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 10px 0;
}

.prdct-qty {
  margin-top: 20px;
  display: none;
  justify-content: space-between;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  flex-direction: column;
  gap: 8px;
}

.description {
  margin: 10px 0;
  line-height: 1.6em;
  color: var(--text-gray2);
  word-wrap: break-word;
  max-width: 55ch;
  text-align: justify;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
}

.modal-quantity {
  margin: 20px 0;
}

/* Blog Container */
.blog-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 20px;
}

.blog-section {
  flex: 1;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  height: 400px;
}

.blog-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
}

.blog-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  transition: filter 0.3s ease;
}

.blog-section:hover img {
  filter: blur(0);
}

.section-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(45, 90, 39, 0.8);
  color: white;
  padding: 15px 25px;
  text-align: center;
  font-size: 1.5em;
  width: 100%;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.blog-section:hover .section-title {
  background-color: rgba(45, 90, 39, 1);
}

.section-title span {
  color: white;
  text-decoration: none;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #ddd;
}

.footer a {
  color: #2d5a27;
  text-decoration: none;
  margin: 0 15px;
}

/* Admin Controls */
.admin-controls {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

.admin-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-back-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.admin-back-btn svg {
  transition: transform 0.3s ease;
}

.admin-back-btn:hover svg {
  transform: translateX(-3px);
}

/* Breadcrumbs Styling */
.breadcrumbs {
  background-color: #f5f5f5; /* Light gray background */
  padding: 12px 20px;
  margin-bottom: 25px;
  border-radius: 8px;
  font-size: 0.95em;
  color: #555;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Business Closed Message - Centered */
.business-closed-message {
  display: none; /* Hidden by default, shown by JavaScript when closed */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
  margin: 20px auto;
  max-width: 600px;
}

/* Loading State Message */
.loading-state-message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
}

.loading-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-spinner-container p {
  font-size: 1.2em;
  color: var(--text-gray2);
  margin: 0;
  font-weight: 500;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(26, 74, 40, 0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Small loading spinner for business hours */
.loading-spinner-small {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 74, 40, 0.2);
  border-top: 2px solid var(--text-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.business-closed-message .closed-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.business-closed-message h2 {
  font-size: 2em;
  color: var(--primary-color);
  margin: 0 0 15px 0;
  font-weight: 600;
}

.business-closed-message p {
  font-size: 1.2em;
  color: var(--text-gray2);
  margin: 10px 0;
  line-height: 1.6;
}

.business-closed-message .business-hours-display {
  font-size: 1.1em;
  color: var(--text-green);
  font-weight: 600;
  margin-top: 20px;
  padding: 12px 24px;
  background-color: rgba(26, 74, 40, 0.1);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.business-closed-message .business-hours-display span {
  display: inline-block;
}

/* Responsive adjustments for closed message */
@media (max-width: 768px) {
  .business-closed-message,
  .loading-state-message {
    min-height: 50vh;
    padding: 30px 15px;
  }

  .business-closed-message .closed-icon {
    font-size: 60px;
  }

  .business-closed-message h2 {
    font-size: 1.6em;
  }

  .business-closed-message p {
    font-size: 1em;
  }

  .business-closed-message .business-hours-display {
    font-size: 0.95em;
    padding: 10px 20px;
  }

  .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }

  .loading-spinner-container p {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .business-closed-message,
  .loading-state-message {
    min-height: 40vh;
    padding: 20px 10px;
  }

  .business-closed-message .closed-icon {
    font-size: 50px;
  }

  .business-closed-message h2 {
    font-size: 1.4em;
  }

  .business-closed-message p {
    font-size: 0.95em;
  }

  .business-closed-message .business-hours-display {
    font-size: 0.9em;
    padding: 8px 16px;
  }

  .loading-spinner {
    width: 35px;
    height: 35px;
  }

  .loading-spinner-container p {
    font-size: 0.95em;
  }

  /* Modal Adjustments - Small Mobile */
  .modal-content {
    width: 95%;
    max-width: 600px;
    padding: 20px 15px;
    max-height: 90vh;
  }

  .main-image {
    height: 220px;
  }

  .modal-body {
    gap: 15px;
  }

  .modal-title {
    font-size: 18px;
    max-width: 100%;
  }

  .modal-price {
    font-size: 17px;
  }

  .description {
    max-width: 100%;
    font-size: 14px;
  }

  .thumbnail-container img {
    width: 60px;
    height: 60px;
  }

  .close {
    font-size: 20px;
    width: 30px;
    height: 30px;
    right: 8px;
    top: 8px;
  }
}

.breadcrumbs a {
  color: #1a4a28; /* Matching primary color */
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: #0f3d1a; /* Darker shade for hover */
  text-decoration: underline;
}

.breadcrumbs .separator {
  margin: 0 8px;
  color: #999;
}

/* ====================
   Fully Responsive Design - All Screen Sizes
   ==================== */

/* Extra Large Desktops (1600px and up) - 5 columns */
@media (min-width: 1600px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
  }

  .main-container {
    max-width: 1600px;
  }

  /* Modal - consistent centering for extra large screens */
  .modal-content {
    max-width: 1000px;
    width: 85%;
  }
}

/* Large Desktops (1400px to 1599px) - 4 columns */
@media (min-width: 1400px) and (max-width: 1599px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
  }

  /* Modal - consistent centering */
  .modal-content {
    max-width: 950px;
    width: 85%;
  }
}

/* Standard Desktops (1200px to 1399px) - 4 columns */
@media (min-width: 1200px) and (max-width: 1399px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .scroll-container {
    padding: 0 20px;
  }

  /* Modal - consistent centering */
  .modal-content {
    max-width: 900px;
    width: 85%;
  }
}

/* Small Desktops / Large Laptops (992px to 1199px) - 3 columns */
@media (min-width: 992px) and (max-width: 1199px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .main-container {
    padding: 30px 20px;
  }

  .prdct-title {
    font-size: 2.2em;
  }

  .header-section {
    padding: 0 20px;
  }

  .product-image {
    height: 200px;
  }

  /* Modal - consistent centering */
  .modal-content {
    max-width: 850px;
    width: 90%;
    padding: 28px;
  }
}

/* Tablets Landscape (768px to 991px) - 3 columns */
@media (min-width: 768px) and (max-width: 991px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .main-container {
    padding: 25px 20px;
  }

  .prdct-title {
    font-size: 2em;
  }

  .prdct-subtitle {
    font-size: 1em;
  }

  .header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .sort-container {
    flex: 1;
  }

  .product-image {
    height: 180px;
  }

  .product-info h3 {
    font-size: 15px;
  }

  .breadcrumbs {
    padding: 10px 15px;
    font-size: 0.9em;
  }

  /* Modal - consistent centering for tablets landscape */
  .modal-content {
    width: 92%;
    max-width: 800px;
    padding: 25px;
    max-height: 80vh;
  }

  .modal-body {
    flex-direction: column;
    gap: 20px;
  }

  .main-image {
    height: 300px;
  }

  .thumbnail-container {
    justify-content: center;
  }

  .close {
    right: 10px;
    top: 10px;
    font-size: 24px;
    width: 35px;
    height: 35px;
  }
}

/* Tablets Portrait (640px to 767px) - 2 columns */
@media (min-width: 640px) and (max-width: 767px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .main-container {
    padding: 20px 15px;
  }

  .scroll-container {
    padding: 0 15px;
  }

  .prdct-title {
    font-size: 1.9em;
  }

  .header-section {
    flex-direction: column;
    gap: 12px;
    padding: 0;
  }

  .header-right {
    width: 100%;
  }

  .sort-dropdown {
    flex: 1;
  }

  .product-image {
    height: 180px;
  }

  .product-info {
    padding: 14px;
  }

  .product-info h3 {
    font-size: 15px;
    min-height: 42px;
  }

  .price {
    font-size: 19px;
  }

  /* Modal - consistent centering for tablets portrait */
  .modal-content {
    width: 92%;
    max-width: 680px;
    padding: 22px;
    max-height: 80vh;
  }

  .modal-body {
    flex-direction: column;
    gap: 18px;
  }

  .main-image {
    height: 260px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-price {
    font-size: 18px;
  }

  .close {
    font-size: 22px;
    width: 32px;
    height: 32px;
  }

  .blog-container {
    flex-direction: column;
  }
}

/* Large Mobile (480px to 639px) - 2 columns compact */
@media (min-width: 480px) and (max-width: 639px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .main-container {
    padding: 15px 12px;
  }

  .scroll-container {
    padding: 0 12px;
  }

  .prdct-title {
    font-size: 1.7em;
  }

  .prdct-subtitle {
    font-size: 0.95em;
  }

  .header-section {
    flex-direction: column;
    gap: 12px;
    padding: 0;
  }

  .header-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .sort-container {
    flex: 1;
    min-width: 180px;
  }

  .product-card {
    border-radius: 10px;
  }

  .product-image {
    height: 140px;
  }

  .product-info {
    padding: 12px;
  }

  .product-info h3 {
    font-size: 14px;
    min-height: 40px;
  }

  .price {
    font-size: 17px;
  }

  .availtoday-badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  .stock {
    font-size: 12px;
  }

  .quantity-controls button {
    width: 28px;
    height: 28px;
  }

  .quantity-controls input {
    width: 50px;
    height: 28px;
    font-size: 13px;
  }

  .add-to-cart {
    padding: 10px;
    font-size: 12px;
  }

  /* Modal - consistent centering for large mobile */
  .modal-content {
    width: 94%;
    max-width: 580px;
    padding: 20px 15px;
    max-height: 82vh;
  }

  .main-image {
    height: 220px;
  }

  .modal-body {
    gap: 15px;
    flex-direction: column;
  }

  .modal-title {
    font-size: 18px;
    max-width: 100%;
  }

  .modal-price {
    font-size: 17px;
  }

  .description {
    max-width: 100%;
    font-size: 14px;
  }

  .thumbnail-container img {
    width: 60px;
    height: 60px;
  }

  .close {
    font-size: 20px;
    width: 30px;
    height: 30px;
    right: 8px;
    top: 8px;
  }
}

/* Standard Mobile (375px to 479px) - 1 column */
@media (min-width: 375px) and (max-width: 479px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .main-container {
    padding: 15px 10px;
  }

  .scroll-container {
    padding: 0 10px;
  }

  .prdct-title {
    font-size: 1.6em;
  }

  .prdct-subtitle {
    font-size: 0.9em;
  }

  .header-section {
    flex-direction: column;
    padding: 0 10px;
    gap: 10px;
  }

  .header-right {
    width: 100%;
  }

  .product-card {
    max-width: 100%;
  }

  .product-image {
    height: 200px;
  }

  .product-info {
    padding: 12px;
  }

  .product-info h3 {
    font-size: 15px;
    min-height: auto;
  }

  .price {
    font-size: 18px;
  }

  .quantity-controls {
    margin: 10px 0;
  }

  .add-to-cart {
    width: calc(100% - 24px);
    margin: 0 auto 12px auto;
  }

  .cart-dropdown-content {
    position: fixed;
    right: 10px;
    left: 10px;
    min-width: auto;
  }

  /* Modal - consistent centering for standard mobile */
  .modal-content {
    width: 95%;
    max-width: 520px;
    padding: 18px 12px;
    max-height: 85vh;
  }

  .main-image {
    height: 200px;
  }

  .modal-body {
    gap: 12px;
    flex-direction: column;
  }

  .modal-title {
    font-size: 17px;
  }

  .modal-price {
    font-size: 16px;
  }

  .description {
    font-size: 13px;
  }

  .thumbnail-container img {
    width: 55px;
    height: 55px;
  }

  .close {
    font-size: 18px;
    width: 28px;
    height: 28px;
    right: 6px;
    top: 6px;
  }
}

/* Small Mobile (320px to 374px) - 1 column optimized */
@media (min-width: 320px) and (max-width: 374px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .main-container {
    padding: 12px 8px;
  }

  .scroll-container {
    padding: 0 8px;
  }

  .prdct-title {
    font-size: 1.5em;
    text-align: center;
  }

  .prdct-subtitle {
    font-size: 0.85em;
  }

  .header-section {
    padding: 0 8px;
  }

  .sort-label {
    font-size: 13px;
  }

  .sort-dropdown {
    font-size: 13px;
    padding: 7px 28px 7px 10px;
  }

  .product-info {
    padding: 10px;
  }

  .product-info h3 {
    font-size: 14px;
  }

  .price {
    font-size: 17px;
    margin: 6px 0;
  }

  .availtoday-badge {
    font-size: 10px;
    padding: 3px 7px;
  }

  .stock {
    font-size: 11px;
  }

  .quantity-controls button {
    width: 26px;
    height: 26px;
  }

  .quantity-controls input {
    width: 45px;
    height: 26px;
    font-size: 12px;
  }

  .add-to-cart {
    padding: 9px;
    font-size: 12px;
  }

  .featured-product::before {
    font-size: 10px;
    padding: 3px 10px;
  }

  /* Modal - consistent centering for small mobile */
  .modal-content {
    width: 96%;
    max-width: 480px;
    padding: 15px 10px;
    max-height: 88vh;
  }

  .main-image {
    height: 180px;
  }

  .modal-body {
    gap: 10px;
    flex-direction: column;
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-price {
    font-size: 15px;
  }

  .description {
    font-size: 12px;
    padding: 10px;
  }

  .thumbnail-container {
    gap: 8px;
  }

  .thumbnail-container img {
    width: 50px;
    height: 50px;
  }

  .close {
    font-size: 16px;
    width: 26px;
    height: 26px;
    right: 5px;
    top: 5px;
  }
}

/* Extra Small Devices (below 320px) - Ultra compact */
@media (max-width: 319px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .main-container {
    padding: 10px 5px;
  }

  .prdct-title {
    font-size: 1.4em;
  }

  .product-info {
    padding: 8px;
  }

  .product-info h3 {
    font-size: 13px;
  }

  .price {
    font-size: 16px;
  }

  .add-to-cart {
    font-size: 11px;
    padding: 8px;
  }

  /* Modal - consistent centering for extra small devices */
  .modal-content {
    width: 98%;
    max-width: 440px;
    padding: 12px 8px;
    max-height: 90vh;
  }

  .main-image {
    height: 160px;
  }

  .modal-body {
    gap: 8px;
    flex-direction: column;
  }

  .modal-title {
    font-size: 15px;
  }

  .modal-price {
    font-size: 14px;
  }

  .description {
    font-size: 11px;
    padding: 8px;
  }

  .thumbnail-container img {
    width: 45px;
    height: 45px;
  }

  .close {
    font-size: 14px;
    width: 24px;
    height: 24px;
    right: 4px;
    top: 4px;
  }
}

/* Confirmation Popup */
.confirmation-popup {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(76, 175, 80, 0.3);
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-weight: 500;
  font-size: 15px;
  min-width: 280px;
  text-align: center;
}

.confirmation-popup.success {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  box-shadow: 0 8px 32px rgba(76, 175, 80, 0.3);
}

.confirmation-popup.error {
  background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
  box-shadow: 0 8px 32px rgba(244, 67, 54, 0.3);
}

.confirmation-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.confirmation-popup.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-100px);
}

/* Add to Cart Button States */
.add-to-cart-btn {
  background-color: var(--available-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--btn-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  font-size: var(--font-size2);
}

.add-to-cart-btn:hover:not(:disabled) {
  background-color: #0f3d1a;
  transform: translateY(-2px);
  box-shadow: var(--border-shadow);
}

.add-to-cart-btn:disabled {
  background-color: #6b7280;
  color: #d1d5db;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.add-to-cart-btn.closed {
  background-color: #dc2626;
  color: white;
}

.add-to-cart-btn.closed:hover {
  background-color: #b91c1c;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0 30px 0;
  padding: 0 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.category-tab {
  padding: 10px 20px;
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 25px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-tab:hover {
  background: #e8f5e9;
  border-color: #256035;
  color: #256035;
}

.category-tab.active {
  background: #256035;
  color: white;
  border-color: #256035;
}

@media (max-width: 768px) {
  .category-tabs {
    padding: 0 10px;
    gap: 8px;
  }

  .category-tab {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Today Badge on Card (top-left corner) */
.today-badge-left {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ffb3b3 0%, #ff9999 100%);
  color: #8b0000;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 11px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
  z-index: 10;
}

/* Pre-Order Badge on Card (top-left corner) */
.preorder-badge-left {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
  z-index: 10;
}

/* Unavailable Badge on Card (top-left corner) */
.unavailable-badge-left {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #757575 0%, #616161 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

/* Unavailable Overlay on Image */
.unavailable-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 8px 8px 0 0;
}

.unavailable-text {
  color: white;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.unavailable-reason {
  color: #ff6b6b;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Unavailable Product Card Styling */
.unavailable-product {
  opacity: 0.7;
  filter: grayscale(30%);
}

.unavailable-product:hover {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Unavailable Button */
.unavailable-btn {
  background: #9e9e9e !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.unavailable-btn:hover {
  background: #9e9e9e !important;
  transform: none !important;
}

.product-image {
  position: relative;
}

@media (max-width: 768px) {
  .today-badge-left,
  .preorder-badge-left {
    font-size: 9px;
    padding: 3px 8px;
    top: 6px;
    left: 6px;
  }
}

/* Quantity Modal Styles */
.quantity-modal-content {
  max-width: 400px;
  padding: 30px;
}

.quantity-modal-body {
  text-align: center;
}

.quantity-modal-body h2 {
  margin: 0 0 10px 0;
  font-size: 24px;
  color: #256035;
}

.quantity-modal-price {
  font-size: 20px;
  color: #333;
  font-weight: bold;
  margin: 5px 0;
}

.quantity-modal-stock {
  display: none;
  /* font-size: 14px;
  color: #666;
  margin: 5px 0 20px 0; */
}

.quantity-modal-controls {
  margin: 20px 0;
}

.quantity-modal-controls label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.quantity-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.quantity-modal-actions button {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-cancel {
  background-color: #f0f0f0;
  color: #333;
}

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

.btn-confirm {
  background-color: #256035;
  color: white;
}

.btn-confirm:hover {
  background-color: #0f5132;
}

/* Order Type Selector */
.order-type-selector {
  margin: 15px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.order-type-selector label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.order-type-buttons {
  display: flex;
  gap: 10px;
}

.order-type-btn {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #ddd;
  background-color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #666;
}

.order-type-btn:hover {
  border-color: #4caf50;
  color: #4caf50;
}

.order-type-btn.active {
  background-color: #4caf50;
  border-color: #4caf50;
  color: white;
}

.quantity-modal-date {
  display: none !important;
  /* font-size: 13px;
  color: #666;
  margin: 5px 0;
  font-style: italic; */
}
