@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap');

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1a1a1a;
  background: #fafaf8;
  line-height: 1.7;
}

/* ── Announcement bar ── */
.announcement-bar {
  background: #1a1a1a;
  color: #d4c9b8;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

/* ── Header ── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}
.logo { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; text-decoration: none; color: #1a1a1a; white-space: nowrap; }
.header-nav a { text-decoration: none; color: #555; font-size: 0.875rem; white-space: nowrap; }
.header-nav a:hover { color: #1a1a1a; }

.cart-link {
  position: relative;
  text-decoration: none;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}
.cart-link:hover { background: #f0f0ec; }
.cart-icon { display: block; flex-shrink: 0; }
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}

/* View Cart CTA（商品ページ: カートに入れた後に表示） */
.btn-view-cart {
  display: none;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-top: 0.6rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-view-cart:hover { background: #1a1a1a; color: #fff; }

/* ── Breadcrumbs ── */
.breadcrumbs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  color: #999;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumbs a { color: #888; text-decoration: none; }
.breadcrumbs a:hover { color: #1a1a1a; text-decoration: underline; }
.breadcrumbs span[aria-hidden] { color: #ccc; }

/* ── Product page layout ── */
.product-page { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }

.product-hero {
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: 3.5rem;
  margin-bottom: 4rem;
  align-items: start;
}
@media (max-width: 720px) {
  .product-hero { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Gallery ── */
.product-gallery { position: relative; }

.gallery-main-wrap { position: relative; }

.gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e8e8e4;
  background: #f5f4f0;
  display: block;
  padding: 12px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 64px;
  height: 64px;
  border: 2px solid #e8e8e4;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  background: #f5f4f0;
  cursor: pointer;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: #c8a96e;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e8e8e4;
  background: #f5f4f0;
  display: block;
  padding: 12px;
}

.product-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid #e8e8e4;
  background: #f5f4f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 0.85rem;
}

.mij-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
}

/* ── Product info panel ── */
.product-origin {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #999;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 1.5rem;
  color: #111;
}

/* ── Specs table ── */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}
.specs-table th,
.specs-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}
.specs-table th {
  width: 36%;
  color: #888;
  font-weight: 500;
  white-space: nowrap;
}
.specs-table td { color: #222; font-weight: 500; }
.spec-note { font-weight: 400; color: #888; font-size: 0.82em; }

/* ── Price ── */
.product-price { margin-bottom: 1.25rem; }

#price-display {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
  margin-bottom: 0.3rem;
}
#price-display.price-loading {
  color: #ccc;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.price-sub { font-size: 0.78rem; color: #aaa; }

/* ── Quantity + Add to Cart ── */
.purchase-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  align-items: stretch;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.qty-btn {
  width: 36px;
  height: 100%;
  min-height: 48px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #555;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: #f5f5f0; }
.qty-input {
  width: 40px;
  border: none;
  border-left: 1px solid #e5e5e5;
  border-right: 1px solid #e5e5e5;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  background: #fff;
  -moz-appearance: textfield;
  min-height: 48px;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.btn-cart {
  flex: 1;
  padding: 0.9rem 1.25rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.02em;
}
.btn-cart:hover:not(:disabled) { background: #333; }
.btn-cart:active:not(:disabled) { transform: scale(0.98); }
.btn-cart:disabled { background: #ccc; cursor: not-allowed; }
.btn-cart.btn-added { background: #2d7a2d; }

/* ── Trust row ── */
.trust-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.trust-item {
  font-size: 0.78rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── Delivery note ── */
.delivery-note {
  font-size: 0.83rem;
  color: #666;
  padding: 0.75rem 1rem;
  background: #f5f5f0;
  border-radius: 6px;
  border-left: 3px solid #d0cfc8;
}

/* ── Detail sections ── */
.product-details { display: flex; flex-direction: column; gap: 0; }

.product-details section {
  border-top: 1px solid #e8e8e4;
  padding: 2rem 0;
}

.product-details h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #111;
}
.product-details h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.product-details p { color: #444; margin-bottom: 0.75rem; line-height: 1.75; }
.product-details ul, .product-details ol {
  padding-left: 1.4rem;
  color: #444;
}
.product-details li { margin-bottom: 0.45rem; line-height: 1.65; }

/* ── Hardness bar ── */
.hardness-block { margin: 1rem 0; }
.hardness-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 0.4rem;
}
.hardness-label-row strong { color: #333; }
.hardness-track {
  height: 6px;
  background: #e5e5e0;
  border-radius: 99px;
  overflow: hidden;
}
.hardness-fill {
  height: 100%;
  background: linear-gradient(90deg, #bbb 0%, #555 100%);
  border-radius: 99px;
  transition: width 0.6s ease;
}
.hardness-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #bbb;
  margin-top: 0.3rem;
}

/* ── Shipping table ── */
.shipping-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-top: 1rem; }
.shipping-table th, .shipping-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid #eeeeea;
}
.shipping-table th { background: #f5f5f0; font-weight: 600; color: #444; }
.shipping-note { font-size: 0.8rem; color: #888; margin-top: 0.75rem; }

/* ── FAQ accordion ── */
.faq-section h2 { margin-bottom: 0.5rem; }

.faq-list { display: flex; flex-direction: column; }

.faq-item { border-bottom: 1px solid #eee; }
.faq-item:first-child { border-top: 1px solid #eee; }

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
  text-align: left;
  transition: color 0.15s;
}
.faq-q:hover { color: #555; }
.faq-q[aria-expanded="true"] { color: #1a1a1a; }

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  font-size: 1.1rem;
  line-height: 20px;
  text-align: center;
  color: #aaa;
  transition: transform 0.2s;
}
.faq-q[aria-expanded="true"] .faq-icon { color: #555; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-a p {
  padding-bottom: 1rem;
  margin: 0;
  font-size: 0.875rem;
  color: #555;
  line-height: 1.75;
}

/* ── Accessories section ── */
.accessories-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e8e8e4;
}
.accessories-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #111;
}
.accessories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 640px) {
  .accessories-grid { grid-template-columns: 1fr; }
}
.accessory-card {
  border: 1px solid #e8e8e4;
  border-radius: 8px;
  padding: 1.25rem;
  background: #fff;
}
.accessory-icon { font-size: 1.75rem; margin-bottom: 0.6rem; }
.accessory-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; color: #222; }
.accessory-card p { font-size: 0.82rem; color: #666; line-height: 1.65; margin: 0; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid #e5e5e5;
  margin-top: 4rem;
  padding: 2.5rem 2rem 1.5rem;
  background: #fff;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  display: flex;
  gap: 3rem;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-brand strong.footer-logo { display: block; font-size: 1rem; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.82rem; color: #888; max-width: 380px; line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a { font-size: 0.85rem; color: #888; text-decoration: none; }
.footer-links a:hover { color: #1a1a1a; }
.footer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: #bbb;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Hub explore links (in steel / origin sections) ── */
.hub-explore-link { margin-top: 0.75rem; margin-bottom: 0; }
.hub-explore-link a { color: #c8a96e; font-weight: 600; text-decoration: none; font-size: 0.875rem; }
.hub-explore-link a:hover { text-decoration: underline; }

/* ── Related products section ── */
.related-products {
  padding: 2.5rem 0;
  border-top: 1px solid #e8e8e4;
}
.related-products h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #111;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 720px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
.related-card {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
  display: block;
}
.related-card:hover { border-color: #1a1a1a; }
.related-card img { width: 100%; height: 140px; object-fit: cover; background: #f5f5f0; display: block; }
.related-card .no-img { width: 100%; height: 140px; background: #f5f5f0; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.related-card-body { padding: 0.7rem; }
.related-card-name { font-size: 0.82rem; font-weight: 600; line-height: 1.3; color: #1a1a1a; margin-bottom: 0.2rem; }
.related-card-price { font-size: 0.85rem; font-weight: 700; color: #1a1a1a; }
.related-see-all {
  display: inline-block;
  margin-top: 1.25rem;
  color: #c8a96e;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.related-see-all:hover { text-decoration: underline; }

/* ── Out of Stock ── */
/* 商品ページ: 価格欄の OOS 表示 */
#price-display.out-of-stock {
  color: #999;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 一覧ページ: OOS カード */
.product-card.card-oos {
  opacity: 0.55;
  pointer-events: auto;
}
.product-card.card-oos:hover { border-color: #ccc; }
.card-oos-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  background: #efefef;
  border-radius: 3px;
  padding: 0.15rem 0.45rem;
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
