/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f7f8fa;
  color: #222;
  line-height: 1.6;
  padding-bottom: 100px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

h1, h2, h3 {
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header */
header {
  background: #ffffff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 1.8rem;
  color: #0d1117;
}

#cart-count-badge {
  background: crimson;
  color: white;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  margin-left: 0.5rem;
}

nav a {
  margin-left: 1.5rem;
  font-weight: 500;
  color: #444;
  transition: color 0.3s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  color: #0a84ff;
}

/* Filters */
.filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

#search-bar, #category-filter {
  padding: 0.7rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 200px;
}

.products-container {
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: auto;
}

.products-container h2 {
  margin-bottom: 1rem;
  text-align: center;
  color: #0a84ff;
}

/* Product Grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
}

/* Product Card */
.product-card {
  background: #fff;
  padding: 1rem;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.product-card h3 {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #333;
}

.product-card p {
  font-size: 1.1rem;
  font-weight: bold;
  color: #000;
}

.product-card button {
  margin-top: 0.8rem;
  padding: 0.6rem 1.2rem;
  background: #0a84ff;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.product-card button:hover {
  background: #006be6;
}

/* Cart Section */
.cart-section {
  max-width: 1200px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.cart-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #0a84ff;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
}

.cart-item p {
  margin: 0;
  font-size: 1rem;
}

.cart-item button {
  background: transparent;
  border: none;
  color: crimson;
  font-weight: bold;
  cursor: pointer;
}

#cart-total {
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: bold;
}

/* PayPal & PayFast containers */
#paypal-button-container,
#payfast-form-container {
  margin-top: 1.5rem;
}

/* Hire Banner */
.hire-banner {
  background: #0a84ff;
  color: white;
  padding: 2rem;
  text-align: center;
  margin: 3rem auto;
  border-radius: 16px;
  max-width: 1000px;
}

.hire-btn {
  display: inline-block;
  background: white;
  color: #0a84ff;
  padding: 0.8rem 1.5rem;
  margin-top: 1rem;
  font-weight: bold;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.hire-btn:hover {
  background: #e5f0ff;
}

/* Footer */
footer {
  background: #f0f0f0;
  color: #666;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 1rem;
  }

  .filters {
    flex-direction: column;
    align-items: center;
  }

  #search-bar, #category-filter {
    width: 100%;
    max-width: 300px;
  }
}

/* ---------- Forms (Login, Signup, PayFast) ---------- */

main {
  max-width: 400px;
  margin: 4rem auto;
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  text-align: center;
}

main h1 {
  margin-bottom: 1.5rem;
  color: #0a84ff;
  font-size: 2rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form input[type="email"],
form input[type="password"] {
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 1.5px solid #ccc;
  border-radius: 10px;
  transition: border-color 0.3s ease;
}

form input[type="email"]:focus,
form input[type="password"]:focus {
  outline: none;
  border-color: #0a84ff;
}

form button {
  padding: 0.9rem 1rem;
  background-color: #0a84ff;
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: #006be6;
}

main p {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #666;
}

main p a {
  color: #0a84ff;
  font-weight: 600;
  transition: color 0.3s ease;
}

main p a:hover {
  color: #006be6;
}

/* PayFast page styles */
body > form#payfast-form {
  max-width: 400px;
  margin: 6rem auto;
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  text-align: center;
}

body > form#payfast-form button[type="submit"] {
  padding: 1rem 2rem;
  background-color: #ffa726;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

body > form#payfast-form button[type="submit"]:hover {
  background-color: #fb8c00;
}

/* Responsive for forms */
@media (max-width: 480px) {
  main {
    margin: 2rem 1rem;
    padding: 1.5rem;
  }

  body > form#payfast-form {
    margin: 3rem 1rem;
    padding: 1.5rem;
  }
}
