/* ========================= */
/* ★魔法の色設定（ここを変えるだけで全部変わります！） */
:root {
    --main-color: #007bff; /* メインの色（今は青） */
    --hover-color: #0056b3; /* ボタンなどを押したときの少し濃い色 */
}

/* ========================= */
/* ベース */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f5f5;
}

/* ========================= */
/* ヘッダー固定 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #222;
    box-sizing: border-box;
}

header .logo {
    font-weight: bold;
    font-size: 20px;
    color: white;
}

header nav a {
    color: white;
    margin-left: 15px;
    text-decoration: none;
    white-space: nowrap;
transition: color 0.3s ease;
}

header nav a:hover {
    color: var(--main-color); /* 文字がテーマカラー（魔法の変数）に変わる！ */
    text-decoration: underline; /* 下線を引く */
    text-underline-offset: 6px; /* 文字と下線の間に少し隙間を開けてオシャレに */
    text-decoration-thickness: 2px; /* 下線を少しだけ太くして見やすく */
}


/* ========================= */
/* HERO (ファーストビューの画像) */
.hero {
    margin-top: 55px; 
    background: url('images/cataloghero.jpg') center/cover no-repeat;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero > div {
    padding: 0;
}

.hero h1 {
    font-size: 42px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    margin: 0;
}

.hero p {
    font-size: 18px;
    margin-top: 8px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* ========================= */
/* メインコンテンツ */
main {
    margin-top: 40px; 
    padding: 0 20px;
    box-sizing: border-box;
}

/* ========================= */
/* 商品カタログ */
.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 30px;
    padding: 20px 0;
}

.product-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 220px;
    margin: 0 auto;

    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.product-card h2 {
    font-size: 20px;
}



/* ========================= */
/* カテゴリフィルター */
.category-filter {
    text-align: center;
    margin-top: 30px;
    position: sticky;
    top: 54px;
    z-index: 900;
    background: #f5f5f5;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.category-filter button {
    background: #eee;
    border: none;
    padding: 10px 18px;
    margin: 5px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.category-filter button:hover {
    background: var(--main-color); /* ★ここが変数になりました */
    color: white;
}

/* ========================= */
/* カテゴリブロック */
.category-block {
    margin-bottom: 50px;
}

.category-block h2 {
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid var(--main-color); /* ★ここが変数になりました */
    padding-bottom: 5px;
}

.category-block .catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

/* ========================= */
/* 追加セクション共通設定 */
.section {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
    box-sizing: border-box;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--main-color); /* ★ここが変数になりました */
    margin: 10px auto 0;
}

/* ========================= */
/* 特徴セクション */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-item {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-item h3 {
    color: var(--main-color); /* ★ここが変数になりました */
    margin-bottom: 15px;
    font-size: 20px;
}

/* ========================= */
/* 会社概要セクション */
.company-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.company-table th, .company-table td {
    padding: 15px 20px;
    border: 1px solid #ddd;
    text-align: left;
}

.company-table th {
    background: #f9f9f9;
    width: 30%;
    font-weight: bold;
}

/* ========================= */
/* お問い合わせセクション */
.contact-bg {
    max-width: 100%;
    background: white;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px;
}

.contact-form button {
    padding: 15px;
    background: var(--main-color); 
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: var(--hover-color); 
}

/* ========================= */
/* プライバシーポリシー */
/* ========================= */
.privacy-section {
    padding: 0 20px 60px; /* お問い合わせの下に配置するため、上の余白を詰める */
}

.privacy-details {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.privacy-details summary {
    padding: 15px 20px;
    background: #f9f9f9;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    list-style: none; /* デフォルトの矢印を非表示に */
    position: relative;
    text-align: center;
    border-radius: 5px;
    transition: background 0.3s ease;
}

/* Safari向けデフォルト矢印非表示 */
.privacy-details summary::-webkit-details-marker {
    display: none;
}

.privacy-details summary:hover {
    background: #eee;
}

/* オリジナルの開閉アイコン（▼） */
.privacy-details summary::after {
    content: '▼';
    position: absolute;
    right: 20px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* 開いた時はアイコンを逆向き（▲）にする */
.privacy-details[open] summary::after {
    transform: rotate(180deg);
}

.privacy-content {
    padding: 20px 30px;
    border-top: 1px solid #ccc;
    font-size: 14px;
    line-height: 1.8;
    color: #444;
}

.privacy-content h3 {
    font-size: 16px;
    color: var(--main-color);
    margin-top: 25px;
    margin-bottom: 10px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 5px;
}

.privacy-content h3:first-child {
    margin-top: 10px;
}

.privacy-content p {
    margin-bottom: 15px;
}

.privacy-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.privacy-content li {
    margin-bottom: 5px;
}


/* ========================= */
/* お知らせ (News) */
/* ========================= */
.news-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 20px 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.news-date {
    color: #666;
    font-size: 14px;
}

.news-category {
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    color: white;
    white-space: nowrap;
}

.tag-info { background-color: var(--main-color); }
.tag-service { background-color: #28a745; }

.news-title {
    flex: 1;
}

.news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.news-title a:hover {
    color: var(--main-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ========================= */
/* フッター */
/* ========================= */
.site-footer {
    background: #222;
    color: #ccc;
    padding: 50px 20px 20px;
    font-size: 14px;
    margin-top: 50px;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
    border-bottom: 1px solid #444;
    padding-bottom: 30px;
}

.footer-info {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    font-size: 22px;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
}

.footer-address, .footer-tel {
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.footer-nav {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--main-color);
}

.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* ========================= */
/* レスポンシブ（スマホ対応） */
@media (max-width: 600px) {
    .category-block .catalog {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    header {
        flex-direction: column;
        padding: 10px;
    }
    header nav {
        margin-top: 10px;
        display: flex;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 5px;
    }
    header nav a {
        font-size: 14px;
    }
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .news-meta {
        min-width: auto;
    }
    .footer-inner {
        flex-direction: column;
        gap: 30px;
    }
    .footer-nav {
        gap: 30px;
    }
}