@import url('/css/variables.css');

/* ============================================================
   Smartmart 修理ページ — サイドバーフィルター付きレイアウト
   prefix: rp-
   ============================================================ */

/* --- Section / Container --- */
.rp-section {
    padding: 24px 0 80px;
    min-height: 60vh;
}

.rp-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Page Header --- */
.rp-header {
    text-align: center;
    margin-bottom: 40px;
}

.rp-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.rp-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Features Row --- */
.rp-features-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.rp-feature-item {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.rp-feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 20px;
}

.rp-feature-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rp-feature-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* --- Layout: Sidebar + Grid --- */
.rp-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 48px;
}

/* --- Sidebar --- */
.rp-sidebar {
    position: sticky;
    top: 140px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.rp-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.rp-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rp-filter-reset {
    font-size: 12px;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.rp-filter-reset:hover {
    color: var(--primary-color);
}

.rp-filter-group {
    margin-bottom: 20px;
}

.rp-filter-group:last-child {
    margin-bottom: 0;
}

.rp-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.rp-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* --- Pill Buttons --- */
.rp-pill {
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.rp-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.rp-pill.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- Main Content Area --- */
.rp-main {
    min-width: 0;
}

/* --- Toolbar --- */
.rp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.rp-result-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.rp-result-count span {
    font-weight: 700;
    color: var(--text-primary);
}

.rp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rp-sidebar-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.rp-sort-select {
    padding: 8px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

/* --- Active Filters --- */
.rp-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.rp-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.rp-active-tag:hover {
    opacity: 0.8;
}

/* --- Card Grid --- */
.rp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* --- Card --- */
.rp-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
}

.rp-card:hover {
    box-shadow: inset 0 0 0 1px var(--border-color, #ddd);
}

.rp-card-image {
    background: var(--bg-tertiary);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.rp-card-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rp-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
}

.rp-card-brand {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.rp-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.rp-card-price-label {
    font-size: 11px;
    color: var(--text-light);
}

.rp-card-price-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

.rp-card-cta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 12px;
    transition: gap 0.2s;
}

.rp-card:hover .rp-card-cta {
    gap: 8px;
}

/* --- Empty State --- */
.rp-empty {
    text-align: center;
    padding: 60px 20px;
}

.rp-empty-icon {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.rp-empty-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* --- Process --- */
.rp-process {
    margin-bottom: 48px;
}

.rp-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 32px;
}

.rp-process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.rp-process-item {
    text-align: center;
}

.rp-process-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
}

.rp-process-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.rp-process-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- CTA Banner --- */
.rp-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
}

.rp-cta-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.rp-cta-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
}

.rp-cta-actions {
    flex-shrink: 0;
}

/* --- Buttons --- */
.rp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.rp-btn-white {
    background: #fff;
    color: var(--primary-color);
}

.rp-btn-white:hover {
    background: var(--bg-secondary);
    color: var(--primary-dark);
}

.rp-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.rp-btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .rp-section {
        padding: 16px 0 60px;
    }

    .rp-title {
        font-size: 24px;
    }

    .rp-features-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .rp-layout {
        grid-template-columns: 1fr;
    }

    .rp-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        border-radius: 0;
        overflow-y: auto;
        padding: 24px;
    }

    .rp-sidebar.open {
        display: block;
    }

    .rp-sidebar-toggle {
        display: flex;
    }

    .rp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .rp-process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rp-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        gap: 20px;
    }

    .rp-cta-actions {
        width: 100%;
    }

    .rp-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .rp-features-row {
        grid-template-columns: 1fr;
    }

    .rp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rp-process-grid {
        grid-template-columns: 1fr;
    }
}

