/* ================================
   共通CSS - 全ページ共通のスタイル
   ================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif !important;
    font-size: 16px !important;
    font-weight: normal !important;
    line-height: 1.6 !important;
    color: #333 !important;
    letter-spacing: normal !important;
}

/* WordPress親テーマ（Twenty Twenty-Five）スタイルのリセット */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif !important;
    font-weight: bold !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
}

p, span, div, a, li, label, input, textarea, select, button {
    font-family: inherit !important;
    letter-spacing: normal !important;
}

/* WordPress生成スタイルのリセット */
.wp-site-blocks {
    padding: 0 !important;
}

.has-global-padding {
    padding: 0 !important;
}

/* 共通カラー変数 */
:root {
    --primary-color: #ff8c5a;
    --primary-hover: #ff6347;
    --text-dark: #333;
    --text-light: #999;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* カテゴリーカラー */
    --color-kitchen: #d85a8f;  /* ピンク */
    --color-stationery: #5a8fd8;  /* 青 */
    --color-others: #5ab88f;  /* 緑 */

    /* ページテーマカラー */
    --theme-color: #ff8c5a;  /* デフォルト（オレンジ） */
    --theme-navy: #3d5a80;   /* 紺色（TOP、Contact、Privacy Policy） */
    --theme-blue: #5a8fd8;   /* 青色（Stationery） */
    --theme-green: #5ab88f;  /* 緑色（Others） */
}

/* ページテーマカラークラス */
body.theme-navy {
    --theme-color: #3d5a80;
}

body.theme-blue {
    --theme-color: #5a8fd8;
}

body.theme-green {
    --theme-color: #5ab88f;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================
   ヘッダー（全ページ共通）
   ================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ヘッダー上部（ロゴ、EPリンク） */
.header-top {
    background: white;
    border-bottom: 1px solid #eee;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

/* メインナビゲーション（帯状） */
.main-nav {
    background: var(--theme-color);
    box-shadow: var(--shadow-light);
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
    flex: 1;
}

.main-nav > div > ul > li > a {
    display: block;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 15px 25px;
    text-align: center;
    transition: background 0.3s ease;
}

.main-nav > div > ul > li > a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ドロップダウンメニュー */
.has-dropdown,
.menu-item-has-children {
    position: relative;
}

ul.dropdown, .dropdown,
ul.sub-menu, .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: translateY(-10px);
    background: transparent;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 0;
    border-radius: 0;
    padding: 0;
    list-style: none;
    display: block;
    overflow: hidden;
}

.has-dropdown:hover .dropdown,
.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li,
.sub-menu li {
    list-style: none;
    margin: 0;
    display: block;
}

.dropdown li:last-child,
.sub-menu li:last-child {
    margin-bottom: 0;
}


.dropdown a,
.main-nav .sub-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark) !important;
    background: white;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
    text-align: center;
    border-radius: 0;
    border: none;
    margin: 0;
}

.dropdown a:hover,
.main-nav .sub-menu a:hover {
    background: var(--theme-color);
    color: white !important;
}

/* EP公式サイトリンク */
.ep-link {
    display: flex;
    align-items: center;
}

.ep-link a {
    background: var(--theme-color);
    color: white;
    padding: 8px 20px;
    border-radius: 0;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.ep-link a:hover {
    opacity: 0.8;
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* モバイルメニュー */
.mobile-menu,
.side-menu {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.mobile-menu.active,
.side-menu.active {
    right: 0;
}

.mobile-menu-header,
.side-menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--theme-color);
    color: white;
}

.mobile-menu-header h2,
.side-menu-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* モバイルナビゲーション */
.mobile-nav ul {
    list-style: none;
    padding: 20px;
}

.mobile-nav > ul > li {
    margin-bottom: 15px;
}

.mobile-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 5px 0;
}

/* NewsとContactのメインメニュー項目 */
.mobile-nav > ul > li > a {
    color: var(--theme-color);
    font-weight: bold;
}

.menu-category {
    display: block;
    font-weight: bold;
    color: var(--theme-color);
    margin-bottom: 5px;  /* 余白を減らす */
}

.mobile-nav ul ul,
.mobile-nav .sub-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-left: 15px;
    padding-top: 5px;
    margin-bottom: 0;
    display: block !important;
}

.mobile-nav ul ul li,
.mobile-nav .sub-menu li {
    margin-bottom: 3px;
}

.mobile-nav ul ul a,
.mobile-nav .sub-menu a {
    padding-left: 0;
    font-size: 14px;
    color: var(--text-dark) !important;
    background: transparent !important;
    opacity: 0.8;
}

.mobile-nav ul ul a:hover,
.mobile-nav .sub-menu a:hover {
    opacity: 1;
    color: var(--theme-color) !important;
}

.ep-mobile-link {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 998;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ================================
   フッター（全ページ共通）
   ================================ */
.footer {
    background: var(--theme-color);
    color: white;
    padding: 40px 0;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.amazon-link {
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-sns {
    display: flex;
    gap: 20px;
}

.footer-sns img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.footer-sns a:hover img {
    transform: scale(1.1);
}

/* ================================
   共通コンポーネント
   ================================ */

/* ページトップへ戻るボタン */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--theme-color);
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top span {
    line-height: 1;
}

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

/* セクションタイトル */
.section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-dark);
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 10px 30px;
    background: var(--theme-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: opacity 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    opacity: 0.8;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* カード */
.card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-light);
}

/* ================================
   レスポンシブ共通設定
   ================================ */
@media (max-width: 768px) {
    /* ヘッダー */
    .main-nav,
    .ep-link {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* フッター */
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .footer-links {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-right {
        align-items: center;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
}
