/* ==========================================================================
   ニッピィ縫製 オンラインショップ デザイン
   --------------------------------------------------------------------------
   テーマ: 「作業台の上の布小物」
     ・地色は生成り(漂白していない木綿の色)
     ・紫は学校の色。ここでは「糸の色」として、縫い目や差し色に控えめに使う
     ・枠は線ではなく「縫い目(ステッチ)」で縁取る
     ・値段は布タグ(値札)のかたち
     ・イラストはCanvaで作った手描きの線画(assets/img/)

   このファイルは、ショップ関連ページのときだけ読み込まれる
   (includes/shop-common.php)。学校サイトの他のページには影響しない。

   【注意】スマートフォン向けの指定(@media)は、必ずファイルの最後にまとめる。
   途中に書くと、後ろにある基本の指定に打ち消されてしまう。
   ========================================================================== */


/* ==========================================================================
   1. 色・寸法
   ========================================================================== */
:root {
    --nk-bg:          #f6f1e9;   /* 生成り(ページの地色) */
    --nk-paper:       #fffcf7;   /* 紙・布(カードの地色) */
    --nk-ink:         #3b3431;   /* 墨(本文) */
    --nk-ink-soft:    #6d635d;   /* 薄墨(補足文) */
    --nk-line:        #e3d9cb;   /* 罫線 */
    --nk-thread:      #7458a6;   /* 紫の糸(学校の色) */
    --nk-thread-dark: #563f86;
    --nk-thread-soft: #b3a2d3;   /* 縫い目の点線 */
    --nk-thread-pale: #f1ecf7;
    --nk-go:          #3b6f55;   /* 購入操作のボタン(苔色) */
    --nk-go-dark:     #2d5843;
    --nk-kraft:       #ecdcbc;   /* 値札の紙 */
    --nk-stamp:       #b04a3a;   /* はんこの朱 */

    --nk-radius:      6px;
    --nk-ease:        cubic-bezier(0.22, 0.61, 0.36, 1);

    /* 見出し・ボタンの書体(丸ゴシック)。Googleフォントが読めなくても
       端末内の丸ゴシック・ゴシックに自動で切り替わる */
    --nk-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN W4",
                  "M PLUS Rounded 1c", "Hiragino Kaku Gothic ProN",
                  "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;

    /* 以前の版の名前(他の場所から参照されても困らないように残す) */
    --nk-purple:      var(--nk-thread);
    --nk-purple-dark: var(--nk-thread-dark);
    --nk-purple-pale: var(--nk-thread-pale);
    --nk-green:       var(--nk-go);
    --nk-green-dark:  var(--nk-go-dark);
    --nk-text:        var(--nk-ink);
    --nk-text-light:  var(--nk-ink-soft);
    --nk-cream:       var(--nk-bg);
    --nk-border-radius: var(--nk-radius);
}


/* ==========================================================================
   2. テーマとの調整(サイドバーを外して全幅に)
   --------------------------------------------------------------------------
   テーマの sidebar.php は書き換えず、表示だけを止める。PHP側の
   is_active_sidebar フィルタとの二段構え(テーマ設定によっては枠が残るため)。
   ========================================================================== */
body.nk-shop #sidebar,
body.nk-shop .sidebar {
    display: none !important;
}

body.nk-shop #main {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.nk-shop #content.content,
body.nk-shop #content-in.wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.nk-shop #content {
    background: var(--nk-bg);
}

.nk-shop-page {
    background: var(--nk-bg);
    color: var(--nk-ink);
    font-size: 15px;
    line-height: 1.9;
    letter-spacing: 0.02em;
    padding-bottom: 88px;
}

.nk-shop-page *,
.nk-shop-page *::before,
.nk-shop-page *::after {
    box-sizing: border-box;
}

/* 日本語を文節(言葉の切れ目)で折り返す。「作業 / を進めています」のような
   単語の途中での改行を防ぐ。対応しているブラウザ(Chrome・Edge・Android)でだけ効き、
   対応していないブラウザでは今までどおりの折り返しになる(崩れはしない) */
.nk-shop-page,
.nk-hero-slider {
    word-break: auto-phrase;
}

.nk-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.nk-wrap--narrow { max-width: 780px; }

.nk-shop-page a { color: var(--nk-thread-dark); }

.nk-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* ==========================================================================
   3. 縫い目・値札・はんこ(このショップの「らしさ」を作る部品)
   ========================================================================== */

/* 縫い目: 要素の内側、少し離れた位置に紫の点線を縫う。
   点線を背景で描いているので、縫い目の長さ(6px)と間隔(5px)を自由に決められる */
.nk-stitch,
.nk-cart .wc-block-cart__main,
.nk-cart .wc-block-cart__sidebar,
.nk-checkout .wc-block-checkout__sidebar,
.nk-product .woocommerce-product-gallery {
    position: relative;
}

.nk-cart .wc-block-cart__sidebar,
.nk-checkout .wc-block-checkout__sidebar { position: sticky; }

/* WooCommerceの部品(クラスを足せないもの)にも同じ縫い目を付ける */
.nk-stitch::after,
.nk-cart .wc-block-cart__main::after,
.nk-cart .wc-block-cart__sidebar::after,
.nk-checkout .wc-block-checkout__sidebar::after,
.nk-product .woocommerce-product-gallery::after {
    content: "";
    position: absolute;
    inset: 7px;
    pointer-events: none;
    border-radius: 3px;
    --c: var(--nk-thread-soft);
    background:
        repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 11px) top    / 100% 1.5px no-repeat,
        repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 11px) bottom / 100% 1.5px no-repeat,
        repeating-linear-gradient(0deg,  var(--c) 0 6px, transparent 6px 11px) left   / 1.5px 100% no-repeat,
        repeating-linear-gradient(0deg,  var(--c) 0 6px, transparent 6px 11px) right  / 1.5px 100% no-repeat;
}

/* 1本だけの縫い目(区切り線) */
.nk-seam {
    height: 1.5px;
    border: none;
    margin: 0;
    background: repeating-linear-gradient(90deg, var(--nk-thread-soft) 0 6px, transparent 6px 11px);
}

