﻿/* ============================================================
   Product Detail Page Styles
   buyer-product-detail.html 専用スタイル
   ============================================================ */

.product-detail-container {
    /* 2026-06-03: app-container(flex) 内で margin:0 auto により max-content(=1400)へ張り付き、
       viewport < 1400 で縮まず横はみ出し → 3カラムの右 buy box が画面外に切れていた。
       width:100% で利用可能幅に収め、max-width で上限のみ制限する。 */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px calc(var(--geal-bottom-nav-height) + 80px + env(safe-area-inset-bottom, 0px));
    background: var(--geal-bg-primary);
}

/* スクロール時にナビゲーションバーで隠れないようマージン確保 */
#section-top, #section-details, #customerReviewsSection {
    scroll-margin-top: 60px;
}

/* PC Layout: 3 Columns (Amazon 型)
   2026-06-03: 画像(左・上限420px) / 商品情報(中) / 購入ボックス(右・sticky) の3カラム。
   右の余白を購入導線に充て、カート/今すぐ購入をファーストビューに常時固定表示する
   (ボトムナビに隠れる問題の解消)。 */
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr) minmax(280px, 320px);
    gap: 32px;
    margin-bottom: 24px;
    align-items: start;
}

/* Right Column: Buy Box (sticky) */
.product-buybox {
    position: sticky;
    top: 60px;
    height: fit-content;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--geal-bg-card);
    border: 1px solid var(--geal-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
/* buy box 内は縦詰め・区切り線は控えめに */
.product-buybox .price-shipping-area {
    margin-bottom: 0;
    padding-bottom: 12px;
}
.product-buybox .benefits-area {
    margin-bottom: 0;
    padding-bottom: 12px;
}
/* 購入ボタンは縦積み (狭いカラム幅でも押しやすく) */
.product-buybox .action-buttons {
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}
.product-buybox .action-buttons .btn-add-cart,
.product-buybox .action-buttons .btn-buy-now,
.product-buybox .action-buttons .btn-favorite,
.product-buybox .action-buttons .btn-share {
    width: 100%;
}

/* 中〜小画面: 3カラムを解除して縦積み (購入ボックスは情報の下・sticky 解除) */
/* 2026-06-03: モバイル/タブレット専用レイアウト (PC の3カラムと順序を分離)。
   display:contents で .product-info / .product-buybox の box を解体し、配下の全ブロックを
   .product-layout(flex column) の直接 item にして order で自由に並べ替える。
   → 価格・バリエーション・在庫・数量・購入ボタン(購入導線)を上に、
     レビュー・ストアフォロー・返品ポリシー・通報・修理(二次情報)を下に。 */
@media (max-width: 1080px) {
    .product-layout {
        display: flex;
        flex-direction: column;
        gap: 12px;
        /* PC 3カラム用の align-items:start が flex 縦並びでは「内容幅で左寄せ→右に余白」に
           なるため、モバイルは stretch で各ブロックを全幅にする (2026-06-03 右余白バグ修正) */
        align-items: stretch;
    }
    /* base の .product-info{display:flex} を確実に上回るため子セレクタで特異度を上げる */
    .product-layout > .product-info,
    .product-layout > .product-buybox {
        display: contents;
    }

    /* 購入導線を上 → 二次情報を下 の順序。出品者ヘッダーは一番上 (ブランドの上)。 */
    .product-gallery            { order: 1; }
    .store-member-section       { order: 2; justify-content: flex-start; } /* モバイルは左寄せ */
    .badges-section             { order: 3; }
    .product-condition-badge    { order: 4; }
    .product-name               { order: 5; }
    .brand-name                 { order: 6; } /* 2026-06-04: ブランドは商品名の下 */
    .price-shipping-area        { order: 7; }
    #product-variant-chips      { order: 8; }
    #product-stock-status       { order: 9; }
    #product-variant-description { order: 10; }
    .product-delivery-info      { order: 11; }
    .benefits-area              { order: 12; }
    .product-quantity-row       { order: 13; }
    .action-buttons             { order: 14; }
    .review-section             { order: 15; }
    #product-offer-section      { order: 16; }
    .product-return-policy-link-wrap { order: 17; }
    .product-report-link-wrap   { order: 18; }
    #product-repair-section     { order: 19; }
}

/* Left Column: Image Gallery */
.product-gallery {
    position: sticky;
    top: 60px;
    height: fit-content;
    min-width: 0;
}

.main-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--geal-bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.thumbnail {
    aspect-ratio: 1 / 1;
    background: var(--geal-bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail:hover {
    border-color: var(--geal-accent-light);
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--geal-accent);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right Column: Product Info
   2026-06-03: 縦余白を圧縮し情報を詰める (Amazon 比較で間延び指摘)。各ブロックの
   margin-bottom と二重にならないよう gap を縮小。min-width:0 で grid blow-out 防止。 */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* 1. Certification Badges */
.badges-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 4px;
}

.cert-badge {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--geal-accent);
    color: #fff;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 2. Brand Name */
.brand-name {
    font-size: 0.95rem;
    color: #374151;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.brand-link {
    color: var(--geal-text-primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--geal-text-muted);
    transition: color var(--geal-transition, 0.2s ease), border-color var(--geal-transition, 0.2s ease);
}
.brand-link:hover {
    color: var(--geal-accent);
    border-bottom-color: var(--geal-accent);
}

/* レビュー件数のリンク */
.review-count .review-count-link {
    color: var(--geal-accent);
    text-decoration: none;
    cursor: pointer;
}
.review-count .review-count-link:hover { text-decoration: underline; }

.product-condition-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    margin: 0 0 6px 0;
    background: var(--geal-success-pale);
    color: var(--geal-success);
    border: 1px solid var(--geal-success-bg-light);
}
.product-condition-badge.condition-like_new { background: var(--geal-success-pale); color: var(--geal-success-hover); border-color: var(--geal-success-bg-light); }
.product-condition-badge.condition-good { background: var(--geal-info-pale); color: var(--geal-info-deep); border-color: var(--geal-info-bg); }
.product-condition-badge.condition-fair { background: var(--geal-warning-pale); color: var(--geal-warning-deep); border-color: var(--geal-warning-bg); }
.product-condition-badge.condition-poor { background: var(--geal-danger-pale); color: var(--geal-danger-hover); border-color: var(--geal-danger-bg-light); }

/* 3. Product Name */
.product-name {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--geal-text-primary);
    margin: 0 0 6px 0;
}

