@charset "UTF-8";
/*
    Template: swell
    Theme Name: Byemo Child
    Theme URI: https://byemo.jp/
    Description: バイモ - 仲介手数料0%の個人間自動車売買プラットフォーム（SWELL子テーマ）
    Version: 1.0.0
    Author: Byemo Inc.
*/

:root {
    --byemo-primary: #2563eb;
    --byemo-primary-hover: #1d4ed8;
    --byemo-secondary: #64748b;
    --byemo-success: #059669;
    --byemo-danger: #dc2626;
    --byemo-background: #f1f5f9;
    --byemo-card: #ffffff;
    --byemo-border: #e2e8f0;
    --byemo-radius: 8px;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #1e293b;
    background-color: var(--byemo-background);
}

.byemo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===================================
   Common Components
   =================================== */
.byemo-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: 0.2s; }
.byemo-btn--primary { background: var(--byemo-primary); color: white; }
.byemo-btn--primary:hover { background: var(--byemo-primary-hover); }
.byemo-btn--outline { background: transparent; border: 1px solid #e2e8f0; color: inherit; }
.byemo-btn--full { width: 100%; }
.byemo-btn--large { padding: 1rem 2.5rem; font-size: 1.125rem; }

/* ===================================
   Search Form V4
   =================================== */
.byemo-search-form-v4 { background: #fff; padding: 1rem; border-radius: 12px; margin-bottom: 2rem; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.search-form-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.search-form-row--sub { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed #e2e8f0; }
.search-item { flex: 1; min-width: 150px; }
.search-item label { display: block; font-size: 0.75rem; font-weight: bold; color: #64748b; margin-bottom: 0.25rem; }
.search-item select, .search-item input { width: 100%; padding: 0.5rem; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 0.875rem; background: #f8fafc; }
.search-item--btn { flex: 0 0 100px; }
.clear-link { font-size: 0.75rem; color: #94a3b8; text-decoration: none; }

/* ===================================
   Grid & Card V4 (Instagram Style)
   =================================== */
.byemo-car-grid-v4 { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 0.75rem; 
}

/* Home Page specific 3-column grid */
.home-new-cars-grid .byemo-car-grid-v4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.byemo-card-v4 { position: relative; background: #fff; border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; }
.byemo-card-v4__link { display: block; height: 100%; }
.byemo-card-v4__image-wrapper { position: relative; width: 100%; height: 100%; }
.byemo-card-v4__image { width: 100%; height: 100%; object-fit: cover; }

/* SOLD / 商談中 Ribbon (Large V4) */
.byemo-card-v4__sold-badge, .byemo-card-v4__reserved-badge {
    position: absolute; top: 0; left: 0; z-index: 20; width: 100px; height: 100px; overflow: hidden; pointer-events: none;
}
.byemo-card-v4__sold-badge::before, .byemo-card-v4__reserved-badge::before {
    content: ""; position: absolute; top: -50px; left: -50px; width: 100px; height: 100px; transform: rotate(-45deg);
}
.byemo-card-v4__sold-badge::before { background: #ef4444; }
.byemo-card-v4__reserved-badge::before { background: #3b82f6; }

.byemo-card-v4__sold-badge span, .byemo-card-v4__reserved-badge span {
    position: absolute; top: 15px; left: -15px; width: 100px; transform: rotate(-45deg);
    text-align: center; color: #fff; font-weight: 900; font-size: 0.85rem; letter-spacing: 0.05em; text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Card Info Overlay */
.byemo-card-v4__overlay { position: absolute; bottom: 0; left: 0; right: 0; top: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%); display: flex; flex-direction: column; justify-content: space-between; padding: 0.75rem; color: #fff; }
.byemo-card-v4__top-info { display: flex; justify-content: flex-end; gap: 0.25rem; }
.byemo-card-v4__seller-tag { font-size: 0.6rem; font-weight: bold; padding: 0.1rem 0.4rem; border-radius: 4px; }
.byemo-card-v4__seller-tag.is-indiv { background: #059669; }
.byemo-card-v4__seller-tag.is-biz { background: #2563eb; }
.byemo-card-v4__area-tag { font-size: 0.6rem; background: rgba(0,0,0,0.5); padding: 0.1rem 0.4rem; border-radius: 4px; }
.byemo-card-v4__bottom-info { overflow: hidden; }
.byemo-card-v4__title { font-size: 0.85rem; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.byemo-card-v4__price { font-size: 1.1rem; font-weight: 800; color: #fff; }

/* ===================================
   Improved Car Detail Page
   =================================== */
.byemo-car-detail-page { padding: 2rem 0; background: #f8fafc; }
.byemo-detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }

.byemo-detail-section { background: #fff; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.byemo-detail-section h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 1.25rem; color: #1e293b; border-left: 4px solid var(--byemo-primary); padding-left: 0.75rem; }
.byemo-page-title { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; color: #0f172a; line-height: 1.3; }

/* Gallery */
.byemo-gallery { margin-bottom: 2rem; }
.byemo-gallery__main { position: relative; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); width: 100%; aspect-ratio: 4 / 3; }
.byemo-gallery__main img { width: 100%; height: 100%; object-fit: contain; background: #f8fafc; display: block; }
.byemo-gallery__thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; }
.byemo-gallery__thumbs img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.byemo-gallery__thumbs img.active { border-color: var(--byemo-primary); }
.sold-overlay-ribbon { position: absolute; top: 20px; left: -30px; background: #ef4444; color: #fff; padding: 0.5rem 3rem; transform: rotate(-45deg); font-weight: 900; z-index: 10; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

/* Specs Grid */
.byemo-specs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.spec-item { background: #f8fafc; padding: 1rem; border-radius: 8px; text-align: center; border: 1px solid #e2e8f0; }
.spec-label { font-size: 0.75rem; color: #64748b; margin-bottom: 0.25rem; font-weight: bold; }
.spec-value { font-weight: 800; color: #1e293b; font-size: 1rem; }

.byemo-detail-header__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.byemo-detail-header__tags .tag { background: #e2e8f0; color: #475569; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }

/* Sidebar Cards */
.byemo-sidebar-card { background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); margin-bottom: 1.5rem; border: 1px solid #e2e8f0; }
.byemo-price-card .price-label { font-size: 0.85rem; color: #64748b; margin-bottom: 0.5rem; }
.byemo-price-card .price-value { font-size: 2.25rem; font-weight: 900; color: var(--byemo-primary); line-height: 1; }
.byemo-price-card .price-value span { font-size: 1rem; margin-left: 0.2rem; }
.byemo-price-card .price-notice { color: #059669; font-weight: 800; font-size: 0.875rem; margin: 1rem 0; }

.trust-badge {
    color: #2563eb;
    font-weight: 900;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.trust-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}

.seller-header { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.seller-avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid #f1f5f9; }
.seller-name { font-weight: 800; font-size: 1.1rem; line-height: 1.2; }
.seller-type { font-size: 0.75rem; color: #64748b; margin-top: 0.2rem; }

.seller-stats { display: flex; gap: 1rem; margin-bottom: 1.25rem; padding: 0.75rem; background: #f8fafc; border-radius: 8px; justify-content: space-around; }
.stat-item { text-align: center; }
.stat-item .label { display: block; font-size: 0.65rem; color: #64748b; font-weight: bold; }
.stat-item .value { font-weight: 800; font-size: 1rem; }
.seller-business-info { font-size: 0.85rem; line-height: 1.6; border-top: 1px solid #f1f5f9; padding-top: 1rem; }

.sold-status-box { background: #f1f5f9; color: #94a3b8; padding: 1rem; border-radius: 8px; text-align: center; font-weight: 800; font-size: 1.25rem; }

/* ===================================
   Home Page V2
   =================================== */
.home-hero-compact { background: #fff; padding: 2.5rem 0; border-bottom: 1px solid #e2e8f0; margin-bottom: 2rem; }
.home-hero-compact h1 { font-size: 1.75rem; font-weight: 800; color: #0f172a; margin-bottom: 0.5rem; }
.home-hero-compact p { color: #64748b; font-size: 1.1rem; }

.home-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.home-section { background: #fff; border-radius: 12px; padding: 1.5rem; margin-bottom: 2rem; border: 1px solid #e2e8f0; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.25rem; }
.section-header h2 { font-size: 1.25rem; font-weight: 800; margin: 0; color: #1e293b; }
.view-all { font-size: 0.875rem; color: var(--byemo-primary); font-weight: 600; text-decoration: none; }

.make-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
.make-item { display: flex; justify-content: space-between; padding: 0.75rem; background: #f8fafc; border-radius: 6px; text-decoration: none; color: #475569; font-size: 0.9rem; transition: 0.2s; }
.make-item:hover { background: #eff6ff; color: var(--byemo-primary); }
.make-count { color: #94a3b8; font-size: 0.8rem; }

.model-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
.model-item { padding: 0.6rem; font-size: 0.85rem; color: #475569; text-decoration: none; border: 1px solid #f1f5f9; border-radius: 4px; text-align: center; }
.model-item:hover { background: #f1f5f9; color: var(--byemo-primary); }

.sidebar-section { background: #fff; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.5rem; border: 1px solid #e2e8f0; }
.sidebar-section h3 { font-size: 1rem; font-weight: 800; margin-bottom: 1rem; border-left: 4px solid var(--byemo-primary); padding-left: 0.75rem; }

.news-list { display: flex; flex-direction: column; gap: 0.75rem; }
.news-item { display: flex; gap: 0.75rem; text-decoration: none; color: #334155; font-size: 0.875rem; }
.news-date { color: #94a3b8; flex-shrink: 0; }
.news-title:hover { text-decoration: underline; }

.guide-links { display: flex; flex-direction: column; gap: 1rem; }
.guide-card { display: flex; gap: 1rem; text-decoration: none; color: inherit; padding: 0.75rem; background: #f8fafc; border-radius: 8px; transition: 0.2s; }
.guide-card:hover { background: #eff6ff; }
.guide-icon { font-size: 1.5rem; flex-shrink: 0; }
.guide-title { font-weight: 800; font-size: 0.9rem; }
.guide-desc { font-size: 0.75rem; color: #64748b; margin-top: 0.2rem; }

.area-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.area-link { font-size: 0.8rem; color: #475569; text-decoration: none; padding: 0.3rem 0.6rem; background: #f1f5f9; border-radius: 4px; }
.area-link:hover { background: #e2e8f0; }

/* ===================================
   Mercari Style Comments
   =================================== */
.comment-count-header { font-weight: 800; font-size: 1.1rem; margin-bottom: 1.5rem; color: #1e293b; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-body { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.comment-avatar img { border-radius: 50%; width: 48px; height: 48px; background: #e2e8f0; }
.comment-text-bubble { flex: 1; background: #f1f5f9; padding: 1rem; border-radius: 12px; position: relative; }
.comment-text-bubble::before { content: ""; position: absolute; left: -8px; top: 15px; border-width: 8px 8px 8px 0; border-style: solid; border-color: transparent #f1f5f9 transparent transparent; }

.comment-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.comment-author-name { font-weight: 800; font-size: 0.85rem; color: #1e293b; }
.author-badge { background: #ef4444; color: #fff; font-size: 0.65rem; font-weight: 800; padding: 0.1rem 0.4rem; border-radius: 4px; }
.comment-date { font-size: 0.75rem; color: #94a3b8; margin-left: auto; }
.comment-content-text { font-size: 0.95rem; line-height: 1.6; color: #334155; }

.comment-form-container { margin-top: 2rem; padding-top: 2rem; border-top: 2px solid #f1f5f9; }
.comment-tip { background: #fffbeb; color: #92400e; padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.8rem; margin-bottom: 1rem; border: 1px solid #fef3c7; }
.comment-form-field textarea { width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1rem; background: #f8fafc; resize: vertical; }
.comment-login-promo { text-align: center; padding: 2rem; background: #f8fafc; border-radius: 12px; border: 2px dashed #e2e8f0; }

/* ===================================
   Responsive
   =================================== */
@media (max-width: 900px) {
    .byemo-detail-layout { grid-template-columns: 1fr; }
    .byemo-detail-sidebar { order: -1; }
    .home-layout { grid-template-columns: 1fr; }
    .home-sidebar { order: 2; }
}

@media (max-width: 600px) {
    .byemo-car-grid-v4 { grid-template-columns: repeat(2, 1fr); gap: 0.25rem; }
    .home-new-cars-grid .byemo-car-grid-v4 { grid-template-columns: repeat(3, 1fr) !important; gap: 2px !important; }
    .home-new-cars-grid .byemo-card-v4__overlay { padding: 0.25rem; }
    .home-new-cars-grid .byemo-card-v4__title { font-size: 0.55rem; }
    .home-new-cars-grid .byemo-card-v4__price { font-size: 0.7rem; }
    .home-new-cars-grid .byemo-card-v4__seller-tag,
    .home-new-cars-grid .byemo-card-v4__area-tag { font-size: 0.45rem; padding: 0 0.1rem; }
    
    .byemo-card-v4__sold-badge, .byemo-card-v4__reserved-badge { width: 70px; height: 70px; }
    .byemo-card-v4__sold-badge::before, .byemo-card-v4__reserved-badge::before { top: -35px; left: -35px; width: 70px; height: 70px; }
    .byemo-card-v4__sold-badge span, .byemo-card-v4__reserved-badge span { top: 10px; left: -10px; width: 75px; font-size: 0.6rem; }
    
    .byemo-specs-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .byemo-page-title { font-size: 1.5rem; }
}

/* Cleanup SWELL */
.p-sidebar, .c-subTitle, .p-pageHeader, .p-breadcrumb { display: none !important; }
.l-main { padding: 0 !important; }
