*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.logo span { color: var(--text); }

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color .2s;
}
nav a:hover { color: var(--primary); }

/* Hero */
.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 60%, #3b82f6 100%);
  color: white;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: .75rem; }
.hero p  { font-size: 1.1rem; opacity: .9; margin-bottom: 2rem; }

/* Button */
.btn {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: .75rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }

form .btn {
  background: var(--primary);
  color: white;
  width: 100%;
  margin-top: .5rem;
}
form .btn:hover { background: var(--primary-dark); }

/* Contact section */
.contact {
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* Form fields */
.field { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--text);
}

input, textarea {
  width: 100%;
  padding: .65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
  background: white;
}
textarea { resize: vertical; }

/* Alerts */
.alert {
  padding: .875rem 1.125rem;
  border-radius: 8px;
  font-size: .95rem;
  margin-bottom: 1.5rem;
}
.alert.success { background: var(--success-bg); color: var(--success-text); }
.alert.error   { background: var(--error-bg);   color: var(--error-text); }

/* Nav active state */
nav a.active { color: var(--primary); }

/* Hero small variant */
.hero--sm {
  padding: 3rem 2rem 2.5rem;
}

/* Products section */
.products-section {
  padding: 3rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0,0,0,.12);
}

.product-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--border);
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.product-card:hover .product-img img {
  transform: scale(1.04);
}

.product-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--primary);
  background: rgba(37,99,235,.08);
  padding: .2rem .6rem;
  border-radius: 99px;
  margin-bottom: .75rem;
  width: fit-content;
}

.product-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.product-body p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.btn--sm {
  padding: .45rem 1.1rem;
  font-size: .875rem;
  background: var(--primary);
  color: white;
}
.btn--sm:hover { background: var(--primary-dark); transform: translateY(-2px); }

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

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  font-size: .875rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.75rem; }
  header { flex-direction: column; gap: .75rem; }
  nav a:first-child { margin-left: 0; }
}
