/**
 * 農家さん紹介 詳細ページ専用スタイル
 */

.farmer-show {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 3rem;
}

.farmer-hero {
    position: relative;
    min-height: 320px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.farmer-hero-bg {
    position: absolute;
    inset: 0;
}

.farmer-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.farmer-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.farmer-hero-title {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    margin: 0;
}

.farmer-hero-catch {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.farmer-profile-section {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.farmer-profile-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ccfbf1;
}

.farmer-profile-section p,
.farmer-profile-section .text-block {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #334155;
}

.farmer-profile-section .profile-html {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #334155;
}

.farmer-profile-section .profile-html img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 農園情報・アクセスセクション */
.farmer-info-section {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.farmer-info-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ccfbf1;
}

.farmer-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .farmer-info-grid {
        grid-template-columns: 1fr;
    }
}

.farmer-info-block {
    min-width: 0;
}

.farmer-info-block h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.farmer-info-block .info-line {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #334155;
}

.farmer-info-block .info-line:last-child {
    margin-bottom: 0;
}

.farmer-info-block .info-icon {
    width: 1.5rem;
    flex-shrink: 0;
    text-align: center;
    color: #0d9488;
}

.farmer-info-block a {
    color: #0f766e;
    text-decoration: none;
    font-weight: 500;
}

.farmer-info-block a:hover {
    color: #0d9488;
    text-decoration: underline;
}

.farmer-map-wrap {
    margin-top: 0.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.farmer-map-wrap.farmer-map-wrap--link {
    padding: 1rem;
}

.farmer-map-wrap iframe {
    width: 100%;
    height: 220px;
    border: 0;
    display: block;
}

.farmer-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #0f766e;
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.farmer-map-link:hover {
    background: #0d9488;
    color: #fff !important;
    text-decoration: none !important;
}

.farmer-contact-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.farmer-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s;
}

.farmer-contact-btn.phone {
    background: #ecfdf5;
    color: #0f766e;
    border: 1px solid #a7f3d0;
}

.farmer-contact-btn.phone:hover {
    background: #d1fae5;
    color: #0d9488;
}

.farmer-contact-btn.email {
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.farmer-contact-btn.email:hover {
    background: #ccfbf1;
    color: #0d9488;
}

.farmer-contact-btn.web {
    background: #f0fdf4;
    color: #0f766e;
    border: 1px solid #86efac;
}

.farmer-contact-btn.web:hover {
    background: #dcfce7;
    color: #0d9488;
}

.farmer-contact-btn i {
    font-size: 1rem;
}

.farmer-avatar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.farmer-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0d9488;
}

.farmer-meta {
    font-size: 0.875rem;
    color: #64748b;
}

/* プロフィール内・詳細情報（郵便番号・住所・電話・メール・HP） */
.farmer-detail-info {
    font-size: 0.9rem;
}

.farmer-detail-line {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.farmer-detail-line:last-child {
    margin-bottom: 0;
}

.farmer-detail-label {
    flex-shrink: 0;
    width: 5.5em;
    font-weight: 600;
    color: #64748b;
    font-size: 0.85rem;
}

.farmer-detail-link,
.farmer-detail-line a {
    color: #0f766e;
    text-decoration: none;
}

.farmer-detail-link:hover,
.farmer-detail-line a:hover {
    color: #0d9488;
    text-decoration: underline;
}

.farmer-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* フォローボタン（ユーザープロフィールページと同じスタイル） */
.farmer-actions .follow-btn-wrap { flex-shrink: 0; }
.farmer-actions .follow-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
}
.farmer-actions .follow-loading i { font-size: 0.7rem; }
.farmer-actions .follow-btn-wrap .follow-btn--off { background: #fff; border: 1px solid #cbd5e1; color: #475569; }
.farmer-actions .follow-btn-wrap .follow-btn--off .follow-btn-heart { color: #cbd5e1; }
.farmer-actions .follow-btn-wrap.is-following .follow-btn--on,
.farmer-actions .follow-btn-wrap .follow-btn--on { background: #fff; border: 1px solid #e2e8f0; color: #475569; }
.farmer-actions .follow-btn-wrap.is-following .follow-btn--on .follow-btn-heart,
.farmer-actions .follow-btn-wrap .follow-btn--on .follow-btn-heart { color: #dc2626; }

/* いいねボタン（journal/show と同じスタイル） */
.journal-like-btn {
    border: none;
    background: transparent;
    padding: 0.35rem 0.5rem;
    font-size: 0.95rem;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.journal-like-btn .journal-like-icon { color: #94a3b8; }
.journal-like-btn.active .journal-like-icon { color: #dc2626; }

.farmer-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.farmer-share-wrap {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.farmer-share-wrap .farmer-share-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.farmer-share-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.farmer-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.farmer-share-btn:hover {
    transform: scale(1.1);
    opacity: 0.95;
    color: #fff;
}

.farmer-share-btn.fb {
    background: #1877f2;
}

.farmer-share-btn.line {
    background: #00b900;
}

.farmer-share-btn.x {
    background: #000;
}

.farmer-share-btn.ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.farmer-share-btn.copy {
    background: #64748b;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.farmer-share-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #0f766e;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.farmer-share-toast.show {
    opacity: 1;
}

/* フォトギャラリー：日誌ページ（journal/show）と同じスタイル */
.farmer-gallery-wrap {
    margin-top: 0.5rem;
    overflow: hidden;
    background: transparent;
}

.farmer-gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 320px;
    max-height: 85vh;
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    background: #f3f4f6;
}

.farmer-gallery-swiper-main {
    width: 100%;
    height: 100%;
}

.farmer-gallery-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.farmer-gallery-main .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: middle;
    pointer-events: none;
}

.farmer-gallery-thumbs-wrap {
    padding: 0.75rem 0 1rem 0;
    margin-bottom: 0;
    background: transparent;
    border-top: none;
}

.farmer-gallery-thumbs {
    width: 100%;
    height: 72px;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.farmer-gallery-thumbs .swiper-slide {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s, opacity 0.2s;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.farmer-gallery-thumbs .swiper-slide:hover {
    opacity: 0.9;
}

.farmer-gallery-thumbs .swiper-slide-thumb-active {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.farmer-gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 全画面フォトビューア（journal/show と同じデザイン） */
.farmer-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    touch-action: pan-y pinch-zoom;
}

.farmer-fullscreen.is-open {
    display: flex;
}

.farmer-fullscreen-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.farmer-fullscreen-close:hover {
    background: rgba(255,255,255,0.3);
}

.farmer-fullscreen-slider {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.farmer-fullscreen-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.farmer-fullscreen-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.farmer-fullscreen-slide img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.farmer-fullscreen-prev,
.farmer-fullscreen-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.25rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.farmer-fullscreen-prev:hover,
.farmer-fullscreen-next:hover {
    background: rgba(255,255,255,0.4);
}

.farmer-fullscreen-prev {
    left: 1rem;
}

.farmer-fullscreen-next {
    right: 1rem;
}

.farmer-fullscreen-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.farmer-journal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.farmer-journal-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.farmer-journal-item:last-child {
    border-bottom: none;
}

.farmer-journal-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.farmer-journal-item a:hover {
    color: #0f766e;
}

.farmer-journal-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.farmer-journal-date {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.farmer-journal-title {
    font-weight: 600;
    color: #1e293b;
}

.farmer-journal-body {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.farmer-comments {
    margin-top: 1rem;
}

.farmer-comment {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.farmer-comment:last-child {
    border-bottom: none;
}

.farmer-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.farmer-comment-body {
    font-size: 0.9rem;
}

.farmer-comment-name {
    font-weight: 600;
    color: #334155;
    margin-bottom: 2px;
}

.farmer-comment-text {
    color: #475569;
}

.farmer-comment-time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

#comments {
    scroll-margin-top: 1rem;
}

/* 農家さんページ内 商品カード */
.farmer-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}
.farmer-product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.farmer-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.farmer-product-photo {
    aspect-ratio: 4/3;
    background: #e2e8f0;
    overflow: hidden;
}
.farmer-product-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.farmer-product-body {
    padding: 0.6rem 0.8rem 0.8rem;
}
.farmer-product-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 0.15rem;
}
.farmer-product-price {
    font-size: 0.85rem;
    color: #111827;
    margin-bottom: 0.15rem;
}
.farmer-product-cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0d9488;
}

