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

/* ボディ全体のスタイル */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px;
    overflow-x: hidden; /* 横スクロールを防ぐ */
}

main {
    background-color: #f8f9fa; /* 背景色 */
    padding: 0 20px 20px 20px; /* 上部の余白を0にして隙間を減らす */
    margin-top: -20px; /* スライダーと商品リストの隙間を減らすためにマージンを減らす */
}

/* ヘッダー (パソコン表示用) */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #333333; /* 背景をダークグレーに設定 */
    padding: 20px;
    color: white; /* テキスト色を白に設定 */
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* 影を追加 */
}

.header-container .site-title {
    font-size: 36px;
    margin-left: 10px;
    color: white; /* ロゴの色を白に設定 */
    text-decoration: none;
    white-space: nowrap;
}

.search-bar-container {
    flex-grow: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.search-form input {
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
    border-right: none;
}

.search-form button {
    background-color: #FF9900; /* オレンジ色のボタンはそのまま */
    border: none;
    cursor: pointer;
    padding: 11.4px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form button img {
    width: 20px;
    height: 20px;
}

.header-nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.header-nav a {
    color: white; /* リンクの色を白に設定 */
    text-decoration: none;
    margin-left: 20px;
    display: flex;
    align-items: center;
    font-size: 18px;
}

.header-nav a:hover {
    color: #FF9900; /* ホバー時にオレンジ色に変更 */
}

.header-nav a img {
    width: 30px;
    height: 30px;
    margin-right: 8px;
}

.welcome-message {
    margin-right: 10px;
    font-size: 16px;
    color: white; /* テキスト色を白に設定 */
    white-space: nowrap;
    margin-left: auto;
}

/* ハンバーガーメニュー (スマホ表示用) */
.openbtn1 {
    background: #333;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 5px;
    margin-left: 10px;
    display: none; /* パソコンでは非表示 */
    align-items: center;
    justify-content: center;
    position: relative;
}

.openbtn1 span {
    display: block;
    position: absolute;
    height: 3px;
    width: 25px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.openbtn1 span:nth-of-type(1) {
    top: 16px;
}

.openbtn1 span:nth-of-type(2) {
    top: 22px;
}

.openbtn1 span:nth-of-type(3) {
    top: 28px;
}

.openbtn1.active span:nth-of-type(1) {
    top: 22px;
    transform: rotate(-45deg);
}

.openbtn1.active span:nth-of-type(2) {
    opacity: 0;
}

.openbtn1.active span:nth-of-type(3) {
    top: 22px;
    transform: rotate(45deg);
}

/* サイドメニュー */
.header-nav-mobile {
    position: fixed;
    top: 60px; /* ヘッダーの下から表示 */
    right: -250px;
    width: 250px;
    height: calc(100% - 60px); /* ヘッダーの高さを除いた高さ */
    background-color: #333;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    transition: right 0.3s ease;
    z-index: 1000;
}

.header-nav-mobile.show {
    right: 0;
}

.header-nav-mobile a {
    color: #fff;
    font-size: 18px;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    width: 100%;
    border-bottom: 1px solid #444;
}

.header-nav-mobile a:hover {
    background-color: #444;
}


/* オーバーレイ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 900;
}

.overlay.active {
    display: block;
}

/* 商品リストの基本スタイル */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* デスクトップでは横並び */
    gap: 20px;
    padding: 20px;
    max-width: 100%;
}

/* 商品アイテムのスタイル（新着商品のサイズに合わせる） */
.product-item {
    width: 100%; /* 全体の幅を統一 */
    max-width: 200px; /* 新着商品のサイズに合わせて最大幅を200pxに固定 */
    margin: 0 auto;
    padding-bottom: 20px;
    text-align: center; /* テキストを中央に揃える */
    transition: transform 0.3s ease;
}

.product-item img {
    width: 100%; /* 画像の幅を100%に設定 */
    height: auto; /* 高さを自動調整 */
    object-fit: cover; /* 画像の比率を保って全体を覆う */
    margin-bottom: 10px;
    border-radius: 5px; /* 角を少し丸める */
}

.product-item h3 {
    font-size: 18px; /* フォントサイズを調整 */
    margin-bottom: 10px;
}

.product-item p {
    font-size: 16px;
    color: #FF9900;
    margin-bottom: 10px;
}

.product-item:hover {
    transform: scale(1.05); /* ホバー時のズーム */
}



.product-item a {
    display: inline-block;
    padding: 10px 15px;
    background-color: #FF9900;
    color: white;
    border-radius: 4px;
    text-decoration: none;
}

.product-item a:hover {
    background-color: #FFA500;
}

/* 推奨セクション */
.recommendation-prompt {
    text-align: center;
    margin: 40px 0;
}

.recommendation-prompt h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.recommendation-prompt a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #FFFFFF;
    color: #FF9900;
    border: 2px solid #FF9900;
    border-radius: 4px;
    text-decoration: none;
    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.recommendation-prompt a:hover {
    background-color: #FF9900;
    color: white;
}

/* トップに戻るボタン */
.back-to-top-button {
    display: block;
    padding: 15px 0;
    background-color: #333333;
    color: white;
    text-align: center;
    text-decoration: none;
    width: 100%;
    margin: 0;
    border-radius: 0;
}

.back-to-top-button:hover {
    background-color: #333333;
}

/* フッター */
footer {
    background-color: #333333;
    color: white;
    padding: 20px 0;
    text-align: center;
}

.footer-links a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copyright {
    margin-top: 20px;
    font-size: 14px;
    color: #CCCCCC;
    text-align: center;
}





























/* スクロールを無効にするクラス */
.no-scroll {
    overflow: hidden; /* ページ全体のスクロールを無効にする */
}



/* モバイル向けメディアクエリ */
@media (max-width: 768px) {

    .search-form {
        display: flex;
        align-items: center;
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        gap: -3px; /* 検索バーとボタンの間隔を調整 */
    }

    .search-form input {
        padding: 12px 18px; /* ここで調整できます */
        font-size: 16px;
        border: none;
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
        flex-grow: 1;
        box-sizing: border-box;
    }

    .search-form button {
        padding: 12px 16px; /* ボタンのパディングを調整 */
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
        margin-left: -4px; /* 負のマージンで要素を重ねる */
    }

    .header-container {
        flex-direction: column;
        text-align: center;
    }

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

    .search-bar-container {
        width: 100%;
        margin: 10px 0;
        order: 2; /* ハンバーガーボタンの下に表示 */
    }

    .openbtn1 {
        display: flex;
        order: 3; /* 検索バーの右隣に表示 */
        margin-left: auto;
    }

    .header-nav {
        display: none;
    }
/* サイドメニュー（スマホ表示用） */
.header-nav-mobile {
    position: fixed;
    top: 70px; /* ヘッダーの下に配置 */
    left: -250px; /* 非表示状態で画面外に隠す */
    width: 250px;
    height: 100%;
    background-color: #333;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    transition: left 0.3s ease; /* アニメーション効果 */
    z-index: 1000; /* 他の要素より上に表示 */
}

.header-nav-mobile.active {
    left: 0; /* ハンバーガークリックで表示 */
}

/* ハンバーガーボタン */
.openbtn1 {
    background: #333;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001; /* サイドメニューより前面に表示 */
}

.openbtn1 span {
    display: block;
    position: absolute;
    height: 3px;
    width: 25px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.openbtn1 span:nth-of-type(1) {
    top: 16px;
}

.openbtn1 span:nth-of-type(2) {
    top: 22px;
}

.openbtn1 span:nth-of-type(3) {
    top: 28px;
}

.openbtn1.active span:nth-of-type(1) {
    top: 22px;
    transform: rotate(-45deg);
}

.openbtn1.active span:nth-of-type(2) {
    opacity: 0;
}

.openbtn1.active span:nth-of-type(3) {
    top: 22px;
    transform: rotate(45deg);
}


    .header-nav-mobile.show {
        right: 0;
    }

    .header-nav-mobile a {
        color: #fff;
        font-size: 18px;
        padding: 10px;
        text-align: center;
        text-decoration: none;
        width: 100%;
        border-bottom: 1px solid #444;
    }

    .header-nav-mobile a:hover {
        background-color: #444;
    }

    .header-nav-mobile a img {
        width: 20px;  /* アイコンの幅を20pxに設定 */
        height: 20px; /* アイコンの高さを20pxに設定 */
        margin-right: 8px; /* アイコンとテキストの間隔 */
    }

    .footer-links {
        flex-direction: column;
    }

    .hamburger {
        display: flex;
    }

    .header-nav {
        display: none;
    }

    .hamburger {
        margin-left: 15px;
    }

    .side-menu {
        background-color: #232F3E;
        padding: 20px;
        position: fixed;
        top: 0;
        left: -250px; /* 非表示の状態で左に隠れている */
        width: 250px;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease; /* アニメーション効果 */
    }
    
    .side-menu.active {
        left: 0; /* メニューが表示される時に左に0になる */
    }
    

    .overlay.active {
        display: block;
    }

}



/* モバイル対応 - 縦表示に変更 */
@media (max-width: 768px) {
    .product-list {
        display: block; /* グリッドではなくブロック表示に変更 */
        padding: 10px 0; /* 上下に適度な余白を確保 */
    }

    .product-item {
        max-width: 100%; /* 幅を100%に設定し、横幅いっぱいに表示 */
        margin-bottom: 20px; /* 各商品アイテムの間に余白を追加 */
    }

    .product-item h3 {
        font-size: 16px;
    }

    .product-item p {
        font-size: 14px;
    }
}

/* 小さなスマホ対応 (480px以下) */
@media (max-width: 480px) {
    .product-list {
        display: block; /* 縦並びで表示 */
        padding: 5px 0;
    }

    .product-item {
        max-width: 100%; /* 小さな画面でも横幅を100%に */
        margin-bottom: 15px; /* 各商品間に余白を追加 */
    }

    .product-item h3 {
        font-size: 14px;
    }

    .product-item p {
        font-size: 12px;
    }
}