/* --- Base styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #fff;
  color: #222;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* --- Welcome Page --- */
.welcome .container {
  width: 90%;
  max-width: 380px;
  padding-top: 60px;
  text-align: center;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #aaa;
  margin-bottom: 40px;
}

.headline {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 800;
  color: #222;
  margin-bottom: 20px;
}

.headline span {
  color: #c43a2f;
}

.description {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin-bottom: 40px;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  cursor: pointer;
}

.btn.primary {
  background-color: #f8e1a3;
  border: none;
}

.btn.outline {
  background: none;
  border: 2px solid #f8e1a3;
  color: #222;
}

.guest {
  display: inline-block;
  font-size: 14px;
  color: #666;
  text-decoration: underline;
  margin-top: 10px;
}

/* --- Home Page --- */
.home {
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background-color: #fff;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 380px;
  margin-bottom: 20px;
}

.user-info h2 {
  font-size: 22px;
  font-weight: 700;
}

.user-info p {
  color: #666;
  font-size: 14px;
}

.avatar {
  width: 40px;
  height: 40px;
  background: #ddd;
  border-radius: 50%;
}

.regular-order {
  width: 100%;
  max-width: 380px;
  background-color: #f8e1a3;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 30px;
}

.mystery, .sandwiches {
  width: 100%;
  max-width: 380px;
  margin-bottom: 20px;
}

.mystery h3, .sandwiches h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.cards {
  display: flex;
  gap: 12px;
}

.card {
  flex: 1;
  border-radius: 15px;
  background: #f7f7f7;
  padding: 15px;
  text-align: center;
}

.card.blue {
  background-color: #d9f1f9;
}

.card.green {
  background-color: #e5f9d9;
}

.card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
}

.card p {
  font-size: 12px;
  color: #555;
  margin-bottom: 10px;
}

.card .btn.small {
  padding: 8px 0;
  font-size: 14px;
  border-radius: 8px;
  background-color: #ffe48b;
  border: none;
}

.image-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 8px;
}

.price {
  font-weight: 600;
  color: #222;
  margin-bottom: 5px;
}

.footer-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 380px;
  display: flex;
  justify-content: space-around;
  background-color: #fff;
  border-top: 1px solid #eee;
  padding: 10px 0;
}

.nav-icon {
  font-size: 22px;
}
/* footer nav */
.footer-nav a {
  text-decoration: none;
  color: #222;
  font-size: 22px;
  transition: all 0.2s ease;
}

.footer-nav a.active {
  color: #c43a2f; /* red accent from your theme */
  transform: scale(1.2);
}

.footer-nav a:hover {
  opacity: 0.7;
}

/* header nav */
/* --- Header Nav (Topbar) --- */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 380px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  z-index: 100;
}

.logo-link {
  font-weight: 700;
  font-size: 18px;
  color: #c43a2f; /* fall red accent */
  text-decoration: none;
}

.icon-link {
  font-size: 22px;
  color: #222;
  text-decoration: none;
}

.icon-link:hover {
  opacity: 0.7;
}
body.home, body.welcome {
  padding-top: 70px; /* space for header */
  padding-bottom: 70px; /* space for footer */
}

/* form support */

/* --- Form Styling --- */
form.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

form label {
  font-size: 14px;
  color: #444;
}

form input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

form input:focus {
  border-color: #f8e1a3;
  background-color: #fffdf1;
}

/* --- Shop Grid Fix (3 items per row) --- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  justify-items: center;
  align-items: stretch;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;        /* center grid horizontally */
  box-sizing: border-box;
}

.shop-grid .card {
  flex: none !important;
  background: #f7f7f7;
  text-align: center;
  border-radius: 12px;
  padding: 12px;
}
.container {
  max-width: 420px;
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
}

@media (max-width: 420px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* all habit  */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: center;
}
th {
  background: #f8e1a3;
  font-weight: 600;
}
tr:hover {
  background: #fffdf5;
}

/* color for timer  */
.next-checkin[data-time="low"] { color: #e65c5c; }   /* <2h left */
.next-checkin[data-time="medium"] { color: #e6a350; }/* 2–6h left */
.next-checkin[data-time="high"] { color: #1b9b4f; }   /* >6h left */


/* for shop  */

.shop-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  padding: 10px;
}

.shop-scroll::-webkit-scrollbar { display: none; }

.card-award {
  flex: 0 0 calc(33.33% - 10px); /* 3 per view */
  scroll-snap-align: start;
  min-width: 110px;
}

.section-title {
  position: sticky;
  top: 60px;
  background: white;
  z-index: 2;
}


.pet-tools {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.pet-tools form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
}

.pet-tools input[type="text"] {
  flex: 1 1 60%;
  min-width: 60px;
  max-width: 80px;
  text-align: center;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 12px;
  box-sizing: border-box;
}

.btn.small {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}


/*pet in logo*/
.logo-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

/* 🐾 Pet emoji bounce animation */
.pet-logo {
  display: inline-block;
  animation: petBounce 2.5s ease-in-out infinite;
}

@keyframes petBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
