/* ================= GLOBAL ================= */
html, body {
  height: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: arial, sans-serif;
  background-color: #fdfdfd;
  color: #2f1e3d;
  line-height: 1.6;
  scrollbar-width: none;
}

/* ================= HEADER / NAVBAR ================= */
header {
  width: 99%;
  height: 40px;
  background: #503f46;
  color: #fff;
  padding: 0.8rem 1.5rem;
  position: sticky;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between; /* center header content by default */
  align-items: center;
  z-index: 1000;
}

/* 📱 Mobile Responsive (screens below 480px) */
@media (max-width: 480px) {
  header {
    padding-left: 0rem;
    padding-right: 0.5rem;
  }

  nav {
    width: 100%;
    max-width: 468px;
    justify-content: space-between;
  }
}

.logo img {
  height: 120px;
  width: auto;
  object-fit: contain;
  display: block;
}

nav {
    justify-content: space-between; /* logo left, search center, controls right */
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 5px 15px;
  height: 60px;
  position: relative;
}

nav ul {
    margin: 0; /* reset margin */
  gap: 15px;
  font-size: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}
nav a:hover {
  color: #f3c677;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  order: 3; /* nav links order */
}
.nav-links.open {
  display: flex !important;
  flex-direction: column;
  background: #2f1e3d;
  position: absolute;
  top: 60px;
  right: 0;
  width: 100%;
  padding: 1rem;
  text-align: center;
}

/* Hamburger button */
.hamburger {
  display: none; /* hidden by default, will show on small screens */
  font-size: 26px;
  cursor: pointer;
  color: #fff;
  background: none;
  border: none;
  margin: 0;
  order: 4; /* hamburger order */
  z-index: 2100;
}

/* Make header content centered: logo + nav */
nav .logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo { order: 1; }

/* ensure nav-links and search align nicely */
.nav-search {
  flex: 1 1 300px;
  min-width: 120px;
  order: 2; /* search order */
}

/* On larger screens make header layout horizontal and spaced */
@media (min-width: 769px) {
  header {
    padding: 0.8rem 2rem;
  }

  nav {
    width: 100%;
    max-width: 1200px;
    justify-content: space-between;
  }

  .nav-links {
    display: flex;
    align-items: center;
  }
}

/* ================= SEARCH BAR ================= */
.nav-search {
  flex: 2;
  display: flex;
  justify-content: center;
  position: relative;
}
.nav-search input {
  width: 60%;
  padding: 8px 36px 8px 12px;
  border-radius: 20px 0 0 20px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}
#clear-search {
  position: absolute;
  right: 125px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  display: none;
  color: #666;
}
#clear-search:hover {
  color: #e91e63;
}
.nav-search button#search-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 0 20px 20px 0;
  background: #403036;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}
.nav-search button#search-btn:hover {
  background: #59464d;
}

