@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');


/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Arial", sans-serif;
  background-color: #f9faf7;
  color: #333;
  line-height: 1.6;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #f9faf7;
  color: #333;
  line-height: 1.6;
  background-image: URL("/images/MemoriesCornerLogo.png");
  background-repeat: repeat-x;
  background-position:center;
}

a {
  text-decoration: none;
  color: #2a7f62;
  font-size: 1rem;
}

header {
  background: #d9f0e6;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #a3c5aa;
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f5a3a;
}

.logo-rotate {

      width: 130px;
      height: 130px;
      /* animation: spinY 3s linear infinite; */
      animation: spinY 15s linear infinite;
      transform-style: preserve-3d;
    }


.navbar {
  width: 100%;
  height: 60px;
  max-width: 1200px;
  margin: 0;
  padding: 0;
  display: flex;
  box-sizing: border-box;
  font-family: "Noto Sans TC", "Open Sans", sans-serif;
  align-items: center;
  justify-content: space-between;
}

body.navbar {
  height: 100vh;
  background-color: #8fb99e;
  background-size: cover;
  background-position: center;
}

.navbar ul {
  display: flex;
  gap: 20px;
  list-style: none;

}
.navbar ul li a {
  font-weight: 600;
  padding: 5px 10px;
  list-style: none;
  transition: background-color 0.3s ease;
}
.navbar ul li a:hover {
  background-color: #a3c5aa;
  color: #fff;
  border-radius: 4px;
}

.navbar .logo a {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar .nav_links {
  display: flex;
  gap: 2rem;
}
.navbar .toggle_btn {
  color: #225a2e;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

.action_btn {
  background-color: #225a2e;
  color: #fff;
  padding: 0.5rem 1rem;
  border: none;
  outline: none;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
}

.action_btn:hover {
  scale: 1.05;
  color: #fff;
}

.action_btn:active {
  scale: 0.95;
}








/* Main container */
.container {
  max-width: 1200px;
  margin: 20px auto 50px;
  padding: 0 20px;
}

/* Product categories navigation */
.categories {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.categories button {
  background: #e3f0e9;
  border: 2px solid #8fb99e;
  color: #527a58;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.categories button.active,
.categories button:hover {
  background: #527a58;
  color: #fff;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.product-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgb(0 0 0 / 0.15);
}
.product-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.product-info {
  padding: 15px 18px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #23532a;
}
.product-info p.desc {
  flex-grow: 1;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 12px;
}
.product-info button {
  background: #2a7f62;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.product-info button:hover {
  background: #1f5a3a;
}

/* Modal for product details */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal.active {
  display: flex;
}
.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.8rem;
  font-weight: bold;
  color: #777;
  cursor: pointer;
  border: none;
  background: none;
}
.modal-content img {
  width: 100%;
  margin-bottom: 15px;
  border-radius: 6px;
  object-fit: cover;
  max-height: 300px;
}
.modal-content h2 {
  color: #23532a;
  margin-bottom: 15px;
}
.modal-content p {
  margin-bottom: 12px;
  line-height: 1.4;
}
.modal-content h3 {
  color: #3a6e43;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* === User Login === */
#checkLogin {
  color: blue;
}

/* Cart styling */
.cart-btn {
  background: #2a7f62;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  position: fixed;
  /* bottom: 30px; */
  bottom:106px;
  /* right: 30px; */
  right: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 101;
  /* z-index: 101;  */
}
.cart-btn:hover {
  background: #1f5a3a;
}
.cart-modal {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  /* z-index: 100; */
  padding: 20px;
}
.cart-modal.active {
  display: flex;
}
.cart-content {
  background: white;
  width: 90%;
  max-width: 600px;
  border-radius: 10px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
}
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.cart-header h2 {
  color: #23532a;
}
.cart-close {
  font-size: 1.8rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #888;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
}
.cart-item h4 {
  flex: 1 1 100px;
  color: #2a7f62;
}
.cart-item .qty-btn {
  background: #a3c5aa;
  border: none;
  padding: 5px 10px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  border-radius: 4px;
}

.cart-item .qty-btn:disabled {
  background: #ddd;
  cursor: not-allowed;
}

.cart-item .qty {
  margin: 0 10px;
}

.cart-total {
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 15px;
  text-align: right;
  color: #236a34;
}

.checkout-btn {
  background: #2a7f62;
  color: white;
  width: 100%;
  padding: 12px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  transition: background-color 0.3s ease;
}
.checkout-btn:hover {
  background: #1f5a3a;
}

/* Checkout form */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}
.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
  color: #2a7f62;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #a3c5aa;
  border-radius: 6px;
  font-size: 1rem;
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Brand Story */
.brand-story {
  background: #eaf4eb;
  border-radius: 10px;
  padding: 30px 20px;
  margin: 50px 20px;
  text-align: center;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  color: #225a2e;
}
.brand-story h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
}
.brand-story p {
  font-size: 1.1rem;
  line-height: 1.5;
}


/* Banner / Video */
.banner {
  position: relative;
  min-height: 52vh;
  display: grid;
  place-items: center;
  text-align: center;
  /* color: #fff; */
  color: #225a2e;
}
.banner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  /* background: var(--overlay); */
}
.banner-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  padding: 24px;
}
.banner h1 {
  font-size: 2.2rem;
  margin: 0 0 10px;
}
.banner p {
  opacity: 0.95;
  margin-bottom: 16px;
}
.banner-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
#marquee-box {
  width: 100%;
  overflow: hidden;
  height: 232px;

  background: #eaf4eb;
  border-radius: 10px;
  padding: 30px 20px;
  margin: 50px 20px;

}
#marquee-con {
  width: 500%;
  float: left;
}
#marquee,
#marquee-1 {
  float: left;
}
.marquee-img {
  float: left;
  height: 232px;
  width: 186px;
  margin-left: 16px;
}

