/* ================================
   PAGE LAYOUT
================================ */
.weekly-layout {
  display: flex;
  gap: 30px;
  padding: 20px;
  /* Standard Desktop Max-Width */
  max-width: 1200px;
  margin: 0 auto;
}

/* ================================
   SIDEBAR (Desktop)
================================ */
.weekly-sidebar {
  position: sticky;
  top: 120px;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.weekly-sidebar button {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 10px;
  font-size: 16px; /* Standardized from 18px */
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
  font-weight: 600;
  font-family: inherit;
}

.weekly-sidebar button:hover {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

/* ================================
   WEEKLY WRAPPER
================================ */
.weekly-wrapper {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.weekly-title {
  text-align: center;
  /* Auto-adjusts between 24px and 32px */
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
}

.wm-date-range {
  text-align: center;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 600;
  margin-top: -5px;
  margin-bottom: 25px;
  color: black;
  width: 100%;
}

/* ================================
   DAY CARD
================================ */
.weekly-day-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 25px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: 0.2s ease;
  width: 100%;
}

.weekly-day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.weekly-day-title {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 600;
  margin-bottom: 15px;
  color: #d35400;
}

/* ================================
   ITEM ROW
================================ */
.weekly-item-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  margin: 10px 0;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.weekly-item-row:last-child {
  border-bottom: none;
}

.weekly-name {
  font-size: clamp(15px, 3.5vw, 18px);
  font-weight: 600;
  color: #333;
}

.weekly-price {
  font-size: clamp(15px, 3.5vw, 18px);
  font-weight: 700;
  color: #777;
  padding-right: 20px;
}

/* ================================
   ADD BUTTON
================================ */
.weekly-add-btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: 0.2s ease;
}

.weekly-add-btn:hover {
  background: #2ecc71;
}

/* ================================
   MODAL
================================ */
.weekly-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.weekly-modal-box {
  background: #ffffff;
  width: 90%;
  max-width: 420px;
  padding: 30px 25px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.25s ease;
}

.weekly-modal-box h2 {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 700;
  margin-bottom: 15px;
  color: #333;
}

.wm-qty-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 20px 0;
}

.wm-qty-btn {
  width: 40px; /* Standard touch size */
  height: 40px;
  border: none;
  background: #eee;
  border-radius: 8px;
  font-size: clamp(18px, 4vw, 22px);
  cursor: pointer;
  transition: 0.2s ease;
}

.wm-qty-btn:hover {
  background: #ddd;
}

.wm-qty-number,
.wm-inline-price,
#wm-total-price {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  color: #333;
}

.wm-total-row {
  display: flex;
  justify-content: space-between;
  max-width: 180px;
  margin: 0 auto 20px auto;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.wm-add-cart,
.wm-close-btn {
  width: 100%;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s ease;
}

.wm-add-cart {
  background: #27ae60;
  color: white;
}

.wm-close-btn {
  background: #bdc3c7;
  color: #333;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ================================
   AUTO ADJUST FOR PHONES & TABLETS
================================ */
@media (max-width: 768px) {
  .weekly-layout {
    flex-direction: column;
    padding: 10px;
    gap: 15px;
  }

  .weekly-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .weekly-sidebar button {
    flex: 0 0 auto;
    font-size: 14px;
    padding: 10px 14px;
  }

  .weekly-day-card {
    padding: 15px;
  }

  .weekly-item-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .weekly-price {
    padding-right: 5px;
    text-align: right;
  }

  .weekly-add-btn {
    grid-column: span 2; /* Full width button on mobile for better touch */
    width: 100%;
    font-size: 14px;
    padding: 12px;
  }
}

/* ================================
   ⭐ MOBILE HEADER (MATCH CATERING / DESSERT)
================================ */
.mobile-header {
  display: none;
}

@media (max-width: 768px) {
  .main-header {
    display: none !important;
  }

  .mobile-header {
    display: block;
    width: 100%;
    background: #ffffff;
    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 {
    position: relative;
  }

  .mobile-cart img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  #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;
  }

  .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;
  }

  .mobile-dropdown {
    display: none;
    flex-direction: column;
    background: #ffffff;
    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;
  }

  .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);
    }
  }
}
