/* CSS Reset and Design System Variables */
:root {
  /* Color Palette */
  --bg-main: #FAF7F2;          /* ナチュラルなアイボリー/ベージュ */
  --bg-card: #FFFFFF;          /* カード用のホワイト */
  --text-main: #3E3228;        /* 深いダークブラウン */
  --text-muted: #7A6E65;       /* やわらかいグレーブラウン */
  --accent-brown: #8D5B4C;     /* 温かみのあるブラウン */
  --accent-orange: #E88D4F;    /* 焼きたてを連想させる温かいオレンジ */
  --accent-orange-hover: #D67A3B;
  --accent-green: #6B8E5F;     /* 自然を感じる優しいグリーン */
  --border-color: #EADFD4;     /* 細い線用ベージュ */
  
  /* Fonts */
  --font-family-base: 'Noto Sans JP', sans-serif;
  --font-family-title: 'Kiwi Maru', 'Noto Sans JP', serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 4px 12px rgba(62, 50, 40, 0.05);
  --shadow-md: 0 8px 24px rgba(62, 50, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(62, 50, 40, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Header Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-family-title);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--accent-brown);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent-orange);
}

.nav-links .btn-nav {
  background-color: var(--accent-brown);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
}

.nav-links .btn-nav:hover {
  background-color: var(--accent-orange);
  color: #fff;
}

/* スマホ表示対応 (ブレークポイント 680px以下) */
@media (max-width: 680px) {
  .navbar {
    padding: 0.6rem 0;
  }

  .nav-container {
    padding: 0 1rem;
  }

  /* 「ひかりパン工房」の文字を非表示にし、織物アイコンのみ表示 */
  .logo-text {
    display: none;
  }

  .logo-icon {
    font-size: 1.8rem;
    padding: 0.2rem;
  }

  /* 「ホーム」リンクを非表示 */
  .nav-links .nav-home {
    display: none;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .nav-links .btn-nav {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* 1. Hero Section (ファーストビュー) */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(62, 50, 40, 0.45) 0%, rgba(62, 50, 40, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  color: #FFFFFF;
}

.badge-limited {
  display: inline-block;
  background-color: var(--accent-orange);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-title {
  font-family: var(--font-family-title);
  font-size: 2.5rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background-color: var(--accent-orange);
  color: #fff;
  padding: 1rem 2.2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(232, 141, 79, 0.4);
  transition: all 0.25s ease;
}

.btn-primary:hover {
  background-color: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 141, 79, 0.5);
}

.btn-secondary {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

/* Common Section Layout */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-subtitle {
  color: var(--accent-green);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-family-title);
  font-size: 2rem;
  color: var(--text-main);
  font-weight: 500;
}

.title-underline {
  width: 50px;
  height: 3px;
  background-color: var(--accent-orange);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* 2. Story Section */
.story-section {
  background-color: var(--bg-main);
}

.story-intro {
  max-width: 700px;
  margin: -1.5rem auto 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.story-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.story-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.story-card:hover .story-img-box img {
  transform: scale(1.05);
}

.step-num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent-brown);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.story-card-body {
  padding: 1.5rem;
}

.story-card-body h3 {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  font-family: var(--font-family-title);
}

.story-card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 3. Lineup Section (3列カード型) */
.lineup-section {
  background-color: #F4ECE1; /* やや深みのあるナチュラルベージュ */
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.product-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stock-badge {
  position: absolute;
  bottom: 0.8rem;
  left: 0.8rem;
  background-color: rgba(62, 50, 40, 0.85);
  color: #FFF;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.stock-badge.soldout-badge {
  background-color: #E74C3C;
}

.tag-recommend, .tag-seasonal {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.tag-recommend {
  background-color: var(--accent-orange);
}

.tag-seasonal {
  background-color: var(--accent-green);
}

/* Product list & stock item styles */
.item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.item-stock-status {
  font-size: 0.8rem;
  color: var(--accent-brown);
  font-weight: 700;
}

.item-stock-status.soldout {
  color: #E74C3C;
}

.select-item.soldout-item {
  opacity: 0.65;
  background-color: #F0EAE1;
}

.select-item.soldout-item .item-name {
  text-decoration: line-through;
}

.btn-submit:disabled {
  background-color: #BDC3C7;
  cursor: not-allowed;
  box-shadow: none;
}


.product-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-name {
  font-family: var(--font-family-title);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.product-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1rem;
  border-top: 1px stroke var(--border-color);
  border-top: 1px solid #F0E6DC;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-brown);
}

.product-price small {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.product-size {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* 4. Order Form Section */
.order-section {
  background-color: var(--bg-main);
}

.order-box {
  max-width: 750px;
  margin: 0 auto;
  background-color: var(--bg-card);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

@media (max-width: 600px) {
  .order-box {
    padding: 1.8rem;
  }
}

.order-notice {
  font-size: 0.9rem;
  color: var(--accent-orange);
  margin-top: 0.5rem;
  font-weight: 500;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.required {
  background-color: #E74C3C;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.optional {
  background-color: #95A5A6;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-family-base);
  color: var(--text-main);
  background-color: #FAFAFA;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  background-color: #FFF;
  box-shadow: 0 0 0 3px rgba(232, 141, 79, 0.15);
}

.select-product-list {
  background: #FAF7F2;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.select-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-name {
  font-size: 0.95rem;
  font-weight: 500;
}

.select-item .form-select {
  width: 100px;
  padding: 0.4rem;
}

.form-submit {
  margin-top: 1rem;
  text-align: center;
}

.btn-submit {
  width: 100%;
  background-color: var(--accent-orange);
  color: #fff;
  border: none;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(232, 141, 79, 0.35);
  transition: all 0.25s ease;
}

.btn-submit:hover {
  background-color: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 141, 79, 0.45);
}

/* Footer */
.footer {
  background-color: var(--text-main);
  color: #EADFD4;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-info h3 {
  font-family: var(--font-family-title);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #FFF;
}

.footer-info p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.3rem;
}

.copyright {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  opacity: 0.6;
}

/* 合言葉（パスワード）保護モーダル */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(62, 50, 40, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.auth-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  animation: authPopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes authPopIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.auth-card h2 {
  font-family: var(--font-family-title);
  color: var(--text-main);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.auth-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

.auth-input-group {
  display: flex;
  gap: 0.5rem;
}

.auth-input-group input {
  flex-grow: 1;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-input-group input:focus {
  border-color: var(--accent-orange);
}

.btn-auth {
  background-color: var(--accent-orange);
  color: #fff;
  border: none;
  padding: 0 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-auth:hover {
  background-color: var(--accent-orange-hover);
}

.auth-error {
  color: #E74C3C;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.8rem;
  min-height: 1.2rem;
}