/* marquee banner for Advertising */
#bnr {
  margin-top: 0;
  font-size: 1.3rem;
  font-weight: bold;
  color: rgb(94, 101, 232);
}

/* Back-to-Top */
/* #top {
  display: none; 
  position: fixed; 
  bottom: 10px; 
  right: 15px; 
  z-index: 99; 
  border: none; 
  outline: none;
  background-color: red; 
  color: white; 
  cursor: pointer; 
  padding: 15px; 
  border-radius: 10px; 
  font-size: 18px; 
} 
*/

 #top {
  /* background-image: url(./images/up-arrow.png); */
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 15px; /* Place the button at the bottom of the page */
  right: 15px; /* Place the button 30px from the right */
  z-index: 99; /* Make sure it does not overlap */
  border: none; /* Remove borders */
  /* outline: none; Remove outline */
  background-color: #2a7f62; /* Set a background color */
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 8px 12px; /* Some padding */
  border-radius: 20px; /* Rounded corners */
  /* font-size: 16px; Increase font size */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
} 
/* =============== Footer ========================= */
/* .footer {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  color: #2a7f62;
  background: #a3c5aa;
  border: 20px;
  padding: 5px 10px;
  font-weight: 700;
  border-radius: 4px;
} */

.footer {
  background-color: #f2f2f2;
  padding: 40px 20px;
  color: #2a7f62;
  font-size: 14px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-info,
.footer-contact,
.footer-social {
  flex: 1 1 250px;
  position: relative;
}

footer .footer-social.license {
  color: #23532a;
  font-style: italic;
  font-weight: bold;
}

.footer-contact input,
.footer-contact textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #a3c5aa;
  border-radius: 4px;
}

.footer-contact button {
  background-color: #2a7f62;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
}

.footer-social a img {
  width: 24px;
  margin-right: 10px;
}

footer .site-copyrights {
  display: flex;
  padding: 3px;
  background: none;
  color: #225a2e;
  text-align: center;
  justify-self: center;
}


/* ========== chatbox design ============== */
.chatbot {
  position: fixed;
  /* bottom: 20px; */
  bottom: 60px;
  right: 20px;
  z-index: 999;
}


/* .chatbot-btn {
  background-color: #2a7f62;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
} */

.chatbot-btn {
  background-color: #2a7f62;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  /* font-size: 16px; */
  font-weight: 600;
  /* right: 100px; */
  right: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  /* z-index: 101; */
  z-index: 50;
}

.chatbot-window {
  background: white;
  border: 2px solid #a3c5aa;
  border-radius: 8px;
  width: 300px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 60px;
  right: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.chatbot-header {
  background-color: #2a7f62;
  color: white;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
}

#chatbotInput {
  border: none;
  border-top: 1px solid #ccc;
  padding: 10px;
  font-size: 14px;
}