/* 値札: 左に穴の開いたクラフト紙のタグ */
.nk-price-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px 13px 4px 22px;
    background: var(--nk-kraft);
    color: var(--nk-ink);
    font-family: var(--nk-display);
    font-weight: 700;
    line-height: 1.5;
    clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%);
}

.nk-price-tag::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: var(--nk-bg);
    box-shadow: inset 0 0 0 1px rgba(59, 52, 49, 0.25);
}

.nk-price-tag del { opacity: 0.55; font-weight: 400; margin-right: 4px; }
.nk-price-tag ins { text-decoration: none; }

/* はんこ: 「準備中」など。少し傾けて、手で押した感じに */
.nk-stamp {
    display: inline-block;
    padding: 3px 10px;
    border: 2px solid var(--nk-stamp);
    border-radius: 4px;
    color: var(--nk-stamp);
    font-family: var(--nk-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    background: rgba(255, 252, 247, 0.9);
    transform: rotate(-7deg);
}


/* ==========================================================================
   4. 見出し・文章
   ========================================================================== */
.nk-shop-page h1,
.nk-shop-page h2,
.nk-shop-page h3 {
    font-family: var(--nk-display);
    font-weight: 700;
    color: var(--nk-ink);
    letter-spacing: 0.04em;
    line-height: 1.5;
    margin: 0;
    /* テーマの見出し装飾(背景色・枠線)を打ち消す */
    background: none;
    border: none;
    padding: 0;
}

.nk-shop-page h1::before,
.nk-shop-page h1::after,
.nk-shop-page h2::before,
.nk-shop-page h2::after,
.nk-shop-page h3::before,
.nk-shop-page h3::after {
    content: none;
}

/* 見出しの下に、紫の糸を1本ゆるく引く */
.nk-heading {
    display: inline-block;
    font-size: 24px;
    padding-bottom: 12px !important;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M2 6 C 18 2, 30 9, 46 5 S 76 2, 92 6 S 110 7, 118 4' fill='none' stroke='%237458a6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")
        left bottom / 120px 10px no-repeat !important;
}

.nk-heading--center { background-position: center bottom !important; }

.nk-lead {
    color: var(--nk-ink-soft);
    font-size: 14px;
    margin: 14px 0 0;
}


/* ==========================================================================
   5. ボタン・リンク
   ========================================================================== */
.nk-btn,
.nk-shop-page .button.wc-forward {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 26px;
    border: 2px solid var(--nk-go);
    border-radius: var(--nk-radius);
    background: var(--nk-go);
    color: #fff !important;
    font-family: var(--nk-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s var(--nk-ease), border-color 0.2s var(--nk-ease);
}

.nk-btn:hover,
.nk-shop-page .button.wc-forward:hover {
    background: var(--nk-go-dark);
    border-color: var(--nk-go-dark);
    color: #fff !important;
}

.nk-btn--sub {
    background: transparent;
    border-color: var(--nk-ink);
    color: var(--nk-ink) !important;
}

.nk-btn--sub:hover {
    background: var(--nk-ink);
    border-color: var(--nk-ink);
    color: var(--nk-paper) !important;
}

/* もどるリンク: 文字の前に「く」の字の矢じりを描く(画像・絵文字は使わない) */
.nk-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--nk-ink) !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.nk-back::before {
    content: "";
    width: 7px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: 1px;
}

.nk-back:hover { color: var(--nk-thread-dark) !important; }

.nk-shop-page :focus-visible {
    outline: 3px solid var(--nk-thread);
    outline-offset: 2px;
}


/* ==========================================================================
   6. ショップ内の導線バー(もどる / お買い物カゴ)
   ========================================================================== */
.nk-bar {
    background: var(--nk-bg);
}

.nk-bar .nk-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 60px;
}

.nk-bar .nk-seam { margin: 0 24px; }

.nk-crumb {
    color: var(--nk-ink-soft);
    font-size: 13px;
    margin: 0;
}

.nk-crumb a { color: var(--nk-ink-soft) !important; text-decoration: underline; text-underline-offset: 3px; }
.nk-crumb a:hover { color: var(--nk-thread-dark) !important; }
.nk-crumb .nk-crumb-sep { margin: 0 8px; opacity: 0.6; }

.nk-bar-cart {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--nk-ink) !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
}

.nk-bar-cart:hover { color: var(--nk-thread-dark) !important; }

.nk-bar-cart[aria-current="page"] { pointer-events: none; color: var(--nk-thread-dark) !important; }

.nk-bar-cart .nk-price-tag {
    font-size: 13px;
    padding: 1px 10px 1px 19px;
    min-width: 40px;
    justify-content: center;
}


/* ==========================================================================
   7. 購入の段階表示(カゴ → ご注文手続き → 完了)
   ========================================================================== */
.nk-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0 auto;
    padding: 30px 0 6px;
    counter-reset: nkstep;
}

.nk-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--nk-ink-soft);
    font-size: 13px;
    font-weight: 700;
    counter-increment: nkstep;
    white-space: nowrap;
}

.nk-steps li::before {
    content: counter(nkstep);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px dashed var(--nk-thread-soft);
    background: var(--nk-paper);
    color: var(--nk-ink-soft);
    font-family: var(--nk-display);
    font-size: 14px;
}

/* 段階と段階のあいだを、ひと針ずつの縫い目でつなぐ */
.nk-steps li + li::after { content: none; }

.nk-steps li:not(:last-child) {
    margin-right: 14px;
}

.nk-steps li:not(:last-child) > span::after {
    content: "";
    display: inline-block;
    width: 44px;
    height: 1.5px;
    margin-left: 14px;
    vertical-align: middle;
    background: repeating-linear-gradient(90deg, var(--nk-thread-soft) 0 6px, transparent 6px 11px);
}

.nk-steps li.is-done::before {
    content: "✓";
    border-style: solid;
    border-color: var(--nk-thread-soft);
    color: var(--nk-thread);
}

.nk-steps li.is-current { color: var(--nk-ink); }

.nk-steps li.is-current::before {
    border: 1.5px solid var(--nk-thread);
    background: var(--nk-thread);
    color: #fff;
}


