/**
 * 共通コンポーネント用スタイル（ナビ・カード・ reveal 等）。
 */
body {
    background-color: var(--color-bg);
    color: var(--color-stone-700);
    font-family: 'Noto Serif JP', serif;
    overflow-x: hidden;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

body.font-sans-body {
    font-family: 'Noto Sans JP', sans-serif;
}

.font-serif-en { font-family: 'Cormorant Garamond', serif; }

.group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/**
 * ヘッダーは body のページ別フォント（Sans 本文ページ等）に引きずられないよう、タイポをここで固定する。
 */
#navbar {
    transition: all 0.5s ease;
    font-family: 'Noto Sans JP', sans-serif;
    letter-spacing: 0.05em;
    line-height: 1.5;
}
#navbar .font-serif {
    font-family: 'Noto Serif JP', serif;
}
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/**
 * トップページのみ：ヒーロー上の透明ヘッダーを白文字化（スクロールで .scrolled 時は従来の濃色に戻る）。
 * .dropdown-menu 内は除外（白背景のため濃色のまま）。
 */
body.page-home #navbar:not(.scrolled) .max-w-7xl .flex.items-center.space-x-12 > a.flex.flex-col > span {
    color: rgba(255, 255, 255, 0.88) !important;
}
body.page-home #navbar:not(.scrolled) .max-w-7xl .flex.items-center.space-x-12 > a.flex.flex-col > :is(h1, div).font-serif {
    color: #fff !important;
}
body.page-home #navbar:not(.scrolled) nav.hidden > a {
    color: rgba(255, 255, 255, 0.94) !important;
}
body.page-home #navbar:not(.scrolled) nav.hidden > div > button {
    color: rgba(255, 255, 255, 0.94) !important;
}
body.page-home #navbar:not(.scrolled) nav.hidden > a:hover,
body.page-home #navbar:not(.scrolled) nav.hidden > div > button:hover {
    color: #fecdd3 !important;
}
/*
 * アイコン列: .max-w-7xl がそのまま flex justify-between のコンテナ（子に flex 行はない）。
 * 誤: .max-w-7xl > .flex.justify-between > …（存在しない階層でマッチせず、SVG が text-stone-700 のままだった）
 *
 * 注意: .space-x-6 配下にアカウントのドロップダウン（.header-account__panel 内リンク）があるため、
 * 子孫セレクタ a ではなく「直接の a / button」と「ユーザーアイコン1本」だけを白化する。
 */
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > a,
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > button,
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > .header-account > a {
    color: #fff !important;
}
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > a:hover,
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > button:hover,
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > .header-account > a:hover {
    color: #fecdd3 !important;
}
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > a svg,
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > button svg,
body.page-home #navbar:not(.scrolled) .max-w-7xl > div.flex.items-center.space-x-6 > .header-account > a svg {
    color: #fff !important;
    stroke: #fff !important;
}

/* アカウントメニュー: ナビの .group（メガメニュー）と Tailwind group を分離 */
.header-account {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.header-account__panel {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 50;
    width: 13rem;
    padding-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}
.header-account:hover .header-account__panel,
.header-account:focus-within .header-account__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.hero-divider {
    width: 0;
    height: 1px;
    background-color: var(--color-rose-300);
    margin: 3rem auto 0;
    animation: wffExpandWidth 1.5s ease forwards 1.2s;
}
@keyframes wffExpandWidth {
    to { width: 6rem; }
}

.hero-divider--on-dark {
    background-color: #fecdd3;
}

/* トップヒーロー：キャッチコピーは必ず白（body 文字色や CSS 読み込み順に依存しない） */
body.page-home .home-hero .home-hero__catch-en,
body.page-home .home-hero .home-hero__catch-ja {
    color: #ffffff;
}

/* トップヒーロー：SP は本文非表示のため区切り線を詰める */
@media (max-width: 767px) {
    body.page-home .home-hero .hero-divider {
        margin-top: 1.25rem;
    }
}

.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(253, 164, 175, 0.2);
}

.product-card {
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}
.product-card:hover {
    transform: translateY(-8px);
}

.img-grayscale {
    filter: grayscale(0.2);
    transition: filter 0.7s ease;
}
.product-card:hover .img-grayscale {
    filter: grayscale(0);
}

