/* FOREST LIFE SHOP — Common Stylesheet */

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

:root {
  /* Spacing — 8pt grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radius — concentric scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Motion */
  --ease-out: cubic-bezier(0, 0, 0.58, 1);
  --duration-fast: 200ms;
  --duration-normal: 300ms;

  /* Elevation */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(201, 168, 106, 0.15);
  --focus-ring: 0 0 0 4px rgba(201, 168, 106, 0.35);
}

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  background-color: #121417;
  color: #ece5d8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */

h1, h2, h3, h4, h5, h6 {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

p, li, dd {
  margin-bottom: 1rem;
  line-height: 1.7;
}

a {
  color: #C9A86A;
  text-decoration: underline;
  transition: opacity var(--duration-fast) var(--ease-out);
}

a:hover {
  opacity: 0.8;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Header & Navigation */

header {
  background-color: #0a0a0a;
  border-bottom: 1px solid #2a2a2e;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.75rem;
  margin-bottom: 0;
  color: #C9A86A;
  letter-spacing: 0.05em;
}

header a {
  color: #C9A86A;
  text-decoration: none;
}

header a:hover {
  opacity: 0.7;
}

/* Main Content */

main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* Product Grid */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.product-card {
  border: 1px solid #2a2a2e;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background-color: rgba(201, 168, 106, 0.03);
  box-shadow: var(--shadow-card);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: #C9A86A;
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.product-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #ece5d8;
}

.product-price {
  font-size: 1.5rem;
  color: #C9A86A;
  margin-bottom: 1rem;
  font-weight: 600;
}

.product-description {
  flex: 1;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.product-card a {
  align-self: flex-start;
  color: #C9A86A;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid #C9A86A;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
  display: inline-block;
}

.product-card a:hover {
  background-color: #C9A86A;
  color: #121417;
}

.product-card a:active {
  transform: scale(0.97);
}

/* Buttons & Forms */

button, .btn {
  background-color: #C9A86A;
  color: #121417;
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  font-family: inherit;
}

button:hover, .btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

button:active, .btn:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid #C9A86A;
  color: #C9A86A;
}

.btn-secondary:hover {
  background-color: #C9A86A;
  color: #121417;
}

/* Forms */

input[type="text"],
input[type="email"],
textarea {
  background-color: rgba(236, 229, 216, 0.05);
  border: 1px solid #2a2a2e;
  color: #ece5d8;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--duration-fast) var(--ease-out);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: #C9A86A;
}

/* Status Messages */

.error {
  color: #ff6b6b;
  background-color: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.success {
  color: #51cf66;
  background-color: rgba(81, 207, 102, 0.1);
  border: 1px solid rgba(81, 207, 102, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.warning {
  color: #ffd43b;
  background-color: rgba(255, 212, 59, 0.1);
  border: 1px solid rgba(255, 212, 59, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.info {
  color: #74c0fc;
  background-color: rgba(116, 192, 252, 0.1);
  border: 1px solid rgba(116, 192, 252, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

/* Footer */

footer {
  background-color: #0a0a0a;
  border-top: 1px solid #2a2a2e;
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.9rem;
  color: #999;
}

footer a {
  color: #C9A86A;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Utility Classes */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
  display: none !important;
}

.loading {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

/* Product Details Page */

.product-hero {
  margin-bottom: 3rem;
}

.product-hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.product-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

.product-details > div:last-child {
  background-color: rgba(201, 168, 106, 0.05);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid #2a2a2e;
  box-shadow: var(--shadow-card);
  height: fit-content;
}

.product-details .price {
  font-size: 2rem;
  color: #C9A86A;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.product-details .description {
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .product-card:hover,
  button:hover, .btn:hover {
    transform: none;
  }
}

/* Responsive */

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  header {
    padding: 1rem;
  }

  header h1 {
    font-size: 1.25rem;
  }

  main {
    padding: 0 1rem;
  }

  .container {
    padding: 1.5rem;
  }

  .product-details {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    padding: 1rem;
  }
}

/* ── 製品説明の中で使う補助スタイル ──────────────────────────
   商品ページ(site/products/*.html)は scripts/generate-product-pages.py が
   生成する。設定ファイル名や環境変数名を等幅で見せるための .mono と、
   機能・制限を並べる箇条書きの体裁をここで定義する。 */
.description .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(201, 168, 106, 0.10);
  border: 1px solid rgba(201, 168, 106, 0.22);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

.description ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
}

.description li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.description li::marker {
  color: #c9a86a;
}