/* 4. Price & Shipping Area */
.price-shipping-area {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--geal-border);
}

.main-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--geal-price);
    margin: 0;
}

.shipping-info {
    font-size: 0.95rem;
    color: var(--geal-success-light);
    font-weight: 600;
}

/* 5. Benefits Area */
.benefits-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--geal-border);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--geal-text-secondary);
}

.benefit-icon {
    color: var(--geal-accent);
    font-size: 1rem;
}

.coupon-tag {
    display: inline-block;
    background: var(--geal-warning-pale);
    color: var(--geal-warning-text);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 4px;
}

/* 6. Review Section */
.review-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--geal-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-section:hover {
    background-color: var(--geal-bg-secondary);
    padding: 8px 12px;
    margin: 0 -12px 16px -12px;
    border-radius: 8px;
}

.star-rating {
    display: flex;
    gap: 2px;
    font-size: 1.1rem;
    color: var(--geal-star);
}

.rating-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--geal-text-primary);
}

.review-count {
    color: var(--geal-text-muted);
    font-size: 0.9rem;
}

/* 7. Store & Member Status */
.store-member-section {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 2026-06-04: PC は中央列の右寄せ (葉太指示) */
    gap: 8px;
    margin-bottom: 10px;
}

/* 未フォロー = 塗り (押させたい CTA) / フォロー中 = 灰色のミュート表示 (2026-06-04) */
.btn-follow-store {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--geal-accent);
    border-radius: 8px;
    background: var(--geal-accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-follow-store:hover {
    background: var(--geal-accent-hover);
    border-color: var(--geal-accent-hover);
}
.btn-follow-store.following {
    background: #fff;
    color: #6b7280;
    border-color: #d1d5db;
}
.btn-follow-store.following:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #9ca3af;
}

