/* ============================================
   MAIN SITE STYLES (style.css)
   ============================================ */

/* General Styles */
body {
  
  font-family: Arial, sans-serif;
  background-color: #eff6fd;
  margin: 0;
   
}

/* ============================================
   NAVBAR STYLES
   ============================================ */
.navbar-custom {
  background-color: white !important;
  color: rgb(85, 107, 47);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.app-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  margin-right: 1rem;
}
.navbar-brand{
  color: rgb(38, 58, 4);
  font-size  : 1.5rem;
}


.delivery-location {
  background: none;
  border: none;
  color: #ffc107;
  font-size: 1rem;
  cursor: pointer;
}

.login-link {
  background-color: #fff2f2 !important;
  color: #99aa42;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.login-link:hover,
.login-link:focus {
  background-color: #fff2f2 !important;
  color: #e0a800;
  text-decoration: underline;
  outline: none;
}

.auth-buttons {
  background-color: #c34e4e;
  color: rgba(0, 0, 0, 0.05);
}

.cart-icon {
  margin-left: 1rem;
  color: #fff;
}

#loginBtn {
  background-color: #4CAF50;
  color: white;
  border: none;
}

#cartIcon {
  background-color: #4CAF50;
  color: white;
  border: none;
}

#cartIcon.empty-cart {
  cursor: not-allowed;
  opacity: 0.7;
}

/* ============================================
   SEARCH FUNCTIONALITY
   ============================================ */
.search-box input {
  padding: 0.4rem;
  border-radius: 4px;
  border: 1px solid #ffffff;
  width: 100%;
  max-width: 600px;
}

.search-container {
  position: relative;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease, border-radius 0.3s ease;
  overflow: hidden;
  border: 1px solid #ccc;
  padding: 0;
}

.search-container input {
  display: none;
}

.search-container.active {
  width: 100%;
  justify-content: flex-start;
  padding-left: 10px;
}

.search-container.active input {
  display: block;
  border: none;
  outline: none;
  padding: 0 10px;
  flex: 1;
  background: transparent;
  opacity: 1;
  width: 100%;
  transition: all 0.3s ease;
  font-size: 14px;
}

.search-container .search-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn img {
  width: 22px;
  height: 22px;
}

.autocomplete-suggestions {
  list-style: none;
  background: white;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 5px;
  padding-left: 0;
  position: absolute;
  z-index: 1000;
  width: 100%;
}

.location-wrapper {
  position: relative;
}

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background-color: white;
  border: 1px solid #ccc;
  width: 100%;
}

/* ============================================
   CAROUSEL STYLES
   ============================================ */
.carousel {
  position: relative;
  margin: var(--spacing-md) 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.carousel-inner {
  width: 100%;
  position: relative;
}

.carousel-item {
  text-align: center;
  position: relative;
}

.carousel-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: var(--border-radius);
}

/* Responsive carousel image sizes */
.carousel-item img {
  max-height: 400px;
  min-height: 200px;
}

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  z-index: 15;
  display: flex;
  gap: var(--spacing-xs);
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.5);
  transition: var(--transition-fast);
}

.carousel-indicators button.active {
  background-color: var(--white);
}

#promoCarousel {
  margin: var(--spacing-sm) 0 var(--spacing-lg) 0;
}

/* Carousel responsive breakpoints with better image handling */
@media (max-width: 1199.98px) {
  .carousel-item img {
    max-height: 350px;
    min-height: 180px;
  }
}

@media (max-width: 991.98px) {
  .carousel-item img {
    max-height: 300px;
    min-height: 150px;
  }
}

@media (max-width: 767.98px) {
  .carousel-item img {
    max-height: 250px;
    min-height: 120px;
  }
  
  .carousel-indicators {
    bottom: 10px;
  }
  
  .carousel-indicators button {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 575.98px) {
  .carousel-item img {
    max-height: 200px;
    min-height: 100px;
  }
  
  .carousel {
    margin: var(--spacing-sm) 0;
    border-radius: var(--border-radius-sm);
  }
  
  .carousel-item img {
    border-radius: var(--border-radius-sm);
  }
}

@media (max-width: 359.98px) {
  .carousel-item img {
    max-height: 170px;
    min-height: 90px;
  }
}



/* ============================================
   PRODUCT GRID STYLES (Homepage/Listing)
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
}

.product-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background-color: #f8f9fa;
}

.product-img-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  background-color: var(--light-bg);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--transition-normal);
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  margin: var(--spacing-sm) 0;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.4em * 2);
}

.product-price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.1rem;
  margin: var(--spacing-xs) 0;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--spacing-sm);
}

.add-button {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-fast);
  min-width: 80px;
}

.add-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Product grid responsive breakpoints */
@media (max-width: 1199.98px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-sm);
  }
}

