/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f5f0; /* 全体の背景色 */
}

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

ul {
    list-style: none;
}

/* ヘッダー */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: relative;
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0.05em;
    background-color: #f7f5f0;
    height: 80px; /* 高さ固定 */
    z-index: 100; /* ハンバーガーメニューより手前に */
}

/* ロゴのスタイル */
.logo img {
    height: 60px; /* ロゴ画像の高さ調整 */
    width: auto; /* 幅は自動調整 */
}

.header-left.logo { /* header-left内のロゴ */
    /* font-weightやfont-sizeの指定は画像ロゴには不要 */
}

/* グローバルメニュー */
.header-nav ul {
    display: flex;
    gap: 30px;
}

.header-nav a {
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: #888;
}

.header-nav svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

/* 縦書きロゴ */
.header-logo-vertical.logo-vertical {
    position: absolute;
    right: 40px;
    top: 50%; /* 中央揃えの基準 */
    transform: translateY(-50%); /* 中央揃え */
    writing-mode: vertical-rl; /* 縦書き */
    text-orientation: upright; /* 文字を正立させる（一部ブラウザで異なる可能性あり） */
    font-size: 0.8em; /* 元の文字サイズ */
    letter-spacing: 0.3em; /* 縦書きでの文字間隔 */
    color: #555; /* 元の文字色 */
    opacity: 0.7; /* 透明度 */
}

.header-logo-vertical.logo-vertical img {
    height: 60px; /* 縦書きロゴ画像の高さ調整 */
    width: auto;
    object-fit: contain; /* コンテナに収める */
}


/* ハンバーガーメニューアイコン */
.hamburger-menu {
    display: none; /* デフォルトでは非表示（PCでは表示しない） */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 200; /* メニューより手前に */
}

.hamburger-menu div {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* ハンバーガーメニューが開いた時のアニメーション */
.hamburger-menu.open .bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.hamburger-menu.open .bar2 {
    opacity: 0;
}
.hamburger-menu.open .bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
}


/* メインビジュアル */
.hero-section {
    width: 100%;
    height: 80vh; /* ビューポートの高さの80% */
    position: relative;
    overflow: hidden; /* はみ出しを隠す */
    background-color: #d4c5b1; /* 動画がない場合の背景色 */
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 動画がコンテナに収まるようにトリミング */
    object-position: center; /* 動画の中心を維持 */
}

/* メインビジュアル上のテキスト */
.hero-overlay-text, .hero-overlay-text-right {
    position: absolute;
    color: #fff; /* テキスト色 */
    font-size: 1.2em;
    letter-spacing: 0.1em;
    opacity: 0.8;
    mix-blend-mode: overlay; /* 動画の色にテキストが馴染むように */
}

.hero-overlay-text {
    top: 30%;
    left: 15%;
}

.hero-overlay-text-right {
    top: 50%;
    right: 15%;
}


/* "FRAGRANCE FAMILY" セクション */
.fragrance-family-intro {
    text-align: center;
    padding: 100px 20px 80px;
    font-size: 0.9em;
    letter-spacing: 0.2em;
    color: #666;
}

/* フレグランスカテゴリ */
.fragrance-categories {
    padding: 0 5%; /* 左右の余白 */
    max-width: 1400px; /* 最大幅 */
    margin: 0 auto; /* 中央揃え */
}

.category-title {
    font-size: 1.2em;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-align: center;
    margin-bottom: 50px;
    padding-top: 80px; /* カテゴリ間の間隔 */
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* レスポンシブなグリッド */
    gap: 40px; /* グリッドアイテム間の間隔 */
    margin-bottom: 100px;
}

.grid-item {
    text-align: center;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block; /* 余白をなくす */
    margin-bottom: 15px;
}

.grid-item .item-title {
    font-size: 0.95em;
    letter-spacing: 0.08em;
    color: #333;
}

/* フッター */
.footer {
    background-color: #f7f5f0;
    padding: 80px 40px 40px;
    position: relative;
    font-size: 0.85em;
    line-height: 2;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* レスポンシブ対応 */
    max-width: 1200px;
    margin: 0 auto;
}

.footer-left, .footer-right {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px; /* レスポンシブ対応 */
}

.footer-left {
    flex-basis: 30%; /* 幅の目安 */
}

.footer-logo.logo img { /* フッターのロゴ */
    height: 50px; /* フッターロゴ画像の高さ調整 */
    filter: brightness(0.8); /* 少し暗めにするなど調整 */
}

.footer-logo {
    margin-bottom: 20px;
}


.footer-nav-bottom li, .footer-info li { /* フッターのnavは別クラス名に */
    margin-bottom: 5px;
}

.footer-nav-bottom a, .footer-info a {
    transition: color 0.3s ease;
}

.footer-nav-bottom a:hover, .footer-info a:hover {
    color: #888;
}