/* ==========================================================================
   8. ページの見出し(カゴ・ご注文手続き・文章ページ)
   ========================================================================== */
.nk-page-head {
    padding: 22px 0 28px;
    text-align: center;
}

.nk-page-head h1 {
    font-size: 26px;
}

.nk-page-head .nk-heading { background-position: center bottom !important; }

.nk-page-head .nk-lead { max-width: 560px; margin-left: auto; margin-right: auto; }


/* ==========================================================================
   9. 案内のメモ(送料・お支払いなど)
   ========================================================================== */
.nk-memo {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--nk-ink);
}

.nk-memo img {
    width: 64px;
    height: auto;
    display: block;
}

.nk-memo strong { font-weight: 700; }

.nk-memo p { margin: 0; }
.nk-memo p + p { margin-top: 4px; color: var(--nk-ink-soft); }


/* ==========================================================================
   10. 商品一覧ページ
   ========================================================================== */

/* ---------- 写真のスライド ---------- */
.nk-hero-slider {
    position: relative;
    height: clamp(320px, 30vw, 470px);
    overflow: hidden;
    background: var(--nk-ink);
}

.nk-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.9s var(--nk-ease);
}

.nk-slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-color: var(--nk-thread-dark);
    background-size: cover;
    background-position: center;
}

.nk-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(34, 27, 24, 0.7) 0%, rgba(34, 27, 24, 0.35) 50%, rgba(34, 27, 24, 0) 100%);
}

/* 写真そのものに文字(看板)が写っているスライドは、下だけを暗くする */
.nk-slide--bottom { background-position: center 22%; }
.nk-slide--bottom::after {
    background: linear-gradient(180deg, rgba(34, 27, 24, 0) 45%, rgba(34, 27, 24, 0.8) 100%);
}
.nk-slide--bottom .nk-slide-body { max-width: none; padding-bottom: 38px; }
.nk-slide--bottom .nk-slide-body p { display: none; }

.nk-slide-body {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    /* 左右の余白は画面幅に合わせて広げる(前後のボタンと重ならないように) */
    padding: 0 clamp(24px, 7vw, 88px) 58px;
}

.nk-slide-body h2 {
    font-size: clamp(22px, 2.6vw, 32px) !important;
    color: #fff !important;
    line-height: 1.55 !important;
    letter-spacing: 0.06em !important;
    margin: 0 0 12px !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.nk-slide-body p {
    max-width: 30em;
    color: #f1ece6;
    font-size: 14px;
    line-height: 1.9;
    margin: 0 0 22px;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.nk-slide-body .nk-btn {
    min-height: 44px;
    padding: 10px 22px;
    background: rgba(255, 252, 247, 0.12);
    border-color: rgba(255, 252, 247, 0.85);
}

.nk-slide-body .nk-btn:hover {
    background: var(--nk-paper);
    border-color: var(--nk-paper);
    color: var(--nk-ink) !important;
}

/* 前後のボタン: 丸の中に「く」の字 */
.nk-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(34, 27, 24, 0.2);
    cursor: pointer;
    transition: background 0.2s var(--nk-ease);
}

.nk-slider-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(-30%, -50%) rotate(45deg);
}

.nk-slider-arrow.next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.nk-slider-arrow:hover { background: rgba(34, 27, 24, 0.45); }
.nk-slider-arrow.prev { left: 20px; }
.nk-slider-arrow.next { right: 20px; }

.nk-slider-dots {
    position: absolute;
    z-index: 3;
    right: 24px;
    bottom: 22px;
    display: flex;
    gap: 8px;
}

.nk-slider-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.3s var(--nk-ease), background 0.3s var(--nk-ease);
}

.nk-slider-dots button.is-active {
    width: 24px;
    border-radius: 4px;
    background: #fff;
}

/* ---------- はじめのあいさつ ---------- */
.nk-intro {
    padding: 60px 0 8px;
    text-align: center;
}

/* 本文: 言葉の切れ目(span)の間でだけ折り返す
   文字の大きさは40px(v1.6.0で送料の「394」と同じ44pxにし、v1.6.1で少し小さくした) */
.nk-intro-text {
    margin: 0 auto;
    color: var(--nk-ink);
    font-size: 40px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    word-break: keep-all;          /* 念のため: spanの外でも単語の途中で切らない */
}

.nk-intro-text span { display: inline-block; }

/* ---------- ご購入の流れ ---------- */
.nk-flow {
    padding: 56px 0 24px;
}

.nk-flow-head {
    text-align: center;
    margin-bottom: 34px;
}

.nk-flow-head .nk-kicker {
    display: block;
    color: var(--nk-thread);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.nk-flow-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: nkflow;
}

.nk-flow-item {
    position: relative;
    counter-increment: nkflow;
    margin: 0;
    padding: 26px 22px 24px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
    text-align: center;
}

.nk-flow-item img {
    display: block;
    height: 104px;
    width: auto;
    max-width: 100%;
    margin: 4px auto 16px;
}

.nk-flow-item h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.nk-flow-item h3::before {
    content: counter(nkflow);
    display: inline-grid !important;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--nk-thread);
    color: #fff;
    font-size: 13px;
    vertical-align: 2px;
}

.nk-flow-item p {
    margin: 0;
    color: var(--nk-ink-soft);
    font-size: 13px;
    line-height: 1.85;
    text-align: left;
}

.nk-flow-item p strong { color: var(--nk-ink); }

.nk-flow-note {
    margin: 22px 0 0;
    text-align: center;
    color: var(--nk-ink-soft);
    font-size: 13px;
}

/* ---------- 送料の図解(v1.5.0) ----------
   左: レシートの形で「運賃+着払い手数料=合計」を見せる
   右: ゆうパケットの大きさの寸法図(SVGはPHPの nishikobe_shop_packet_figure())
   金額・寸法の数字はPHPの nishikobe_shop_shipping() が1か所で持っている */
.nk-ship {
    padding: 48px 0 8px;
}
.nk-ship--compact {
    padding: 0;
    margin: 0 0 26px;
}
.nk-ship .nk-flow-head { margin-bottom: 28px; }

