body {
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  font-family: Arial;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

input,
select,
button {
  padding: 10px;
  margin: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

button {
  background: #007bff;
  color: white;
  cursor: pointer;
  border: none;
}

button:hover {
  background: #0056b3;
}

.form-box {
  background: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.product-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: 0.3s;
  padding: 15px;
}

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

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-info {
  padding: 10px;
}

.product-info h3 {
  margin: 0 0 10px;
}

.category {
  color: #007bff;
  font-size: 14px;
  margin-bottom: 10px;
}

.delete-btn {
  background: red;
}
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 500px;
  margin: 60px auto;
  padding: 20px;
  border-radius: 12px;
  position: relative;
}

.modal-content img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 10px;
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
}
@media (max-width: 600px) {
  .container {
    width: 95%;
    padding: 10px;
  }

  h1 {
    font-size: 24px;
  }

  input,
  select,
  button {
    width: 100%;
    box-sizing: border-box;
    margin: 6px 0;
  }

  .login-box,
  .form-box {
    display: flex;
    flex-direction: column;
  }

  .product-list {
    grid-template-columns: 1fr;
  }

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

  .modal-content {
    width: 90%;
    margin: 40px auto;
    padding: 15px;
  }

  .modal-content img {
    max-height: 260px;
  }
}
.product-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.product-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.detail-container {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px;
}

.detail-images {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.detail-img {
  width: 260px;
  border-radius: 12px;
  border: 1px solid #ddd;
}

.detail-container h1 {
  margin-bottom: 15px;
}

.detail-container p {
  line-height: 1.8;
  font-size: 16px;
}
@media (max-width: 768px) {

  .product-list {
    grid-template-columns: 1fr;
  }

  .product-card {
    width: 100%;
  }

  .detail-images {
    flex-direction: column;
    align-items: center;
  }

  .detail-img {
    width: 90%;
  }

  .detail-container {
    padding: 10px;
  }

  button {
    width: 100%;
    margin-top: 10px;
  }

}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar h1 {
  font-size: 28px;
  color: #007bff;
}

.nav-right {
  display: flex;
  gap: 10px;
}

.nav-right input,
.nav-right select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.form-box {
  display: flex;
  gap: 10px;
  margin: 30px 20px;
  align-items: center;
  flex-wrap: wrap;
}

.form-box input,
.form-box select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.form-box button {
  padding: 10px 18px;
  border-radius: 8px;
}
.image-viewer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.image-viewer img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}
.admin-hidden {
  display: none !important;
}
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 400px;
  margin: 10% auto;
  padding: 20px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-content h2 {
  margin: 0 0 10px;
  text-align: center;
}
@media (max-width: 768px) {

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 15px;
  }

  .topbar h1 {
    text-align: center;
    font-size: 24px;
  }

  .nav-right {
    flex-direction: column;
    width: 100%;
  }

  .nav-right input,
  .nav-right select {
    width: 100%;
    box-sizing: border-box;
  }

  .login-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .form-box {
    flex-direction: column;
    align-items: stretch;
    margin: 15px;
  }

  .form-box input,
  .form-box select,
  .form-box button {
    width: 100%;
    box-sizing: border-box;
  }

  .product-list {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .product-card {
    width: 100%;
    box-sizing: border-box;
  }

  .product-images {
    flex-direction: column;
  }

  .product-img {
    width: 100%;
    height: auto;
  }

  .modal-content {
    width: 85%;
    margin: 25% auto;
  }

  .slider-img {
    width: 100%;
    height: auto;
  }

  .thumbs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
  }

  .thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
  }
}
.banner {
  position: relative;
  margin: 20px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.banner img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

.banner-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: white;
  border: none;
  font-size: 34px;
  width: 42px;
  height: 60px;
  cursor: pointer;
}

.banner-btn.left {
  left: 10px;
}

.banner-btn.right {
  right: 10px;
}
.fav-link{
    display:inline-block;
    margin-top:10px;
    padding:8px 14px;
    background:#2563eb;
    color:white;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
}

.fav-link:hover{
    opacity:0.9;
}
/* Banner */
.banner {
  width: 100%;
  height: 320px;
  overflow: hidden;
  position: relative;
  border-radius: 14px;
  margin-bottom: 30px;
}

.banner img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: none;
}

.banner img.active {
  display: block;
}
.banner {
  position: relative;
}

.banner-text {
  position: absolute;
  z-index: 10;
  color: white;
  top: 50%;
  left: 60px;
  transform: translateY(-50%);
}

.banner-text h1 {
  font-size: 48px;
  margin-bottom: 10px;
}

.banner-text p {
  font-size: 20px;
  margin-bottom: 20px;
}

.banner-text button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: #007bff;
  color: white;
  font-size: 16px;
  cursor: pointer;
}
.banner {
  height: 260px;
  margin: 20px auto 30px;
}

.banner img {
  height: 260px;
}

.product-list {
  margin-top: 20px;
}

body {
  overflow-x: hidden;
}
.detail-card{
    display:flex;
    gap:40px;
    background:#fff;
    padding:30px;
    border-radius:20px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
    margin-top:20px;
}

.detail-image{
    width:420px;
    height:420px;
    object-fit:cover;
    border-radius:20px;
}

.detail-info{
    flex:1;
}

.detail-info h1{
    font-size:36px;
    margin-bottom:20px;
}

.detail-category{
    color:#666;
    margin-bottom:20px;
}

.detail-desc{
    font-size:18px;
    line-height:1.8;
    margin-bottom:30px;
}

.buy-btn{
    background:#1677ff;
    color:#fff;
    border:none;
    padding:15px 40px;
    border-radius:12px;
    font-size:18px;
    cursor:pointer;
}

.buy-btn:hover{
    opacity:0.9;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.hidden {
  display: none;
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 420px;
  padding: 20px;
  border-radius: 12px;
  position: relative;
  text-align: center;
}

.modal-content img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.close-btn {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 24px;
  border: none;
  background: none;
}