.footer-right {
    flex-basis: 60%; /* 幅の目安 */
    display: flex;
    justify-content: flex-end; /* 右寄せ */
    gap: 50px; /* 項目間の間隔 */
}

.footer-info {
    margin-right: 30px; /* SNSリンクとの間隔 */
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links img {
    width: 24px;
    height: 24px;
}

.language-selector a {
    margin-right: 5px;
    color: #555;
    transition: color 0.3s ease;
}

.language-selector a.active {
    font-weight: 700;
    color: #333;
}

.language-selector a:hover {
    color: #888;
}

.copyright {
    font-size: 0.8em;
    color: #777;
    margin-top: 15px; /* 言語セレクタとの間隔 */
    text-align: right; /* 右寄せ */
}

.scroll-to-top {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background-color: #d4c5b1; /* 背景色を画像から抽出 */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}

.scroll-to-top svg {
    color: #333;
    width: 24px;
    height: 24px;
}

.scroll-to-top:hover {
    background-color: #c4b5a1;
}

/* bodyに適用されるクラス */
body.no-scroll {
    overflow: hidden;
}

/* ========== レスポンシブ対応 ========== */

/* スマートフォン表示 (例: 768px以下) */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        height: 60px; /* 高さ調整 */
    }

    .header-nav {
        /* スマートフォンでは初期状態では非表示 */
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(247, 245, 240, 0.95); /* 背景色と透明度 */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 150; /* ヘッダーのロゴより上 */
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%); /* 最初は右に隠す */
    }

    .header-nav.open {
        transform: translateX(0); /* ハンバーガーメニューが開いたら表示 */
        display: flex; /* Flexコンテナとして表示 */
    }

    .header-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 25px; /* メニュー項目の間隔 */
        font-size: 1.5em; /* 大きめのフォントサイズ */
        font-weight: 600;
        letter-spacing: 0.1em;
    }

    .header-nav ul li a {
        display: block; /* クリック領域を広くする */
        padding: 10px 0;
    }

    .header-nav ul li.search-icon-li {
        margin-top: 20px; /* 検索アイコンのLIのみ上部余白 */
    }

    /* ハンバーガーメニュー表示 */
    .hamburger-menu {
        display: flex; /* スマートフォンで表示 */
        position: relative; /* z-indexを効かせるため */
    }

    .header-logo-vertical {
        display: none; /* スマートフォンでは非表示 */
    }

    .hero-section {
        height: 50vh;
    }

    .hero-overlay-text {
        top: 25%;
        left: 10%;
        font-size: 1em;
    }
    .hero-overlay-text-right {
        top: 45%;
        right: 10%;
        font-size: 1em;
    }

    .fragrance-family-intro {
        padding: 50px 20px 40px;
    }

    .category-title {
        margin-bottom: 30px;
        padding-top: 50px;
    }

    .category-grid {
        gap: 20px;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* スマートフォン向けに最小幅を小さく */
        margin-bottom: 60px;
    }

    .footer {
        padding: 50px 20px 30px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-left, .footer-right {
        width: 100%;
        align-items: center;
        margin-bottom: 30px;
    }

    .footer-right {
        flex-direction: column;
        gap: 20px;
        justify-content: center;
    }

    .footer-info {
        margin-right: 0; /* 中央揃えのため削除 */
    }

    .social-links {
        justify-content: center;
    }

    .copyright {
        text-align: center;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* タブレット表示 (例: 769px ～ 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        padding: 20px 30px;
    }
    .header-nav ul {
        gap: 20px;
    }
    .header-logo-vertical {
        right: 30px;
    }
    .fragrance-categories {
        padding: 0 3%;
    }
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 30px;
    }
    .footer {
        padding: 60px 30px;
    }
    .footer-right {
        gap: 30px;
    }
    .scroll-to-top {
        right: 30px;
        bottom: 30px;
    }
}

.slider-wrapper {
    width: 100%; /* スライドショー全体の表示幅 */
    max-width: auto; /* 最大幅 */
    overflow: hidden; /* はみ出る部分を隠す */
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    /* スライドアイテムの高さに合わせて調整 */
    height: 240px; /* 例: slide-itemの高さ200px + padding 20px * 2 */
    position: relative; /* 子要素のposition:absoluteの基準 */
}

.slider {
    display: flex; /* 画像を横並びにする */
    /* ここで指定する幅は、アニメーションの移動距離の計算に必要 */
    /* 今回は、10枚の画像セットを2セット配置しているので、10枚分の幅をアニメーションで移動させる */
    /* (画像幅 + マージン) * 枚数 */
    /* 例: 各画像300px + 右マージン15px */
    width: calc((300px + 15px) * 20); /* 20枚分の合計幅 */
    animation: infinite-scroll 30s linear infinite; /* アニメーション適用 */
    position: absolute; /* slider-wrapper内で絶対配置 */
    top: 20px; /* slider-wrapperのpaddingを考慮 */
    left: 20px; /* slider-wrapperのpaddingを考慮 */
}