.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.filter-tag {
    background: #fff;
    border: 1px solid #eee;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}
.filter-tag:hover {
    border-color: var(--color-rose-300);
}

.filter-bar {
    position: sticky;
    top: 72px;
    background: rgba(253, 252, 251, 0.95);
    backdrop-filter: blur(8px);
    z-index: 30;
    border-bottom: 1px solid #f1f1f1;
}

/**
 * 商品一覧：3つの select が縦いっぱいに伸びるのを防ぎ、常に横並びにする。
 * （flex アイテムの min-width:auto ＋ max-w-full 等で 1 列に落ちるケースへの対策）
 */
.filter-bar form .filter-bar-selects {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.filter-bar form .filter-bar-selects .filter-bar-select {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
}

.filter-bar form .filter-bar-selects .filter-bar-apply {
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 639px) {
    .filter-bar form .filter-bar-selects {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 2px;
    }

    .filter-bar form .filter-bar-selects .filter-bar-select {
        flex: 0 0 auto;
        min-width: 9.75rem;
        max-width: 12.5rem;
    }
}

@media (min-width: 640px) {
    .filter-bar form .filter-bar-selects {
        flex-wrap: wrap;
    }
}

.sold-out-overlay {
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #888;
    letter-spacing: 0.2em;
}

.product-card .image-swap-2 {
    opacity: 0;
    transition: opacity 0.5s ease;
}
.product-card:hover .image-swap-2 {
    opacity: 1;
}

.btn-primary {
    display: block;
    width: 100%;
    background-color: var(--color-stone-800);
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    transition: background-color 0.3s;
}
.btn-primary:hover {
    background-color: var(--color-rose-400);
}

.btn-secondary {
    display: block;
    width: 100%;
    border: 1px solid var(--color-stone-800);
    color: var(--color-stone-800);
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    transition: all 0.3s;
}
.btn-secondary:hover {
    background-color: var(--color-stone-800);
    color: #fff;
}

.summary-card {
    border: 1px solid #f5f5f4;
    padding: 2rem;
    background: #fff;
}
@media (min-width: 1024px) {
    .summary-card {
        position: sticky;
        top: 6rem;
    }
}

#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-stone-800);
    color: #fff;
    padding: 1rem 2rem;
    font-size: 0.75rem;
    z-index: 100;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --------------------------------------------------------------------------
 * モバイルドロワー（lg 未満のハンバーガーから開く）
 * -------------------------------------------------------------------------- */
.mobile-drawer-root {
    position: fixed;
    inset: 0;
    z-index: 60;
    visibility: hidden;
    pointer-events: none;
}
.mobile-drawer-root.is-open {
    visibility: visible;
    pointer-events: auto;
}
.mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 25, 23, 0.45);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.mobile-drawer-root.is-open .mobile-drawer-backdrop {
    opacity: 1;
}
.mobile-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(100%, 22rem);
    max-width: 100vw;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mobile-drawer-root.is-open .mobile-drawer-panel {
    transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
    .mobile-drawer-backdrop,
    .mobile-drawer-panel {
        transition: none;
    }
}
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 1rem 1.25rem;
    border-bottom: 1px solid #f5f5f4;
    flex-shrink: 0;
}
.mobile-drawer-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: -0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s;
}
.mobile-drawer-close-btn:hover {
    background-color: #fafaf9;
}
.mobile-drawer-close-btn:focus-visible {
    outline: 2px solid var(--color-rose-300);
    outline-offset: 2px;
}
.mobile-drawer-nav {
    overflow-y: auto;
    flex: 1;
    padding: 0.75rem 0 1.5rem;
    -webkit-overflow-scrolling: touch;
}
.mobile-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0 1.25rem;
}
.mobile-drawer-list--legal {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f5f5f4;
}
.mobile-drawer-list li + li {
    border-top: 1px solid #fafaf9;
}
.mobile-drawer-link {
    display: block;
    padding: 0.9rem 0;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    color: #44403c;
    text-decoration: none;
    transition: color 0.15s;
}
.mobile-drawer-link:hover {
    color: #fb7185;
}
.mobile-drawer-link--primary {
    font-weight: 700;
    color: #292524;
}
.mobile-drawer-link--legal {
    padding: 0.5rem 0;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    color: #78716c;
}
.mobile-drawer-link--legal:hover {
    color: #fb7185;
}
.mobile-drawer-details {
    margin: 0.5rem 1.25rem 0;
    border-top: 1px solid #f5f5f4;
    padding-top: 0.25rem;
}
.mobile-drawer-summary {
    cursor: pointer;
    list-style: none;
    padding: 0.75rem 1.5rem 0.75rem 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #57534e;
    position: relative;
}
.mobile-drawer-summary::-webkit-details-marker {
    display: none;
}
.mobile-drawer-summary::after {
    content: '';
    position: absolute;
    right: 0.35rem;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    margin-top: -0.35rem;
    border-right: 2px solid #a8a29e;
    border-bottom: 2px solid #a8a29e;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.mobile-drawer-details[open] .mobile-drawer-summary::after {
    margin-top: -0.15rem;
    transform: rotate(225deg);
}
.mobile-drawer-sublist {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0 0 0 0.5rem;
}
.mobile-drawer-sublink {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.8125rem;
    color: #57534e;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.15s;
}
.mobile-drawer-sublink:hover {
    color: #fb7185;
}

body.mobile-drawer-open {
    overflow: hidden;
}