/* Dropdown menu */
.dropdown_menu {
  display: none;
  position: absolute;
  right: 2rem;
  top: 60px;
  height: 0;
  width: 300px;
  background: rgba(48, 123, 153, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 10px;
  overflow: hidden;
  transition: height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dropdown_menu.open {
  height: 240px;
  margin: 1.5rem;
  padding: 0px solid;
}

.dropdown_menu li {
  padding: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown_menu .action_btn {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ======== Login ========== */
.hidden {
  display: none;
}

#loginMessage {
  color: red;
  font-weight: bold;
  margin-top: 10px;
}





/* ======== Responsive design ========== */
@media (max-width: 768px) {
  navbar ul {
    display: none;
  }
  .banner h1 {
    font-size: 1.8rem;
    
  }
  .banner p {
    font-size: 1rem;
  }

}

@media (max-width: 992px) {
  .navbar .nav_links,
  .navbar .action_btn {
    display: none;
  }

  .navbar .toggle_btn {
    display: block;
  }

  .dropdown_menu {
    display: block;
  }

}

@media (max-width: 576px) {
  .dropdown_menu {
    left: 2rem;
    width: unset;
  }
}

@keyframes spinY {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

/* carousel */
        .carousel-container {
            position: relative;
            overflow: hidden;
            width: 100%;
            padding: 20px 0;
        }
        
        .carousel-wrapper {
            display: flex;
            transition: transform 0.5s ease;
            will-change: transform;
        }
        
        .carousel-card {
            min-width: 300px;
            max-width: 300px;
            height: 450px;
            margin: 0 15px;
            perspective: 1000px;
        }
        
        .card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            transition: transform 0.8s;
            transform-style: preserve-3d;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            border-radius: 10px;
        }
        
        .carousel-card:hover .card-inner {
            transform: rotateY(180deg);
        }
        
        .card-front, .card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 10px;
            overflow: hidden;
        }
        
        .card-front {
            background-color: #fff;
            display: flex;
            flex-direction: column;
        }
        
        .card-back {
            background-color: #fff;
            transform: rotateY(180deg);
            padding: 20px;
            overflow-y: auto;
        }
        
        .card-image {
            /* height: 200px;
            object-fit: cover;
            width: 100%; */
            height: 600px;
            object-fit: cover;
            width: 100%;
        }
        
        .card-title {
            background-color: #2a7f62;
            color: white;
            padding: 10px;
            text-align: center;
            font-weight: bold;
            font-size: 1.2rem;
        }
        
        .card-content {
            padding: 15px;
        }
        
        .card-content h4 {
            color: #2a7f62;
            margin-bottom: 10px;
            font-weight: bold;
        }
        
        .card-content p {
            margin-bottom: 10px;
            line-height: 1.6;
        }
        
        .btn-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgba(255, 255, 255, 0.8);
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 10;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }
        
        .btn-nav:hover {
            background-color: white;
            transform: translateY(-50%) scale(1.1);
        }
        
        .btn-prev {
            left: 10px;
        }
        
        .btn-next {
            right: 10px;
        }
        
        .carousel-indicators {
            display: flex;
            justify-content: center;
            margin-top: 20px;
        }
        
        .indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: #ccc;
            margin: 0 5px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .indicator.active {
            background-color: #2a7f62;
            transform: scale(1.2);
        }
        
        .video-container {
            position: relative;
            padding-bottom: 56.25%;
            height: 0;
            overflow: hidden;
            margin-bottom: 15px;
            border-radius: 5px;
        }
        
        .video-container video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        
        @media (max-width: 768px) {
            .carousel-card {
                /* min-width: 250px;
                max-width: 250px; */
                /* height: 400px; */
                  width: 100%;
                overflow: hidden;
                height: 400px;

                background: #eaf4eb;
                border-radius: 10px;
                /* padding: 30px 20px;
                margin: 50px 20px; */
                
            }
            
            .card-title {
                font-size: 1rem;
            }
            
            .card-content {
                padding: 10px;
            }
            
            .btn-nav {
                width: 40px;
                height: 40px;
            }
        }
        
        @media (max-width: 576px) {
            .carousel-card {
                min-width: 200px;
                max-width: 200px;
                height: 350px;
            }
            
            .card-image {
                /* height: 150px; */
                  float: left;
                  /* height: 232px; */
                  height: 350px;
                  width: 186px;
                  margin-left: 16px;

            }
            
            .card-title {
                font-size: 0.9rem;
            }
            
            .card-content h4 {
                font-size: 1rem;
            }
            
            .card-content p {
                font-size: 0.9rem;
            }
        }