/* マウスホバーで一時停止 */
.slider:hover {
    animation-play-state: paused;
}

.slide-item {
    flex-shrink: 0; /* アイテムが縮まないようにする */
    width: 300px; /* 各スライドアイテムの幅 */
    height: 200px; /* 各スライドアイテムの高さ */
    margin-right: 15px; /* アイテム間の余白 */
    background-color: #eee; /* 画像がない場合の代替色 */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    overflow: hidden;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像がアイテムに収まるようにトリミング */
    display: block;
}

/* 無限スクロールアニメーションの定義 */
@keyframes infinite-scroll {
    0% {
        transform: translateX(0); /* 最初は移動なし */
    }
    100% {
        /* 1セット分の画像（10枚）の幅だけ左に移動させる */
        /* (300px + 15px) * 10 = 3150px */
        transform: translateX(calc(-1 * (300px + 15px) * 10)); /* 10枚分の幅を左に移動 */
    }
}


/* レスポンシブ対応 */
@media (max-width: 768px) {
    .slider-wrapper {
        width: 95%;
        padding: 10px;
        height: 180px; /* 高さを調整 */
    }
    .slider {
        top: 10px;
        left: 10px;
        width: calc((250px + 10px) * 20); /* スライドアイテム幅 + マージン * 総枚数 */
        animation: infinite-scroll-mobile 25s linear infinite; /* 速度も調整 */
    }
    .slide-item {
        width: 250px; /* アイテム幅を調整 */
        height: 160px;
        margin-right: 10px;
    }
    @keyframes infinite-scroll-mobile {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-1 * (250px + 10px) * 10)); /* 10枚分の幅を左に移動 */
        }
    }
}

@media (max-width: 480px) {
    .slider-wrapper {
        height: 150px; /* 高さを調整 */
    }
    .slider {
        width: calc((200px + 8px) * 20); /* スライドアイテム幅 + マージン * 総枚数 */
        animation: infinite-scroll-xsmall 20s linear infinite; /* 速度も調整 */
    }
    .slide-item {
        width: 200px; /* アイテム幅を調整 */
        height: 130px;
        margin-right: 8px;
    }
    @keyframes infinite-scroll-xsmall {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-1 * (200px + 8px) * 10)); /* 10枚分の幅を左に移動 */
        }
    }
}

.back-to-top {
    position: fixed; /* 画面に固定 */
    bottom: 30px;    /* 下から30px */
    right: 30px;     /* 右から30px */
    background-color: #eee4d9; /* 背景色 */
    color: white;    /* 文字色 */
    padding: 10px 15px; /* 内側の余白 */
    text-decoration: none; /* 下線をなくす */
    font-size: 24px; /* 文字サイズ */
    line-height: 1; /* 行の高さを1に設定し、上下中央に配置 */
    text-align: center; /* テキストを中央揃え */
    opacity: 0;      /* 最初は非表示（透明） */
    visibility: hidden; /* 最初は非表示（要素自体も隠す） */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* フェードイン・アウトのアニメーション */
    z-index: 1000; /* 他の要素の上に表示 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* 影 */
}

.back-to-top:hover {
    background-color: #604e45; /* ホバー時の背景色 */
}

.back-to-top.visible {
    opacity: 1;      /* 表示状態（不透明） */
    visibility: visible; /* 表示状態（要素を表示） */
}

.pet-wedding-cta {
    text-align: center;
    padding: 100px 20px; /* 上下のパディング調整 */
    background-color: #f7f5f0; /* 背景色は既存サイトと同じ */
    max-width: 1000px; /* 幅を制限 */
    margin: 0 auto 100px; /* 中央揃えと下部の余白 */
}

.section-divider {
    width: 80px; /* 罫線の幅 */
    height: 1px;
    background-color: #ccc; /* 罫線の色 */
    margin: 0 auto 50px; /* 中央揃えと下部の余白 */
}

.cta-heading {
    font-size: 2.2em; /* 文字のサイズ */
    font-weight: 700; /* 太字 */
    line-height: 1.5;
    margin-bottom: 40px;
    color: #5d4037; /* 画像から抽出した茶系の色 */
}

.cta-body {
    font-size: 1em; /* 文字のサイズ */
    line-height: 1.8;
    margin-bottom: 50px;
    color: #666;
}

.cta-button {
    display: inline-block; /* ボタンとして機能するように */
    border: 1px solid #5d4037; /* ボタンの枠線 */
    color: #5d4037; /* ボタンの文字色 */
    padding: 15px 30px;
    font-size: 0.9em;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border-radius: 3px; /* 少し角丸に */
}

.cta-button:hover {
    background-color: #5d4037;
    color: #fff;
}