/* ==================== BASE (Mobile First) ==================== */
body {
   margin: 0; padding: 0;
   background-color: #f5f5f0;
   color: #2d2d2d;
   font-family: 'Inter', 'Noto Sans JP', sans-serif;
   position: relative;
   overflow-x: hidden;
   -webkit-tap-highlight-color: transparent;
   scroll-behavior: smooth;
}

.inner-box {
   max-width: 480px;
   margin: 0 auto;
   width: 100%;
   box-sizing: border-box;
   position: relative;
}

body::before {
   content: "";
   position: fixed;
   top: 0; left: 0;
   width: 100%; height: 100%;
   background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
   opacity: 0.04;
   pointer-events: none;
   z-index: 9998;
}

.breadcrumb-container { position: relative; padding: 85px 20px 30px; z-index: 10; }
.breadcrumbs { 
   list-style: none; display: flex; 
   flex-direction: center;
   padding: 0; margin: 0; font-size: 10px; letter-spacing: 0.05em; overflow-x: auto; white-space: nowrap; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin: 0 8px; color: #ccc; }
.breadcrumbs a { text-decoration: none; color: #2d2d2d; opacity: 0.5; }

main { position: relative; z-index: 1; width: 100%; }
.main-content { width: 100%; padding: 0; box-sizing: border-box; }
.product-item-block { width: 100%; box-sizing: border-box; }
.product-purchase-area { width: 100%; }
.product-purchase-info { width: 100%; }

.product-divider {
   height: 0;
   border-top: 1px dashed #d0cfc8;
   margin: 0 0 50px;
}

.product-hero { margin-bottom: 25px; }
.product-hero img { width: 100%; height: auto; display: block; }

.product-flex-container {
   display: flex;
   justify-content: space-between;
   align-items: flex-end;
   padding: 0 30px;
   gap: 0;
   flex-wrap: nowrap;
}

.product-info-left { flex: 1; min-width: 0; }

.p-title { font-size: 24px; color: #2d2d2d; margin: 0 0 5px; font-weight: 700; line-height: 1.4; }
.p-sub { font-size: 10px; color: #888888; margin: 0 0 0px; }
.p-capacity { font-size: 15px; color: #666666; margin: 0 0 0px; }
.p-price-box { margin: 0 0 0 30px; color: #2d2d2d; }
.p-price { font-size: 20px; font-weight: 700; }
.p-tax { font-size: 11px; }

.p-title-sub {
   font-size: 16px;
   font-weight: 500;
   margin-left: -5px;
}

.qty-wrapper-container { width: 100%; box-sizing: border-box; }
.qty-wrapper {
   display: flex; align-items: center; gap: 4px;
   font-size: 14px; color: #2d2d2d; white-space: nowrap;
   width: 100%;
   padding: 0 30px;
   box-sizing: border-box;
   margin-top: 25px;
}

.qty-controls { display: flex; align-items: center; }
input.qty-input::-webkit-outer-spin-button,
input.qty-input::-webkit-inner-spin-button {
   -webkit-appearance: none;
   margin: 0;
}
.qty-btn, .qty-input {
   width: 34px; height: 34px; border: 1px solid #ccc; background: #fff;
   display: flex; align-items: center; justify-content: center;
   text-align: center; font-size: 14px; color: #2d2d2d;
}
.qty-input { border-left: none; border-right: none; width: 30px; outline: none; background: #f8f8f8; -webkit-appearance: none; border-radius: 0; }
.qty-btn { cursor: pointer; background-color: transparent; user-select: none; -webkit-appearance: none; appearance: none; }
.qty-btn:first-child { border-radius: 4px 0 0 4px; }
.qty-btn:last-child { border-radius: 0 4px 4px 0; }

.shipping { font-size: 11px; color: #bda16b; font-weight: 700; margin-left: -10px; }
.shipping-notice-wide {
   display: block;
   font-size: 11px;
   color: #666666;
   margin: 10px 0 20px 30px;
   padding: 0;
   box-sizing: border-box;
   white-space: nowrap;
}

.product-info-right { width: 115px; flex-shrink: 0; text-align: right; }
.product-info-right img { width: 115px; height: auto; display: block; }

.btn-cart { display: flex; align-items: center; justify-content: center; gap: 12px; width: calc(100% - 60px); max-width: 340px; margin: 30px auto 40px; background-color: #bda16b; color: #ffffff; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: 0.15em; padding: 18px 0; border-radius: 2px; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.btn-cart svg { width: 20px; height: 20px; fill: currentColor; }

.delivery-notice {
   text-align: center;
   margin-top: -30px;
   margin-bottom: 40px;
   font-size: 13px;
   color: #666666;
   font-weight: 500;
   letter-spacing: 0.05em;
}
.highlight-date {
   font-weight: 700;
   color: #bda16b;
   font-size: 18px;
}

.page-anchor-nav { width: 100%; background-color: #fff; padding: 30px 0; }
.anchor-list {
   list-style: none;
   padding: 0 50px;
   margin: 0;
   column-count: 2;
   column-gap: 20px;
}
.anchor-list li {
   position: relative;
   padding-left: 18px;
   margin-bottom: 15px;
   font-size: 13px;
   box-sizing: border-box;
   break-inside: avoid;
}
.anchor-list li::before {
   content: "→";
   position: absolute;
   left: 0;
   color: #bda16b;
   font-weight: bold;
}
.anchor-list a { text-decoration: none; color: #1a2a40; font-weight: 500; }

.section-full-white { width: 100%; background-color: #ffffff; padding: 50px 0; box-sizing: border-box; }
.section-full-gray { width: 100%; background-color: #e9e9e9; padding: 50px 0; box-sizing: border-box; }

.description-title { font-size: 20px; font-weight: 700; color: #1a2a40; margin-bottom: 25px; display: block; padding-left: 12px; border-left: 4px solid #bda16b; line-height: 1.2; }
.description-text { font-size: 15px; color: #2d2d2d; line-height: 1.8; margin: 0; text-align: justify; }
.intake-text { font-size: 15px; color: #2d2d2d; line-height: 1.8; text-align: justify; width: 100%; max-width: none; margin: 0; }

.usage-grid-container { width: 100%; margin-bottom: 30px; }
.usage-title-1 {
   font-size: 17px;
   font-weight: 700;
   color: #1a2a40;
   margin-bottom: 20px;
   padding: 12px 0 12px 35px;
   border-top: 1px solid #1a2a40;
   border-bottom: 1px solid #1a2a40;
   letter-spacing: 0.1em;
   position: relative;
   display: flex;
   align-items: center;
}
.usage-title-1::before {
   content: "◈";
   position: absolute;
   left: 10px;
   font-size: 16px;
   color: #bda16b;
   top: 50%;
   transform: translateY(-50%);
}
.usage-flex-2-3 { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 10px; }
.usage-img-2 { width: 90px; flex-shrink: 0; }
.usage-img-2 img { width: 100%; height: auto; display: block; border-radius: 2px; }
.usage-text-3 { font-size: 15px; line-height: 1.6; color: #1a2a40; text-align: justify; }
.usage-caption-row {
    margin-top: 15px;
    margin-bottom: 15px;
}
.usage-caption { font-size: 13.5px; color: #888888; display: block; margin-top: 5px; }
.usage-caption--warn { color: #a3441f; }
.usage-note-4 { font-size: 14px; line-height: 1.6; color: #666; padding: 10px 12px; background-color: #f9f9f7; border-radius: 2px; border-left: 2px solid #bda16b; }

.back-nav-section { width: 100%; padding: 40px 40px 50px; box-sizing: border-box; text-align: center; background-color: #f5f5f0; }
.btn-back-lineup { 
    max-width: 320px;
    width: 100%;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 18px 40px; 
    background-color: #ffffff; color: #1a2a40; border: 1px solid #1a2a40; text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: 0.1em; border-radius: 50px; transition: all 0.3s ease; }
.btn-back-lineup:hover,
.btn-back-lineup:active { background-color: #1a2a40; color: #fff; }

.faq-item { border-bottom: 1px solid #e0e0e0; }
.faq-question { display: flex; align-items: center; padding: 15px 0; cursor: pointer; position: relative; }
.faq-icon-q, .faq-icon-a { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-right: 12px; flex-shrink: 0; }
.faq-icon-q { background-color: #bda16b; color: #fff; }
.faq-q-text { font-size: 16px; font-weight: 600; color: #1a2a40; padding-right: 25px; }
.faq-question::after { content: "＋"; position: absolute; right: 5px; font-size: 14px; transition: 0.3s; }
.faq-item.active .faq-question::after { content: "－"; transform: rotate(180deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; overflow: hidden; transition: grid-template-rows 0.3s ease-out; }
.faq-item.active .faq-answer { grid-template-rows: 1fr; padding-bottom: 25px; }
.faq-answer-inner { display: flex; align-items: flex-start; min-height: 0; overflow: hidden; }
.faq-icon-a { border: 1.5px solid #bda16b; background-color: #fff; color: #bda16b; min-height: 0; }
.faq-a-text { font-size: 16px; line-height: 1.7; color: #2d2d2d; min-height: 0; overflow: hidden; }
.faq-a-link { color: #1a2a40; text-decoration: underline; font-weight: 600; }

.strong-text { font-weight: 900; color: #121212; }

.spec-table { width: 100%; border-collapse: collapse; border-top: 1px solid #1a2a40; margin-top: 10px; font-size: 13px; }
.spec-table th { width: 40%; background-color: #f9f9f7; color: #1a2a40; padding: 15px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #eee; font-size: 12px; }
.spec-table td { width: 60%; background-color: #ffffff; padding: 15px 12px; border-bottom: 1px solid #eee; }

.nutrition-list { display: flex; flex-direction: column; gap: 4px; }
.nutrition-row { display: flex; justify-content: flex-start; align-items: baseline; gap: 20px; line-height: 1.6; }
.nutrition-row span:first-child { width: 90px; flex-shrink: 0; }
.nutrition-row .num { font-weight: 700; }
.nutrition-note { font-size: 11px; color: #666; margin-top: 8px; display: block; }

.totop-button {
   position: fixed;
   right: 20px; bottom: 20px;
   width: 68px; height: 68px;
   background-color: #bda16b;
   color: #ffffff;
   border-radius: 50%;
   display: flex; align-items: center; justify-content: center;
   text-decoration: none; text-align: center; font-size: 11.5px; font-weight: 700; line-height: 1.2;
   z-index: 9999; opacity: 0; visibility: hidden;
   transition: 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.totop-button.is-show { opacity: 1; visibility: visible; }

/* ============================================================
   PC・タブレット レイアウト（768px以上）
   左列：製品メイン画像　右列：製品情報＋数量＋カートボタン
   ============================================================ */
@media (min-width: 768px) {

    body { max-width: none; box-shadow: none; margin: 0; }

    .breadcrumb-container { max-width: 960px; margin: 0 auto; padding: 85px 30px 20px; }
    .breadcrumbs { font-size: 12px; }

    .inner-box { max-width: 960px; }

    /* 目次: スマホ版に倣ったボタン型タイル */
    .anchor-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        width: 100%;
        max-width: none;
        height: auto;
        padding: 0;
    }
    .anchor-list li {
        padding-left: 0;
        margin-bottom: 0 !important;
        font-size: 15px;
    }
    .anchor-list li::before {
        content: none;
    }
    .anchor-list a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        height: 100%;
        box-sizing: border-box;
        background-color: #f9f9f7;
        border: 1px solid #1a2a40;
        border-radius: 10px;
        padding: 16px 10px 16px 18px;
        font-weight: 700;
        font-size: 15px;
        line-height: 1.3;
        color: #1a2a40;
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }
    .anchor-list a::after {
        content: "＞";
        color: #2d2d2d;
        font-weight: 700;
        font-size: 12px;
        flex-shrink: 0;
        transition: color 0.2s ease;
    }
    .anchor-list a:hover {
        background-color: #1a2a40;
        color: #ffffff;
        transform: scale(1.04);
    }
    .anchor-list a:hover::after {
        color: #ffffff;
    }

    .product-purchase-area {
        display: flex;
        align-items: center;
        max-width: 960px;
        margin: 0 auto;
        padding: 0 30px 30px;
        box-sizing: border-box;
    }

    .product-hero {
        flex: 0 0 48%;
        margin-bottom: 0;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .product-purchase-info {
        flex: 0 0 52%;
        padding-left: 10px;
        padding-top: 15px;
        box-sizing: border-box;
        min-width: 0;
    }

    .product-flex-container { padding: 0; align-items: center; }

    .p-title { font-size: 32px; }
    .p-title-sub { font-size: 18px; }
    .p-sub { font-size: 16px; }
    .p-capacity { font-size: 20px; }

    /* 製品ロゴ画像: 少し大きく・丸型に（Productと統一） */
    .product-info-right { width: 130px; }
    .product-info-right img {
        width: 130px;
        height: 130px;
        border-radius: 50%;
        object-fit: cover;
        border: 4px solid #ffffff;
        box-shadow: 0 8px 18px rgba(0,0,0,0.18);
        background: #f5f5f0;
    }

    .p-price-box { margin: 10px 0 5px 0; }
    .p-price { font-size: 28px; }
    .p-tax { font-size: 12px; }
    .shipping {
        display: inline-block;
        margin-left: 8px;
        font-size: 15px;
        padding: 3px 10px;
        border-radius: 20px;
        background-color: rgba(189, 161, 107, 0.14);
        text-align: center;
    }

    .qty-wrapper { padding: 0; margin-top: 0; margin-bottom: 20px; width: auto; align-items: flex-end; }

    .btn-cart { width: 100%; max-width: none; margin: 10px 0 20px; font-size: 20px; border-radius: 8px; }

    .delivery-notice { text-align: left; margin-top: -10px; }

    .page-anchor-nav {
        padding-left: max(40px, calc((100% - 900px) / 2));
        padding-right: max(40px, calc((100% - 900px) / 2));
    }

    .description-title { font-size: 24px; }
    .description-text { font-size: 16px; }
    #sec-timing .description-text,
    #sec-notes .description-text { text-align: left; }
    .usage-title-1 { font-size: 22px; }
    .usage-text-3 { font-size: 15px; }
    .usage-note-4 { font-size: 15px; }
    .faq-q-text { font-size: 16px; }
    .faq-a-text { font-size: 16px; }

    .spec-table th, .spec-table td { font-size: 14px; }
    .spec-table th { width: 20%; }
    .nutrition-note { font-size: 15px; }
    .nutrition-row { gap: 80px; }
    .nutrition-row span:first-child { width: 120px; }

    .btn-back-lineup { font-size: 18px; padding: 18px 60px; }

    /* 使い方: 左に画像・右にテキスト＋メモを配置するレイアウト */
    .usage-grid-container {
        display: grid;
        grid-template-columns: 180px 1fr;
        grid-template-areas:
            "title title"
            "img   text"
            "img   note";
        column-gap: 80px;
    }
    .usage-title-1 { grid-area: title; }
    .usage-flex-2-3 {
        display: contents;
    }
    .usage-img-2 {
        grid-area: img;
        width: 180px;
        margin-left: 20px;
    }
    .usage-img-2 img {
        width: 180px;
        height: 180px;
        object-fit: contain;
        border-radius: 4px;
    }

    /* 土壌管理のサポートに: 画像上部30pxをカット・noteが無いので空白行を作らない・下の余白を40px削減 */
    .usage-grid-container:has(img[alt="土壌改良"]) {
        grid-template-areas:
            "title title"
            "img   text"
            ".     note";
        margin-bottom: -25px;
    }
    .usage-img-2:has(img[alt="土壌改良"]) {
        height: 180px;
        overflow: hidden;
    }
    .usage-img-2 img[alt="土壌改良"] {
        height: 210px;
        margin-top: -30px;
    }

    .usage-text-3 { grid-area: text; margin-right: 20px; }
    .usage-note-4 {
        grid-area: note;
        margin-top: 10px;
        margin-right: 20px;
    }
    .usage-caption { font-size: 13px; color: }
}

/* ============================================================
   タブレット専用（768px〜1023.98px）: 円形ロゴをメイン画像の左下角に重ねて配置
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023.98px) {

    /* お届け注釈: 機種によって改行されるのを防ぐため縮小 */
    .delivery-notice {
        font-size: 13px;
        white-space: nowrap;
    }
    .highlight-date {
        font-size: 15px;
    }

    .breadcrumb-container {
        padding-left: 80px;
        padding-right: 80px;
    }

    .product-purchase-area {
        padding-left: 80px;
        padding-right: 80px;
        position: relative;
        align-items: flex-start;
    }

    .product-purchase-info {
        padding-top: 0;
    }

    .page-anchor-nav,
    .section-full-white,
    .section-full-gray {
        padding-left: 80px;
        padding-right: 80px;
    }

    .product-info-right {
        position: absolute;
        left: 30px;
        bottom: 20px;
        z-index: 5;
    }

    /* メルゲン（粉末）のみ: もう一枚の画像の下部と20px重なるよう上に移動 */
    .product-info-right:has(img[alt="製品ロゴ1"]) {
        bottom: 120px;
    }

    /* 目次ボタン: 内部テキストの改行を無効化 */
    .anchor-list a br {
        display: none;
    }

    /* 土壌管理のサポートに: 注記文の下に20pxの余白を追加 */
    .usage-grid-container:has(img[alt="土壌改良"]) .usage-text-3 span {
        margin-bottom: 20px;
    }

    /* お水まろやか: 上線の上に30pxの余白を追加 */
    .usage-grid-container:has(img[alt="お水まろやか"]) {
        margin-top: 30px;
    }

    /* usage-text-3・usage-note-4: 左に20px移動 */
    .usage-text-3,
    .usage-note-4 {
        margin-left: -20px;
    }
}

/* ============================================================
   1024px以上: 目次を横並びに
   ============================================================ */
@media (min-width: 1024px) {

    /* 目次: PCは横一列 */
    .anchor-list {
        grid-template-columns: repeat(5, 1fr);
    }

    .product-purchase-info { padding-left: 25px; }

    .spec-table th, .spec-table td { font-size: 16px; }

    /* ご利用方法: PCのみ余白・フォントサイズを拡大 */
    .usage-img-2 {
        margin-left: 40px;
        margin-right: 60px;
    }
    .usage-text-3 {
        margin-left: 20px;
        margin-right: 40px;
        font-size: 18px;
    }
    .usage-note-4 {
        margin-top: 20px;
        margin-left: 20px;
        margin-right: 40px;
        font-size: 18px;
    }

    /* デスクワークのリフレッシュに: 画像を40px下げる */
    .usage-img-2 img[alt="電磁波"] {
        margin-top: 40px;
    }

    /* 土壌管理のサポートに: 画像をさらに50px上げる */
    .usage-img-2 img[alt="土壌改良"] {
        margin-top: -80px;
    }
    .usage-caption { font-size: 14px; color: }
}

/* ============================================================
   SP専用: 数量・カートをカード化
   ============================================================ */
@media (max-width: 767.98px) {

    .p-title { font-size: clamp(1.5rem, 10.7vw - 0.9rem, 1.7rem); }
    .p-title-mf3 { font-size: clamp(1rem, 7vw - 0.5rem, 1.2rem); }
    .p-sub { font-size: 11px; }
    .p-capacity { font-size: 14px; }

    /* 価格〜カートを1枚のカードに統合 */
    .p-price-box {
        margin: 15px 20px 0;
        padding: 14px 24px 0;
        text-align: center;
        background-color: #fff;
        border: 1px solid #e5e2da;
        border-bottom: none;
        border-radius: 12px 12px 0 0;
        box-sizing: border-box;
    }
    .p-price { font-size: 30px; }
    .p-tax { font-size: 14px; }

    .shipping {
        display: inline-block;
        margin-left: 8px;
        font-size: 15px;
        padding: 3px 10px;
        border-radius: 20px;
        background-color: rgba(189, 161, 107, 0.14);
        text-align: center;
        vertical-align: middle;
    }

    .shipping-notice-wide {
        margin: 0 20px;
        padding: 8px 10px;
        text-align: center;
        background-color: #fff;
        border-left: 1px solid #e5e2da;
        border-right: 1px solid #e5e2da;
        box-sizing: border-box;
        font-size: 12px;
        white-space: nowrap;
    }

    .cart-btn-wrapper {
        margin: 0 20px 30px;
        padding: 20px 24px;
        box-sizing: border-box;
        background-color: #fff;
        border: 1px solid #e5e2da;
        border-top: none;
        border-radius: 0 0 12px 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .qty-wrapper {
        width: 100%;
        padding: 0;
        margin-top: 0;
        justify-content: center;
        align-items: flex-end;
    }

    .qty-controls { align-items: flex-end; }

    .qty-btn, .qty-input { width: 46px; height: 46px; font-size: 16px; }

    .btn-cart {
        width: 100%;
        max-width: none;
        margin: 20px 0 0;
        border-radius: 5px;
        height: 64px;
        font-size: 17px;
    }

    .delivery-notice {
        margin-top: 12px;
        margin-bottom: 0;
    }

    /* 目次: アイコンなし＋「＞」付きタイル型 */
    .page-anchor-nav {
        padding: 24px 20px 28px;
    }
    .anchor-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        max-width: none;
        height: auto;
        padding: 0;
    }
    .anchor-list li {
        padding-left: 0;
        margin-bottom: 0 !important;
        font-size: 15px;
    }
    .anchor-list li::before {
        content: none;
    }
    .anchor-list a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        height: 100%;
        box-sizing: border-box;
        background-color: #f9f9f7;
        border: 1px solid #1a2a40;
        border-radius: 10px;
        padding: 14px 12px;
        font-weight: 700;
        font-size: 16px;
        line-height: 1.3;
        transition: background-color 0.15s ease, color 0.15s ease;
    }
    .anchor-list a::after {
        content: "＞";
        color: #2d2d2d;
        font-weight: 700;
        font-size: 11px;
        flex-shrink: 0;
        transition: color 0.15s ease;
    }
    .anchor-list a:active {
        background-color: #1a2a40;
        color: #ffffff;
    }
    .anchor-list a:active::after {
        color: #ffffff;
    }
}

/* ============================================================
   iPhone SEより大きいスマホ（376px〜767.98px）: 製品情報表
   ============================================================ */
@media (min-width: 376px) and (max-width: 767.98px) {

    .spec-table th {
        font-size: 14px;
        width: 30%;
    }
    .spec-table td {
        font-size: 14px;
        padding: 15px 0px 15px 12px;
    }
    .spec-table tr:last-child th {
        font-size: 12px;
    }
}
