/* ================================
   GLOBAL
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f1f3f6;
  font-family: Roboto, Arial, sans-serif;
  color: #212121;
}

/* ================================
   SLIDER (LIKE IMAGE)
================================ */
.auto-slider {
  width: 100%;
  overflow: hidden;
  background: #fff;
}

.slider-track {
  display: flex;
  width: 200%;
  animation: infiniteSlide 12s linear infinite;
}

.slider-track img {
  width: 50%;
  height: 340px;
  object-fit: cover;
}

@keyframes infiniteSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ================================
   TODAY DEALS SECTION
================================ */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

/* ================================
   PRODUCT CARD (MATCH IMAGE)
================================ */
.product-card {
  background: #fff;
  border-radius: 4px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

/* IMAGE WRAPPER (NEW) */
.product-image {
  height: 140px;
  overflow: hidden;          /* hides extra width/height */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

/* IMAGE */
.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;       /* keeps aspect ratio */
}

.product-name {
  font-size: .9rem;
  font-weight: 500;
  height: 36px;
  overflow: hidden;
  margin-top: -10px;
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: #ad3120;
  margin-top: -30px;
}

.no-products {
  text-align: center;
  font-size: 16px;
  color: #ff4d4d;
  margin: 20px 0;
  font-weight: bold;
}



/* ================================
   BUY BUTTON
================================ */
.product-card .btn {
  margin-top: 6px;
  font-size: .8rem;
  border-radius: 4px;
  background: #ffc815;
  border-color: #ffc815;
  color:#1f1f1f;
  font-weight: bold;
}

/* ================================
   FEATURE STRIP
================================ */
.feature-strip {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.feature-strip p {
  font-weight: 600;
  margin-bottom: 2px;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .slider-track img {
    height: 200px;
  }
}



/* ===== LOADING OVERLAY ===== */
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55); /* transparent dark */
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  animation: fadeIn 1s ease;
}

.loader-box h5 {
  margin-top: 15px;
  font-weight: 600;
}

.loader-box p {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}

#countdown {
  font-size: 22px;
  font-weight: bold;
  color: #0d6efd;
}

/* Spinner */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #ddd;
  border-top: 4px solid #0d6efd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: auto;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.product-description {
  position: relative;
  font-size: 14px;
  color: #555;
}

.product-description .short-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;   /* number of visible lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description.expanded .short-text {
  -webkit-line-clamp: unset;
}

.toggle-desc {
  display: inline-block;
  margin-top: 6px;
  color: #0d6efd;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}



.category-bar {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 80px; /* below navbar */
  z-index: 99;
}

.category-scroll {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 10px;
  padding: 10px 12px;
  scrollbar-width: none; /* Firefox */
}

.category-scroll::-webkit-scrollbar {
  display: none; /* Chrome */
}

.category-item {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  text-decoration: none;
  color: #333;
  background: #f2f2f2;
  transition: all 0.2s ease;
}

.category-item.active {
  background: #0d6efd;
  color: #fff;
}


@media (max-width: 768px) {
  .category-bar {
  top: 75px; 
  
}
}