body {
  margin: 0;
  font-family: sans-serif;
  background: #fafafa;
}

.site-header {
  padding: 16px;
  background: white;
  border-bottom: 1px solid #ddd;
}

.content {
  padding: 30px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product-card {
  background: white;
  padding: 18px;
  border-radius: 14px;
  text-align: center;
  transition: 0.3s;
}

.product-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.product-card img {
  width: 80px;
  height: 100px;
  border-radius: 10px;
}

.product-name {
  text-decoration: none;
  color: black;
}

.product-name h3 {
  margin: 12px 0 6px;
  font-size: 18px;
}

.price {
  font-size: 16px;
  font-weight: bold;
  color: #e63946;
  margin-bottom: 12px;
}

.btn-cart {
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  background: #0077cc;
  color: white;
  font-size: 14px;
  transition: 0.3s;
}

.btn-cart:hover {
  background: #005fa3;
}

.category-nav {
  margin-bottom: 20px;
  padding: 15px;
  background: #f5f5f5;
}
.category-nav a {
  margin: 0 10px;
  padding: 8px 16px;
  text-decoration: none;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.category-nav a:hover,
.category-nav a.active {
  background: #0077cc;
  color: white;
  border-color: #0077cc;
}
.admin-link {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #0077cc;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
}
.user-info {
  position: fixed;
  top: 20px;
  right: 140px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.user-info span {
  color: #333;
  font-weight: 500;
}
.logout-btn {
  background: #dc3545;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}
.logout-btn:hover {
  background: #c82333;
}

.site-footer {
  margin-top: 50px;
  padding: 16px;
  text-align: center;
  background: white;
  border-top: 1px solid #ddd;
}

.product-detail {
  display: flex;
}

.product-detail:target {
  display: flex;
}

.default-message {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: #666;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.product-images {
  flex: 1;
}

.main-image img {
  width: 500px;
  height: 620px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.product-info {
  flex: 1;
  background: white;
  padding: 22px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.product-title {
  margin-top: 0;
  font-size: 26px;
}

.product-desc {
  margin: 14px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
}

.product-price {
  font-size: 20px;
  font-weight: bold;
  color: #e63946;
}

.product-stock {
  margin: 12px 0;
  font-size: 15px;
}

.in-stock {
  color: green;
}

.quantity-box input[type="number"] {
  width: 80px;
  padding: 6px;
  margin-left: 6px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.btn-cart-large {
  margin-top: 18px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: #0077cc;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-cart-large:hover {
  background: #005fa3;
}

@media (max-width: 900px) {
  .product-detail {
    flex-direction: column;
  }

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

.breadcrumb {
  margin-top: 8px;
  font-size: 14px;

  display: flex;
  flex-wrap: wrap;
  align-items: center;

  color: #555;
}

.breadcrumb a {
  text-decoration: none;
  color: #0077cc;
  transition: 0.2s;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  margin: 0 6px;
  color: #999;
}

.breadcrumb .current {
  font-weight: bold;
  color: #222;
}

@media (max-width: 600px) {

  .breadcrumb a:not(:first-child) {
    display: none;
  }

  .breadcrumb .sep {
    display: none;
  }
  .breadcrumb::after {
    content: " > ... > ";
    color: #999;
    margin: 0 6px;
  }

  .breadcrumb .current {
    display: inline;
  }
}



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

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .cart {
    position: static;
    width: auto;
    margin: 20px 0;
  }
}

/* Hidden state for dynamic elements */
.hidden { display: none !important; }
.admin-link-inline { margin-right: 10px; }