/* =============================================
   Others製品ページ専用CSS
   ============================================= */

/* Others製品ページ用テーマカラー */
.page-template-page-others-product-php {
    --theme-color: #5ab88f;
}

/* 共通ヘッダーの青いナビを非表示 */
.page-template-page-others-product-php .main-nav {
    display: none;
}

/* モバイルメニューヘッダーをテーマカラーに */
.page-template-page-others-product-php .mobile-menu-header {
    background: #5ab88f;
}

/* モバイルメニュー内のリンク色 */
.page-template-page-others-product-php .mobile-nav > ul > li > a,
.page-template-page-others-product-php .mobile-nav ul ul a:hover {
    color: #5ab88f !important;
}

/* ヘッダー右上ボタンをテーマカラーに */
.page-template-page-others-product-php .ep-link a {
    background: #5ab88f;
}

/* フッターをテーマカラーに */
.page-template-page-others-product-php .footer {
    background: #5ab88f;
}

/* スクロールトップボタンをテーマカラーに */
.page-template-page-others-product-php .scroll-to-top {
    background: #5ab88f;
}

/* リンク色をテーマカラーに統一 */
.page-template-page-others-product-php a {
    color: #5ab88f;
}

.page-template-page-others-product-php a:hover {
    color: #4a9e7a;
}

/* ヘッダー・フッター内のリンクは白のまま */
.page-template-page-others-product-php .header a,
.page-template-page-others-product-php .footer a {
    color: white;
}

.page-template-page-others-product-php .logo a {
    color: inherit;
}

/* カテゴリナビのリンクは白文字 */
.page-template-page-others-product-php .header-nav a {
    color: white !important;
}

.page-template-page-others-product-php .header-nav a:hover {
    color: white !important;
}

/* Header Nav（商品カテゴリナビ） */
.header-nav {
    background: #5ab88f;
    width: 100%;
}

.header-nav-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    justify-content: center;
}

.header-nav-item {
    flex: 1;
    padding: 15px 10px;
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-nav-item:last-child {
    border-right: none;
}

@media (min-width: 769px) and (max-width: 1200px) {
    .header-nav-item {
        max-width: none;
        flex: 1 1 0;
    }
}

.header-nav-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

.header-nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: bold;
    pointer-events: none;
    cursor: default;
}

/* ================================
   メインスライダー
   ================================ */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-slider-container {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.hero-slider .slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.hero-slider .slide {
    min-width: 100%;
    position: relative;
}

.hero-slider .slide img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* サムネイルナビゲーション（PC用） */
.slider-thumbnails {
    display: flex;
    gap: 0;
    max-width: 100%;
    margin: 0 auto;
}

.slider-thumbnails .thumbnail {
    flex: 1;
    cursor: pointer;
    transition: opacity 0.3s ease;
    opacity: 0.5;
    overflow: hidden;
}

.slider-thumbnails .thumbnail:hover {
    opacity: 0.8;
}

.slider-thumbnails .thumbnail.active {
    opacity: 1;
}

.slider-thumbnails .thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.slider-thumbnails .placeholder-thumb {
    background-color: #d0d0d0;
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #888;
}

/* スライダードットナビ（モバイル用） */
.slider-dots {
    display: none;
    justify-content: center;
    gap: 10px;
    padding: 15px 0;
    background: #f8f9fa;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-dots .dot:hover {
    background: #999;
}

.slider-dots .dot.active {
    background: #5ab88f;
}

/* ================================
   テキストセクション
   ================================ */
.product-text-section {
    padding: 60px 0;
    text-align: left;
}

.product-text-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
}

.product-text-section h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    margin-top: 30px;
    line-height: 1.6;
}

.product-text-section h3:first-child {
    margin-top: 0;
}

.product-text-section h4 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    margin-top: 10px;
    line-height: 1.6;
}

.product-text-section p {
    font-size: 1rem;
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* ================================
   画像セクション
   ================================ */
.product-image-section {
    padding: 40px 0;
}

.product-image-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.product-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* ================================
   2カラムセクション
   ================================ */
.two-column-section {
    padding: 60px 0;
    background: white;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* 逆順レイアウト（仕様左・画像右） */
.two-column-section.reverse .two-column-layout {
    grid-template-columns: 2fr 1fr;
}

.two-column-section.reverse .product-image-column {
    order: 2;
}

.two-column-section.reverse .product-specs-column {
    order: 1;
}

/* 商品画像カラム */
.product-image-column .product-image-wrapper {
    max-width: 100%;
}

.product-image-column .product-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* 製品仕様カラム */
.product-specs-column h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: left;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.specs-table th {
    background: #e8f5e9;
    color: #333;
    font-weight: bold;
    width: 40%;
}

.specs-table td {
    background: white;
    color: #333;
}

/* ================================
   バナーセクション
   ================================ */
.banner-section {
    padding: 40px 0;
    text-align: center;
}

.banner-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.banner-wrapper a {
    display: inline-block;
}

.banner-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.banner-wrapper img:hover {
    opacity: 0.8;
}

/* ================================
   プレースホルダー
   ================================ */
.placeholder-slide {
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 16px;
    width: 100%;
    aspect-ratio: 16/9;
}

.placeholder-image {
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 16px;
    width: 100%;
    aspect-ratio: 16/9;
}

.placeholder-image.square {
    aspect-ratio: 1/1;
}

.placeholder-banner {
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 16px;
    width: 100%;
    padding: 60px 20px;
}

.placeholder-text {
    color: #ccc !important;
}

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

/* ================================
   レスポンシブ
   ================================ */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    /* PC: サムネイル非表示、モバイル: ドット表示 */
    .slider-thumbnails {
        display: none;
    }

    .slider-dots {
        display: flex;
    }

    .product-text-section {
        padding: 40px 0;
    }

    .product-text-section h2 {
        font-size: 1.5rem;
    }

    .product-text-section h3 {
        font-size: 1.3rem;
    }

    .product-text-section h4 {
        font-size: 1.1rem;
    }

    .product-text-section p {
        font-size: 0.95rem;
    }

    .product-image-section {
        padding: 30px 0;
    }

    /* 2カラムを1カラムに */
    .two-column-layout,
    .two-column-section.reverse .two-column-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* reverse時に画像をテーブルの上に表示 */
    .two-column-section.reverse .product-image-column {
        order: -1;
    }

    .product-specs-column h3 {
        font-size: 1.5rem;
    }

    /* テーブルを縦並びに */
    .specs-table tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #ddd;
    }

    .specs-table th,
    .specs-table td {
        display: block;
        width: 100%;
        padding: 10px 12px;
        font-size: 0.9rem;
        border: none;
    }

    .specs-table th {
        background: #e8f5e9;
        font-weight: bold;
        border-bottom: 1px solid #ddd;
    }

    .specs-table td {
        background: white;
    }

    .banner-section {
        padding: 30px 0;
    }

    .slider-dots {
        padding: 10px 0;
    }

    .slider-dots .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .product-text-section h2 {
        font-size: 1.3rem;
    }

    .product-text-section h3 {
        font-size: 1.2rem;
    }

    .product-text-section h4 {
        font-size: 1rem;
    }

    .product-specs-column h3 {
        font-size: 1.3rem;
    }

    .specs-table th,
    .specs-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .placeholder-slide,
    .placeholder-image,
    .placeholder-banner {
        font-size: 14px;
    }
}