.nk-ship-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.nk-ship-card {
    position: relative;
    margin: 0;
    padding: 26px 28px 24px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
}

.nk-ship-lead {
    margin: 0 0 4px;
    color: var(--nk-thread);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.nk-ship-total {
    margin: 0 0 14px;
    font-family: var(--nk-display);
    font-size: 44px;
    line-height: 1.1;
    color: var(--nk-ink);
    letter-spacing: 0.02em;
}
.nk-ship-total span {
    font-size: 20px;
    margin-left: 4px;
}

/* レシート: 点線の区切りと、合計の二重線 */
.nk-receipt {
    margin: 0 0 16px;
    padding: 0;
    font-size: 14px;
}
.nk-receipt > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 2px;
    border-bottom: 1px dashed var(--nk-line);
}
.nk-receipt dt { margin: 0; font-weight: 400; color: var(--nk-ink-soft); }
.nk-receipt dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nk-receipt .nk-receipt-sum {
    border-bottom: 3px double var(--nk-ink-soft);
    font-weight: 700;
}
.nk-receipt .nk-receipt-sum dt { color: var(--nk-ink); font-weight: 700; }

/* 内訳の帯(運賃と手数料の割合) */
.nk-ship-bar {
    display: flex;
    height: 30px;
    margin: 0 0 14px;
    border-radius: 4px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    line-height: 30px;
    white-space: nowrap;
}
.nk-ship-bar-fare {
    background: var(--nk-thread-pale);
    color: var(--nk-thread-dark);
    padding-left: 12px;
}
.nk-ship-bar-fee {
    flex: 1;
    min-width: 88px;              /* 細くなりすぎて文字が読めなくならないように */
    background: var(--nk-kraft);
    color: var(--nk-ink);
    text-align: center;
}

.nk-ship-note {
    margin: 0;
    color: var(--nk-ink-soft);
    font-size: 13px;
    line-height: 1.85;
}
.nk-ship-note strong { color: var(--nk-ink); }

.nk-packet-fig {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 6px auto 12px;
}

.nk-ship-limits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}
.nk-ship-limits li {
    margin: 0;
    padding: 8px 4px;
    border: 1px solid var(--nk-line);
    border-radius: 4px;
    text-align: center;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--nk-ink-soft);
}
.nk-ship-limits span { display: block; }
.nk-ship-limits strong {
    font-family: var(--nk-display);
    font-size: 17px;
    color: var(--nk-ink);
    margin-right: 1px;
}

/* 「送料はご購入後にメールでお知らせ」の一文(v1.6.0) */
.nk-ship-mail {
    margin: 18px 0 0;
    padding: 12px 16px;
    background: var(--nk-thread-pale);
    border-radius: var(--nk-radius);
    color: var(--nk-ink);
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
}
.nk-ship-mail strong { color: var(--nk-thread-dark); }
.nk-ship--compact .nk-ship-mail { margin-top: 12px; font-size: 14px; }

.nk-ship-since {
    margin: 14px 0 0;
    text-align: right;
    color: var(--nk-ink-soft);
    font-size: 12px;
}

/* ---------- ページ下: 利用規約などへのリンク(v1.6.0) ---------- */
.nk-legal {
    padding: 28px 0 36px;
    border-top: 1px dashed var(--nk-thread-soft);
    font-size: 13px;
    text-align: center;
}
.nk-legal .nk-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 28px;
}
.nk-legal a {
    color: var(--nk-ink-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.nk-legal a:hover { color: var(--nk-thread-dark); }

/* ご注文手続き用の小さい版: 余白と文字を詰める */
.nk-ship--compact .nk-ship-card { padding: 20px 22px 18px; }
.nk-ship--compact .nk-ship-total { font-size: 34px; margin-bottom: 8px; }
.nk-ship--compact .nk-ship-total span { font-size: 17px; }
.nk-ship--compact .nk-receipt { font-size: 13px; margin-bottom: 12px; }
.nk-ship--compact .nk-receipt > div { padding: 6px 2px; }
.nk-ship--compact .nk-packet-fig { max-width: 250px; margin: 2px auto 8px; }
.nk-ship--compact .nk-ship-limits { margin-bottom: 10px; }
.nk-ship--compact .nk-ship-since { margin-top: 8px; }

/* ---------- 商品の並び ---------- */
.nk-products {
    padding: 64px 0 0;
}

.nk-products-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.nk-products-head .nk-count {
    color: var(--nk-ink-soft);
    font-size: 13px;
    padding-bottom: 12px;
}

.nk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 30px 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nk-card {
    position: relative;
    margin: 0;
}

/* カード全体を1つのリンクにする(小さなボタンを探さなくてよいように) */
.nk-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px 12px 18px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
    color: var(--nk-ink) !important;
    text-decoration: none !important;
    transition: transform 0.35s var(--nk-ease), box-shadow 0.35s var(--nk-ease);
}

.nk-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(59, 52, 49, 0.1);
}

.nk-card-thumb {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 3px;
    background: #efe7da;
}

.nk-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s var(--nk-ease);
}

.nk-card-link:hover .nk-card-thumb img { transform: scale(1.04); }

.nk-card .nk-stamp {
    position: absolute;
    top: 14px;
    left: 12px;
    z-index: 2;
}

.nk-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 14px 6px 0;
}

.nk-card-title {
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin: 0 0 12px !important;
}

.nk-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.nk-card .nk-price-tag { font-size: 15px; }

.nk-card-more {
    color: var(--nk-thread-dark);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 1px solid currentColor;
    line-height: 1.5;
}

.nk-card.is-preparing .nk-card-link { pointer-events: none; }
.nk-card.is-preparing .nk-card-thumb img { filter: grayscale(0.5); opacity: 0.75; }
.nk-card.is-preparing .nk-card-more { color: var(--nk-ink-soft); border-bottom: none; }

.nk-empty {
    grid-column: 1 / -1;
    padding: 60px 0;
    text-align: center;
    color: var(--nk-ink-soft);
}

/* カテゴリー一覧のときの見出し */
.nk-category-head {
    padding: 34px 0 0;
}


/* ==========================================================================
   11. 商品詳細ページ
   ========================================================================== */
