/* 全体的なデザインを高級インテリアサイト風に変更 */
/* リセットCSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* カスタムプロパティ（高級インテリアテーマ） */
:root {
  --background: #faf8f5;
  --foreground: #2c2c2c;
  --card: #ffffff;
  --card-foreground: #2c2c2c;
  --primary: #8b7355;
  --primary-foreground: #ffffff;
  --secondary: #f5f3f0;
  --secondary-foreground: #4a4a4a;
  --muted: #f8f6f3;
  --muted-foreground: #8a8a8a;
  --accent: #d4a574;
  --accent-foreground: #2c2c2c;
  --border: #e8e6e3;
  --beige: #f0ede8;
  --light-beige: #f8f6f3;
  --radius: 8px;
}

/* ベーススタイル */
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  font-weight: 300;
}

/* ユーティリティクラス */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.brand-name {
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--foreground);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--foreground);
}

/* Added hamburger menu button styles */
.mobile-menu-button {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.mobile-menu-button span {
  width: 2rem;
  height: 2px;
  background-color: var(--foreground);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-button.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-button.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ヒーローセクション */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* heroスライダーのスタイルを追加 */
.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-swiper {
  width: 100%;
  height: 100%;
}

.hero-swiper .swiper-slide {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-text {
  max-width: 600px;
  padding-left: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1.2;
  color: var(--foreground);
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 3rem;
  font-weight: 400;
  letter-spacing: 1px;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 400;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: #7a6449;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background-color: var(--muted);
}

/* セクション */
.section {
  padding: 6rem 0;
}

.section-light {
  background-color: var(--light-beige);
}

.section-beige {
  background-color: var(--beige);
}

.section-contact {
  background-color: var(--light-beige);
}

.section-title {
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--foreground);
  letter-spacing: 2px;
}

/* 画像ポップアップ（ライトボックス） */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  cursor: zoom-out;

  /* モバイル描画安定用 */
  will-change: opacity, transform;
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
}
.image-modal.active { display: flex; }
.image-modal img {
  display: block;          /* inlineの余白回避 */
  width: auto;
  height: auto;
  max-width: 96vw;         /* 余白ぶん少し広め */
  max-height: 90dvh;       /* 100vhではなくdvhでアドレスバー対策 */
  object-fit: contain;     /* 画像全体を収める */
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  cursor: auto;
  visibility: visible;     /* JSで切り替えるための初期値 */
  opacity: 1;              /* JSで切り替えるための初期値 */
  z-index: 1;              /* 念のため前面に */
  transform: translateZ(0);/* レイヤー促進 */
}
.image-modal .image-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 32px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  user-select: none;
  z-index: 2;
}

/* Why Choose Us セクション */
.why-choose {
  /* why-chooseセクションの背景色をより濃いベージュに変更 */
  background: linear-gradient(135deg, var(--beige) 0%, #e8e3db 100%);
  position: relative;
}

.why-choose::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 50%, transparent 100%);
}

.why-choose-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}

.why-choose-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--muted-foreground);
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.grid-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.inspiration-text {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.inspiration-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted-foreground);
}

/* Work Gallery */
.work-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.thumbnail {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
}

.gallery-pagination {
  text-align: center;
  margin-bottom: 2rem;
}

.pagination-current {
  font-size: 1.5rem;
  font-weight: 500;
}

.pagination-separator {
  margin: 0 0.5rem;
  color: var(--muted-foreground);
}

.pagination-total {
  color: var(--muted-foreground);
}

