/* ------------------------------------
🌟 CLOUD KITCHEN - HOME PAGE (CLEAN + FIXED)
------------------------------------ */

/* === GLOBAL LAYOUT === */
section {
  margin: 3rem auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.view-all {
  color: var(--color-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.view-all:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ------------------------------------
🖼️ HERO / BANNER SLIDER
------------------------------------ */
.banner-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-medium);
  height: 65vh;
  min-height: 380px;
}

.slides-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 16px;
  z-index: 1;
}

.slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  z-index: 2;
  padding: 0 1rem;
}

.slide-content h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  animation: fadeInUp 0.9s ease;
}

.slide-content p {
  font-size: 1.05rem;
  margin-bottom: 1.3rem;
  max-width: 550px;
  animation: fadeInUp 1s ease 0.2s;
}

.banner-btn {
  background: var(--color-primary);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
  animation: fadeInUp 1.1s ease 0.4s;
}

.banner-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
}

/* Navigation */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 3;
}

.nav-btn:hover {
  background: var(--color-primary);
}

.prev {
  left: 15px;
}
.next {
  right: 15px;
}

/* Dots */
.dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active,
.dot:hover {
  background: var(--color-primary);
}

/* ------------------------------------
💡 FEATURE CARDS
------------------------------------ */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem auto;
}

.feature-card {
  border-radius: 14px;
  color: white;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 1s forwards;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-text h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.feature-btn {
  background: white;
  color: #000;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.feature-btn:hover {
  background: #f4f4f4;
  transform: translateY(-2px);
}

/* ------------------------------------
🔥 HOT SELLING (Independent Section)
------------------------------------ */

/* ------------------------------------
🔥 HOT SELLING (with Quantity Controls)
------------------------------------ */
.hot-section {
  margin-top: 4rem;
}

.hot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 1.2rem;
}

.hot-card {
  position: relative;
  flex: 1 1 calc(25% - 1.2rem);
  max-width: calc(25% - 1.2rem);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

/* Image */
.hot-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.hot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hot-card:hover .hot-img img {
  transform: scale(1.05);
}

/* Info */
.hot-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.hot-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.4rem;
}

.hot-info .desc {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Price + Add to Cart Row */
.hot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hot-bottom .price {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1rem;
}

/* Quantity and Add Controls */
.hot-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qty-btn {
  border: none;
  background: #f4f4f4;
  color: #333;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.qty-btn:hover {
  background: #e0e0e0;
}

.qty-input {
  width: 36px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  padding: 0.25rem;
}

.add-btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.add-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}
/* ------------------------------------
   🪄 Add Button Animation
------------------------------------ */
.add-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, background 0.3s ease;
}

.add-btn.added {
  background: #28a745; /* success green */
  transform: scale(1.05);
}

.add-btn.added::after {
  content: "✓ Added";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slight bounce when pressed */
.add-btn:active {
  transform: scale(0.95);
}

/* Badges */
.hot-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff4d4d;
  color: #fff;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.food-type {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 2px solid #fff;
  z-index: 2;
}
.food-type.veg {
  background: #2ecc71;
}
.food-type.non-veg {
  background: #e74c3c;
}

.hot-selling .menu-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* ✅ Responsive Layout */
@media (max-width: 1024px) {
  .hot-card {
    flex: 1 1 calc(33.33% - 1rem);
    max-width: calc(33.33% - 1rem);
  }
}

@media (max-width: 768px) {
  .hot-card {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

/* ------------------------------------
   📱 Fix: Add to Cart Visibility in Hot Selling Section
------------------------------------ */
.hot-selling .add-to-cart {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

/* Mobile optimization for small screens */
@media (max-width: 600px) {
  .hot-selling .add-to-cart {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.3rem;
  }

  .hot-selling .qty-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.9rem;
  }

  .hot-selling .qty-input {
    width: 30px;
    font-size: 0.85rem;
    padding: 0.2rem;
  }

  .hot-selling .add-btn {
    flex: 1 1 100%;
    text-align: center;
    padding: 0.5rem 0.9rem;
    margin-top: 0.3rem;
    font-size: 0.9rem;
  }

  .hot-selling .menu-info {
    padding: 0.8rem;
  }

  .hot-selling .menu-card {
    overflow: visible; /* ensures no hidden buttons */
  }
}

@media (max-width: 480px) {
  .hot-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .hot-info {
    padding: 0.8rem;
  }

  .hot-controls {
    gap: 0.3rem;
  }

  .qty-input {
    width: 30px;
  }

  .add-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }
}

/* ------------------------------------
🍱 CATEGORY SECTION
------------------------------------ */
/* ------------------------------------
🍱 CATEGORY SECTION (Modern + Readable)
------------------------------------ */
.category-section {
  margin-top: 4rem;
}

.category-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
}