@media (max-width: 991.98px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  .product-card {
    min-height: 280px;
    padding: var(--spacing-sm);
  }
}

@media (max-width: 767.98px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-sm);
  }
  
  .product-card {
    min-height: 260px;
    padding: var(--spacing-sm);
  }
  
  .product-title {
    font-size: 0.875rem;
  }
  
  .product-price {
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
  }
  
  .product-card {
    min-height: 240px;
    padding: var(--spacing-xs);
  }
  
  .product-title {
    font-size: 0.8rem;
    margin: var(--spacing-xs) 0;
  }
  
  .product-price {
    font-size: 0.9rem;
  }
  
  .add-button {
    font-size: 0.75rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    min-width: 60px;
  }
  
  .product-meta {
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: stretch;
  }
}

@media (max-width: 359.98px) {
  .product-card {
    min-height: 220px;
    padding: var(--spacing-xs);
  }
  
  .product-title {
    font-size: 0.75rem;
  }
  
  .product-price {
    font-size: 0.85rem;
  }
  
  .add-button {
    font-size: 0.7rem;
    padding: 0.25rem var(--spacing-xs);
  }
}

/* ============================================
   QUANTITY CONTROLS - RESPONSIVE
   ============================================ */
.quantity-controls {
  display: flex;
  align-items: center;
  background: var(--light-bg);
  border-radius: 25px;
  padding: var(--spacing-xs);
  border: 1px solid var(--border-color);
  gap: var(--spacing-xs);
  min-width: 120px;
  justify-content: space-between;
}

.quantity-btn {
  background: var(--white);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
}

.quantity-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: var(--white);
  transform: scale(1.1);
}

