@charset "utf-8";
/*
Theme Name: narita Style Theme
Author: Your Name
Version: 1.0.2
Description: キムチ専門店の活気あるEC・店舗サイトをイメージした、スマホ対応・WooCommerce最適化テーマ。
*/

/* ==========================================
   ベースリセット & 共通設定
   ========================================== */
* { box-sizing: border-box; }
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    margin: 0;
    padding: 0;
    color: #222;
    background-color: #fff;
    line-height: 1.6;
}
a { color: #222; text-decoration: none; }
a:hover { opacity: 0.8; }

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

.clearfix:after {
 content:".";
 display:block;
 clear:both;
 height:0;
 visibility:hidden;
}
.clearfix {
 display:inline-block;
 clear: both;
}

/* ==========================================
   ヘッダー（PC環境）
   ========================================== */
header {
    border-bottom: 3px solid #E60012;
    padding: 15px 0;
    background: #fff;
}
.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo h1 { margin: 0; font-size: 24px; font-weight: bold; }
.logo p { margin: 5px 0 0 0; font-size: 12px; color: #666; }

/* WordPressカスタムメニュー用（PC並び） */
.header-nav-list {
    display: flex;
    list-style: none;
    margin: 0; padding: 0;
    gap: 20px;
}
.header-nav-list li a {
    font-weight: bold;
    font-size: 15px;
}
.cart-link {
    color: #E60012 !important;
}

/* ==========================================
   スマホ用ハンバーガーメニュー用の設定
   ========================================== */
.nav-toggle { display: none; }
.nav-toggle-label {
    display: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 100;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    display: block;
    background: #222;
    height: 3px;
    width: 25px;
    border-radius: 3px;
    transition: all 0.3s;
}
.nav-toggle-label span::before { transform: translateY(-9px); }
.nav-toggle-label span::after { transform: translateY(6px); }

/* ==========================================
   トップページ各セクション
   ========================================== */
.main-visual {
    background-color: #222;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 5px solid #E60012;
}
.main-visual-overlay {
    background-color: rgba(0, 0, 0, 0.4);
    width: 100%;
    padding: 100px 20px;
    text-align: center;
}
.main-visual h2 {
    font-size: 36px;
    color: #fff;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.main-visual p {
    color: #fff;
    margin: 0;
    font-size: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}
.section-title h2 {
    font-size: 28px;
    margin: 0;
    color: #222;
    font-weight: bold;
}
.section-title span {
    display: block;
    font-size: 13px;
    color: #E60012;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

section { padding: 60px 0; border-bottom: 1px solid #eee; }
.bg-gray { background-color: #f9f9f9; }

.news-list { list-style: none; padding: 0; margin: 0; }
.news-item {
    display: flex;
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
    font-size: 15px;
}
.news-date { width: 150px; color: #E60012; font-weight: bold; }
.news-text { flex: 1; }

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}
.store-card {
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.store-card h3 {
    font-size: 20px;
    margin-top: 0;
    border-left: 4px solid #E60012;
    padding-left: 10px;
}
.store-info { font-size: 14px; margin-top: 15px; }
/* ==========================================
   商品一覧・詳細共通の下層ページアウター枠
   ========================================== */
.main-content-wrap {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    display: block !important;
    clear: both !important;
}

.main-content-wrap .page-title {
    text-align: center !important;
    font-size: 28px !important;
    font-weight: bold !important;
    margin-bottom: 30px !important;
    border-bottom: 3px solid #E60012 !important;
    padding-bottom: 10px !important;
}

/* ==========================================
   ⚡【最重要】WooCommerce 標準レイアウトのバグ修正（列数連動版）
   ========================================== */

/* 商品リスト(ul.products)の直下や擬似要素にある、隙間や改行を作ってしまう透明なクリア用要素を強制的に完全に消し去ります */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after,
.woocommerce ul.products li.clear,
.woocommerce-page ul.products li.clear {
    display: none !important;
    content: none !important;
    clear: none !important;
    float: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 商品リスト(ul)自体に浮遊リセット(clear)をかけ、上にある並び替えフォームの下に、1つ目の商品が確実に潜り込んで吸い付くようにします */
.woocommerce ul.products,
.woocommerce-page ul.products {
    clear: both !important;
    display: block !important; /* 強制グリッドを完全に解除し、Woo標準の列数システムに返却 */
}

/* 各商品カード(li)の個別装飾（管理画面の横幅%指定を壊さない設定） */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    margin-top: 0 !important;
    margin-bottom: 25px !important;
    padding: 15px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transition: transform 0.2s, border-color 0.2s !important;
}
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
    transform: translateY(-4px);
    border-color: #E60012 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 商品内の各リンク、画像、タイトル、価格の調整 */
.woocommerce ul.products li.product a,
.woocommerce-page ul.products li.product a {
    display: block !important;
    text-decoration: none !important;
    color: #222 !important;
}

/* 画像のサイズ・縦横比を美しく統一する */
.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
    width: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    margin: 0 auto 15px auto !important;
    display: block !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important;
    font-weight: bold !important;
    margin: 10px 0 !important;
    line-height: 1.4 !important;
    min-height: 42px !important; /* タイトルが1行でも2行でも高さを揃える */
}
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
    color: #E60012 !important;
    font-weight: bold !important;
    font-size: 16px !important;
    margin-bottom: 10px !important;
    display: block !important;
}
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
    background: #E60012 !important;
    color: #fff !important;
    padding: 10px !important;
    font-size: 13px !important;
    font-weight: bold !important;
    text-align: center !important;
    border-radius: 0px !important;
    display: block !important;
    width: 100% !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .button:hover {
    background: #222 !important;
}

/* ==========================================
   商品詳細ページ（Single Product）の装飾
   ========================================== */
.product.type-product {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}
.woocommerce-product-gallery {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}
.woocommerce-product-gallery img {
    width: 100% !important;
    height: auto !important;
    border: 1px solid #eee;
}
.summary.entry-summary {
    flex: 1;
    min-width: 300px;
}
.summary .product_title {
    font-size: 26px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.summary .price {
    font-size: 24px;
    color: #E60012;
    font-weight: bold;
    margin-bottom: 20px;
}
.summary form.cart {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 25px 0;
}
.summary form.cart .quantity input {
    width: 60px;
    height: 45px;
    text-align: center;
    border: 1px solid #ccc;
    font-size: 16px;
}
.summary form.cart .single_add_to_cart_button {
    height: 45px;
    background: #E60012 !important;
    color: #fff !important;
    font-weight: bold;
    border: none;
    padding: 0 30px !important;
    cursor: pointer;
    font-size: 16px;
    flex: 1;
    max-width: 250px;
}

/* ==========================================
   カート・マイアカウント・チェックアウト 共通装飾
   ========================================== */
.woocommerce-cart-form,
.woocommerce-MyAccount-content,
.woocommerce-checkout {
    width: 100% !important;
    margin-top: 20px;
}
table.shop_table {
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 30px;
}
table.shop_table th {
    background: #f4f4f4;
    padding: 12px;
    font-weight: bold;
    border: 1px solid #ddd;
}
table.shop_table td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: left;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}
.woocommerce .button,
.woocommerce-page .button,
.woocommerce button.button {
    background: #222 !important;
    color: #fff !important;
    padding: 12px 20px !important;
    font-weight: bold !important;
    border: none !important;
    border-radius: 0px !important;
    cursor: pointer;
    transition: background 0.2s;
}
.woocommerce .alt,
.woocommerce-page .alt,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    background: #E60012 !important;
}
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0; margin: 0 0 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid #222;
    padding-bottom: 10px;
}
.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 8px 15px;
    background: #eee;
    font-weight: bold;
    font-size: 14px;
}
.woocommerce-MyAccount-navigation li.is-active a {
    background: #E60012;
    color: #fff;
}

/* ==========================================
   Shopping Guide（ご利用ガイド）の装飾
   ========================================== */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.guide-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 30px 20px;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.guide-icon { font-size: 32px; margin-bottom: 15px; }
.guide-card h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 12px 0;
    color: #222;
    border-bottom: 2px solid #E60012;
    padding-bottom: 8px;
    display: inline-block;
}
.guide-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
    text-align: left;
    line-height: 1.5;
}

