/* ====== General Reset & Fonts ====== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fafafa;
  margin: 0;
  padding: 0 20px 80px; /* bottom padding for sticky cart */
  color: #333;
}

h1 {
  text-align: center;
  margin: 24px 0;
  font-weight: 700;
  color: #004085;
}

/* ====== Header ====== */
.search-cart {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  
}

  /* Header Styles */
        shopheader {
            background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: var(--shadow);
        }

.search-form {
  display: flex;
  gap: 8px;
  flex-grow: 1;
  max-width: 400px;
}

.search-form input[type="search"] {
  flex-grow: 1;
  padding: 8px 12px;
  font-size: 1rem;
  border: 2px solid #007bff;
  border-radius: 6px;
  transition: border-color 0.3s ease;
}

.search-form input[type="search"]:focus {
  border-color: #0056b3;
  outline: none;
}

.search-form button {
  background-color: #007bff;
  border: none;
  color: white;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background-color: #0056b3;
}

.cart-icon {
  font-size: 1.6rem;
  color: #007bff;
  user-select: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  gap: 6px;
  min-width: 60px;
}

/* ====== Product Grid & Cards ====== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto 40px;
}

.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.product-card h2 {
  font-size: 1.3rem;
  margin: 14px 16px 6px;
  color: #004085;
  flex-grow: 0;
}

.product-card .price {
  font-weight: 700;
  font-size: 1.15rem;
  color: #28a745;
  margin: 0 16px 10px;
}

.description {
  margin: 0 16px 12px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.3;
  min-height: 60px; /* keep height consistent */
}

.description.full {
  min-height: auto;
}

.read-more-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  margin-left: 6px;
  font-weight: 600;
  user-select: none;
  transition: color 0.3s ease;
}

.read-more-btn:hover {
  color: #0056b3;
}

/* ====== Add to Cart Form ====== */
.add-to-cart-form {
  margin: 0 16px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-to-cart-form input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  font-size: 1rem;
  border: 1.5px solid #ced4da;
  border-radius: 6px;
  text-align: center;
  transition: border-color 0.3s ease;
}

.add-to-cart-form input[type="number"]:focus {
  border-color: #007bff;
  outline: none;
}

.add-to-cart-form button {
  background-color: #007bff;
  border: none;
  color: white;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
}

.add-to-cart-form button:hover {
  background-color: #0056b3;
}

/* ====== Sticky Cart Button ====== */
#sticky-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #007bff;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1100;
  user-select: none;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

#sticky-cart:hover {
  background-color: #0056b3;
}

#sticky-cart span {
  font-size: 1.2rem;
  background: #28a745;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 28px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ====== Responsive ====== */
@media (max-width: 600px) {
  .search-cart {
    flex-direction: column;
    gap: 12px;
  }
  .search-form {
    max-width: 100%;
  }
  .product-card img {
    height: 150px;
  }
}
