:root {
  --primary: #ee4d2d;
  --secondary: #f5f5f5;
  --text: #222;
  --border: #e0e0e0;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --max-width: 1200px;
  --accent: #ffb300;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--secondary);
  color: var(--text);
  margin: 0;
  padding: 0;
}

header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 1rem 0;
  text-align: center;
  box-shadow: var(--shadow);
}

header h1 {
  margin: 0;
  color: var(--primary);
  font-size: 2.2rem;
  letter-spacing: -1px;
}

header .subtitle {
  color: #666;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

main#app {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
  min-height: 60vh;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 4px 16px rgba(238,77,45,0.10);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #fafafa;
}

.product-card .info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card .title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.product-card .price {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-card .location {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.product-card .view-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}

.product-card .view-btn:hover {
  background: #d84315;
}

.product-detail {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 2rem;
  max-width: 700px;
  margin: 2rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.product-detail img {
  width: 320px;
  max-width: 100%;
  border-radius: 8px;
  object-fit: cover;
  background: #fafafa;
}

.product-detail-info {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.product-detail-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

.product-detail-price {
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-detail-location {
  color: #888;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.product-detail-desc {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.buy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 1rem;
}

.buy-btn:hover {
  background: #d84315;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary);
  text-decoration: underline;
  font-size: 1rem;
  cursor: pointer;
}

footer {
  background: #fff;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.2rem 0;
  color: #888;
  font-size: 0.98rem;
  margin-top: 2rem;
}

/* --- Login Overlay Styles --- */
#login-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(34,34,34,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem 2rem 2rem;
  min-width: 320px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-modal h2 {
  margin-top: 0;
  color: var(--primary);
  text-align: center;
  margin-bottom: 1.5rem;
}

#login-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #333;
}

#login-form input[type="text"],
#login-form input[type="password"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  margin-top: 0.3rem;
  margin-bottom: 0.2rem;
  background: #fafafa;
}

#login-form button[type="submit"] {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s;
}

#login-form button[type="submit"]:hover {
  background: #d84315;
}