/* ==========================================
   フッター
   ========================================== */
footer {
    background: #111;
    color: #fff;
    padding: 40px 0 20px 0;
    font-size: 14px;
}
footer a { color: #ccc; }
.footer-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-box h4 {
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-top: 0;
}
.footer-nav-list { list-style: none; padding: 0; margin: 0; }
.footer-nav-list li { margin-bottom: 10px; }
.footer-nav-list li a { color: #ccc; font-size: 14px; transition: color 0.2s; }
.footer-nav-list li a:hover { color: #fff; text-decoration: underline; }
.copyright { text-align: center; color: #666; margin-top: 20px; font-size: 12px; }


/* ==========================================
   トップページ 新着商品（New Products）画像最適化
   ========================================== */
/* 商品カード内のリンクブロックをブロック要素化 */
.category-card a {
    display: block !important;
    text-decoration: none !important;
    color: #222 !important;
}

/* 🌟トップページの新着商品画像サイズ・比率を綺麗に整えるコード */
.category-card .product-thumbnail img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;       /* 💡横幅100%に合わせて縦幅を正しい比率で自動伸縮 */
    object-fit: cover !important;  /* 💡画像が引き伸ばされず、枠内に綺麗に収まるよう自動トリミング */
    margin: 0 auto !important;
    display: block !important;
}

/* ホバー時の微調整（一覧ページと統一） */
.category-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
}
/* ==========================================
   トップページ訪問時モーダルウィンドウ
========================================== */
.narita-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.narita-modal-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}
.narita-modal-window {
    background: #fff;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    text-align: center;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.narita-modal-overlay.is-active .narita-modal-window {
    transform: translateY(0);
}
.narita-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}
.narita-modal-close:hover {
    color: #000;
}
.narita-modal-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}
.narita-modal-body {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #666;
    text-align: left;
}
.narita-modal-btn {
    display: inline-block;
    background: #e60012; /* キムチの成田様のブランドカラー等に合わせて調整してください */
    color: #fff;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}
.narita-modal-btn:hover {
    background: #b8000e;
    color: #fff;
}
/* ==========================================
   ロゴとメニューの行分離 ＆ メニュー横いっぱい配置
========================================== */

/* 1. ロゴとメニューを囲んでいる親要素を縦並びに強制変更 */
header,
.site-header,
.header-container,
.header-inner {
    display: flex;
    flex-direction: column; /* 横並びから縦並びに変更 */
    align-items: center;    /* 全体を中央寄せに */
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* 2. ロゴ単体の配置調整（上の行で中央寄せ） */
.logo {
    margin: 15px auto; /* 上下に適度な余白を作り、中央に配置 */
    display: block;
    float: none;       /* 横残りの回り込みを解除 */
}

/* 3. メニュー単体の配置調整（下の行で横いっぱいに広げる） */
.header-nav {
    display: block;
    float: none;         /* 回り込みを完全に解除 */
    width: 100%;
    max-width: 100%;
    clear: both;         /* 前後の要素の干渉をリセット */
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    background: #ffffff; /* 背景を白に固定 */
    margin: 10px 0 0 0;  /* ロゴとの間隔を調整 */
    padding: 0;
}

/* メニューのリスト（ul）を中央寄せにする */
.header-nav ul {
    width: 100%;
    max-width: 1200px;   /* コンテンツ幅に合わせる */
    margin: 0 auto;
    padding: 10px 0;     /* 上下の内側余白 */
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
}

/* 4. 各メニュー項目の配置と右側の区切り縦棒 */
.header-nav ul li {
    position: relative;
    padding: 0 30px;     /* 左右の余白をゆったり確保 */
    margin: 0;
}

/* 右側の区切り縦棒（一番最後の項目の後ろには表示しない） */
.header-nav ul li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background-color: #cccccc;
}

/* 5. リンク文字の装飾とホバーアニメーション */
.header-nav ul li a {
    text-decoration: none;
    color: #333333;
    font-weight: bold;
    font-size: 16px;
    position: relative;
    padding-bottom: 6px;
    display: inline-block;
    transition: color 0.3s ease;
}

/* マウスホバー時の文字色 */
.header-nav ul li a:hover {
    color: #e60012;     /* 成田様のブランドカラー（赤） */
}

/* 下線の土台 */
.header-nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #e60012;
    transition: width 0.3s ease;
}