/* ================= HERO ================= */
.hero {
  width: 100vw;
  height: 100vh;
  background: url('hero.svg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 20px;
  position: relative;
  margin: 0;
  overflow: hidden;
}

/* Hero Text Container */
.hero-content {
  position: relative;
  max-width: 800px;
  padding: 0 20px;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3rem;  /* desktop size */
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.hero-content button {
  padding: 12px 25px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #503c44;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
}

.hero-content button:hover {
  background: #e91e63;
}

/* 📱 Mobile Responsive (screens below 1024px) */
@media (max-width: 1024px) {
  .hero {
    margin-top: -109px;
    padding: 15px;
    background-size: contain;

  }

  .hero-content h1 {
    font-size: 2rem;   /* smaller heading */
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-content button {
    font-size: 0.9rem;
    padding: 10px 20px;
  }



}

/* 📱 Mobile Responsive (screens below 768px) */
@media (max-width: 768px) {
  .hero {
    margin-top: -119px;
    height: 50vh;
    padding: 15px;
    background-size: contain;

  }

  .hero-content h1 {
    font-size: 1.5rem;   /* smaller heading */
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-content button {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
}
/* 📱 Mobile Responsive (screens below 480px) */
@media (max-width: 480px) {
  .hero {
    margin-top: -108px;
    height: 50vh;
    padding: 15px;
    background-size: contain;
  }

  .hero-content h1 {
    font-size: 12px;   /* smaller heading */
    text-align: left;
    padding-right: 50px;
    margin-bottom: 0px;
  }

  .hero-content h2 {
    text-align: left;
    font-size: 10px;
  }

.logo{
  width: 80px;
}

  .hero-content button {
    font-size: 0.9rem;
    padding: 10px 20px;
  }


  /* Show hamburger only on small screens */
  .hamburger {
    display: block;
  }

  /* Center logo and nav on small screens */
  nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .logo img {
    height: 80px; /* reduce logo size */
  }

  /* Collapse nav links into full-width vertical menu when open */
  .nav-links {
    display: none; /* hidden by default on mobile */
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #503c44;
    padding: 1rem 0;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links.open {
    display: flex !important;
  }

  /* slide-down animation for mobile menu */
  .nav-links {
    transition: max-height 0.28s ease, opacity 0.2s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
  }

  .nav-links.open {
    max-height: 320px; /* allow menu to expand */
    opacity: 1;
  }

  .nav-links li a {
    display: block;
    padding: 10px 0;
    font-size: 16px;
  }

  /* Make search take full width below nav when menu is closed */
  .nav-search {
    order: 3;
    width: 100%;
    margin-top: 8px;
  }

  .nav-search input {
    width: 100%;
  }
}

  /* further reduce logo on very small devices */
  .logo img {
    height: 80px;
  }

  nav {
    padding: 8px 10px;
  }


/* ================= PRODUCTS ================= */
.products {
  padding: 2rem;
  text-align: center;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.product-card {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
  .products{
    padding: 0rem;
  }
}

/* ================= CONTACT ================= */
.contact {
  padding: 2rem;
  background: #f3f3f3;
}
#contactForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}
input, textarea {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
}
button {
  background-color: #503c44;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
button:hover {
  background-color: #5e3b7a;
}

/* ================= CART ================= */
.cart-content {
  max-height: 70vh;
  overflow-y: auto;
}
.cart-items {
  margin: 1rem 0;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}
#checkout-btn {
  background: #503c44;
  color: white;
}
#checkout-btn:hover {
  background: #5e3b7a;
}
#close-cart {
  background: #f1f1f1;
  color: #333;
}
#close-cart:hover {
  background: #ddd;
}

/* Cart Sidebar */
#cart-sidebar {
  position: fixed;
  right: -400px; /* hidden by default */
  top: 0;
  width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 12px rgba(0,0,0,0.15);
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

#cart-sidebar.open {
  right: 0;
}

/* Header */
#cart-sidebar h2 {
  background: #2f1e3d;
  color: #fff;
  margin: 0;
  padding: 15px;
  font-size: 18px;
  text-align: center;
  border-radius: 0 0 12px 12px;
}

/* Cart Items */
#cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.cart-item .remove {
  background: transparent;
  border: none;
  color: #d9534f;
  font-size: 18px;
  cursor: pointer;

}

/* Cart Footer */
.cart-footer {
  padding: 15px;
  border-top: 1px solid #eee;
}

#cart-total {
  font-weight: bold;
  font-size: 16px;
  display: block;
  margin-bottom: 10px;
}

#checkout-btn {
  width: 100%;
  padding: 12px;
  background: #503c44;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

#checkout-btn:hover {
  background: #5e3b7a;
}

/* ================= CHECKOUT MODAL ================= */
/* Checkout Modal */
#checkout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#checkout-modal .modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  position: relative;
}

#checkout-modal h2 {
  margin-top: 0;
  color: #5e3b7a;
  text-align: center;
}

#checkout-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}

#checkout-close:hover {
  color: #000;
}

/* Checkout Form */
#checkout-form label {
  font-size: 14px;
  display: block;
  margin: 10px 0 5px;
}

#checkout-form input,
#checkout-form select,
#checkout-form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 14px;
  margin-bottom: 10px;
}

#checkout-form button {
  width: 100%;
  padding: 12px;
  background: #2f1e3d;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
}

#checkout-form button:hover {
  background: #5e3b7a;
}

/* ================= GENERAL MODALS ================= */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-box {
  background: #fff;
  padding: 25px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.modal-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #2f1e3d;
}
.modal-form .form-group {
  margin-bottom: 15px;
}
.modal-form input,
.modal-form textarea,
.modal-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.modal-btn {
  width: 100%;
  padding: 12px;
  background: #503c44;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}
.modal-btn:hover {
  background: #5e3b7a;
}

/* ================= FOOTER ================= */
footer {
  width: 100vw;
  background: black;
  color: white;
  text-align: center;
  padding: 1rem;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .logo img { height: 80px; }
  nav { flex-wrap: wrap; height: auto; }
  .nav-search input { width: 100%; }

  /* Hide links initially */
  .nav-links {
    display: none;
    flex-direction: column;
    background: #2f1e3d;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    padding: 1rem;
    text-align: center;
  }
  .nav-links.open {
    display: flex;
  }

  /* Show hamburger in mobile */
  .hamburger { display: block; }
}

@media (max-width: 480px) {
  .logo img { height: 150px; padding-left: 50px; }
  .cart-sidebar { width: 100%; right: -100%; }
  .cart-sidebar.open { right: 0; }
  .modal-box { width: 95%; padding: 15px; border-radius: 8px; }
  .product-grid { grid-template-columns: 1fr; }
  button, .modal-btn { font-size: 15px; padding: 14px; }
  body { font-size: 14px; line-height: 1.5; }
}
/* Cart count badge */
#cart-count {
  background: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}