.gallery-description {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.gallery-description p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

/* Design Process */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.step-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.step-text {
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  color: var(--foreground);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.testimonial-card {
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.testimonial-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.testimonial-content {
  padding: 2rem;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 500;
  color: var(--foreground);
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 6rem;
}

.contact-title {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.contact-description {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.contact-form h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.contact-form p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.team-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Store Section */
.store-section {
  border-top: 1px solid var(--border);
  padding-top: 4rem;
}

.store-title {
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.store-description {
  text-align: center;
  color: var(--muted-foreground);
  margin-bottom: 3rem;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.store-card {
  background-color: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.store-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-weight: bold;
}

.store-icon.official {
  background-color: var(--primary);
}

.store-icon.rakuten {
  background-color: #bf0000;
}

.store-icon.yahoo {
  background-color: #ff0033;
}

.store-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.store-card p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* Products セクション全体の背景色を追加 */
.products {
  /* productsセクション全体に明るいグレー系の背景色を追加してwhy-chooseとのコントラストを強化 */
  background-color: #f8f9fa;
  padding: 6rem 0;
}

/* Product Showcase */
.products-showcase {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  /* products-showcaseの背景色を透明に変更 */
  background-color: transparent;
  position: relative;
  padding: 4rem 0;
}

.product-section {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 3rem;
  /* より強いシャドウとボーダーを追加 */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(139, 115, 85, 0.1);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.product-header {
  text-align: center;
  margin-bottom: 3rem;
  /* ヘッダー部分にアクセントラインを追加 */
  position: relative;
  padding-bottom: 1rem;
}

.product-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 1px;
}

.product-title {
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
  /* タイトルにテキストシャドウを追加 */
  text-shadow: 0 2px 4px rgba(139, 115, 85, 0.1);
}

.product-subtitle {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  font-weight: 300;
}

.product-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.product-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}

.product-image:hover {
  transform: scale(1.02);
}

.product-image.main {
  grid-column: 1 / -1;
  aspect-ratio: 1 / 1;
}

.product-video {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #faf8f5 !important;
  border-radius: var(--radius);
  padding: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.youtube-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #faf8f5 !important;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.youtube-video {
  width: 177.78%; /* 16:9を1:1にするための拡大率 (16/9 * 100%) */
  height: 177.78%;
  border: none;
  border-radius: var(--radius);
  background-color: transparent;
  object-fit: cover;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.product-video-player {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  object-fit: cover;
  background-color: var(--muted);
}

.product-video-player:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.product-description {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.product-description p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* Achievements Section */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.achievement-card {
  background-color: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-2px);
}

.achievement-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.achievement-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.achievement-card p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

/* Footer */
.footer {
  background-color: var(--foreground);
  color: var(--background);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer .logo {
  color: var(--foreground);
  filter: brightness(0) invert(1);
}

.footer .brand-name {
  color: var(--background);
}

.footer-info {
  text-align: right;
}

.footer-info p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

/* 商品カラーギャラリーのスタイルを追加 */
.product-color-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 2rem;
  margin-bottom: 2rem;
  width: 100%;
}

.color-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  background: #fff;
}

.color-image:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.color-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.color-image:hover img {
  transform: scale(1.08);
}

/* YouTube動画サムネイル */
.youtube-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background-color: var(--muted);
  transition: transform 0.3s ease;
}

.youtube-thumbnail:hover {
  transform: scale(1.02);
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4rem;
  height: 4rem;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.play-button:hover {
  background-color: white;
  transform: translate(-50%, -50%) scale(1.1);
}

.play-button svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.2rem;
}

/* YouTube動画モーダル */
.video-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.video-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  width: 80%;
  max-width: 900px;
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.close-button {
  position: absolute;
  top: -2rem;
  right: 0;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease;
}

.close-button:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* レスポンシブ */
@supports (height: 100dvh) {
  .image-modal { padding: 16px; } /* 低い端末でも少し余白 */
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  /* Show hamburger button and update nav menu for mobile */
  .mobile-menu-button {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--card);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 99;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* カラーギャラリーのレイアウト: 2×2+1のグリッド */
  .product-color-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .color-image:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

  .color-image:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .product-gallery {
    grid-template-columns: 1fr;
  }

  .product-images {
    grid-template-columns: 1fr;
  }

  .product-image.main {
    grid-column: 1;
  }

  .product-section {
    padding: 1rem;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .why-choose-content,
  .work-gallery,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid,
  .store-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-info {
    text-align: center;
  }

  /* モバイル用のモーダルスタイルを追加 */
  .video-modal .modal-content {
    width: 95%;
    height: auto;
    max-height: 90vh;
  }

  .video-container {
    aspect-ratio: 16 / 9;
  }

  .product-color-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .color-image:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

  .color-image:hover {
    transform: translateY(-4px) scale(1.01);
  }
}
