/*
Theme Name: Gadget HAC Theme
Theme URI: https://gadget.life-hac.com/
Author: Gadget HAC
Description: Simple original theme for Gadget HAC Media.
Version: 1.0.0
Text Domain: gadget-hac-theme
*/

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: #1f2937;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.85;
  letter-spacing: 0;
  word-spacing: 0;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.site-header-inner,
.site-footer-inner {
  width: min(100% - 32px, 960px);
  margin: 0 auto;
  padding: 18px 0;
}

.site-title {
  color: #111827;
  font-size: 20px;
  font-weight: 700;
}

.site-main {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 34px 0 72px;
}

.article {
  background: #ffffff;
}

.article-header {
  margin-bottom: 18px;
}

.article-title {
  margin: 0 0 8px;
  color: #111827;
  font-family: Georgia, "Times New Roman", "Noto Serif JP", serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

.article-meta {
  color: #6b7280;
  font-size: 13px;
}

.article-thumbnail {
  margin: 0 0 28px;
}

.article-thumbnail img {
  width: 100%;
  height: auto;
}

.article-content {
  font-size: 16px;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content h2 {
  margin: 42px 0 14px;
  color: #111827;
  font-family: Georgia, "Times New Roman", "Noto Serif JP", serif;
  font-size: 26px;
  line-height: 1.5;
}

.article-content h3 {
  margin: 28px 0 10px;
  color: #111827;
  font-size: 21px;
  line-height: 1.5;
}

.article-content p {
  margin: 0 0 1.25em;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}

.article-content li {
  margin: 0.35em 0;
}

.article-content img {
  max-width: 100%;
  height: auto;
}

.article-content blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
}

.article-content code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #f3f4f6;
  font-size: 0.92em;
}

.article-content pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
}

.site-footer {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  font-size: 14px;
}

/* Product gallery */
.ghac-product-gallery {
  max-width: 720px;
  margin: 8px auto 26px;
}

.ghac-gallery-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 360px;
  background: #ffffff;
  overflow: hidden;
}

.ghac-gallery-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  margin: 0 auto;
}

.ghac-gallery-nav {
  position: absolute !important;
  top: 50% !important;
  z-index: 5;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #9ca3af;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
}

.ghac-gallery-prev {
  left: 8px !important;
  right: auto !important;
}

.ghac-gallery-next {
  right: 8px !important;
  left: auto !important;
}

.ghac-product-gallery.is-single .ghac-gallery-nav,
.ghac-product-gallery.is-single .ghac-gallery-thumbs {
  display: none !important;
}

.ghac-gallery-thumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.ghac-gallery-thumb {
  width: 88px;
  height: 88px;
  padding: 3px;
  border: 1px solid #9ca3af;
  border-radius: 0;
  background: #ffffff;
  cursor: pointer;
  appearance: none;
}

.ghac-gallery-thumb.is-active {
  border: 2px solid #6b7280;
}

.ghac-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ghac-affiliate-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  max-width: 620px;
  margin: 28px auto 42px;
}

.ghac-affiliate-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 16px 22px;
  border-radius: 14px;
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none !important;
  box-shadow: none;
}

.ghac-rakuten-button {
  background: #ef1b2d;
}

.ghac-amazon-button {
  background: #ff8426;
}

.ghac-affiliate-button:hover {
  opacity: 0.92;
  color: #ffffff !important;
  text-decoration: none !important;
}

@media (max-width: 640px) {
  .ghac-gallery-main {
    min-height: 240px;
  }

  .ghac-gallery-image {
    max-height: 360px;
  }

  .ghac-gallery-thumb {
    width: 64px;
    height: 64px;
  }

  .ghac-affiliate-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 100%;
  }

  .ghac-affiliate-button {
    min-height: 52px;
    padding: 12px 10px;
    font-size: 14px;
    border-radius: 10px;
  }
}