.quantity-btn:disabled {
  background: #e9ecef;
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.quantity-input {
  border: none;
  background: transparent;
  text-align: center;
  width: 40px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.quantity-input:focus {
  outline: none;
  background: rgba(40, 167, 69, 0.1);
  border-radius: var(--border-radius-sm);
}

/* Quantity controls responsive */
@media (max-width: 575.98px) {
  .quantity-controls {
    min-width: 100px;
    padding: 2px;
  }
  
  .quantity-btn {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
  }
  
  .quantity-input {
    width: 32px;
    font-size: 0.875rem;
  }
}

@media (max-width: 359.98px) {
  .quantity-controls {
    min-width: 90px;
  }
  
  .quantity-btn {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
  
  .quantity-input {
    width: 28px;
    font-size: 0.75rem;
  }
}
/* ============================================
   SECTION STYLES
   ============================================ */

/* ============================================
   MODAL STYLES
   ============================================ */
.modal.right .modal-dialog {
  position: fixed;
  right: 0;
  margin: 0;
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
  max-width: 400px;
}

.modal.right.show .modal-dialog {
  transform: translateX(0);
}

.modal-dialog-slideout {
  margin: 0;
  height: 100%;
}

.modal.right .modal-content {
  height: 100%;
  overflow-y: auto;
  border-radius: 0;
}

/* ============================================
   OTP STYLES
   ============================================ */
.otp-inputs {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.otp-input {
  width: 45px;
  height: 50px;
  text-align: center;
  font-size: 20px;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: 0.3s;
}

.otp-input:focus {
  border-color: #28a745;
  outline: none;
  box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
}

/* ============================================
   CART STYLES
   ============================================ */
.offcanvas {
  width: 400px;
  max-width: 100%;
}

.offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.offcanvas-header {
  border-bottom: 1px solid #e5e5e5;
}

/* ============================================
   GENERAL QUANTITY CONTROLS (for cart/listings)
   ============================================ */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.quantity-controls button,
.quantity-controls input {
  padding: 0.4rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  text-align: center;
  background: #f9f9f9;
  cursor: pointer;
}

.quantity-controls input {
  width: 50px;
  appearance: textfield;
}

.quantity-controls button:hover {
  background: #28a745;
  color: #fff;
}

.quantity-controls button:focus,
.quantity-controls input:focus {
  outline: none;
  border-color: #28a745;
}

/* ============================================
   UTILITY STYLES
   ============================================ */
.btn-white-black {
  background-color: white !important;
  color: black !important;
  border: 1px solid #ccc;
}

.btn-white-black:hover {
  background-color: #f1f1f1;
  color: black;
}

.flash {
  animation: flashScale 0.3s ease;
}

@keyframes flashScale {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ============================================
   CHAT BUTTON
   ============================================ */
#customChatBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  font-weight: bold;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
footer {
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  padding: 2rem 0;
}

.footer-links p {
  margin: 0.3rem 0;
  color: #010000;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

/* .footer-links p:hover {
  background-color: #464849;
} */

footer a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

footer a:hover {
  /* color: #a0a0a0; */
  text-decoration: underline;
}

.footer-note {
  margin-top: 1rem;
  font-style: italic;
  color: #adb5bd;
}

.social-icon:hover {
  transform: scale(1.3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   FEEDBACK SECTION
   ============================================ */
.feedback-section {
  background-color: #fff;
  padding: 2rem;
  border-top: 2px solid #e9ecef;
  text-align: center;
}

.feedback-form textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  resize: none;
  margin-bottom: 1rem;
}

.feedback-form button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */



/* Full screen OTP step for devices < 768px */
@media (max-width: 768px) {
  #loginStepOtp {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 20px;
  }

  #loginStepOtp .otp-inputs {
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }

  #loginStepOtp .otp-input {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
  }

  #loginStepOtp .position-absolute {
    position: relative !important;
    margin-bottom: 20px;
  }

  #loginStepOtp button#verifyOtpBtn {
    margin-top: auto;
  }
}


/* ============================================
   IMPROVED CART MODAL STYLES
   Add these to your existing style.css
   ============================================ */

:root {
  --primary-color: #28a745;
  --secondary-color: #6c757d;
  --danger-color: #dc3545;
  --success-color: #198754;
  --warning-color: #ffc107;
  --light-bg: #f8f9fa;
  --border-color: #e9ecef;
  --text-muted: #6c757d;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced Cart Modal */
.offcanvas.cart-drawer {
  width: 420px;
  max-width: 100%;
}

.cart-header-enhanced {
  background: linear-gradient(135deg, var(--primary-color), var(--success-color));
  color: white;
  padding: 1.25rem;
  border: none;
  position: relative;
  overflow: hidden;
}

.cart-header-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  pointer-events: none;
}

.cart-header-enhanced h5 {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
  position: relative;
  z-index: 1;
}

.cart-item-enhanced {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
}

.cart-item-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cart-item-image-enhanced {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.cart-item-details-enhanced {
  flex: 1;
  padding-left: 1rem;
}

.cart-item-name-enhanced {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.cart-item-price-enhanced {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.1rem;
}

.cart-item-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.quantity-controls-enhanced {
  display: flex;
  align-items: center;
  background: var(--light-bg);
  border-radius: 25px;
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  min-width: 120px;
}

.quantity-btn-enhanced {
  background: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quantity-btn-enhanced:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.quantity-btn-enhanced:disabled {
  background: #e9ecef;
  color: #adb5bd;
  cursor: not-allowed;
}

.quantity-input-enhanced {
  border: none;
  background: transparent;
  text-align: center;
  width: 40px;
  font-weight: 600;
  color: #2c3e50;
}

.quantity-input-enhanced:focus {
  outline: none;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 4px;
}

.remove-btn-enhanced {
  background: none;
  border: none;
  color: var(--danger-color);
  padding: 0.5rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.remove-btn-enhanced:hover {
  background: var(--danger-color);
  color: white;
  transform: scale(1.1);
}

.cart-summary-enhanced {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  margin: 1rem 0;
}

.summary-row-enhanced {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.summary-row-enhanced:last-child {
  border-bottom: none;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--primary-color);
}

.summary-label-enhanced {
  color: var(--text-muted);
  font-weight: 500;
}

.summary-value-enhanced {
  font-weight: 600;
  color: #2c3e50;
}

.free-delivery-enhanced {
  color: var(--success-color);
  font-weight: 600;
}

.original-price-enhanced {
  text-decoration: line-through;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.grand-total-enhanced {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.savings-badge-enhanced {
  background: linear-gradient(135deg, var(--success-color), #20c997);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
  margin-left: 0.5rem;
}

