/* ================================
   DESSERTS SECTION
================================ */
.desserts-section {
  padding: 40px clamp(15px, 5vw, 20px);
  text-align: center;
}

/* ================================
   GRID (Standardized)
================================ */
#desserts-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}

/* ================================
   DESSERT CARD
================================ */
.dessert-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 25px; /* Standardized with your other cards */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s;
  border: 1px solid #f0f0f0;
}

.dessert-card:hover {
  transform: translateY(-5px);
}

.dessert-img {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin-bottom: 15px;
  background-color: #f8f9fa;
}

.dessert-card h3 {
  font-size: clamp(18px, 3vw, 22px);
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
  color: #1a1a1a;
}

.dessert-card p {
  margin: 0 0 15px 0;
  font-size: 17px;
  font-weight: 300; /* normal weight */
  color: #444; /* softer color */
  gap: 20px;
}
.tray-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* spacing between label and price */
}
.tray-label {
  font-size: 17px;
  font-weight: 400;
  color: #444;
}
.tray-price {
  font-size: 17px;
  font-weight: 500;
  color: #333;
}
/* ================================
   ⭐ TOAST NOTIFICATION (GLOBAL)
================================ */
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #27ae60;
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  z-index: 99999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   ADD BUTTON (Manual Control)
================================ */
.dessert-add-btn {
  background: #27ae60; /* Sleeker professional look */
  color: white;
  padding: 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  width: 100px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto; /* Pushes button to bottom of card */
  transition: all 0.2s ease;
}

.dessert-add-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
}

/* ================================
   MODAL RESTORATION
================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* lighter, faster */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  /* remove blur for speed */
  backdrop-filter: none;

  opacity: 1;
  transition: opacity 0.12s ease; /* faster fade */
}

.modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.modal-box {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease;
}

.qty-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
}
.qty-controls {
  display: flex;
  align-items: center;
  gap: 16px; /* this will finally work */
}
.total-label {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  font-size: 20px;
  font-weight: 600;
}

.qty-btn {
  width: 44px; /* Standard touch target */
  height: 44px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: #e9ecef;
}

.add-btn {
  background: #27ae60;
  color: white;
  padding: 14px;
  width: 100%;
  border: none;
  border-radius: 12px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  background: lightgrey;
  color: black;
  padding: 14px;
  width: 100%;
  border: none;
  border-radius: 12px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

/* ================================
   ⭐ MOBILE AUTO-ADJUST
================================ */
@media (max-width: 900px) {
  #desserts-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  #desserts-container {
    grid-template-columns: repeat(1, 1fr);
  }

  .dessert-card {
    padding: 20px;
  }

  .dessert-add-btn {
    width: 100%; /* Full width for easier tapping */
    height: 44px;
  }

  .qty-btn {
    width: 48px;
    height: 48px;
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* ================================
   ⭐ CART ICON & BADGE RESTORATION
================================ */
/* 1. Ensure the container is positioned relatively for the badge to stick to it */
.cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 20px; /* Adjust spacing from menu items */
  text-decoration: none !important;
}

/* 2. Style the actual image inside the cart link */
.cart-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

/* 3. The Green Circle Badge */
#cart-count {
  position: absolute;
  top: -8px; /* Moves it up above the icon */
  right: -10px; /* Moves it to the right of the icon */
  background: #27ae60; /* Brand green */
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 2px;
  border-radius: 50%;
  line-height: 1;
  min-width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid white; /* Adds a clean border to separate from icon */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* 4. Remove any weird underlines/borders from the cart link */
.cart-icon,
.cart-icon:hover,
.cart-icon:active {
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
}

/* ================================
   ⭐ MOBILE FIX FOR CART
================================ */
@media (max-width: 768px) {
  .cart-icon {
    margin-right: 15px; /* Adds space so it doesn't hit the edge of the phone */
  }

  #cart-count {
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
  }
}
/* ================================
   ⭐ MOBILE HEADER (EXACT CATERING)
================================ */
.mobile-header {
  display: none;
}

@media (max-width: 768px) {
  .main-header {
    display: none !important;
  }

  .mobile-header {
    display: block;
    width: 100%;
    background: white;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .mobile-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
  }

  .mobile-logo img {
    width: 55px;
  }

  .mobile-cart img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  .mobile-cart {
    position: relative;
  }

  .mobile-cart #cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #27ae60;
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* ⭐ MENU BAR */
  .mobile-menu-btn {
    width: 100%;
    text-align: center;
    padding: 14px 0;
    background: #f8f8f8;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
  }

  /* ⭐ DROPDOWN */
  .mobile-dropdown {
    display: none;
    flex-direction: column;
    background: white;
    border-bottom: 1px solid #eee;
  }

  .mobile-dropdown.active {
    display: flex;
  }

  .mobile-dropdown a {
    padding: 14px 20px;
    font-size: 17px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
  }

  .mobile-dropdown a:last-child {
    border-bottom: none;
  }
  #cart-count-mobile {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #27ae60;
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
  }

  /* ⭐ Bubble animation */
  .bubble-animate {
    animation: bubblePop 0.35s ease-out;
  }

  @keyframes bubblePop {
    0% {
      transform: scale(1);
    }
    40% {
      transform: scale(1.15);
    }
    70% {
      transform: scale(0.95);
    }
    100% {
      transform: scale(1);
    }
  }
}
