/*
Theme Name: iori
Theme URI: https://example.com/
Author: OpenAI
Description: iori 和紙アロマ用カスタムWordPressテーマ（ヘッダー配置修正版）
Version: 1.5.0
Text Domain: iori
*/

:root{
  --wine:#8d2239;
  --ink:#2c2927;
  --paper:#f8f4e8;
  --content:1120px;
}

*{box-sizing:border-box}

html{
  width:100%;
  margin:0;
  padding:0;
  scroll-behavior:smooth;
  scroll-padding-top:95px;
}

body{
  width:100%;
  margin:0;
  padding:0;
  overflow-x:hidden;
  color:var(--ink);
  background:#f8f4e8 url("assets/images/washi-bg.jpg") repeat;
  font-family:"Yu Mincho","Hiragino Mincho ProN","Hiragino Mincho Pro","Noto Serif JP",serif;
  line-height:1.75;
  font-size:16px;
}

img{
  display:block;
  max-width:100%;
  height:auto;
}

a{
  color:inherit;
  text-decoration:none;
}

button,input,textarea{
  font:inherit;
}

/* ヘッダーをページ最上部に配置 */
body::before{
  content:none;
  display:none;
}
/* ===== HEADER ===== */
.site-header{
  position:relative;
  z-index:100;
  width:100%;
  background:#fff;
  border-top:1px solid rgba(0,0,0,.08);
  border-bottom:1px solid rgba(0,0,0,.04);
}

.header-inner{
  width:min(calc(100% - 48px),var(--content));
  min-height:118px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
}

/* 左側ロゴ */
.site-logo{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex:0 0 auto;
}

.site-logo-image{
  display:block;
  width:92px;
  max-width:none;
  height:auto;
}

/* 右側メニュー */
.desktop-nav{
  margin-left:auto;
}

.desktop-nav ul{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:36px;
}

.desktop-nav a{
  position:relative;
  display:block;
  padding:10px 0;
  font-size:16px;
  letter-spacing:.08em;
  white-space:nowrap;
  transition:color .2s ease;
}

.desktop-nav a::after{
  content:"";
  position:absolute;
  left:0;
  right:100%;
  bottom:4px;
  height:1px;
  background:var(--wine);
  transition:right .2s ease;
}

.desktop-nav a:hover{
  color:var(--wine);
}

.desktop-nav a:hover::after{
  right:0;
}

/* モバイル用ハンバーガー */
.menu-toggle{
  display:none;
  border:0;
  background:transparent;
  color:#393533;
  width:40px;
  height:40px;
  padding:0;
  cursor:pointer;
  font-size:23px;
}

.site-nav{
  display:none;
  width:100%;
  background:#fff;
  border-top:1px solid #eee;
  box-shadow:0 8px 18px rgba(0,0,0,.05);
}

.site-nav.is-open{
  display:block;
}

.site-nav ul{
  width:min(calc(100% - 32px),var(--content));
  margin:0 auto;
  padding:12px 0 18px;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.site-nav a{
  display:block;
  padding:10px 4px;
  font-size:15px;
  border-bottom:1px solid #eee;
}

/* ===== MAIN ===== */
main{
  width:100%;
}

.page-wrap{
  width:min(calc(100% - 48px),var(--content));
  margin:0 auto;
}

.hero{
  margin:0;
}

.hero img{
  width:100%;
}

/* 3 feature images */
.story-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:28px;
  margin-top:36px;
}

.story-grid img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:3 / 2;
  object-fit:cover;
}

/* sections */
.section{
  padding-top:84px;
  scroll-margin-top:95px;
}

.section-title{
  margin:0 0 22px;
  font-size:30px;
  line-height:1.4;
  font-weight:500;
  letter-spacing:.08em;
}

.visual-card{
  width:100%;
  background:#fff;
}

.visual-card img{
  width:100%;
}

/* ===== CONTACT ===== */
.contact-section{
  padding-top:78px;
  padding-bottom:58px;
}

.contact-form{
  display:grid;
  gap:8px;
}

.contact-form label{
  display:block;
  margin:0 0 4px;
  font-size:15px;
  line-height:1.5;
}

.contact-form input,
.contact-form textarea{
  display:block;
  width:100%;
  border:1px solid #ded9d2;
  border-radius:0;
  background:#fff;
  color:#222;
  padding:9px 10px;
  outline:none;
  font-size:15px;
}

.contact-form input{
  height:38px;
}

.contact-form textarea{
  min-height:250px;
  resize:vertical;
}