.nk-product {
    padding: 22px 0 0;
}

/* 追加後のお知らせ */
.nk-product .woocommerce-notices-wrapper:not(:empty) {
    margin-bottom: 26px;
}

.nk-shop-page .woocommerce-message,
.nk-shop-page .woocommerce-info,
.nk-shop-page .woocommerce-error {
    position: relative;
    margin: 0 0 24px;
    padding: 20px 24px !important;
    list-style: none;
    background: var(--nk-paper) !important;
    border: none !important;
    border-left: 3px solid var(--nk-thread) !important;
    border-radius: var(--nk-radius);
    color: var(--nk-ink) !important;
    font-size: 14px;
    line-height: 1.8;
}

.nk-shop-page .woocommerce-message::before,
.nk-shop-page .woocommerce-info::before,
.nk-shop-page .woocommerce-error::before {
    content: none !important;
}

.nk-shop-page .woocommerce-error { border-left-color: var(--nk-stamp) !important; }

/* カゴに入れた直後の案内(PHPで中身を組み立てている) */
.nk-added {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 22px;
}

.nk-added-text { flex: 1 1 240px; margin: 0; font-weight: 700; }
.nk-added-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.nk-added-actions .nk-btn { min-height: 42px; padding: 8px 20px; font-size: 14px; }

/* 商品本体(写真 + 説明) */
.nk-product .product {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    margin: 0;
}

.nk-product .woocommerce-product-gallery {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 14px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
}

.nk-product .woocommerce-product-gallery img { border-radius: 3px; }

/* 🔍 の絵文字ボタンは出さない(写真をタップすれば拡大表示される) */
.nk-product .woocommerce-product-gallery__trigger { display: none !important; }

.nk-gallery-hint {
    margin: 10px 0 0;
    color: var(--nk-ink-soft);
    font-size: 12px;
    text-align: center;
}

.nk-product .flex-control-thumbs {
    display: flex;
    gap: 8px;
    margin: 10px 0 0 !important;
    padding: 0;
    list-style: none;
}

.nk-product .flex-control-thumbs li { width: 64px !important; float: none !important; margin: 0 !important; }
.nk-product .flex-control-thumbs img { border-radius: 3px; opacity: 0.6; cursor: pointer; }
.nk-product .flex-control-thumbs img.flex-active { opacity: 1; outline: 2px solid var(--nk-thread-soft); }

.nk-product .summary {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding-top: 6px;
}

.nk-course-label {
    display: block;
    color: var(--nk-thread);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.nk-product .product_title {
    font-size: 26px !important;
    line-height: 1.5 !important;
    margin: 0 0 16px !important;
}

.nk-product .summary .price {
    display: block;
    margin: 0 0 20px;
}

.nk-product .summary .price .nk-price-tag { font-size: 20px; padding: 5px 16px 5px 26px; }

.nk-product .woocommerce-product-details__short-description {
    color: var(--nk-ink);
    font-size: 14.5px;
    line-height: 2;
    margin-bottom: 22px;
}

.nk-product .summary .nk-memo { margin: 0 0 22px; }

.nk-product .stock {
    display: inline-block;
    margin: 0 0 14px;
    color: var(--nk-ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.nk-product .stock.in-stock { color: var(--nk-ink-soft) !important; }
.nk-product .stock.out-of-stock { color: var(--nk-stamp) !important; }

.nk-product form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    margin: 0 0 12px !important;
}

.nk-product form.cart .quantity { margin: 0 !important; }

.nk-product .quantity .qty {
    width: 76px;
    height: 52px;
    border: 1.5px solid var(--nk-line);
    border-radius: var(--nk-radius);
    background: var(--nk-paper);
    text-align: center;
    font-size: 16px;
}

.nk-product .single_add_to_cart_button {
    flex: 1 1 220px;
    min-height: 52px;
    background: var(--nk-go) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--nk-radius) !important;
    font-family: var(--nk-display) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    padding: 12px 24px !important;
    transition: background 0.2s var(--nk-ease);
}

.nk-product .single_add_to_cart_button:hover { background: var(--nk-go-dark) !important; }

.nk-cart-hint {
    margin: 0;
    color: var(--nk-ink-soft);
    font-size: 12.5px;
}

.nk-product .product_meta { display: none; }

/* 商品についての説明(タブが1つだけなら、タブの見出しは出さない) */
.nk-product .woocommerce-tabs {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 34px 40px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
}

.nk-product .woocommerce-tabs ul.tabs {
    display: flex;
    gap: 22px;
    margin: 0 0 22px !important;
    padding: 0 !important;
    list-style: none;
    border-bottom: 1px solid var(--nk-line);
}

.nk-product .woocommerce-tabs ul.tabs:has(li:only-child) { display: none; }
.nk-product .woocommerce-tabs ul.tabs::before,
.nk-product .woocommerce-tabs ul.tabs li::before,
.nk-product .woocommerce-tabs ul.tabs li::after { display: none !important; }

.nk-product .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.nk-product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 0 0 10px;
    color: var(--nk-ink-soft);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.nk-product .woocommerce-tabs ul.tabs li.active a {
    color: var(--nk-ink);
    border-bottom-color: var(--nk-thread);
}

.nk-product .woocommerce-tabs .panel {
    margin: 0 !important;
    font-size: 14.5px;
    line-height: 2;
}

.nk-product .woocommerce-tabs .panel h2 {
    font-size: 18px;
    margin-bottom: 14px;
}

/* ほかの商品(関連商品) */
.nk-product .related.products,
.nk-product .upsells.products {
    grid-column: 1 / -1;
    margin-top: 48px;
}

.nk-product .related.products > h2,
.nk-product .upsells.products > h2 {
    font-size: 20px;
    margin-bottom: 22px;
}

.nk-product .related.products ul.products,
.nk-product .upsells.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.nk-product ul.products::before,
.nk-product ul.products::after { display: none !important; }

.nk-product ul.products li.product {
    display: block !important;   /* テーマ側の「中身を縮めて並べる」指定を打ち消す */
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 10px 10px 16px !important;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
    text-align: left;
}

.nk-product ul.products li.product a { text-decoration: none; color: var(--nk-ink); }

/* 写真を包むリンクが「文字と同じ扱い」のままだと、写真が縮んでしまうため */
.nk-product ul.products li.product a.woocommerce-LoopProduct-link { display: block; }

.nk-product ul.products li.product img {
    display: block;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    border-radius: 3px;
    margin: 0 0 10px !important;
}

.nk-product ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--nk-display);
    font-size: 14px !important;
    font-weight: 700;
    padding: 0 4px !important;
    margin: 0 0 4px !important;
}

