/* 全要素のリセット */
* {
    margin: 0;
    /* マージンを0にリセット */
    padding: 0;
    /* パディングを0にリセット */
    box-sizing: border-box;
    /* ボックスサイズをボーダー含むに設定 */
}

body {
    background-color: white;
    /* 背景色を白に設定 */
    color: black;
    /* 文字色を黒に設定 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* フォントファミリーを設定 */
    line-height: 1.6;
    /* 行間を1.6に設定 */
    min-height: 100vh;
    /* 最小高さをビューポート高さに設定 */
    display: flex;
    /* フレックスボックスを有効化 */
    flex-direction: column;
    /* 縦方向に配置 */
}

header {
    background-color: white;
    /* 背景色を白に設定 */
    padding: 1rem 0;
    /* 上下のパディングを1remに設定 */
}

nav {
    max-width: 1200px;
    /* 最大幅を1200pxに設定 */
    margin: 0 auto;
    /* 左右中央揃え */
    padding: 0 1rem;
    /* 左右のパディングを1remに設定 */
    display: flex;
    /* フレックスボックスを有効化 */
    justify-content: flex-end;
    /* 右端揃え */
}

nav ul {
    list-style: none;
    /* リストマーカーを削除 */
    display: flex;
    /* フレックスボックスを有効化 */
    gap: 2rem;
    /* 要素間の間隔を2remに設定 */
}

nav a {
    color: black;
    /* 文字色を黒に設定 */
    text-decoration: none;
    /* 下線を削除 */
    font-weight: 500;
    /* フォントの太さを500に設定 */
    transition: color 0.2s ease;
    /* 色の変化を0.2秒でアニメーション */
}

nav a:hover {
    color: #666;
    /* ホバー時の色をグレーに設定 */
}

.section {
    flex: 1;
    /* 残りのスペースを占有 */
    padding: 2rem 0 4rem 0;
    /* 上下のパディングを設定、下部に余裕を追加 */
}

.container {
    max-width: 1200px;
    /* 最大幅を1200pxに設定 */
    margin: 0 auto;
    /* 左右中央揃え */
    padding: 0 1rem;
    /* 左右のパディングを1remに設定 */
}

/* リストスタイルの調整 */
.container ul {
    list-style-position: inside;
    /* リストマーカーを内側に配置 */
    padding-left: 0;
    /* 左側のパディングを削除 */
}

.container li {
    margin-bottom: 0.5rem;
    /* リスト項目間の間隔 */
}

/* プロダクトグリッドスタイル */
.products-grid {
    display: grid;
    /* グリッドレイアウトを有効化 */
    grid-template-columns: repeat(4, 1fr);
    /* 4列の等幅グリッド */
    gap: 3rem;
    /* グリッド間の間隔を3remに設定 */
    row-gap: 4rem;
    /* 行間の間隔を4remに設定 */
    margin: 2rem 0;
    /* 上下のマージンを2remに設定 */
}

.product-card {
    background: white;
    /* 背景色を白に設定 */
    border-radius: 12px;
    /* 角丸を12pxに設定 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* 影を追加 */
    overflow: hidden;
    /* はみ出した部分を隠す */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* 変形と影のアニメーション */
    display: flex;
    /* フレックスボックスを有効化 */
    flex-direction: column;
    /* 縦方向に配置 */
    height: 100%;
    /* 高さを100%に設定 */
}

.product-card:hover {
    transform: translateY(-8px);
    /* 上に8px移動 */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    /* ホバー時の影を強調 */
}

.product-image {
    width: 100%;
    /* 幅を100%に設定 */
    overflow: hidden;
    /* はみ出した部分を隠す */
    background: #f8f9fa;
    /* 背景色を薄いグレーに設定 */
}

.product-image img {
    width: 100%;
    /* 幅を100%に設定 */
    height: auto;
    /* 高さを自動調整 */
    object-fit: contain;
    /* 画像全体を表示 */
    transition: transform 0.3s ease;
    /* 変形のアニメーション */
}

.product-card:hover .product-image img {
    transform: scale(1.05);
    /* 1.05倍に拡大 */
}

.product-info {
    padding: 1.5rem;
    /* パディングを1.5remに設定 */
    display: flex;
    /* フレックスボックスを有効化 */
    flex-direction: column;
    /* 縦方向に配置 */
    flex-grow: 1;
    /* 残りのスペースを占有 */
    justify-content: space-between;
    /* 上下に分散配置 */
}

.product-info>a {
    align-self: flex-end;
    /* 右端に配置 */
}

.product-title {
    font-size: 1.25rem;
    /* フォントサイズを1.25remに設定 */
    font-weight: 600;
    /* フォントの太さを600に設定 */
    color: #333;
    /* 文字色をダークグレーに設定 */
    margin-bottom: 0.75rem;
    /* 下のマージンを0.75remに設定 */
    line-height: 1.3;
    /* 行間を1.3に設定 */
}