.store-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--geal-text-primary);
}

/* 出品者ヘッダー: フォローはショップ名の直後に詰める (2026-06-04) */
.store-member-section .btn-follow-store {
    margin-left: 4px;
    flex-shrink: 0;
}

.member-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-add-cart {
    flex: 1;
    padding: 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.btn-favorite {
    padding: 16px 24px;
    background: var(--geal-bg-card);
    border: 2px solid var(--geal-border);
    border-radius: 8px;
    color: #6b7280;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-favorite i {
    color: inherit;
}

.btn-favorite:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-share {
    padding: 16px 24px;
    background: var(--geal-bg-card);
    border: 2px solid var(--geal-border);
    border-radius: 8px;
    color: #6b7280;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share i {
    color: inherit;
}

.btn-share:hover {
    border-color: #6B21A8;
    color: #6B21A8;
}

/* Product Description (Full Width) */
.product-description {
    background: var(--geal-bg-card);
    padding: 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--geal-border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--geal-text-primary);
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--geal-accent);
}

.description-content {
    line-height: 1.8;
    color: var(--geal-text-secondary);
    font-size: 1rem;
}

.description-content p { margin: 0 0 16px 0; }
.description-content p:last-child { margin-bottom: 0; }

.allergen-info-section {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--geal-warning-pale);
    border: 2px solid var(--geal-warning);
    border-radius: 8px;
    font-size: 1rem;
}

.allergen-info-section strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--geal-warning-text);
    font-size: 1.05rem;
}

.allergen-icon {
    font-size: 1.3rem;
}

.allergen-info-text {
    margin: 8px 0 0 0;
    font-weight: 700;
    color: var(--geal-warning-darker);
    font-size: 1rem;
}

/* Phase 1c: アレルゲン 3 状態表示（含む / 不使用[Certified] / 未確認） */
.allergen-info-text .allergen-line {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.allergen-info-text .allergen-line:first-child {
    margin-top: 0;
}
.allergen-info-text .allergen-contains {
    color: var(--geal-warning-darker);
    font-weight: 700;
}
.allergen-info-text .allergen-free {
    color: #15803D;
    font-weight: 700;
}
.allergen-info-text .allergen-note,
.allergen-info-text .allergen-warn {
    font-weight: 500;
    font-size: 0.85rem;
    color: #6b7280;
}
.allergen-info-text .allergen-warn {
    color: var(--geal-warning-text);
}

/* Customer Reviews Section */
.customer-reviews-section {
    background: var(--geal-bg-card);
    padding: 28px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--geal-border);
    margin-top: 24px;
    scroll-margin-top: 60px;
}

.reviews-overview {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--geal-border);
}

.rating-summary {
    text-align: center;
}

.average-rating {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--geal-text-primary);
    line-height: 1;
    margin-bottom: 12px;
}

.summary-stars {
    font-size: 1.5rem;
    color: var(--geal-star);
    margin-bottom: 8px;
}

.total-reviews {
    color: var(--geal-text-muted);
    font-size: 0.95rem;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    font-size: 0.9rem;
    color: var(--geal-text-muted);
    min-width: 60px;
}

