/* General Layout */
body {
  background-color: #2d004d;
  color: white;
  font-family: Arial, sans-serif;
  margin: 0;
}
h1 { 
  margin: 0; 
  font-size: 28px; 
}

/* Navbar */
.navbar {
  background-color: #1a0033;
  padding: 1em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: fixed;
  top: 0; left: 0;
  width: 95%;
  height: 70px;
  z-index: 1000;
}
.nav-right { 
  display: flex; 
  flex-direction: row; 
  align-items: center; 
  gap: 20px; 
}
.nav-links { 
  display: flex; 
  gap: 15px; 
}
.nav-links a, .sidebar a { 
  color: white; 
  text-decoration: none; 
}
.nav-links a { 
  font-weight: bold; 
}
.nav-links a:hover { 
  font-size: large; 
  font-weight: bold; 
}

/* Sidebar */
.sidebar {
  width: 200px;
  background-color: #1a0033;
  height: 100vh;
  position: fixed;
  top: 0; left: 0;
  padding-top: 120px;
}
.sidebar ul { 
  list-style: none; 
  padding: 0; 
}
.sidebar ul li { 
  margin: 15px 0; 
}

/* Main Content */
main { 
  margin-left: 220px; 
  padding: 140px 50px; 
}

/* Products */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.product-card {
  background-color: #1f1b2e;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  background-color: #5000a0;
}
.product-card img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
}
.product-card:hover img { 
  transform: scale(1.08); 
}

.product-card a {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background-color: #8000ff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  transition: background-color .3s ease, transform .2s ease;
}
.product-card a:hover { 
  background-color: #a000ff; 
  transform: scale(1.05); 
}

/* Contact Section */
.contact { 
  margin-top: 40px; 
  padding: 20px; 
  background-color: #1a0033; 
  border-radius: 10px; 
}

.contact h2 { 
  margin-bottom: 15px; 
}

.contact-form { 
  display: flex; 
  flex-direction: column; 
}

.contact-form label { 
  margin: 10px 0 5px; 
}

.contact-form input, .contact-form textarea {
  padding: 8px; 
  border: none; 
  border-radius: 5px; 
  margin-bottom: 10px;
}
.contact-form button { 
  background-color: #8000ff; 
  color: white; 
  padding: 10px; 
  border: none; 
  border-radius: 5px; 
  cursor: pointer; 
}

/* Search Bar */
.search-container { 
  display: flex; 
  align-items: center; 
}

.search-container form {
  display: flex; 
  align-items: center; 
  background-color: #1a0033; 
  padding: 4px; 
  border-radius: 6px;
}

.search-container input[type="text"] {
  padding: 6px 10px; 
  border: none; 
  border-radius: 5px 0 0 5px; 
  outline: none; 
  width: 180px;
  background-color: #fcfbfd; 
  color: #000;
}

.search-container input:hover { 
  border: 2px solid rgb(235,229,229); 
}

.search-container button {
  padding: 6px 12px; 
  background-color: #8000ff; 
  border: none; 
  border-radius: 0 5px 5px 0;
  color: white; 
  cursor: pointer; 
  font-weight: bold;
}

.search-container button:hover { 
  background-color: #a000ff; 
}

/* Login & Register */
.login-container {
  max-width: 400px; 
  margin: 100px auto; 
  padding: 30px;
  background-color: #2e2e4d; 
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,.6); 
  text-align: center; 
  color: #fff;
}

.login-container a { 
  color: white; 
}

.login-container .logo { 
  width: 200px; 
  margin-bottom: 20px; 
}

.login-container h2 { 
  margin-bottom: 20px; 
  font-size: 26px; 
  color: #fff; 
}

.login-container form { 
  display: flex; 
  flex-direction: column; 
  gap: 15px; 
}

.login-container input[type="text"],
.login-container input[type="email"],
.login-container input[type="password"] {
  padding: 12px; 
  border: none; 
  border-radius: 6px; 
  background-color: #444; 
  color: #fff; 
  font-size: 16px;
}

.login-container input::placeholder { 
  color: #ccc; 
}
.login-container button {
  padding: 12px; 
  background-color: #6a0dad; 
  color: white; border: none; 
  border-radius: 6px;
  font-size: 16px; 
  cursor: pointer; 
  transition: background .3s ease;
}