.product-description {
    color: #666;
    /* 文字色をグレーに設定 */
    font-size: 0.9rem;
    /* フォントサイズを0.9remに設定 */
    line-height: 1.5;
    /* 行間を1.5に設定 */
    margin-bottom: 1.25rem;
    /* 下のマージンを1.25remに設定 */
    display: -webkit-box;
    /* WebKitボックスを有効化 */
    -webkit-line-clamp: 3;
    /* 3行で切り詰め */
    -webkit-box-orient: vertical;
    /* 縦方向に配置 */
    overflow: hidden;
    /* はみ出した部分を隠す */
}

.download-button {
    background: none;
    /* 背景を透明に設定 */
    border: none;
    /* 境界線を削除 */
    padding: 0;
    /* パディングを0に設定 */
    cursor: pointer;
    /* カーソルをポインターに設定 */
    transition: transform 0.3s ease;
    /* 変形のアニメーション */
    width: auto;
    /* 幅を自動に設定 */
    display: inline-block;
    /* インラインブロック要素に変更 */
    margin-left: auto;
    /* 左マージンを自動に設定して右揃え */
    line-height: 0;
    /* 行の高さを0にして余白を削除 */
}

.download-button:hover {
    transform: scale(1.05);
    /* 1.05倍に拡大 */
}

.download-button img {
    width: 100%;
    /* 幅を100%に設定 */
    max-width: 150px;
    /* 最大幅を150pxに設定 */
    height: auto;
    /* 高さを自動調整 */
    display: block;
    /* ブロック要素として表示して余白を削除 */
    vertical-align: top;
    /* 縦方向の配置を上に設定 */
}

/* レスポンシブ対応 - 1024px以下 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3列の等幅グリッド */
    }
}

footer {
    background-color: #FFFFFF;
    /* 背景色を白に設定 */
    padding: 2rem 0;
    /* 上下のパディングを2remに設定 */
    margin-top: auto;
    /* 上部マージンを自動に設定 */
    position: relative;
    /* 相対位置指定 */
}

.footer-content {
    max-width: 1200px;
    /* 最大幅を1200pxに設定 */
    margin: 0 auto;
    /* 左右中央揃え */
    padding: 0 1rem;
    /* 左右のパディングを1remに設定 */
    display: grid;
    /* グリッドレイアウトを使用 */
    grid-template-columns: 1fr 1fr 1fr;
    /* 三分割 */
    align-items: center;
    /* 縦方向中央揃え */
    gap: 1rem;
    /* 要素間の間隔を1remに設定 */
}

.footer-left {
    display: flex;
    /* フレックスボックスを有効化 */
    gap: 2rem;
    /* 要素間の間隔を2remに設定 */
    align-items: center;
    /* 縦方向中央揃え */
    justify-self: start;
    /* グリッド内で左端に配置 */
    margin-left: 0;
    /* 左端に固定 */
}

.footer-center {
    text-align: center;
    /* 中央揃え */
    justify-self: center;
    /* グリッド内で中央揃え */
}

.footer-right {
    justify-self: end;
    /* グリッド内で右揃え */
}

.footer-content a {
    color: black;
    /* 文字色を黒に設定 */
    text-decoration: none;
    /* 下線を削除 */
    transition: color 0.2s ease;
    /* 色の変化を0.2秒でアニメーション */
}

.footer-content a:hover {
    color: #666;
    /* ホバー時の色をグレーに設定 */
}

/* レスポンシブ対応 - 768px以下 */
@media (max-width: 768px) {
    .section {
        padding: 1rem 0 6rem 0;
        /* モバイルでは下部の余裕をさらに追加 */
    }

    .products-grid {
        grid-template-columns: 1fr;
        /* 1列のグリッド */
        gap: 1.5rem;
        /* グリッド間の間隔を1.5remに設定 */
        row-gap: 2rem;
        /* 行間の間隔を2remに設定 */
        margin-bottom: 2rem;
        /* 下部に追加の余白 */
    }

    .product-card {
        max-width: 300px;
        /* 最大幅を300pxに設定 */
        margin: 0 auto;
        /* 左右中央揃え */
    }

    .product-image {
        height: auto;
        /* 高さを自動調整 */
    }

    .product-info {
        padding: 1.5rem;
        /* パディングを1.5remに設定 */
    }

    .product-title {
        font-size: 1.2rem;
        /* フォントサイズを1.2remに設定 */
        text-align: center;
        /* 中央揃え */
    }

    .product-description {
        text-align: center;
        /* 中央揃え */
        font-size: 0.9rem;
        /* フォントサイズを0.9remに設定 */
    }

    .footer-content {
        grid-template-columns: 1fr;
        /* 1列のグリッド */
        grid-template-rows: auto auto auto;
        /* 3行に分割 */
        gap: 1.5rem;
        /* 要素間の間隔を1.5remに設定 */
        padding: 1rem;
        /* パディングを追加 */
        text-align: center;
        /* 中央揃え */
    }

    .footer-left {
        justify-self: center;
        /* グリッド内で中央揃え */
        order: 1;
        /* コピーライトの上に配置 */
    }

    .footer-center {
        justify-self: center;
        /* グリッド内で中央揃え */
        order: 2;
        /* 真ん中に配置 */
    }

    .footer-right {
        justify-self: center;
        /* グリッド内で中央揃え */
        order: 3;
        /* 一番下に配置 */
    }
}