/*
 * assets/css/common.css
 * 全ページ共通スタイル。
 * 各 HTML の <style> から共通部分を抽出。
 * Tailwind CDN のカスタムテーマと同じ値を使用（競合しない）。
 */

/* ベースフォント・カラー */
body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #222222;
    background-color: #FFFFFF;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ラグジュアリーセリフフォントユーティリティ */
.font-serif-luxury {
    font-family: 'Cormorant Garamond', serif;
}

/* カスタムスクロールバー */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #F7F7F7; }
::-webkit-scrollbar-thumb { background: #111111; }

/* フェードインアップアニメーション */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* 商品画像フレーム — 全ページ共通 */
.product-img-frame {
    position: relative;
    overflow: hidden;
    background-color: #FFFFFF;
}
.product-img-frame > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.product-img-frame--grid {
    aspect-ratio: 3 / 4;
}
.product-img-frame--detail {
    aspect-ratio: 3 / 4;
    max-height: min(80vh, 720px);
}
.product-img-frame--thumb {
    aspect-ratio: 1 / 1;
}

/* 商品画像ホバーズーム（一覧・トップ） */
.luxury-img-container > img {
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), filter 1.5s ease;
    filter: grayscale(20%) brightness(95%);
}
.luxury-img-container:hover > img {
    transform: scale(1.04);
    filter: grayscale(0%) brightness(100%);
}

/* ゴールドアンダーラインホバー */
.gold-link { position: relative; }
.gold-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #C8A86B;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.gold-link:hover::after { width: 100%; }

/* スクロールリビール（Intersection Observer と連携） */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* フォームインプット共通スタイル（バリデーションエラー時も含む） */
.form-input {
    width: 100%;
    background-color: #F7F7F7;
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #222222;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Noto Sans JP', sans-serif;
}
.form-input:focus { border-color: #C8A86B; }
.form-input.error  { border-color: #e53e3e; }

/* エラーメッセージ */
.form-error {
    color: #e53e3e;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* 固定ヘッダー分の余白（fixed header 対策） */
.header-offset {
    padding-top: calc(6rem + env(safe-area-inset-top, 0px));
}
@media (min-width: 768px) {
    .header-offset {
        padding-top: calc(6.5rem + env(safe-area-inset-top, 0px));
    }
}

[x-cloak] { display: none !important; }