.login-container button:hover { background-color: #8a2be2; }

/* Product page */
.product-details { text-align: center; 
  padding: 180px 20px 20px; 
}

.product-detail-container {
  width: 600px; 
  margin: 20px 220px; 
  padding: 20px;
  background: #1e1e2f; 
  color: white; 
  border-radius: 10px;
  display: flex; 
  gap: 30px; 
  align-items: center;
}

.product-detail-container img { 
  width: 100%; 
  height: 100%; 
  border-radius: 10px; 
}

.product-info { 
  max-width: 600px; 
}

.product-info h2 { 
  font-size: 28px; 
  margin-bottom: 10px; 
}

.product-info .price { 
  font-size: 22px; 
  color: #a7f3d0; 
  margin-bottom: 10px; 
}

.product-info .description { 
  margin-bottom: 20px; 
  line-height: 1.5; 
}

.product-info button { 
  padding: 10px 20px; 
  background: #7c3aed; 
  color: white; 
  border: none; 
  border-radius: 8px; 
  font-size: 16px; 
  cursor: pointer; 
}

.product-info button:hover { 
  background: #a78bfa; 
}

/* AR view */
.ar-button {
  display: inline-block; 
  margin-top: 10px; 
  background-color: #8e44ad; 
  color: white;
  padding: 10px 16px; 
  text-decoration: none; 
  border-radius: 6px; 
  transition: background-color .3s ease;
}

.ar-button:hover { 
  background-color: #732d91; 
}
.ar-coming-soon { 
  text-align: center; 
  margin-top: 100px; 
  font-family: Arial, sans-serif; 
}
.ar-coming-soon h1 { 
  font-size: 2.5rem; 
  margin-bottom: 20px; 
}

.ar-coming-soon p { 
  font-size: 1.2rem; 
  color: #777; 
}

.ar-coming-soon a { 
  text-decoration: none; 
  color: #ffffff; 
}

.button-group { 
  margin-top: 1rem; 
}

.button-group button, .button-group .ar-button {
  margin-right: 10px; 
  padding: 10px 20px; 
  font-weight: bold; 
  border: none; 
  cursor: pointer;
}

.button-group .buy-now { 
  background-color: #8a2be2; 
  color: white; 
}

/* NFT page */
.nft-marketplace {
  margin-left: 220px;
  padding: 130px 20px 20px;
  background-color: #2d004d;
  color: #fff; 
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.nft-marketplace h2 { 
  font-size: 2.2rem; 
  margin-bottom: 1.5rem; 
  text-align: center; 
  color: #fff; 
}

.nft-list { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
  gap: 2rem; 
}

.nft-card {
  background-color: #1f1b2e; 
  padding: 1.5rem; 
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(0,0,0,.4); 
  text-align: center;
  transition: transform .3s ease, 
  box-shadow .3s ease;
}

.nft-card:hover { 
  transform: translateY(-8px) scale(1.03); 
  box-shadow: 0 8px 20px rgba(0,0,0,.4); 
  background-color: #5000a0; 
}

.nft-card img {
  width: 100%; 
  height: 200px; 
  object-fit: cover; 
  border-radius: 12px; 
  border: 2px solid #8a2be2;
  transition: transform .3s ease;
}

.nft-card img:hover { 
  transform: scale(1.08); 
}

.nft-card h3 { 
  margin: 12px 0 6px; 
  font-size: 1.2rem; 
  color: #fff; 
}

.nft-card .creator { 
  font-size: .9rem; 
  color: #ccc; 
  margin-bottom: 10px; 
}

.nft-card .price { 
  font-size: 1.1rem; 
  font-weight: 600; 
  color: #c792ea; 
  margin: 12px 0; 
}

.nft-card button {
  padding: 10px 20px; 
  background-color: #8a2be2; 
  border: none; color: white; 
  border-radius: 8px; 
  font-size: .95rem;
  cursor: pointer; 
  transition: background-color .3s ease, 
  transform .2s ease;
}

.nft-card button:hover { 
  background-color: #a000ff; 
  transform: scale(1.05); 
}

/* Custom Alert */
.custom-alert {
  position: fixed; 
  top: 50%; left: 50%; 
  transform: translate(-50%, -50%);
  background-color: #1a0033; 
  color: white; 
  padding: 20px 30px; 
  border: 2px solid white; 
  border-radius: 12px;
  z-index: 9999; 
  text-align: center; 
  display: none; 
  max-width: 300px;
}

.custom-alert p { 
  margin-bottom: 15px; 
  font-size: 16px; 
}

.custom-alert button {
  background-color: #8a2be2; 
  border: none; 
  color: white; 
  padding: 8px 16px; 
  border-radius: 5px; 
  cursor: pointer;
  font-weight: bold; 
  transition: background-color .3s ease;
}

.custom-alert button:hover { 
  background-color: #a64bf4; 
}

/* Cart */
.cart-container { 
  margin-left: 250px; 
  padding: 130px 20px 20px; 
  color: white; 
}

.cart-item {
  display: flex; 
  align-items: center; 
  gap: 20px; 
  margin-bottom: 20px;
  background-color: #333; 
  padding: 15px; 
  border-radius: 10px;
}

.cart-item img { width: 100px; 
  border-radius: 10px; 
}

.cart-item-details { 
  flex: 1; 
}

.cart-item h3, .cart-item p { 
  margin: 5px 0; 
}

.remove-btn { 
  background-color: red; 
  color: white; 
  border: none; 
  padding: 8px 12px; 
  border-radius: 6px; 
  cursor: pointer; 
}

#cart-summary { 
  margin-top: 30px; 
}

#checkout-btn {
  background-color: #8000ff; 
  color: white; 
  padding: 10px 20px; 
  border: none; 
  border-radius: 8px; 
  cursor: pointer;
  transition: background-color .3s ease, transform .2s ease;
}