.nk-product ul.products li.product .price {
    display: block;
    padding: 0 4px;
    color: var(--nk-ink-soft) !important;
    font-size: 13px !important;
}

/* 関連商品では「カゴに追加」を出さない。まず商品ページで確かめてもらう */
.nk-product ul.products li.product .button,
.nk-product ul.products li.product .added_to_cart { display: none !important; }


/* ==========================================================================
   12. お買い物カゴ
   ========================================================================== */
.nk-cart .wc-block-cart {
    margin: 0 !important;
}

.nk-cart .wc-block-components-sidebar-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 28px;
    margin: 0 !important;
}

.nk-cart .wc-block-cart__main {
    flex: 1 1 560px;
    padding: 6px 26px 14px !important;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
}

.nk-cart .wc-block-cart__sidebar {
    flex: 0 1 330px;
    padding: 24px 24px 22px !important;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
    position: sticky;
    top: 20px;
}

.nk-cart .wc-block-cart-items { width: 100%; border-collapse: collapse; }

/* 商品の行に付く、うっすら青い背景(WooCommerce標準)を消す */
.nk-cart .wc-block-cart-items,
.nk-cart .wc-block-cart-items th,
.nk-cart .wc-block-cart-items td,
.nk-cart .wc-block-cart-items__row { background: transparent !important; }

.nk-cart .wc-block-cart-items__header th {
    padding: 18px 8px 12px !important;
    border-bottom: 1px solid var(--nk-line) !important;
    color: var(--nk-ink-soft);
    font-size: 12px;
    font-weight: 700;
}

.nk-cart .wc-block-cart-items__row td {
    padding: 22px 8px !important;
    border-bottom: 1px solid var(--nk-line) !important;
    vertical-align: top;
}

.nk-cart .wc-block-cart-items__row:last-child td { border-bottom: none !important; }

.nk-cart .wc-block-cart-item__image img { border-radius: 3px; }

.nk-cart .wc-block-components-product-name {
    color: var(--nk-ink) !important;
    font-family: var(--nk-display);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
}

.nk-cart .wc-block-components-product-metadata__description { display: none; }

.nk-cart .wc-block-components-quantity-selector {
    border: 1.5px solid var(--nk-line) !important;
    border-radius: var(--nk-radius) !important;
    background: var(--nk-paper);
}

.nk-cart .wc-block-components-quantity-selector::after { display: none !important; }

.nk-cart .wc-block-components-quantity-selector__button { color: var(--nk-ink) !important; min-width: 36px; }
.nk-cart .wc-block-components-quantity-selector__input { font-weight: 700; }

.nk-cart .wc-block-cart-item__remove-link {
    color: var(--nk-ink-soft) !important;
    font-size: 12px !important;
    text-decoration: underline !important;
}

.nk-cart .wc-block-cart__totals-title {
    display: block !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    font-family: var(--nk-display);
    font-size: 17px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    color: var(--nk-ink) !important;
}

.nk-cart .wc-block-components-totals-wrapper { border-top: 1px solid var(--nk-line) !important; padding: 12px 0 !important; }
.nk-cart .wc-block-components-totals-item { font-size: 14px; }

.nk-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.nk-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-family: var(--nk-display);
    font-size: 20px !important;
    font-weight: 700 !important;
}

.nk-cart .wc-block-cart__submit-button {
    width: 100%;
    min-height: 54px;
    background: var(--nk-go) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--nk-radius) !important;
    font-family: var(--nk-display) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
}

.nk-cart .wc-block-cart__submit-button:hover { background: var(--nk-go-dark) !important; }

.nk-cart .nk-memo { margin-bottom: 26px; }

/* 「こちらもおすすめ」などの商品の並び(ブロック) */
.nk-cart .wp-block-woocommerce-product-collection,
.nk-cart .wp-block-woocommerce-product-new { margin-top: 30px; }

/* カゴが空のとき */
.nk-cart .wp-block-woocommerce-empty-cart-block {
    padding: 40px 28px 44px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
    text-align: center;
}

.nk-cart .wc-block-cart__empty-cart__title {
    font-size: 20px !important;
    padding-top: 150px !important;
    background: url("img/spool.png") center top / auto 130px no-repeat !important;
}

.nk-cart .wc-block-cart__empty-cart__title::before { display: none !important; }

.nk-cart .wp-block-woocommerce-empty-cart-block hr { display: none; }

.nk-cart .wp-block-woocommerce-empty-cart-block h2:not(.wc-block-cart__empty-cart__title) {
    font-size: 16px;
    margin: 34px 0 18px;
}

/* 空のカゴの下に並ぶ「新登場」などの商品: カゴに直接入れるボタンは出さず、
   商品名・写真から詳細ページへ進んでもらう(一覧からいきなり入れると、
   商品を確かめないまま注文へ進んでしまうため。関連商品と同じ考え方) */
.nk-cart .wc-block-components-product-button,
.nk-cart .wp-block-woocommerce-product-new .wp-block-button,
.nk-cart .wc-block-grid__product-add-to-cart { display: none !important; }

.nk-cart .wc-block-grid__product,
.nk-cart .wc-block-product {
    padding: 10px 10px 14px !important;
    background: var(--nk-bg);
    border-radius: var(--nk-radius);
    border: none !important;
}

.nk-cart .wc-block-grid__product-title,
.nk-cart .wc-block-components-product-name,
.nk-cart .wp-block-post-title a {
    color: var(--nk-ink) !important;
    font-family: var(--nk-display);
    font-weight: 700;
    text-decoration: none !important;
}

.nk-cart .wc-block-grid__product-image img { border-radius: 3px; }