/* ================= ADMIN LOGIN MODAL ================= */
#admin-login-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #2f1e3d;
  justify-content: center;
  align-items: center;
}

#admin-login-modal .modal-content {
  background: #fff;
  padding: 25px;
  width: 90%;
  max-width: 350px;
  border-radius: 12px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: popIn 0.3s ease;
}

#admin-login-modal h2 {
  margin-bottom: 15px;
  color: #2f1e3d;
  font-size: 1.4rem;
}

#admin-login-modal input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

#admin-login-modal button {
  background: #2f1e3d;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}
#admin-login-modal button:hover {
  background: #5e3b7a;
}

#loginResponse {
  margin-top: 10px;
  font-size: 14px;
  color: red;
}

#admin-login-modal .close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 20px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  transition: color 0.3s;
}
#admin-login-modal .close-btn:hover {
  color: #5e3b7a;
}

/* Small animation */
@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

/* Product Card */
.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 1rem;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.product-card h3 {
  font-size: 1rem;
  margin: 0.4rem 0;
}

.product-card p {
  font-size: 0.9rem;
  color: #555;
  margin: 0.2rem 0 0.8rem;
}

.product-card .price {
  color: #2f1e3d;
  font-weight: bold;
  margin-bottom: 0.6rem;
}

.product-card button {
  background: #503c44;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.3s;
}
.product-card button:hover {
  background: #5e3b7a;
}

/* Category Filter */
#category-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1rem;
}
.filter-btn {
  background: #eaeaea;
  color: #2f1e3d;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}
.filter-btn:hover {
  background: #503c44;
  color: #fff;
}
.filter-btn.active {
  background: #503c44;
  color: #fff;
}

/* 🟣 Mobile: 2 per row */
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-card img {
    height: 150px;
  }

  .product-card h3 {
    font-size: 0.9rem;
  }

  .product-card .price {
    font-size: 0.85rem;
  }

  .product-card button {
    font-size: 0.8rem;
    padding: 6px;
  }
}
footer {
  background: #503c44;  /* brand color */
  color: #fff;
  text-align: center;
  padding: 1.2rem 0;
  margin-top: 3rem;
}

.footer-content p {
  margin: 0;
  font-size: 0.9rem;
}

.social-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-links a {
  color: #fff;
  font-size: 1.6rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
  transform: scale(1.2);
  color: #f8c4d8; /* soft pink hover — matches your brand */
}
@media (max-width: 480px) {
  .product-grid{
    color: #000;
  }
}
.cart-icon-wrapper {
  position: relative;
  margin-left: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  color: #333;
  position: relative;
}

#cart-count {
  background: crimson;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 2px 6px;
  position: absolute;
  top: -8px;
  right: -10px;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: none; /* Lọ́fíndà purple */
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: bold;
}

.cart-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.cart-modal.open {
  display: flex;
}

.cart-content {
  background: white;
  width: 90%;
  max-width: 400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #503f46;
  color: white;
  padding: 1rem;
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
}

.cart-items {
  max-height: 250px;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cart-item span {
  font-size: 0.9rem;
}

.remove {
  background: none;
  border: none;
  color: crimson;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
}

.cart-footer {
  border-top: 1px solid #eee;
  padding: 1rem;
  text-align: center;
}

.checkout-btn {
  background: #7b2cbf;
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: 600;
}

.checkout-btn:hover {
  background: #5a189a;
}
@media (max-width: 480px) {
  .header-right {
    gap: 0px;
  }

  #cart-count {
    top: -6px;
    right: -8px;
  }
}

/* Default (desktop) */
.search-icon {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
}

/* Search bar default state (hidden) */
.search-bar {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  background: #503c44;
  padding: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  z-index: 99;
}

/* When visible */
.search-bar.show {
  opacity: 1;
  max-height: 80px;
}

/* Search input styles */
.search-bar input {
  width: 70%;
  padding: 8px 12px;
  border: none;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
}

/* Search button */
#search-btn {
  background: #403036;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
  font-weight: bold;
}

#search-btn:hover {
  background: #59464d;
}

/* 🔍 Search icon & other header buttons */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 100;
}

.icon-btn, .cart-btn, .hamburger {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
}

/* 📱 Mobile */
@media (max-width: 768px) {
  .search-bar {
    top: 55px;
    background: #503c44;
    padding: 10px;
  }

  .search-bar input {
    width: 80%;
  }
}

h1 {
  color: black;
  text-align: left;
    display: block; ;
    font-size: 20px;
    opacity: 60%;
    padding-right: 135px;
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}
