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

/* ---------- Page Header (products, contact, order-lookup) ---------- */
.page-header { text-align: center; padding: 48px 24px 32px; }
.page-header h1 { font-size: 28px; font-weight: 700; letter-spacing: 3px; margin-bottom: 8px; }
.page-header p { font-size: 14px; color: #a89585; font-weight: 300; }

/* ---------- 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: 12px; overflow: hidden;
  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: #f0ebe3; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 16px 18px; }
.product-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.product-sub { font-size: 12px; color: #a89585; margin-bottom: 8px; }
.product-price { font-size: 14px; color: #b09880; 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: 4px; 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: #b09880; }
.product-badge.badge-sold-out { background: #c44; }
.product-badge.badge-limited { background: #8b5cf6; }
.product-badge.badge-demo { background: #4a7c9a; }
.product-badge.badge-default { background: #a89585; }

/* ---------- 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 #e0dcd6; border-radius: 24px;
  font-size: 14px; font-family: 'Noto Serif KR', serif; color: #5a4638; background: #fff;
  outline: none; transition: border-color 0.2s;
}
.search-bar input:focus { border-color: #c4a882; box-shadow: 0 0 0 3px rgba(196,168,130,0.15); }
.search-bar input::placeholder { color: #b09880; }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: #b09880; 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: 20px; font-size: 12px; cursor: pointer;
  border: 1px solid #d4c4b0; background: #fff; color: #7a6555; transition: all 0.2s;
  font-family: 'Noto Serif KR', serif;
}
.filter-pill:hover { border-color: #5a4638; color: #5a4638; }
.filter-pill.active { background: #5a4638; color: #f7f3ee; border-color: #5a4638; }
.sort-select {
  padding: 6px 16px; border-radius: 20px; font-size: 12px;
  border: 1px solid #d4c4b0; background: #fff; color: #7a6555;
  font-family: 'Noto Serif KR', serif; cursor: pointer; outline: none;
}
.sort-select:focus { border-color: #c4a882; }

/* ---------- 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: #7a6555; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid #e0dcd6; border-radius: 10px;
  font-size: 14px; font-family: inherit; color: #5a4638; background: #faf8f5;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: #c4a882; box-shadow: 0 0 0 3px rgba(196,168,130,0.15);
}
.form-group textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #c4b8a8; }

/* ---------- 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: 22px; }
  .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; }
}