/* カゴが空のときは、送料の案内は出さない(まだ関係がないため) */
.nk-cart:has(.wp-block-woocommerce-empty-cart-block) .nk-memo { display: none; }

.nk-empty-actions {
    margin-top: 22px;
    text-align: center;
}


/* ---------- 送料の「無料」表示を消す(実際はゆうパケットの着払いのため) ----------
   WooCommerceが「送料0円のとき専用」に出す部分だけを狙っている:
     ・<strong>無料</strong>  … 0円のときだけ <strong> で囲まれる
     ・--free クラス          … 0円のときだけ付く
   有料の配送方法を追加した場合、そちらの金額はこれまでどおり表示される。
   配送方法の名前はPHP側で「ゆうパケット(着払い)」に変えてあるので、
   金額欄を消しても着払いであることは伝わる(v1.1.0で追加)。 */
.nk-shop-page .wc-block-components-totals-shipping .wc-block-components-totals-item__value strong,
.nk-shop-page .wc-block-checkout__shipping-option--free {
    display: none !important;
}


/* ==========================================================================
   13. ご注文手続き
   ========================================================================== */
.nk-checkout .wc-block-checkout { margin: 0 !important; }

.nk-checkout .wc-block-components-sidebar-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 28px;
    margin: 0 !important;
}

.nk-checkout .wc-block-checkout__main { flex: 1 1 560px; }

.nk-checkout .wc-block-checkout__sidebar {
    flex: 0 1 330px;
    padding: 22px 22px 18px !important;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
    position: sticky;
    top: 20px;
}

.nk-checkout .wc-block-components-checkout-step {
    margin: 0 0 16px !important;
    padding: 26px 28px 22px !important;
    background: var(--nk-paper) !important;   /* テーマ・WooCommerce側の透明指定に勝たせる */
    border: none !important;
    border-radius: var(--nk-radius);
}

.nk-checkout .wc-block-components-checkout-step::after { display: none !important; }

.nk-checkout .wc-block-components-checkout-step__heading { margin-bottom: 6px !important; }

.nk-checkout .wc-block-components-checkout-step__title {
    font-family: var(--nk-display) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--nk-ink) !important;
}

.nk-checkout .wc-block-components-checkout-step__description,
.nk-checkout .wc-block-checkout__guest-checkout-notice {
    color: var(--nk-ink-soft) !important;
    font-size: 12.5px !important;
}

.nk-checkout .wc-block-components-text-input input,
.nk-checkout .wc-blocks-components-select__select,
.nk-checkout .wc-block-components-textarea {
    background: #fff !important;
    border: 1.5px solid var(--nk-line) !important;
    border-radius: var(--nk-radius) !important;
}

.nk-checkout .wc-block-components-text-input input:focus,
.nk-checkout .wc-blocks-components-select__select:focus,
.nk-checkout .wc-block-components-textarea:focus {
    border-color: var(--nk-thread) !important;
    box-shadow: 0 0 0 3px var(--nk-thread-pale) !important;
}

/* 販売は国内だけなので、国の選択欄は出さない(PHP側で国が1つだけのときに限って付く印) */
body.nk-single-country .nk-checkout .wc-block-components-address-form__country { display: none !important; }

.nk-checkout .wc-block-components-radio-control__option {
    border-radius: var(--nk-radius) !important;
}

.nk-checkout .wc-block-components-radio-control-accordion-content,
.nk-checkout .wc-block-components-radio-control__description {
    color: var(--nk-ink) !important;
    font-size: 13px !important;
    line-height: 1.85 !important;
}

.nk-checkout .wc-block-checkout__terms {
    margin: 4px 0 18px !important;
    padding: 0 !important;
    color: var(--nk-ink-soft);
    font-size: 12.5px;
    border: none !important;
}

.nk-checkout .wc-block-checkout__actions { padding-top: 6px !important; }

.nk-checkout .wc-block-checkout__actions_row { gap: 14px; flex-wrap: wrap-reverse; }

.nk-checkout .wc-block-components-checkout-place-order-button {
    min-height: 56px;
    min-width: 260px;
    background: var(--nk-go) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--nk-radius) !important;
    font-family: var(--nk-display) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
}

.nk-checkout .wc-block-components-checkout-place-order-button:hover { background: var(--nk-go-dark) !important; }

.nk-checkout .wc-block-components-checkout-return-to-cart-button {
    color: var(--nk-ink) !important;
    font-weight: 700;
}

.nk-checkout .wc-block-components-checkout-order-summary__title-text {
    font-family: var(--nk-display);
    font-size: 17px;
    font-weight: 700;
}

.nk-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.nk-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-family: var(--nk-display);
    font-size: 19px !important;
    font-weight: 700 !important;
}

.nk-checkout .nk-memo { margin-bottom: 18px; }

.nk-place-note {
    margin: 12px 0 0;
    color: var(--nk-ink-soft);
    font-size: 12.5px;
}

/* ---------- 注文完了ページ ---------- */
.nk-thanks-next {
    margin: 0 0 26px;
    padding: 28px 30px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
}

.nk-thanks-next h2 { font-size: 18px; margin-bottom: 14px !important; }

.nk-thanks-next ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: nkthx;
}

.nk-thanks-next li {
    position: relative;
    counter-increment: nkthx;
    margin: 0 0 10px;
    padding-left: 38px;
    font-size: 14px;
    line-height: 1.85;
}

.nk-thanks-next li::before {
    content: counter(nkthx);
    position: absolute;
    left: 0;
    top: 1px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--nk-thread);
    color: #fff;
    font-family: var(--nk-display);
    font-size: 13px;
    font-weight: 700;
}

.nk-checkout .woocommerce-order {
    padding: 28px 30px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
}

.nk-checkout .woocommerce-order h2 { font-size: 18px; margin: 26px 0 12px !important; }
.nk-checkout .woocommerce-order-overview { padding-left: 0; list-style: none; }


/* ==========================================================================
   14. 文章ページ(利用規約・プライバシーポリシー)
   ========================================================================== */
.nk-doc {
    padding: 42px 48px 46px;
    background: var(--nk-paper);
    border-radius: var(--nk-radius);
}