/* マウスホバー時に下線を伸ばす */
.header-nav ul li a:hover::after {
    width: 100%;
}


/* ==========================================
   レスポンシブ表示（画面幅 768px以下）
   ========================================== */
@media screen and (max-width: 768px) {
    .header-wrap { position: relative; }
    .nav-toggle-label { display: block; }

    .header-nav {
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: #fff;
        border: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        z-index: 99;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .header-nav-list { flex-direction: column; gap: 0; padding: 10px 0; }
    .header-nav-list li a { display: block; padding: 15px 20px; border-bottom: 1px solid #eee; }

    .nav-toggle:checked ~ .header-nav { max-height: 500px; }
    .nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
    .nav-toggle:checked ~ .nav-toggle-label span::before { transform: rotate(45deg) translateY(0); }
    .nav-toggle:checked ~ .nav-toggle-label span::after { transform: rotate(-45deg) translateY(-3px); }

    .main-visual h2 { font-size: 26px; }
    .store-grid { grid-template-columns: 1fr; gap: 20px; }
    .news-item { flex-direction: column; gap: 5px; }
    .news-date { width: auto; }

    .guide-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .guide-card { padding: 20px 15px; }
    .guide-card h3 { font-size: 14px; }
    .guide-card p { font-size: 12px; }

    .product.type-product { flex-direction: column; gap: 20px; }
    .woocommerce-product-gallery, .summary.entry-summary { max-width: 100%; }
    .summary .product_title { font-size: 20px; }
}
