/* ==========================================================================
   components.css — Shared styles extracted from inline <style> blocks
   ========================================================================== */

/* ---------- Page Header (products, contact, order-lookup) ---------- */
.page-header { text-align: left; padding: 48px 24px 32px; max-width: 1100px; margin: 0 auto; }
.page-header h1 { font-size: 48px; font-weight: 700; letter-spacing: 3px; margin-bottom: 12px; }
.page-header p { font-size: 18px; color: #8a9bb0; font-weight: 400; }

/* ---------- Product Grid / Cards (index, products) ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff; border-radius: 0; overflow: hidden; border: 2px solid #000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.product-img {
  aspect-ratio: 1; background: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.product-img img { width: 100%; height: 100%; object-fit: contain; }
.product-img .card-img-main, .product-img .card-img-hover { position: absolute; top: 0; left: 0; transition: opacity 0.3s; }
.product-img .card-img-hover { opacity: 0; }
.product-card:hover .card-img-hover { opacity: 1; }
.product-card:hover .card-img-main { opacity: 0; }
.product-info { padding: 16px 18px; }
.product-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.product-sub { font-size: 12px; color: #8a9bb0; margin-bottom: 8px; }
.product-price { font-size: 14px; color: #5a9fd4; letter-spacing: 1px; }
.product-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; }
.product-badge { padding: 3px 8px; border-radius: 0; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: #fff; }
.product-badge.badge-new { background: #4a7c59; }
.product-badge.badge-popular, .product-badge.badge-best { background: #e8a04c; }
.product-badge.badge-coming-soon { background: #8a9bb0; }
.product-badge.badge-sold-out { background: #c44; }
.product-badge.badge-limited { background: #8b5cf6; }
.product-badge.badge-demo { background: #4a7c9a; }
.product-badge.badge-default { background: #8a9bb0; }

/* ---------- Search Bar (index, products) ---------- */
.search-bar { max-width: 480px; margin: 0 auto; position: relative; }
.search-bar input {
  width: 100%; padding: 12px 20px 12px 44px; border: 1px solid #dde4ed; border-radius: 0;
  font-size: 14px; font-family: 'LaundryGothic', sans-serif; color: #2c3e50; background: #fff;
  outline: none; transition: border-color 0.2s;
}
.search-bar input:focus { border-color: #5a9fd4; box-shadow: 0 0 0 3px rgba(59,130,196,0.15); }
.search-bar input::placeholder { color: #8a9bb0; }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: #8a9bb0; pointer-events: none;
}

/* ---------- Filter Controls (index, products) ---------- */
.filter-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 24px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.filter-pill {
  padding: 6px 16px; border-radius: 0; font-size: 12px; cursor: pointer;
  border: 2px solid #3b82c4; background: #fff; color: #5a6a7a; transition: all 0.2s;
  font-family: 'LaundryGothic', sans-serif;
}
.filter-pill:hover { border-color: #3b82c4; color: #3b82c4; }
.filter-pill.active { background: #3b82c4; color: #fff; border-color: #3b82c4; }
.sort-select {
  padding: 6px 16px; border-radius: 0; font-size: 12px;
  border: 2px solid #3b82c4; background: #fff; color: #5a6a7a;
  font-family: 'LaundryGothic', sans-serif; cursor: pointer; outline: none;
}
.sort-select:focus { border-color: #5a9fd4; }

/* ---------- Form Components (auth, contact, cart, order-lookup) ---------- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #5a6a7a; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid #dde4ed; border-radius: 0;
  font-size: 14px; font-family: inherit; color: #2c3e50; background: #f8fafc;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: #5a9fd4; box-shadow: 0 0 0 3px rgba(59,130,196,0.15);
}
.form-group textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #a0b0c0; }

/* ---------- Spinner keyframe (index, products) ---------- */
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive (shared breakpoints) ---------- */
@media (max-width: 640px) {
  .page-header { padding: 32px 16px 20px; }
  .page-header h1 { font-size: 32px; }
  .page-header p { font-size: 15px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-info { padding: 12px; }
  .product-name { font-size: 13px; }
  .search-bar { margin: 16px auto 0; }
}