.submit-button{
  width:245px;
  height:48px;
  margin-top:10px;
  padding:0;
  border:0;
  background:var(--wine);
  color:#fff;
  cursor:pointer;
  font-size:15px;
}

.submit-button:hover{
  filter:brightness(.88);
}

/* Contact Form 7 */
.wpcf7-form p{
  margin:0 0 8px;
}

.wpcf7-form label{
  display:block;
  font-size:15px;
  line-height:1.5;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea{
  width:100%;
  border:1px solid #ded9d2;
  border-radius:0;
  background:#fff;
  padding:9px 10px;
  font-size:15px;
  box-shadow:none;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"]{
  height:38px;
}

.wpcf7-form textarea{
  min-height:250px;
}

.wpcf7-form input[type="submit"]{
  width:245px;
  height:48px;
  border:0;
  border-radius:0;
  background:var(--wine);
  color:#fff;
  cursor:pointer;
  font-size:15px;
}

/* ===== FOOTER ===== */
.site-footer{
  width:100%;
  margin:0;
  padding:22px 16px;
  background:var(--wine);
  color:#fff;
  text-align:center;
  font-family:Arial,sans-serif;
  font-size:14px;
  line-height:1.2;
}

.site-footer small{
  font-size:14px;
}

.to-top{
  position:fixed;
  right:18px;
  bottom:70px;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  background:rgba(61,104,135,.72);
  color:#fff;
  font-size:14px;
  z-index:50;
}

/* ===== TABLET ===== */
@media (max-width:900px){
  .header-inner,
  .page-wrap{
    width:calc(100% - 40px);
  }

  .header-inner{
    min-height:100px;
  }

  .site-logo-image{
    width:82px;
  }

  .desktop-nav ul{
    gap:22px;
  }

  .desktop-nav a{
    font-size:14px;
  }

  .section-title{
    font-size:27px;
  }
}

/* 香りの種類：PC版では横長画像だけを表示 */
.fragrance-pc{
  display:block;
}

/* モバイル用4画像はPC・タブレットでは非表示 */
.fragrance-mobile{
  display:none !important;
}

/* ===== MOBILE ===== */
@media (max-width:700px){
.header-inner,
  .page-wrap{
    width:calc(100% - 28px);
  }

  .header-inner{
    min-height:74px;
  }

  .site-logo-image{
    width:48px;
  }

  .desktop-nav{
    display:none;
  }

  .menu-toggle{
    display:block;
    margin-left:auto;
  }
  .story-grid{
    grid-template-columns:1fr;
    gap:18px;
    margin-top:18px;
  }

  .story-grid img{
    width:100%;
    height:auto;
    aspect-ratio:3 / 2;
    object-fit:cover;
  }
.section{
    padding-top:62px;
    scroll-margin-top:80px;
  }

  .section-title{
    margin-bottom:18px;
    font-size:23px;
  }

  /* 香りの種類：PC用画像を非表示 */
  .fragrance-pc{
    display:none !important;
  }

  /* 香りの種類：モバイル用4画像を縦並び */
  .fragrance-mobile{
    display:flex !important;
    flex-direction:column;
    gap:18px;
    width:100%;
  }

  .fragrance-mobile-item{
    width:100%;
    margin:0;
  }

  .fragrance-mobile-item img{
    display:block;
    width:100%;
    height:auto;
  }

  .contact-section{
    padding-top:64px;
    padding-bottom:46px;
  }

  .contact-form label,
  .wpcf7-form label{
    font-size:14px;
  }

  .contact-form textarea,
  .wpcf7-form textarea{
    min-height:220px;
  }

  .submit-button,
  .wpcf7-form input[type="submit"]{
    width:180px;
    height:44px;
    font-size:14px;
  }

  .site-footer,
  .site-footer small{
    font-size:12px;
  }
}


/* ===== FINAL RESPONSIVE OVERRIDE v1.4 =====
   PC: 横長の商品一覧だけ表示
   Mobile: 個別4画像だけ表示
*/
@media screen and (min-width: 701px){
  #fragrance .fragrance-pc{
    display:block !important;
  }
  #fragrance .fragrance-mobile{
    display:none !important;
    visibility:hidden !important;
    height:0 !important;
    overflow:hidden !important;
    margin:0 !important;
    padding:0 !important;
  }
}

@media screen and (max-width: 700px){
  #fragrance .fragrance-pc{
    display:none !important;
  }
  #fragrance .fragrance-mobile{
    display:flex !important;
    visibility:visible !important;
    height:auto !important;
    overflow:visible !important;
    flex-direction:column !important;
    gap:18px !important;
    width:100% !important;
  }
}