.bar-container {
    flex: 1;
    height: 20px;
    background: var(--geal-bg-muted);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.bar-percentage {
    font-size: 0.85rem;
    color: var(--geal-text-muted);
    min-width: 40px;
    text-align: right;
}

/* Review Cards */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.review-card {
    background: var(--geal-bg-secondary);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--geal-border);
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: var(--geal-accent-light);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reviewer-name {
    font-weight: 600;
    color: var(--geal-text-primary);
    font-size: 0.95rem;
}

.review-date {
    font-size: 0.85rem;
    color: var(--geal-text-faint);
}

.review-stars {
    display: flex;
    gap: 2px;
    color: var(--geal-star);
    font-size: 1rem;
}

.review-text {
    color: var(--geal-text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* View More Reviews Button */
.view-more-reviews {
    display: block;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.view-more-reviews:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.view-more-reviews i {
    margin-left: 8px;
}

/* Badge Click Styling */
.cert-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.cert-clickable:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.status-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.status-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Modal Optimization for Mobile */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        padding: 24px 20px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .modal-body {
        flex-direction: column;
        gap: 20px;
    }

    .modal-image-area img {
        width: 100px;
        height: auto;
    }

    .modal-text-area h3 {
        font-size: 1.1rem;
    }

    .modal-text-area p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .close-modal {
        font-size: 28px;
        top: 12px;
        right: 16px;
    }
}

/* Mobile Optimization (< 768px) */
@media (max-width: 768px) {
    .product-detail-container {
        padding: 8px 16px calc(var(--geal-bottom-nav-height) + 80px + env(safe-area-inset-bottom, 0px));
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    .thumbnail-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .badges-section {
        gap: 8px;
    }

    .cert-badge {
        height: 28px;
    }

    .status-badge {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .brand-name {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .product-name {
        font-size: 1.35rem;
        margin-bottom: 8px;
    }

    /* 2026-06-03: モバイルも詰める + 横並び。価格と送料は横一列に。 */
    .price-shipping-area {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 6px 12px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .main-price {
        font-size: 1.8rem;
    }

    .shipping-info {
        font-size: 0.9rem;
    }

    .benefits-area {
        gap: 6px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .benefit-item {
        font-size: 0.85rem;
    }

    .review-section {
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .star-rating {
        font-size: 1rem;
    }

    .rating-text {
        font-size: 0.95rem;
    }

    .review-count {
        font-size: 0.85rem;
    }

    /* 2026-06-04: 出品者ヘッダーはモバイルも横一列 (アイコン｜ショップ名 … フォロー) */
    .store-member-section {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 4px;
    }

    .store-name {
        font-size: 0.9rem;
    }

    .member-status {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn-add-cart,
    .btn-favorite,
    .btn-share {
        width: 100%;
        padding: 14px;
    }

    .product-description {
        padding: 24px 16px;
    }

    .customer-reviews-section {
        padding: 24px 16px;
        margin-top: 16px;
    }

    .reviews-overview {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 24px;
        padding-bottom: 24px;
    }

    .average-rating {
        font-size: 2.8rem;
    }

    .summary-stars {
        font-size: 1.2rem;
    }

    .rating-bar-row {
        gap: 8px;
    }

    .bar-label {
        min-width: 50px;
        font-size: 0.85rem;
    }

    .bar-container {
        height: 16px;
    }

    .bar-percentage {
        font-size: 0.8rem;
        min-width: 35px;
    }

    .review-card {
        padding: 16px;
    }

    .reviewer-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .reviewer-name {
        font-size: 0.9rem;
    }

    .review-date {
        font-size: 0.8rem;
    }

    .review-stars {
        font-size: 0.9rem;
    }

    .review-text {
        font-size: 0.9rem;
    }

    .view-more-reviews {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
}

/* ============================================================
   Stock status badge / message
   ============================================================ */
.product-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    margin: 0 0 12px 0;
    line-height: 1.2;
}
.product-stock-status.stock-out {
    background: var(--geal-danger-pale);
    color: var(--geal-danger-hover);
    border: 1px solid var(--geal-danger-bg-light);
}
.product-stock-status.stock-low {
    background: var(--geal-warning-pale);
    color: var(--geal-warning-text);
    border: 1px solid var(--geal-warning-bg);
}
.product-stock-status.stock-in {
    background: transparent;
    color: var(--geal-success);
    border: none;
    padding-left: 0;
    padding-right: 0;
}

/* ============================================================
   Earliest delivery info
   ============================================================ */
.product-delivery-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--geal-text-secondary);
    margin: 0 0 12px 0;
}
.product-delivery-info i { color: var(--geal-accent); }


/* ============================================================
   Store rating (next to store name)
   ============================================================ */
.store-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--geal-text-primary);
}
.store-rating i { color: var(--geal-star); font-size: 0.95rem; }
.store-rating .store-rating-count {
    font-weight: 400;
    color: var(--geal-text-muted);
    font-size: 0.85rem;
    margin-left: 2px;
}
.store-member-section .store-name {
    text-decoration: none;
    color: inherit;
}
.store-member-section .store-name:hover {
    color: var(--geal-accent);
    text-decoration: underline;
}

/* ストアアイコン (store.icon) */
.store-icon-link {
    display: inline-flex;
    flex-shrink: 0;
}
.store-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--geal-border, #e5e7eb);
    background: var(--geal-bg-secondary);
    transition: border-color 0.2s ease;
}
.store-icon-link:hover .store-icon {
    border-color: var(--geal-accent);
}

/* ============================================================
   Quantity selector
   ============================================================ */
.product-quantity-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}
.qty-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--geal-text-primary);
}
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--geal-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--geal-bg-card);
}
.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--geal-bg-card);
    color: var(--geal-text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.qty-btn:hover:not(:disabled) { background: var(--geal-bg-secondary); }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-input {
    width: 48px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--geal-border);
    border-right: 1px solid var(--geal-border);
    background: transparent;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--geal-text-primary);
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================================
   Action buttons (extends existing) — Buy Now button
   ============================================================ */