#checkout-btn:hover { 
  background-color: #a000ff; 
  transform: scale(1.05); 
}

/* Checkout */
.checkout-container { 
  margin-left: 220px; 
  padding: 20px; 
}
.checkout-info { 
  max-width: 600px; 
  margin: 0 auto; 
}

.checkout-info h3 { 
  font-size: 22px; 
}

.checkout-info .price { 
  font-size: 18px; 
  font-weight: bold; 
  color: #4CAF50; 
}

.checkout-info .description { 
  margin-top: 10px; 
  font-size: 16px; 
}

.checkout-info .quantity { 
  margin-top: 20px; 
}

.checkout-info .quantity input { padding: 5px; font-size: 16px; width: 60px; }
.checkout-info button { background-color: #4CAF50; color: white; padding: 10px 20px; border: none; font-size: 16px; cursor: pointer; margin-top: 20px; }
.checkout-info button:hover { background-color: #45a049; }
.checkout-product-img {
  width: 250px; height: auto; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.2); margin-bottom: 20px; display: block;
}

/* Profile */
.profile-container {
  margin-left: 220px; 
  padding: 130px 20px 20px; 
  background-color: #2d004d; 
  min-height: 100vh;
}

.profile-container h2 { 
  text-align: center; 
  font-size: 32px;
  margin-bottom: 20px; 
}

.profile-details {
  background-color: #460f57; 
  padding: 20px; 
  border-radius: 8px; 
  margin-bottom: 20px; 
  box-shadow: 0 4px 6px rgba(0,0,0,.1);
}

.profile-details h3 { 
  font-size: 24px; 
  margin-bottom: 15px; 
}

.profile-details p { 
  font-size: 16px; 
  margin: 8px 0; 
}

/* Order History */
.order-history {
  background-color: #460f57; 
  padding: 20px; 
  border-radius: 8px; 
  box-shadow: 0 4px 6px rgba(0,0,0,.1);
}

.order-history h3 { 
  font-size: 24px; 
  margin-bottom: 15px; 
}

.order-history table { 
  width: 100%; 
  border-collapse: collapse; 
}
.order-history table th, .order-history table td { 
  padding: 12px 15px; 
  border: 1px solid #ddd; 
  text-align: left; 
}
.order-history table th { 
  background-color: #ddd; 
  font-weight: bold; 
  color: #1e1e2f; 
}

/* Edit Button (global) */
button {
  background-color: #4CAF50; 
  color: white; 
  padding: 12px 20px; 
  border: none; 
  font-size: 16px; 
  cursor: pointer;
  display: block; 
  margin: 20px auto; 
  border-radius: 5px;
}

button:hover { 
  background-color: #45a049; 
}

/* Footer */
.footer {
  text-align: center; 
  padding: 10px; 
  background-color: #333; 
  color: white;
  position: fixed; 
  bottom: 0; 
  width: 100%;
}

/* Admin dashboard */
.admin-dashboard { 
  margin-left: 220px; 
  padding: 130px 20px 20px; 
  background-color: #2d004d; 
  color: white; 
}

.admin-form form { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
  margin-bottom: 2rem; 
}

.admin-form input, .admin-form textarea, .admin-form button { 
  padding: 10px; 
  border: none; 
  border-radius: 6px; 
}

.admin-form button { 
  background-color: #4caf50; 
  color: white; 
  cursor: pointer; 
  transition: background-color .3s ease, transform .2s ease; 
}

.admin-form button:hover { 
  background-color: #164718; 
  transform: scale(1.05); 
}

.dashboard-chart canvas { 
  background-color: #fff; 
  border-radius: 10px; 
}

/* Logo */
.logo-center { 
  text-align: center; 
  margin-bottom: 20px; 
}

.logo-center img { 
  width: 200px; 
}

/* Search results container + card overrides */
.search-results-container {
  margin-left: 220px; 
  text-align: center; 
  padding: 130px 20px 20px; 
  background-color: #2d004d; 
  color: #fff;
}

#search-results { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
  gap: 1.5rem; 
}

