/* Deal of the Day Section - Enhanced with Touch & Arrow Navigation */
.deal-of-the-day {
  padding: 20px 0;
  background-color: #fff;
  margin: 0px 0;
  border-radius: 0px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 0 10px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.slider-nav {
  display: flex;
  gap: 10px;
}

.slider-nav button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-nav button:hover {
  background: #f7f7f7;
  border-color: #bbb;
}

.slider-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Enhanced Deals Carousel with Touch Support */
.deals-carousel {
  position: relative;
  overflow: hidden;
  padding: 0 10px; /* 10px margin on sides */
  margin: 10px 0;
}

.deals-grid {
  display: flex;
  gap: 5px; /* 10px gap between products */
  transition: transform 0.5s ease;
  scroll-behavior: smooth;
  padding: 5px 0; /* Extra padding for visual balance */
  cursor: grab;
}

.deals-grid:active {
  cursor: grabbing;
}

/* Hide scrollbar but allow scrolling */
.deals-grid {
  -ms-overflow-style: none;
  scrollbar-width: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.deals-grid::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 calc(50% - 5px); /* 2 cards (accounting for 10px gap) */
  min-width: 0;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  user-select: none;
}

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

/* Product card content styles remain the same */
.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e53935;
  color: white;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 1;
}

.product-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.default-image {
  opacity: 0.6;
}

.product-details {
  padding: 10px;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0 5px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-description {
  font-size: 0.8rem;
  color: #666;
  margin: 0 0 10px;
  height: 2.4rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price {
  margin: 10px 0;
}

.current-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: #020b38;
}

.original-price {
  font-size: 0.8rem;
  color: #999;
  text-decoration: line-through;
  margin-left: 5px;
}

.product-timer {
  background: #f8f8f8;
  padding: 8px;
  border-radius: 4px;
  margin: 10px 0;
  text-align: center;
}

.timer {
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: bold;
  color: #28d705;
}

.timer-label {
  font-size: 0.7rem;
  color: #666;
  margin-top: 3px;
}

.timer .expired {
  color: #999;
  font-size: 0.8rem;
}

.add-to-cart {
  width: 100%;
  padding: 8px;
  background: #f70000;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.add-to-cart:hover {
  background: #ce3700;
}

.add-to-cart:disabled {
  background: #999;
  cursor: not-allowed;
}

.deal-expired {
  opacity: 0.8;
}

/* Loading, Error, and No Deals states remain the same */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  min-height: 300px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: #e53935;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state, .no-deals {
  text-align: center;
  padding: 20px;
}

.error-state {
  color: #e53935;
}

.no-deals {
  color: #666;
}

.retry-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background: #e53935;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Responsive Breakpoints */
/* Tablets - 3 products */
@media (min-width: 600px) {
  .product-card {
    flex: 0 0 calc(33.333% - 7px); /* 3 cards with 10px gap */
  }
}

/* Small Desktops - 4 products */
@media (min-width: 900px) {
  .product-card {
    flex: 0 0 calc(25% - 8px); /* 4 cards with 10px gap */
  }
}

/* Large Desktops - 5 products */
@media (min-width: 1200px) {
  .product-card {
    flex: 0 0 calc(20% - 8px); /* 5 cards with 10px gap */
  }
}

/* Touch scroll improvements */
@media (hover: none) {
  .deals-grid {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  .slider-nav {
    display: none; /* Hide arrows on touch devices if preferred */
  }
}