.btn-buy-now {
    flex: 1;
    padding: 16px;
    background: var(--geal-bg-card);
    color: var(--geal-accent);
    border: 2px solid var(--geal-accent);
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-buy-now:hover {
    background: var(--geal-accent);
    color: #fff;
    transform: translateY(-2px);
}
.btn-buy-now:disabled,
.btn-add-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================
   Related Products (こちらもおすすめ — 横スクロール)
   ============================================================ */
.related-products {
    margin: 24px 0;
    background: var(--geal-bg-card);
    padding: 28px 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--geal-border);
}
.related-products .section-title {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
}
.related-products-scroll .main-price {
    font-size: 12px;
}
.related-products-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.related-products-scroll::-webkit-scrollbar { height: 6px; }
.related-products-scroll::-webkit-scrollbar-thumb {
    background: var(--geal-border);
    border-radius: 3px;
}
.related-products-scroll > .product-item {
    flex: 0 0 auto;
    width: 160px;
    scroll-snap-align: start;
    position: relative;
}
.related-products-scroll > .related-skeleton-item {
    flex: 0 0 auto;
    width: 160px;
}
.related-products-scroll > .product-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: var(--geal-bg-secondary);
}
.related-products-scroll .minimal-overlay {
    padding: 6px 0 0;
}
@media (max-width: 768px) {
    .related-products {
        padding: 20px 16px;
    }
    .related-products-scroll > .product-item {
        width: 140px;
    }
}

/* ============================================================
   Section Navigation Bar (sticky tabs)
   ============================================================ */
.product-section-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--geal-bg-card);
    border-bottom: 1px solid var(--geal-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-120%);
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}
.product-section-nav.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.product-section-nav ul {
    display: flex;
    list-style: none;
    margin: 0 auto;
    padding: 0 16px;
    max-width: 1400px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.product-section-nav ul::-webkit-scrollbar { display: none; }
.product-section-nav li {
    flex: 0 0 auto;
}
.product-section-nav a {
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--geal-text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}
.product-section-nav a:hover {
    color: var(--geal-accent);
}
.product-section-nav a.active {
    color: var(--geal-accent);
    border-bottom-color: var(--geal-accent);
}
@media (max-width: 768px) {
    .product-section-nav a {
        padding: 10px 14px;
        font-size: 0.88rem;
    }
}

/* ============================================================
   Lightbox (image zoom overlay)
   ============================================================ */
.product-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.product-lightbox.is-open {
    display: flex;
}
.product-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   Variable thumbnail-grid (overrides legacy fixed 4-column)
   ============================================================ */
.thumbnail-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}
.thumbnail-grid:empty {
    display: none;
}
.thumbnail-grid.has-many {
    grid-template-columns: none;
    display: flex;
    overflow-x: auto;
    gap: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.thumbnail-grid.has-many .thumbnail {
    flex: 0 0 80px;
    scroll-snap-align: start;
}

/* ============================================================
   Mobile tweaks
   ============================================================ */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    .btn-buy-now {
        width: 100%;
        padding: 14px;
    }

    .store-member-section {
        flex-wrap: wrap;
    }
    .store-rating {
        font-size: 0.85rem;
    }
}