.category-card {
  position: relative;
  flex: 1 1 calc(20% - 1rem);
  max-width: calc(20% - 1rem);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: brightness(55%);
  transition: all 0.3s ease;
}

.category-card:hover img {
  filter: brightness(70%);
  transform: scale(1.05);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

/* Overlay Text */
.category-name {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.8rem 0.5rem;
  text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
}

/* ✅ Responsive Grid Fix */
@media (max-width: 1200px) {
  .category-card {
    flex: 1 1 calc(25% - 1rem);
    max-width: calc(25% - 1rem);
  }
}

@media (max-width: 992px) {
  .category-card {
    flex: 1 1 calc(33.33% - 1rem);
    max-width: calc(33.33% - 1rem);
  }
}

@media (max-width: 768px) {
  .category-card {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

@media (max-width: 480px) {
  .category-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .category-name {
    font-size: 0.9rem;
    padding: 0.6rem;
  }
}

/* ------------------------------------
🥗 TIFFIN PROMO
------------------------------------ */
/* =====================================================
🥗 TIFFIN PROMO — Improved Layout + Better Mobile View
===================================================== */

/* Main wrapper */
.tiffin-promo {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-light);
  padding: 2rem;
  margin-top: 3rem;
  width: 100%;
}

/* Flex container */
.tiffin-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: nowrap; /* Desktop only */
}

/* Image */
.tiffin-image img {
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  height: auto;
  object-fit: cover;
}

/* Content */
.tiffin-content {
  flex: 1;
}

.tiffin-content h3 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.tiffin-content p {
  color: #555;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.tiffin-content ul {
  margin-bottom: 1.5rem;
}

.tiffin-content li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.tiffin-content li i {
  color: var(--color-primary);
}

/* Button improvement */
.btn-orange {
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

.btn-orange:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
}

@media (max-width: 992px) {
  .tiffin-container {
    flex-direction: row;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
  }

  .tiffin-image img {
    max-width: 480px;
  }

  .tiffin-content {
    text-align: center;
  }
}

/* MOBILE FIX — This is the part that makes it truly responsive */
@media (max-width: 600px) {
  .tiffin-container {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    text-align: center;
    gap: 1.2rem;
  }

  .tiffin-image img {
    max-width: 100% !important;
    width: 100%;
  }

  .tiffin-content h3 {
    font-size: 1.3rem;
  }

  .tiffin-content p {
    font-size: 0.95rem;
  }

  .tiffin-content ul {
    text-align: left;
    margin: 0 auto;
    max-width: 90%;
  }

  .btn-orange {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1rem;
    font-size: 1rem;
  }
}
/* ------------------------------------
✨ ANIMATIONS
------------------------------------ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------
📱 MOBILE TWEAKS
------------------------------------ */
@media (max-width: 480px) {
  .banner-slider {
    height: 50vh;
  }

  .slide-content h2 {
    font-size: 1.4rem;
  }

  .slide-content p {
    font-size: 0.9rem;
  }
}

/* ============================================
📱 FORCE 2-CARDS GRID ON SMALL MOBILE (≤480px)
============================================ */

/* ⭐ Feature Cards */
@media (max-width: 480px) {
  .features {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem;
  }
}

/* ⭐ Hot Selling Products */
@media (max-width: 480px) {
  .hot-card {
    flex: 1 1 calc(50% - 0.6rem) !important;
    max-width: calc(50% - 0.6rem) !important;
  }
}

/* ⭐ Category Cards */
@media (max-width: 480px) {
  .category-card {
    flex: 1 1 calc(50% - 0.6rem) !important;
    max-width: calc(50% - 0.6rem) !important;
  }
}