.product-card {
  background-color: #282c34; 
  padding: 1rem; 
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,.3); 
  text-align: center; color: white;
}

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

/* ======= Responsive Design ======= */

/* Tablets & small laptops */
@media screen and (max-width: 1024px) {
  .sidebar { width: 160px; }
  main, .nft-marketplace, .cart-container, .profile-container, .admin-dashboard { 
    margin-left: 180px; 
  }
  .product-list { 
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
  }
}

/* Desktop navbar adjustments */
@media screen and (min-width: 1025px) {
  .navbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100px;
  }

  .nav-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .hamburger {
    display: none; /* hidden on desktop */
  }

  .search-container {
    width: auto;
  }
}


/* Hamburger hidden by default */
.hamburger {
  font-size: 24px; 
  background: none; 
  border: none; 
  cursor: pointer; 
  color: white; 
  display: none;
}

/* Mobile */
@media screen and (max-width: 768px) {
  main, .nft-marketplace, .cart-container, .profile-container, .admin-dashboard {
    margin-left: 0; 
    padding: 240px 15px 20px;
  }
  .navbar { 
    flex-direction: column; 
    align-items: flex-start; 
    padding: 1em;
    width: 100%; 
    height: auto; 
  }
  .logo { 
    display: block; 
    width: 100%; 
    margin-bottom: 5px; 
  }
  .hamburger { 
    display: inline-block; 
    margin: 5px 0 10px 10px; 
  }
  .nav-right { 
    flex-direction: column; 
    align-items: flex-end; 
    width: 100%; 
    gap: 12px; 
  }
  .nav-links { 
    display: flex; 
    justify-content: flex-end; 
    margin-right: 20px; 
    width: auto; 
  }
  .search-container { 
    width: 100%; 
    max-width: 320px; 
    margin-right: 10px; 
  }
  .search-container form { 
    width: 100%; 
    display: flex; 
  }
  .search-container input[type="text"] { 
    flex: 1; 
    min-width: 0; 
  }
  .search-container button { 
    flex-shrink: 0; 
  }
  .main { 
    margin-top: 250px; 
    margin-left: 0; 
    padding: 20px; 
  }
  .product-list { 
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
  }
  .contact-form input, .contact-form textarea,.login-container input, .login-container button { 
    width: 100%; 
  }
  .login-container {
    max-width: 100%; 
    margin: 80px 15px; 
    padding: 20px; 
    box-sizing: border-box;
  }

  .login-container button {
    width: 100%;   /* make button expand neatly */
  }
  /* Sidebar slide + overlay */
  .sidebar {
    position: fixed; 
    top: 0; 
    left: -220px; 
    height: 100%; 
    width: 220px;
    background: #1a0033; 
    padding-top: 70px; 
    z-index: 1001; 
    transition: left .3s ease-in-out;
  }
  .sidebar.active { 
    left: 0; 
  }
  .overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,.5); 
    z-index: 1000;
  }
  .overlay.active { 
    display: block; 
  }
  /* put hamburger + search in one row */
.nav-actions {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 15px; /* gap between hamburger and search */
  justify-content: flex-start;
}

.hamburger {
  display: inline-block;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  flex-shrink: 0; /* don’t let it shrink */
  margin-right: 8px;
}

.search-container {
  flex: 1; /* take remaining space */
  max-width: 100%;
}

}

/* Tablet view */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  main, .nft-marketplace, .cart-container, .profile-container, .admin-dashboard {
    margin-left: 0; 
    padding: 240px 15px 20px;
     padding-bottom: 80px;
  }

  .navbar { 
    flex-direction: column; 
    align-items: flex-start; 
    padding: 1em;
    width: 100%; 
    height: auto; 
  }

  .logo { 
    display: block; 
    width: 100%; 
    margin-bottom: 8px; 
  }

  /* keep login/register visible */
  .nav-right { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    align-items: flex-end;
  }
  .nav-links { 
    display: flex; 
    justify-content: flex-end; 
    margin-right: 20px; 
    width: auto; 
  }

  /* ensure hamburger + search are in one row */
  .nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* hamburger left, search right */
    width: 100%;
    gap: 510px;
  }

  .hamburger {
    display: inline-block;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    flex-shrink: 0;
    margin-right: 8px;
  }

  .search-container {
    flex: 1;
    max-width: 100%;
  }

  /* Sidebar slide + overlay */
  .sidebar {
    position: fixed; 
    top: 0; 
    left: -220px; 
    height: 100%; 
    width: 220px;
    background: #1a0033; 
    padding-top: 60px; 
    z-index: 1001; 
    transition: left .3s ease-in-out;
  }
  .sidebar.active { left: 0; }

  .overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,.5); 
    z-index: 1000;
  }
  .overlay.active { display: block; }
}