/* ========== 商品詳細アコーディオン（バッチ3.10B） ========== */
.product-details-sections {
    margin: 24px 0 0 0;
}

.pd-accordion {
    border-bottom: 1px solid var(--geal-border-light, #e5e7eb);
    background: var(--geal-bg-card, #fff);
}

.pd-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--geal-text-primary-full, #111827);
    user-select: none;
}

.pd-accordion summary::-webkit-details-marker { display: none; }
.pd-accordion summary::marker { content: ''; }

.pd-accordion-icon {
    transition: transform 0.2s ease;
    color: var(--geal-text-secondary, #6b7280);
}

.pd-accordion[open] .pd-accordion-icon {
    transform: rotate(180deg);
}

.pd-accordion-content {
    padding: 8px 0 16px 0;
    color: var(--geal-text-primary-full, #111827);
    line-height: 1.7;
}

.pd-highlights-list {
    margin: 0;
    padding-left: 20px;
}
.pd-highlights-list li {
    margin-bottom: 6px;
}

/* Phase 1c Step C-2 (2026-06-03): 商品FAQ (よくある質問) アコーディオン */
.pd-faq-list {
    border-top: 1px solid var(--geal-border-light, #e5e7eb);
}
.pd-faq-item .pd-accordion-title {
    display: inline-flex;
    align-items: baseline;
}
.pd-faq-q-marker,
.pd-faq-a-marker {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-right: 8px;
    transform: translateY(2px);
}
.pd-faq-q-marker {
    background: #f3e8ff;
    color: #6B21A8;
}
.pd-faq-a-marker {
    background: #dcfce7;
    color: #15803D;
}
.pd-faq-item .pd-accordion-content {
    display: flex;
}

.pd-spec-table {
    width: 100%;
    border-collapse: collapse;
}
.pd-spec-table tr {
    border-bottom: 1px solid var(--geal-border-light, #e5e7eb);
}
.pd-spec-table th {
    text-align: left;
    padding: 8px 12px 8px 0;
    font-weight: 500;
    color: var(--geal-text-secondary, #6b7280);
    width: 35%;
    vertical-align: top;
}
.pd-spec-table td {
    padding: 8px 0;
    color: var(--geal-text-primary-full, #111827);
}

.pd-brand-description {
    margin: 0;
    white-space: pre-wrap;
}

/* ============================================================
   Sticky Cart Bar
   .action-buttons が画面外にスクロールした時だけ表示
   ============================================================ */
.sticky-cart-bar {
    position: fixed;
    bottom: calc(var(--geal-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 998;
    background: var(--geal-bg-card);
    border-top: 1px solid var(--geal-border);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.07);
    transform: translateY(100%);
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}
.sticky-cart-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.sticky-cart-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    max-width: 1400px;
    margin: 0 auto;
}
.sticky-cart-bar__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.sticky-cart-bar__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--geal-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sticky-cart-bar__price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--geal-accent);
    font-family: var(--font-num);
}
.sticky-cart-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}
.sticky-cart-bar__btn:hover {
    opacity: 0.88;
}
.sticky-cart-bar__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
@media (min-width: 769px) {
    .sticky-cart-bar__inner {
        padding: 10px 24px;
    }
}