.nk-doc h2 {
    font-size: 17px !important;
    color: var(--nk-thread-dark) !important;
    margin: 36px 0 12px !important;
}

.nk-doc > *:first-child { margin-top: 0 !important; }

.nk-doc h3 { font-size: 15px !important; margin: 22px 0 8px !important; }

.nk-doc p,
.nk-doc li {
    font-size: 14px;
    line-height: 2;
}

.nk-doc p { margin: 0 0 14px; }
.nk-doc ol, .nk-doc ul { margin: 0 0 14px; padding-left: 1.4em; }


/* ==========================================================================
   15. スマートフォン・タブレット向け(必ず最後に置くこと)
   ========================================================================== */
@media (max-width: 960px) {
    .nk-intro-text { font-size: 34px; }
    .nk-flow-list { grid-template-columns: repeat(2, 1fr); }
    .nk-product .product { grid-template-columns: 1fr; gap: 28px; }
    .nk-product .related.products ul.products,
    .nk-product .upsells.products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
    /*
     * スマホではWooCommerce側で縦並び(flex-direction: column)に切り替わるため、
     * 横幅として指定した flex-basis が「高さ」として効いてしまい、
     * 大きな空白ができる。ここで打ち消す(2026年8月に実際に起きた不具合)。
     */
    .nk-cart .wc-block-cart__main,
    .nk-cart .wc-block-cart__sidebar,
    .nk-checkout .wc-block-checkout__main,
    .nk-checkout .wc-block-checkout__sidebar {
        flex: 0 1 auto !important;
        width: 100%;
        /* 画面上部に張り付く動き(sticky)をやめる。static にすると、縫い目の飾りの
           位置の基準がなくなり、飾りが外側の大きな枠に広がってしまうので relative にする */
        position: relative !important;
    }
    .nk-cart .wc-block-cart__main { padding: 4px 14px 8px !important; }
    .nk-cart .wc-block-cart__sidebar,
    .nk-checkout .wc-block-checkout__sidebar { padding: 18px 16px !important; }
    .nk-checkout .wc-block-components-checkout-step { padding: 20px 18px 16px !important; }
    .nk-checkout .wc-block-components-checkout-place-order-button { width: 100%; min-width: 0; }
}

@media (max-width: 700px) {
    .nk-shop-page { font-size: 14px; }
    .nk-wrap { padding: 0 16px; }
    .nk-bar .nk-wrap { min-height: 52px; gap: 10px; }
    .nk-bar .nk-seam { margin: 0 16px; }
    /* スマホでは商品名を省き、「商品一覧」へのリンクだけにする(区切りの「/」も出さない) */
    .nk-crumb .nk-crumb-here,
    .nk-crumb .nk-crumb-sep { display: none; }

    .nk-hero-slider { height: 340px; }
    /* 看板の写真は、スマホだと見出しが看板の文字に重なるので、下側をしっかり暗くする */
    .nk-slide--bottom::after {
        background: linear-gradient(180deg, rgba(34, 27, 24, 0) 25%, rgba(34, 27, 24, 0.86) 72%, rgba(34, 27, 24, 0.92) 100%);
    }
    .nk-slide--bottom .nk-slide-body { padding-bottom: 44px; }
    .nk-card-link.nk-stitch::after { inset: 4px; }
    .nk-slide-body { padding: 0 18px 48px; }
    .nk-slider-arrow { display: none; }
    .nk-slider-dots { left: 0; right: 0; justify-content: center; bottom: 16px; }

    .nk-intro { padding-top: 40px; }
    .nk-intro-text { font-size: 24px; line-height: 1.75; }   /* スマホで44pxだと1行6〜7文字になるため小さめ */

    .nk-flow { padding-top: 40px; }
    .nk-flow-list { grid-template-columns: 1fr; gap: 12px; }
    .nk-flow-item {
        display: grid;
        grid-template-columns: 76px 1fr;
        gap: 4px 16px;
        align-items: center;
        padding: 18px 18px;
        text-align: left;
    }
    .nk-flow-item img { grid-row: 1 / 3; height: 70px; margin: 0 auto; }
    .nk-flow-item h3 { font-size: 15px; margin: 0; }
    .nk-flow-item h3::before { width: 22px; height: 22px; font-size: 12px; margin-right: 6px; }

    /* 送料の図解: 1列にする。寸法の4つの枠は2列×2段に */
    .nk-ship { padding-top: 36px; }
    .nk-ship-grid { grid-template-columns: 1fr; gap: 12px; }
    .nk-ship-card,
    .nk-ship--compact .nk-ship-card { padding: 20px 18px 18px; }
    .nk-ship-total { font-size: 38px; }
    .nk-ship-limits { grid-template-columns: repeat(2, 1fr); }
    .nk-ship-since { text-align: left; }
    .nk-ship-mail { text-align: left; font-size: 14px; }

    .nk-products { padding-top: 44px; }
    .nk-heading { font-size: 20px; }
    .nk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .nk-card-link { padding: 8px 8px 12px; }
    .nk-card-body { padding: 10px 2px 0; }
    .nk-card-title { font-size: 14px !important; margin-bottom: 8px !important; }
    .nk-card-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
    .nk-card .nk-price-tag { font-size: 13.5px; }

    .nk-steps { padding-top: 22px; }
    .nk-steps li { font-size: 11.5px; gap: 6px; }
    .nk-steps li::before { width: 26px; height: 26px; font-size: 12px; }
    .nk-steps li:not(:last-child) { margin-right: 6px; }
    .nk-steps li:not(:last-child) > span::after { width: 16px; margin-left: 6px; }

    .nk-page-head { padding: 16px 0 20px; }
    .nk-page-head h1 { font-size: 21px; }

    .nk-memo { grid-template-columns: 48px 1fr; gap: 12px; padding: 14px 16px; font-size: 13px; }
    .nk-memo img { width: 48px; }

    .nk-product .product_title { font-size: 21px !important; }
    .nk-product .woocommerce-tabs { padding: 24px 18px; }

    .nk-doc { padding: 26px 20px; }
    .nk-thanks-next,
    .nk-checkout .woocommerce-order { padding: 22px 18px; }
}
